WooCommerce Wishlist Plugin - Version 1.9.3

Version Description

Release Date - 1 November 2018

  • Fixed an issue with product name in WooCommerce notice if add to cart validation failed
  • Improved compatibility with WooCommerce Product Add-ons plugin
Download this release

Release Info

Developer templateinvaders
Plugin Icon 128x128 WooCommerce Wishlist Plugin
Version 1.9.3
Comparing to
See all releases

Code changes from version 1.9.2 to 1.9.3

assets/css/admin-form.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/css/admin-setup.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/css/admin.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/css/public.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/css/theme.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
assets/js/public.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.9.2
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.9.3
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: WooCommerce Wishlist Plugin {{ VERSION }}\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/ti-woocommerce-wishlist\n"
8
- "POT-Creation-Date: 2018-10-24 20:55:27+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
5
  "Project-Id-Version: WooCommerce Wishlist Plugin {{ VERSION }}\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/ti-woocommerce-wishlist\n"
8
+ "POT-Creation-Date: 2018-11-01 20:48:41+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
public/wishlist/buttons.class.php CHANGED
@@ -293,7 +293,7 @@ class TInvWL_Public_Wishlist_Buttons {
293
  if ( $add ) {
294
  $result = tinv_array_merge( $result, $add );
295
  } else {
296
- $errors[] = $_product['product_id'];
297
  }
298
  }
299
 
@@ -419,7 +419,7 @@ class TInvWL_Public_Wishlist_Buttons {
419
  if ( $add ) {
420
  $result = tinv_array_merge( $result, $add );
421
  } else {
422
- $errors[] = $id['product_id'];
423
  }
424
  }
425
  if ( ! empty( $errors ) ) {
293
  if ( $add ) {
294
  $result = tinv_array_merge( $result, $add );
295
  } else {
296
+ $errors[] = $product_data->get_id();
297
  }
298
  }
299
 
419
  if ( $add ) {
420
  $result = tinv_array_merge( $result, $add );
421
  } else {
422
+ $errors[] = $_product['variation_id'] ? $_product['variation_id'] : $_product['product_id'];
423
  }
424
  }
425
  if ( ! empty( $errors ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpr
4
  Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, ecommerce
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
- Stable tag: 1.9.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -130,6 +130,12 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
130
 
131
 
132
  == Changelog ==
 
 
 
 
 
 
133
  = 1.9.2 =
134
  *Release Date - 24 October 2018*
135
 
4
  Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, ecommerce
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
+ Stable tag: 1.9.3
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
130
 
131
 
132
  == Changelog ==
133
+ = 1.9.3 =
134
+ *Release Date - 1 November 2018*
135
+
136
+ * Fixed an issue with product name in WooCommerce notice if add to cart validation failed
137
+ * Improved compatibility with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
138
+
139
  = 1.9.2 =
140
  *Release Date - 24 October 2018*
141
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WooCommerce Wishlist Plugin
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 1.9.2
8
  * Requires at least: 4.5
9
  * Tested up to: 4.9
10
  * WC requires at least: 2.6
@@ -41,7 +41,7 @@ if ( ! defined( 'TINVWL_DOMAIN' ) ) {
41
  }
42
 
43
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
44
- define( 'TINVWL_FVERSION', '1.9.2' );
45
  }
46
 
47
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
4
  * Plugin Name: WooCommerce Wishlist Plugin
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
+ * Version: 1.9.3
8
  * Requires at least: 4.5
9
  * Tested up to: 4.9
10
  * WC requires at least: 2.6
41
  }
42
 
43
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
44
+ define( 'TINVWL_FVERSION', '1.9.3' );
45
  }
46
 
47
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
tinv-wishlists-function-integration.php CHANGED
@@ -1740,17 +1740,21 @@ if ( ! function_exists( 'tinv_wishlist_item_meta_woocommerce_product_addons' ) )
1740
 
1741
  $id = ( $variation_id ) ? $variation_id : $product_id;
1742
 
1743
- $product_addons = get_product_addons( $id );
 
 
 
 
1744
 
