WooCommerce Wishlist Plugin - Version 1.8.16

Version Description

Release Date - 015 September 2018

  • Fixed an issue with cart and checkout redirect during bulk add to cart process from a wishlist
  • Fixed an issue with loading main frontend javascript file when button loaded with AJAX
  • Improved compatibility with YITH WooCommerce Product Add-Ons plugin
Download this release

Release Info

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

Code changes from version 1.8.15 to 1.8.16

assets/css/admin-form.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! WooCommerce Wishlist Plugin - version 1.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
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.8.15
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
1
+ /*! WooCommerce Wishlist Plugin - version 1.8.16
2
  * https://wordpress.org/plugins/ti-woocommerce-wishlist/
3
  * Copyright (c) 2018;
4
  * Licensed GPLv2+ */
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Wishlist Plugin 1.8.15\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/ti-woocommerce-wishlist\n"
8
- "POT-Creation-Date: 2018-09-04 14:32:45+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -881,7 +881,7 @@ msgid "Page Setup"
881
  msgstr ""
882
 
883
  #: includes/wizard.class.php:286 includes/wizard.class.php:317
884
- #: public/tinvwl.class.php:540
885
  msgid "Wishlist"
886
  msgstr ""
887
 
@@ -963,7 +963,7 @@ msgstr ""
963
  msgid "Action"
964
  msgstr ""
965
 
966
- #: public/wishlist/buttons.class.php:305 public/wishlist/buttons.class.php:420
967
  msgid ""
968
  "Product %s could not be added to cart because some options are not "
969
  "specified. Please, select some product options before adding the products "
@@ -975,19 +975,19 @@ msgid_plural ""
975
  msgstr[0] ""
976
  msgstr[1] ""
977
 
978
- #: public/wishlist/buttons.class.php:323
979
  msgid "Actions"
980
  msgstr ""
981
 
982
- #: public/wishlist/buttons.class.php:332
983
  msgid "Remove"
984
  msgstr ""
985
 
986
- #: public/wishlist/buttons.class.php:464 public/wishlist/view.class.php:327
987
  msgid "“%s”"
988
  msgstr ""
989
 
990
- #: public/wishlist/buttons.class.php:477
991
  msgid "%s has been successfully removed from wishlist."
992
  msgid_plural "%s have been successfully removed from wishlist."
993
  msgstr[0] ""
@@ -1001,15 +1001,15 @@ msgstr ""
1001
  msgid "%s has not been removed from wishlist."
1002
  msgstr ""
1003
 
1004
- #: public/wishlist/view.class.php:470
1005
  msgid "Return to Wishlist"
1006
  msgstr ""
1007
 
1008
- #: public/wishlist/view.class.php:565
1009
  msgid "Previous Page"
1010
  msgstr ""
1011
 
1012
- #: public/wishlist/view.class.php:574
1013
  msgid "Next Page"
1014
  msgstr ""
1015
 
@@ -1339,7 +1339,7 @@ msgstr ""
1339
  msgid "https://templateinvaders.com/"
1340
  msgstr ""
1341
 
1342
- #: public/wishlist/buttons.class.php:302 public/wishlist/buttons.class.php:417
1343
  msgctxt "Item name in quotes"
1344
  msgid "“%s”"
1345
  msgstr ""
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Wishlist Plugin 1.8.16\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/ti-woocommerce-wishlist\n"
8
+ "POT-Creation-Date: 2018-09-14 17:50:48+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
881
  msgstr ""
882
 
883
  #: includes/wizard.class.php:286 includes/wizard.class.php:317
884
+ #: public/tinvwl.class.php:544
885
  msgid "Wishlist"
886
  msgstr ""
887
 
963
  msgid "Action"
964
  msgstr ""
965
 
966
+ #: public/wishlist/buttons.class.php:305 public/wishlist/buttons.class.php:430
967
  msgid ""
