YITH WooCommerce Catalog Mode - Version 1.2.2

Version Description

  • Added: compatibility with YITH WooCommerce Wishlist
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Catalog Mode
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

class.yith-woocommerce-catalog-mode.php CHANGED
@@ -88,6 +88,11 @@ class YITH_WC_Catalog_Mode {
88
 
89
  add_filter( 'woocommerce_add_to_cart_validation', array( $this, 'avoid_add_to_cart' ), 10, 2 );
90
 
 
 
 
 
 
91
  }
92
 
93
  }
@@ -661,6 +666,31 @@ class YITH_WC_Catalog_Mode {
661
  return defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && ( $_REQUEST['action'] == 'yith_load_product_quick_view' || $_REQUEST['action'] == 'yit_load_product_quick_view' );
662
  }
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  /**
665
  * YITH FRAMEWORK
666
  */
88
 
89
  add_filter( 'woocommerce_add_to_cart_validation', array( $this, 'avoid_add_to_cart' ), 10, 2 );
90
 
91
+ if ( defined( 'YITH_WCWL' ) && YITH_WCWL ) {
92
+ add_filter( 'woocommerce_loop_add_to_cart_link', array( $this, 'hide_add_to_cart_wishlist' ), 10, 2 );
93
+
94
+ }
95
+
96
  }
97
 
98
  }
666
  return defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && ( $_REQUEST['action'] == 'yith_load_product_quick_view' || $_REQUEST['action'] == 'yit_load_product_quick_view' );
667
  }
668
 
669
+ /**
670
+ * Hides add to cart on wishlist
671
+ *
672
+ * @since 1.2.2
673
+ *
674
+ * @param $value
675
+ * @param $product
676
+ *
677
+ * @return string
678
+ * @author Alberto Ruggiero
679
+ */
680
+ public function hide_add_to_cart_wishlist( $value, $product ) {
681
+
682
+ global $yith_wcwl_is_wishlist;
683
+
684
+ if ( $this->check_add_to_cart_single( true, $product->id ) && $yith_wcwl_is_wishlist ) {
685
+
686
+ $value = '';
687
+
688
+ }
689
+
690
+ return $value;
691
+
692
+ }
693
+
694
  /**
695
  * YITH FRAMEWORK
696
  */
init.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-catalog-mode/
5
  Description: YITH WooCommerce Catalog Mode allows you to disable shop functions.
6
  Author: YIThemes
7
  Text Domain: yith-woocommerce-catalog-mode
8
- Version: 1.2.1
9
  Author URI: http://yithemes.com/
10
  */
11
 
@@ -34,7 +34,7 @@ function ywctm_install_free_admin_notice() {
34
  }
35
 
36
  if ( !defined( 'YWCTM_VERSION' ) ) {
37
- define( 'YWCTM_VERSION', '1.2.1' );
38
  }
39
 
40
  if ( !defined( 'YWCTM_FREE_INIT' ) ) {
5
  Description: YITH WooCommerce Catalog Mode allows you to disable shop functions.
6
  Author: YIThemes
7
  Text Domain: yith-woocommerce-catalog-mode
8
+ Version: 1.2.2
9
  Author URI: http://yithemes.com/
10
  */
11
 
34
  }
35
 
36
  if ( !defined( 'YWCTM_VERSION' ) ) {
37
+ define( 'YWCTM_VERSION', '1.2.2' );
38
  }
39
 
40
  if ( !defined( 'YWCTM_FREE_INIT' ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.4
7
- Stable tag: 1.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -113,6 +113,10 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = 1.2.1 =
117
 
118
  * Updated: plugin core framework
@@ -193,7 +197,7 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
193
 
194
  == Upgrade Notice ==
195
 
196
- Last Stable Tag 1.2.1
197
 
198
  == Suggestions ==
199
 
4
  Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.4
7
+ Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
113
 
114
  == Changelog ==
115
 
116
+ = 1.2.2 =
117
+
118
+ * Added: compatibility with YITH WooCommerce Wishlist
119
+
120
  = 1.2.1 =
121
 
122
  * Updated: plugin core framework
197
 
198
  == Upgrade Notice ==
199
 
200
+ Last Stable Tag 1.2.2
201
 
202
  == Suggestions ==
203