1745
  if ( $product_addons ) {
1746
 
1747
 
1748
  foreach ( $product_addons as $addon ) {
1749
  foreach ( $addon['options'] as $option ) {
1750
- $original_data = 'addon-' . $addon['field-name'];
1751
 
1752
  if ( 'file_upload' === $addon['type'] ) {
1753
- $original_data = 'addon-' . $addon['field-name'] . '-' . sanitize_title( $option['label'] );
1754
  }
1755
 
1756
  $value = isset( $item_data[ $original_data ] ) ? $item_data[ $original_data ]['display'] : '';
@@ -1765,31 +1769,39 @@ if ( ! function_exists( 'tinv_wishlist_item_meta_woocommerce_product_addons' ) )
1765
  } else {
1766
  $value = stripslashes( $value );
1767
  }
1768
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/abstract-class-product-addon-field.php' );
1769
  switch ( $addon['type'] ) {
1770
- case 'checkbox' :
1771
- case 'radiobutton' :
1772
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-list.php' );
1773
- $field = new Product_Addon_Field_List( $addon, $value );
 
 
 
 
 
 
 
 
 
 
 
 
1774
  break;
1775
- case 'custom' :
1776
- case 'custom_textarea' :
1777
- case 'custom_price' :
1778
- case 'custom_letters_only' :
1779
- case 'custom_digits_only' :
1780
- case 'custom_letters_or_digits' :
1781
- case 'custom_email' :
1782
- case 'input_multiplier' :
1783
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-custom.php' );
1784
- $field = new Product_Addon_Field_Custom( $addon, $value );
1785
  break;
1786
- case 'select' :
1787
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-select.php' );
1788
- $field = new Product_Addon_Field_Select( $addon, $value );
1789
  break;
1790
- case 'file_upload' :
1791
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-file-upload.php' );
1792
- $field = new Product_Addon_Field_File_Upload( $addon, $value, false );
1793
  break;
1794
  }
1795
 
@@ -1835,7 +1847,12 @@ if ( ! function_exists( 'tinvwl_item_price_woocommerce_product_addons' ) ) {
1835
 
1836
  if ( class_exists( 'WC_Product_Addons' ) ) {
1837
 
1838
- $product_addons = get_product_addons( $product->get_id() );
 
 
 
 
 
1839
 
1840
  if ( $product_addons ) {
1841
 
@@ -1843,7 +1860,7 @@ if ( ! function_exists( 'tinvwl_item_price_woocommerce_product_addons' ) ) {
1843
 
1844
  foreach ( $product_addons as $addon ) {
1845
 
1846
- $original_data = 'addon-' . $addon['field-name'];
1847
 
1848
  $value = isset( $wl_product['meta'][ $original_data ] ) ? $wl_product['meta'][ $original_data ] : '';
1849
  if ( $value == '' ) {
@@ -1856,31 +1873,39 @@ if ( ! function_exists( 'tinvwl_item_price_woocommerce_product_addons' ) ) {
1856
  } else {
1857
  $value = stripslashes( $value );
1858
  }
1859
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/abstract-class-product-addon-field.php' );
1860
  switch ( $addon['type'] ) {
1861
- case 'checkbox' :
1862
- case 'radiobutton' :
1863
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-list.php' );
1864
- $field = new Product_Addon_Field_List( $addon, $value );
 
 
 
 
 
 
 
 
 
 
 
 
1865
  break;
1866
- case 'custom' :
1867
- case 'custom_textarea' :
1868
- case 'custom_price' :
1869
- case 'custom_letters_only' :
1870
- case 'custom_digits_only' :
1871
- case 'custom_letters_or_digits' :
1872
- case 'custom_email' :
1873
- case 'input_multiplier' :
1874
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-custom.php' );
1875
- $field = new Product_Addon_Field_Custom( $addon, $value );
1876
  break;
1877
- case 'select' :
1878
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-select.php' );
1879
- $field = new Product_Addon_Field_Select( $addon, $value );
1880
  break;
1881
- case 'file_upload' :
1882
- include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-product-addon-field-file-upload.php' );
1883
- $field = new Product_Addon_Field_File_Upload( $addon, $value, false );
1884
  break;
1885
  }
1886
 
1740
 
1741
  $id = ( $variation_id ) ? $variation_id : $product_id;
1742
 
1743
+ if ( function_exists( 'get_product_addons' ) ) {
1744
+ $product_addons = get_product_addons( $id );
1745
+ } else {
1746
+ $product_addons = WC_Product_Addons_Helper::get_product_addons( $id );
1747
+ }
1748
 
1749
  if ( $product_addons ) {
1750
 
1751
 
1752
  foreach ( $product_addons as $addon ) {
1753
  foreach ( $addon['options'] as $option ) {
1754
+ $original_data = 'addon-' . $addon['field_name'];
1755
 
1756
  if ( 'file_upload' === $addon['type'] ) {
1757
+ $original_data = 'addon-' . $addon['field_name'] . '-' . sanitize_title( $option['label'] );
1758
  }
1759
 
1760
  $value = isset( $item_data[ $original_data ] ) ? $item_data[ $original_data ]['display'] : '';
1769
  } else {
1770
  $value = stripslashes( $value );
1771
  }
1772
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/abstract-wc-product-addons-field.php' );
1773
  switch ( $addon['type'] ) {
1774
+ case 'checkbox':
1775
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-list.php' );
1776
+ $field = new WC_Product_Addons_Field_List( $addon, $value );
1777
+ break;
1778
+ case 'multiple_choice':
1779
+ switch ( $addon['display'] ) {
1780
+ case 'radiobutton':
1781
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-list.php' );
1782
+ $field = new WC_Product_Addons_Field_List( $addon, $value );
1783
+ break;
1784
+ case 'images':
1785
+ case 'select':
1786
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-select.php' );
1787
+ $field = new WC_Product_Addons_Field_Select( $addon, $value );
1788
+ break;
1789
+ }
1790
  break;
1791
+ case 'custom_text':
1792
+ case 'custom_textarea':
1793
+ case 'custom_price':
1794
+ case 'input_multiplier':
1795
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-custom.php' );
1796
+ $field = new WC_Product_Addons_Field_Custom( $addon, $value );
 
 
 
 
1797
  break;
1798
+ case 'file_upload':
1799
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-file-upload.php' );
1800
+ $field = new WC_Product_Addons_Field_File_Upload( $addon, $value );
1801
  break;
1802
+ default:
1803
+ // Continue to the next field in case the type is not recognized (instead of causing a fatal error)
1804
+ continue;
1805
  break;
1806
  }
1807
 
1847
 
1848
  if ( class_exists( 'WC_Product_Addons' ) ) {
1849
 
1850
+
1851
+ if ( function_exists( 'get_product_addons' ) ) {
1852
+ $product_addons = get_product_addons( $product->get_id() );
1853
+ } else {
1854
+ $product_addons = WC_Product_Addons_Helper::get_product_addons( $product->get_id() );
1855
+ }
1856
 
1857
  if ( $product_addons ) {
1858
 
1860
 
1861
  foreach ( $product_addons as $addon ) {
1862
 
1863
+ $original_data = 'addon-' . $addon['field_name'];
1864
 
1865
  $value = isset( $wl_product['meta'][ $original_data ] ) ? $wl_product['meta'][ $original_data ] : '';
1866
  if ( $value == '' ) {
1873
  } else {
1874
  $value = stripslashes( $value );
1875
  }
1876
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/abstract-wc-product-addons-field.php' );
1877
  switch ( $addon['type'] ) {
1878
+ case 'checkbox':
1879
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-list.php' );
1880
+ $field = new WC_Product_Addons_Field_List( $addon, $value );
1881
+ break;
1882
+ case 'multiple_choice':
1883
+ switch ( $addon['display'] ) {
1884
+ case 'radiobutton':
1885
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-list.php' );
1886
+ $field = new WC_Product_Addons_Field_List( $addon, $value );
1887
+ break;
1888
+ case 'images':
1889
+ case 'select':
1890
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-select.php' );
1891
+ $field = new WC_Product_Addons_Field_Select( $addon, $value );
1892
+ break;
1893
+ }
1894
  break;
1895
+ case 'custom_text':
1896
+ case 'custom_textarea':
1897
+ case 'custom_price':
1898
+ case 'input_multiplier':
1899
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-custom.php' );
1900
+ $field = new WC_Product_Addons_Field_Custom( $addon, $value );
 
 
 
 
1901
  break;
1902
+ case 'file_upload':
1903
+ include_once( WP_PLUGIN_DIR . '/woocommerce-product-addons/includes/fields/class-wc-product-addons-field-file-upload.php' );
1904
+ $field = new WC_Product_Addons_Field_File_Upload( $addon, $value );
1905
  break;
1906
+ default:
1907
+ // Continue to the next field in case the type is not recognized (instead of causing a fatal error)
1908
+ continue;
1909
  break;
1910
  }
1911