968
  "Product %s could not be added to cart because some options are not "
969
  "specified. Please, select some product options before adding the products "
975
  msgstr[0] ""
976
  msgstr[1] ""
977
 
978
+ #: public/wishlist/buttons.class.php:333
979
  msgid "Actions"
980
  msgstr ""
981
 
982
+ #: public/wishlist/buttons.class.php:342
983
  msgid "Remove"
984
  msgstr ""
985
 
986
+ #: public/wishlist/buttons.class.php:484 public/wishlist/view.class.php:327
987
  msgid "“%s”"
988
  msgstr ""
989
 
990
+ #: public/wishlist/buttons.class.php:497
991
  msgid "%s has been successfully removed from wishlist."
992
  msgid_plural "%s have been successfully removed from wishlist."
993
  msgstr[0] ""
1001
  msgid "%s has not been removed from wishlist."
1002
  msgstr ""
1003
 
1004
+ #: public/wishlist/view.class.php:480
1005
  msgid "Return to Wishlist"
1006
  msgstr ""
1007
 
1008
+ #: public/wishlist/view.class.php:575
1009
  msgid "Previous Page"
1010
  msgstr ""
1011
 
1012
+ #: public/wishlist/view.class.php:584
1013
  msgid "Next Page"
1014
  msgstr ""
1015
 
1339
  msgid "https://templateinvaders.com/"
1340
  msgstr ""
1341
 
1342
+ #: public/wishlist/buttons.class.php:302 public/wishlist/buttons.class.php:427
1343
  msgctxt "Item name in quotes"
1344
  msgid "“%s”"
1345
  msgstr ""
public/cart.class.php CHANGED
@@ -149,16 +149,6 @@ class TInvWL_Public_Cart {
149
  self::set_item_data( $cart_item_key, $wishlist['share_key'], $quantity );
150
  self::unprepare_post();
151
 
152
- if ( tinv_get_option( 'processing', 'redirect_checkout' ) ) {
153
- wp_safe_redirect( wc_get_checkout_url() );
154
- exit;
155
- }
156
-
157
- if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
158
- wp_safe_redirect( wc_get_cart_url() );
159
- exit;
160
- }
161
-
162
  return array( $product_id => $quantity );
163
  }
164
  }
149
  self::set_item_data( $cart_item_key, $wishlist['share_key'], $quantity );
150
  self::unprepare_post();
151
 
 
 
 
 
 
 
 
 
 
 
152
  return array( $product_id => $quantity );
153
  }
154
  }
public/tinvwl.class.php CHANGED
@@ -59,7 +59,7 @@ class TInvWL_Public_TInvWL {
59
  * @param string $version Plugin version.
60
  */
61
  function __construct( $plugin_name, $version ) {
62
- $this->_name = $plugin_name;
63
  $this->_version = $version;
64
  $this->pre_load_function();
65
  }
@@ -447,6 +447,10 @@ class TInvWL_Public_TInvWL {
447
  'tinvwl_break_submit' => esc_attr__( 'No items or actions are selected.', 'ti-woocommerce-wishlist' ),
448
  ) );
449
 
 
 
 
 
450
  }
451
 
452
  /**
59
  * @param string $version Plugin version.
60
  */
61
  function __construct( $plugin_name, $version ) {
62
+ $this->_name = $plugin_name;
63
  $this->_version = $version;
64
  $this->pre_load_function();
65
  }
447
  'tinvwl_break_submit' => esc_attr__( 'No items or actions are selected.', 'ti-woocommerce-wishlist' ),
448
  ) );
449
 
450
+ if ( wp_script_is( 'woocommerce', 'enqueued' ) ) {
451
+ wp_enqueue_script( 'tinvwl' );
452
+ }
453
+
454
  }
455
 
