YITH WooCommerce Wishlist - Version 3.0.5

Version Description

  • Released on 23 December 2019 =

  • New: support for WooCommerce 3.9

  • Update: plugin framework

  • Tweak: register original product id instead of translated one, when saving item in DB

  • Fix: customer not being redirected to cart after clicking Add to Cart button in wishlist

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Wishlist
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

README.md CHANGED
@@ -72,18 +72,12 @@ We're also working hard to release a developer guide; please, follow our [social
72
 
73
  ## Changelog
74
 
75
- ### 3.0.4 - Released on 19 December 2019
76
 
77
- * Tweak: added isset on wishlist data store, to prevent notice
78
- * Tweak: removed transients for items count, to avoid load on wp-options table
79
- * Tweak: improved dependencies animation
80
- * Tweak: restored $atts variable inside template, for better compatibility with themes
81
- * Tweak: handling for redirect_to param in $_REQUEST for form-handler class
82
  * Update: plugin framework
83
- * Fix: default variation not being added to wishlist
84
- * Fix: add default variation to wishlist when Ajax loading is enabled
85
- * Fix: count_all_products not retrieving correct number
86
- * Dev: added yith_wcwl_wishlist_delete_url filter
87
 
88
  ## Support
89
 
72
 
73
  ## Changelog
74
 
75
+ ### 3.0.5 - Released on 23 December 2019 =
76
 
77
+ * New: support for WooCommerce 3.9
 
 
 
 
78
  * Update: plugin framework
79
+ * Tweak: register original product id instead of translated one, when saving item in DB
80
+ * Fix: customer not being redirected to cart after clicking Add to Cart button in wishlist
 
 
81
 
82
  ## Support
83
 
README.txt CHANGED
@@ -4,12 +4,12 @@ Contributors: yithemes
4
  Tags: wishlist, woocommerce, products, yit, e-commerce, shop, ecommerce wishlist, yith, woocommerce wishlist, shop wishlist
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
- Stable tag: 3.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Wishlist add all Wishlist features to your website. Needs WooCommerce to work.
12
- WooCommerce 3.8.x compatible.
13
 
14
  == Description ==
15
 
@@ -94,7 +94,7 @@ Try to regenerate permalinks from Settings -> Permalinks by simply saving them a
94
  This might depend on the fact that your theme overrides plugin templates. Check if the developer of your theme has released a compatibility update with version 3.0 or later of YITH WooCommerce Wishlist. As an alternative you can try the plugin in WordPress default theme to leave out any possible influences by the theme.
95
 
96
  = I am currently using Wishlist plugin with Catalog Mode enabled in my site. Prices for products should disappear, yet they still appear in the wishlist page. Can I remove them? =
97
- Yes, of course you can. To avoid Wishlist page to show product prices, you can hide price column from wishlist table. Go to YIT plugins -> wishlist -> settings and disable option "Show Unit price".
98
 
99
  == Screenshots ==
100
 
@@ -112,6 +112,13 @@ Yes, of course you can. To avoid Wishlist page to show product prices, you can h
112
 
113
  == Changelog ==
114
 
 
 
 
 
 
 
 
115
  = 3.0.4 - Released on 19 December 2019 =
116
 
117
  * Tweak: added isset on wishlist data store, to prevent notice
4
  Tags: wishlist, woocommerce, products, yit, e-commerce, shop, ecommerce wishlist, yith, woocommerce wishlist, shop wishlist
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
+ Stable tag: 3.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Wishlist add all Wishlist features to your website. Needs WooCommerce to work.
12
+ WooCommerce 3.9.x compatible.
13
 
14
  == Description ==
15
 
94
  This might depend on the fact that your theme overrides plugin templates. Check if the developer of your theme has released a compatibility update with version 3.0 or later of YITH WooCommerce Wishlist. As an alternative you can try the plugin in WordPress default theme to leave out any possible influences by the theme.
95
 
96
  = I am currently using Wishlist plugin with Catalog Mode enabled in my site. Prices for products should disappear, yet they still appear in the wishlist page. Can I remove them? =
97
+ Yes, of course you can. To avoid Wishlist page to show product prices, you can hide price column from wishlist table. Go to YITH -> Wishlist -> Wishlist Page Options and disable option "Product price".
98
 
99
  == Screenshots ==
100
 
112
 
113
  == Changelog ==
114
 
115
+ = 3.0.5 - Released on 23 December 2019 =
116
+
117
+ * New: support for WooCommerce 3.9
118
+ * Update: plugin framework
119
+ * Tweak: register original product id instead of translated one, when saving item in DB
120
+ * Fix: customer not being redirected to cart after clicking Add to Cart button in wishlist
121
+
122
  = 3.0.4 - Released on 19 December 2019 =
123
 
124
  * Tweak: added isset on wishlist data store, to prevent notice
