Skip to content

Commit

Permalink
VERSION 3.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alarocca130 committed Feb 27, 2020
1 parent e774e9a commit 5506da0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,12 @@ We're also working hard to release a developer guide; please, follow our [social

## Changelog

### 3.0.4 - Released on 19 December 2019
### 3.0.5 - Released on 23 December 2019 =

* Tweak: added isset on wishlist data store, to prevent notice
* Tweak: removed transients for items count, to avoid load on wp-options table
* Tweak: improved dependencies animation
* Tweak: restored $atts variable inside template, for better compatibility with themes
* Tweak: handling for redirect_to param in $_REQUEST for form-handler class
* New: support for WooCommerce 3.9
* Update: plugin framework
* Fix: default variation not being added to wishlist
* Fix: add default variation to wishlist when Ajax loading is enabled
* Fix: count_all_products not retrieving correct number
* Dev: added yith_wcwl_wishlist_delete_url filter
* 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

## Support

Expand Down
11 changes: 9 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: yithemes
Tags: wishlist, woocommerce, products, yit, e-commerce, shop, ecommerce wishlist, yith, woocommerce wishlist, shop wishlist
Requires at least: 4.0
Tested up to: 5.3
Stable tag: 3.0.4
Stable tag: 3.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -94,7 +94,7 @@ Try to regenerate permalinks from Settings -> Permalinks by simply saving them a
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.

= 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? =
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".
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".

== Screenshots ==

Expand All @@ -112,6 +112,13 @@ Yes, of course you can. To avoid Wishlist page to show product prices, you can h

== Changelog ==

= 3.0.5 - 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

= 3.0.4 - Released on 19 December 2019 =

* Tweak: added isset on wishlist data store, to prevent notice
Expand Down
4 changes: 2 additions & 2 deletions includes/class.yith-wcwl-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class YITH_WCWL_Frontend {
* @var string
* @since 1.0.0
*/
public $version = '3.0.4';
public $version = '3.0.5';

/**
* Plugin database version
Expand Down Expand Up @@ -376,7 +376,7 @@ public function enqueue_scripts() {
public function get_localize() {
return apply_filters( 'yith_wcwl_localize_script', array(
'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
'redirect_to_cart' => get_option( 'yith_wcwl_redirect_cart' ) == 'yes',
'redirect_to_cart' => get_option( 'yith_wcwl_redirect_cart' ),
'multi_wishlist' => false,
'hide_add_button' => apply_filters( 'yith_wcwl_hide_add_button', true ),
'enable_ajax_loading' => 'yes' == get_option( 'yith_wcwl_ajax_enable', 'no' ),
Expand Down
11 changes: 10 additions & 1 deletion includes/class.yith-wcwl-wishlist-item.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,23 @@ public function get_origin_wishlist_id() {
return intval( $this->origin_wishlist_id );
}

/**
* Get origin product ID for current item (no WPML filtering)
*
* @return int Wishlist ID
*/
public function get_original_product_id( $context = 'view' ) {
return intval( $this->get_prop( 'product_id', $context ) );
}

/**
* Get product ID for current item
*
* @param $context string Context
* @return int Product ID
*/
public function get_product_id( $context = 'view' ) {
return yit_wpml_object_id( intval( $this->get_prop( 'product_id', $context ) ), 'product', true );
return yit_wpml_object_id( $this->get_original_product_id( $context ), 'product', true );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class YITH_WCWL_Wishlist_Item_Data_Store{
public function create( &$item ) {
global $wpdb;

if( ! ( $product_id = $item->get_product_id() ) || ! ( $wishlist_id = $item->get_wishlist_id() ) ){
if( ! ( $product_id = $item->get_original_product_id() ) || ! ( $wishlist_id = $item->get_wishlist_id() ) ){
return;
}

Expand Down Expand Up @@ -152,7 +152,7 @@ public function update( &$item ) {
$values = array(
$item->get_quantity(),
$item->get_wishlist_id(),
$item->get_product_id(),
$item->get_original_product_id(),
$item->get_user_id(),
$item->get_position(),
$item->is_on_sale(),
Expand Down
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Plugin Name: YITH WooCommerce Wishlist
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
* 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>
* Version: 3.0.4
* Version: 3.0.5
* Author: YITH
* Author URI: https://yithemes.com/
* Text Domain: yith-woocommerce-wishlist
* Domain Path: /languages/
* WC requires at least: 2.5.0
* WC tested up to: 3.8.0
* WC tested up to: 3.9.0
*
* @author YITHEMES
* @package YITH WooCommerce Wishlist
Expand Down

0 comments on commit 5506da0

Please sign in to comment.