456
  /**
public/wishlist/buttons.class.php CHANGED
@@ -307,6 +307,16 @@ class TInvWL_Public_Wishlist_Buttons {
307
  if ( ! empty( $result ) ) {
308
  wc_add_to_cart_message( $result, true );
309
 
 
 
 
 
 
 
 
 
 
 
310
  return true;
311
  }
312
 
@@ -422,6 +432,16 @@ class TInvWL_Public_Wishlist_Buttons {
422
  if ( ! empty( $result ) ) {
423
  wc_add_to_cart_message( $result, true );
424
 
 
 
 
 
 
 
 
 
 
 
425
  return true;
426
  }
427
  } // End if().
307
  if ( ! empty( $result ) ) {
308
  wc_add_to_cart_message( $result, true );
309
 
310
+ if ( tinv_get_option( 'processing', 'redirect_checkout' ) ) {
311
+ wp_safe_redirect( wc_get_checkout_url() );
312
+ exit;
313
+ }
314
+
315
+ if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
316
+ wp_safe_redirect( wc_get_cart_url() );
317
+ exit;
318
+ }
319
+
320
  return true;
321
  }
322
 
432
  if ( ! empty( $result ) ) {
433
  wc_add_to_cart_message( $result, true );
434
 
435
+ if ( tinv_get_option( 'processing', 'redirect_checkout' ) ) {
436
+ wp_safe_redirect( wc_get_checkout_url() );
437
+ exit;
438
+ }
439
+
440
+ if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
441
+ wp_safe_redirect( wc_get_cart_url() );
442
+ exit;
443
+ }
444
+
445
  return true;
446
  }
447
  } // End if().
public/wishlist/view.class.php CHANGED
@@ -429,6 +429,16 @@ class TInvWL_Public_Wishlist_View {
429
  if ( $add ) {
430
  wc_add_to_cart_message( $add, true );
431
 
 
 
 
 
 
 
 
 
 
 
432
  return true;
433
  }
434
  }
429
  if ( $add ) {
430
  wc_add_to_cart_message( $add, true );
431
 
432
+ if ( tinv_get_option( 'processing', 'redirect_checkout' ) ) {
433
+ wp_safe_redirect( wc_get_checkout_url() );
434
+ exit;
435
+ }
436
+
437
+ if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
438
+ wp_safe_redirect( wc_get_cart_url() );
439
+ exit;
440
+ }
441
+
442
  return true;
443
  }
444
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://templateinvaders.com/?utm_source=wordpressorg&utm_content=d
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.8.15
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -130,22 +130,33 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
130
 
131
 
132
  == Changelog ==
 
 
 
 
 
 
 
133
  = 1.8.15 =
134
  *Release Date - 04 September 2018*
 
135
  * Fixed an issue with trashed and deleted products count
136
  * Fixed mobile menu wishlist products counter issue for OceanWP theme
137
  * Minor CSS fixes
138
 
139
  = 1.8.14 =
140
  *Release Date - 29 August 2018*
 
141
  * Fixed fatal errors when 3rd party code using global product object outside a loop
142
 
143
  = 1.8.13 =
144
  *Release Date - 25 August 2018*
 
145
  * Fixed database fields type issue
146
 
147
  = 1.8.12 =
148
  *Release Date - 16 August 2018*
 
149
  * Fixed PHP fatal error on plugin activation
150
 
151
  = 1.8.11 =
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.8.16
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
130
 
131
 
132
  == Changelog ==
133
+ = 1.8.16 =
134
+ *Release Date - 015 September 2018*
135
+
136
+ * Fixed an issue with cart and checkout redirect during bulk add to cart process from a wishlist
137
+ * Fixed an issue with loading main frontend javascript file when button loaded with AJAX
138
+ * Improved compatibility with [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/) plugin
139
+
140
  = 1.8.15 =
141
  *Release Date - 04 September 2018*
142
+
143
  * Fixed an issue with trashed and deleted products count
144
  * Fixed mobile menu wishlist products counter issue for OceanWP theme
145
  * Minor CSS fixes
146
 
147
  = 1.8.14 =
148
  *Release Date - 29 August 2018*
149
+
150
  * Fixed fatal errors when 3rd party code using global product object outside a loop
151
 
152
  = 1.8.13 =
153
  *Release Date - 25 August 2018*
154
+
155
  * Fixed database fields type issue
156
 
157
  = 1.8.12 =
158
  *Release Date - 16 August 2018*
159
+
160
  * Fixed PHP fatal error on plugin activation
161
 
162
  = 1.8.11 =
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.8.15
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.8.15' );
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.8.16
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.8.16' );
45
  }
46
 
47
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
tinv-wishlists-function-integration.php CHANGED
@@ -1621,20 +1621,22 @@ if ( ! function_exists( 'tinv_wishlist_item_meta_yith_woocommerce_product_add_on
1621
  $original_data = 'ywapo_' . $single_type->type . '_' . $single_type->id;
1622
 
1623
  $value = isset( $item_data[ $original_data ] ) ? $item_data[ $original_data ] : '';
 
1624
 
1625
- if ( $value == '' ) {
1626
- continue;
 
 
1627
  }
1628
 
1629
 
1630
- $value = YITH_WAPO_Option::getOptionDataByValueKey( $single_type, '0', 'label' );
1631
-
1632
-
1633
  unset( $item_data[ $original_data ] );
1634
- $item_data[] = array(
1635
- 'key' => $single_type->label,
1636
- 'display' => $value,
1637
- );
 
 
1638
 
1639
  }
1640
 
@@ -1671,12 +1673,17 @@ if ( ! function_exists( 'tinvwl_item_price_yith_woocommerce_product_add_on' ) )
1671
  $original_data = 'ywapo_' . $single_type->type . '_' . $single_type->id;
1672
 
1673
  $value = isset( $wl_product['meta'][ $original_data ] ) ? $wl_product['meta'][ $original_data ] : '';
1674
- if ( $value == '' ) {
 
 
1675
  continue;
1676
  }
1677
 
 
1678
 
1679
- $price += YITH_WAPO_Option::getOptionDataByValueKey( $single_type, '0', 'price' );
 
 
1680
 
1681
  }
1682
 
1621
  $original_data = 'ywapo_' . $single_type->type . '_' . $single_type->id;
1622
 
1623
  $value = isset( $item_data[ $original_data ] ) ? $item_data[ $original_data ] : '';
1624
+ error_log( print_r( $value, true ) );
1625
 
1626
+ if ( ! is_array( $value ) || ! ctype_digit( strval( $value['display'][0] ) ) ) {
1627
+ $value = $value['display'][0];
1628
+ } else {
1629
+ $value = YITH_WAPO_Option::getOptionDataByValueKey( $single_type, $value['display'][0], 'label' );
1630
  }
1631
 
1632
 
 
 
 
1633
  unset( $item_data[ $original_data ] );
1634
+ if ( $value ) {
1635
+ $item_data[] = array(
1636
+ 'key' => $single_type->label,
1637
+ 'display' => $value,
1638
+ );
1639
+ }
1640
 
1641
  }
1642
 
1673
  $original_data = 'ywapo_' . $single_type->type . '_' . $single_type->id;
1674
 
1675
  $value = isset( $wl_product['meta'][ $original_data ] ) ? $wl_product['meta'][ $original_data ] : '';
1676
+
1677
+
1678
+ if ( ! is_array( $value ) || ! ctype_digit( strval( $value[0] ) ) ) {
1679
  continue;
1680
  }
1681
 
1682
+ $addon_price = YITH_WAPO_Option::getOptionDataByValueKey( $single_type, $value[0], 'price' );
1683
 
1684
+ if ( is_numeric( $addon_price ) ) {
1685
+ $price += $addon_price;
1686
+ }
1687
 
1688
  }
1689