includes/class.yith-wcwl-frontend.php CHANGED
@@ -33,7 +33,7 @@ if ( ! class_exists( 'YITH_WCWL_Frontend' ) ) {
33
  * @var string
34
  * @since 1.0.0
35
  */
36
- public $version = '3.0.4';
37
 
38
  /**
39
  * Plugin database version
@@ -376,7 +376,7 @@ if ( ! class_exists( 'YITH_WCWL_Frontend' ) ) {
376
  public function get_localize() {
377
  return apply_filters( 'yith_wcwl_localize_script', array(
378
  'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
379
- 'redirect_to_cart' => get_option( 'yith_wcwl_redirect_cart' ) == 'yes',
380
  'multi_wishlist' => false,
381
  'hide_add_button' => apply_filters( 'yith_wcwl_hide_add_button', true ),
382
  'enable_ajax_loading' => 'yes' == get_option( 'yith_wcwl_ajax_enable', 'no' ),
33
  * @var string
34
  * @since 1.0.0
35
  */
36
+ public $version = '3.0.5';
37
 
38
  /**
39
  * Plugin database version
376
  public function get_localize() {
377
  return apply_filters( 'yith_wcwl_localize_script', array(
378
  'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
379
+ 'redirect_to_cart' => get_option( 'yith_wcwl_redirect_cart' ),
380
  'multi_wishlist' => false,
381
  'hide_add_button' => apply_filters( 'yith_wcwl_hide_add_button', true ),
382
  'enable_ajax_loading' => 'yes' == get_option( 'yith_wcwl_ajax_enable', 'no' ),
includes/class.yith-wcwl-wishlist-item.php CHANGED
@@ -110,6 +110,15 @@ if ( ! class_exists( 'YITH_WCWL_Wishlist_Item' ) ) {
110
  return intval( $this->origin_wishlist_id );
111
  }
112
 
 
 
 
 
 
 
 
 
 
113
  /**
114
  * Get product ID for current item
115
  *
@@ -117,7 +126,7 @@ if ( ! class_exists( 'YITH_WCWL_Wishlist_Item' ) ) {
117
  * @return int Product ID
118
  */
119
  public function get_product_id( $context = 'view' ) {
120
- return yit_wpml_object_id( intval( $this->get_prop( 'product_id', $context ) ), 'product', true );
121
  }
122
 
123
  /**
110
  return intval( $this->origin_wishlist_id );
111
  }
112
 
113
+ /**
114
+ * Get origin product ID for current item (no WPML filtering)
115
+ *
116
+ * @return int Wishlist ID
117
+ */
118
+ public function get_original_product_id( $context = 'view' ) {
119
+ return intval( $this->get_prop( 'product_id', $context ) );
120
+ }
121
+
122
  /**
123
  * Get product ID for current item
124
  *
126
  * @return int Product ID
127
  */
128
  public function get_product_id( $context = 'view' ) {
129
+ return yit_wpml_object_id( $this->get_original_product_id( $context ), 'product', true );
130
  }
131
 
132
  /**
includes/data-stores/class.yith-wcwl-wishlist-item-data-store.php CHANGED
@@ -28,7 +28,7 @@ if ( ! class_exists( 'YITH_WCWL_Wishlist_Item_Data_Store' ) ) {
28
  public function create( &$item ) {
29
  global $wpdb;
30
 
31
- if( ! ( $product_id = $item->get_product_id() ) || ! ( $wishlist_id = $item->get_wishlist_id() ) ){
32
  return;
33
  }
34
 
@@ -152,7 +152,7 @@ if ( ! class_exists( 'YITH_WCWL_Wishlist_Item_Data_Store' ) ) {
152
  $values = array(
153
  $item->get_quantity(),
154
  $item->get_wishlist_id(),
155
- $item->get_product_id(),
156
  $item->get_user_id(),
157
  $item->get_position(),
158
  $item->is_on_sale(),
28
  public function create( &$item ) {
29
  global $wpdb;
30
 
31
+ if( ! ( $product_id = $item->get_original_product_id() ) || ! ( $wishlist_id = $item->get_wishlist_id() ) ){
32
  return;
33
  }
34
 
152
  $values = array(
153
  $item->get_quantity(),
154
  $item->get_wishlist_id(),
155
+ $item->get_original_product_id(),
156
  $item->get_user_id(),
157
  $item->get_position(),
158
  $item->is_on_sale(),
init.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: YITH WooCommerce Wishlist
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
5
  * Description: <code><strong>YITH WooCommerce Wishlist</strong></code> gives your users the possibility to create, fill, manage and share their wishlists allowing you to analyze their interests and needs to improve your marketing strategies. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce on <strong>YITH</strong></a>
6
- * Version: 3.0.4
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-wishlist
10
  * Domain Path: /languages/
11
  * WC requires at least: 2.5.0
12
- * WC tested up to: 3.8.0
13
  *
14
  * @author YITHEMES
15
  * @package YITH WooCommerce Wishlist
3
  * Plugin Name: YITH WooCommerce Wishlist
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
5
  * Description: <code><strong>YITH WooCommerce Wishlist</strong></code> gives your users the possibility to create, fill, manage and share their wishlists allowing you to analyze their interests and needs to improve your marketing strategies. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce on <strong>YITH</strong></a>
6
+ * Version: 3.0.5
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-wishlist
10
  * Domain Path: /languages/
11
  * WC requires at least: 2.5.0
12
+ * WC tested up to: 3.9.0
13
  *
14
  * @author YITHEMES
15
  * @package YITH WooCommerce Wishlist