YITH WooCommerce Catalog Mode - Version 1.6.7

Version Description

Last Stable Tag 1.6.7

Download this release

Release Info

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

Code changes from version 1.6.6 to 1.6.7

class.yith-woocommerce-catalog-mode.php CHANGED
@@ -812,7 +812,7 @@ if ( ! class_exists( 'YITH_WC_Catalog_Mode' ) ) {
812
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
813
  */
814
  public function get_premium_landing_uri() {
815
- return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
816
  }
817
 
818
  /**
812
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
813
  */
814
  public function get_premium_landing_uri() {
815
+ return $this->_premium_landing;
816
  }
817
 
818
  /**
init.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: <code><strong>YITH WooCommerce Catalog Mode</strong></code> allows hiding product prices, cart and checkout from your store and turning it into a performing product catalogue. You will be able to adjust your catalogue settings as you prefer based on your requirements. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
  * Author: YITH
7
  * Text Domain: yith-woocommerce-catalog-mode
8
- * Version: 1.6.6
9
  * Author URI: http://yithemes.com/
10
  * WC requires at least: 3.4.0
11
  * WC tested up to: 3.6.x
@@ -36,7 +36,7 @@ function ywctm_install_free_admin_notice() {
36
  }
37
 
38
  if ( ! defined( 'YWCTM_VERSION' ) ) {
39
- define( 'YWCTM_VERSION', '1.6.6' );
40
  }
41
 
42
  if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
5
  * Description: <code><strong>YITH WooCommerce Catalog Mode</strong></code> allows hiding product prices, cart and checkout from your store and turning it into a performing product catalogue. You will be able to adjust your catalogue settings as you prefer based on your requirements. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
  * Author: YITH
7
  * Text Domain: yith-woocommerce-catalog-mode
8
+ * Version: 1.6.7
9
  * Author URI: http://yithemes.com/
10
  * WC requires at least: 3.4.0
11
  * WC tested up to: 3.6.x
36
  }
37
 
38
  if ( ! defined( 'YWCTM_VERSION' ) ) {
39
+ define( 'YWCTM_VERSION', '1.6.7' );
40
  }
41
 
42
  if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.1.28
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.1.29
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/lib/promo/yith-promo.php DELETED
@@ -1,189 +0,0 @@
1
- <?php
2
- /**
3
- * This file belongs to the YIT Plugin Framework.
4
- *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
- */
10
-
11
- if( ! function_exists( 'simplexml_load_string' ) ){
12
- return false;
13
- }
14
-
15
- add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
16
- add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
17
-
18
- if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
19
- function yith_plugin_fw_promo_notices(){
20
- $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', 'https://update.yithemes.com/promo/hotlink-ok/' );
21
- $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', $base_url . 'yith-promo.xml' );
22
- $transient = "yith_promo_message";
23
- $remote_data = get_site_transient( $transient );
24
- $regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' == $_GET['yith_regenerate_promo_transient'] ? $_GET['yith_regenerate_promo_transient'] : '';
25
- $promo_data = false;
26
- $create_transient = false;
27
-
28
- if( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || 'yes' == $regenerate_promo_transient ){
29
- $remote_data = wp_remote_get( $xml );
30
- $create_transient = true;
31
- }
32
-
33
- if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
- $promo_data = @simplexml_load_string( $remote_data['body'] );
35
- $license = YIT_Plugin_Licence()->get_licence();
36
-
37
- if( true === $create_transient ){
38
- $is_membership_user = false;
39
- $xml_expiry_date = '';
40
-
41
- if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
42
- /* === Check is the user have the YITH Club === */
43
- foreach( $license as $plugin => $data ){
44
- if( ! empty( $data['is_membership'] ) ){
45
- $is_membership_user = true;
46
- $xml_expiry_date = $data['licence_expires'];
47
- $remote_data = $promo_data = array();
48
- break;
49
- }
50
- }
51
- }
52
-
53
- if( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ){
54
- $xml_expiry_date = $promo_data->expiry_date;
55
- }
56
-
57
- //Set Site Transient
58
- set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
59
- }
60
-
61
- if ( $promo_data && ! empty( $promo_data->promo ) ) {
62
- $now = strtotime( current_time( 'mysql' ) );
63
-
64
- foreach ($promo_data->promo as $promo ){
65
- $show_promo = true;
66
- /* === Check for Special Promo === */
67
- if ( ! empty( $promo->show_promo_in ) ) {
68
- $show_promo_in = explode( ',', $promo->show_promo_in );
69
- $show_promo_in = array_map( 'trim', $show_promo_in );
70
- if ( ! empty( $show_promo_in ) ) {
71
- $show_promo = false;
72
- foreach ( $show_promo_in as $plugin ) {
73
- if ( defined( $plugin ) ) {
74
- $plugin_slug = constant( $plugin );
75
- $plugin_is_activated = ! empty( $license[ $plugin_slug ]['activated'] );
76
- if ( defined( $plugin ) && ! apply_filters( 'yith_plugin_fw_promo_plugin_is_activated', $plugin_is_activated ) ) {
77
- $show_promo = true;
78
- break;
79
- }
80
- }
81
- }
82
- }
83
- }
84
-
85
- $start_date = isset( $promo->start_date ) ? $promo->start_date : '';
86
- $end_date = isset( $promo->end_date ) ? $promo->end_date : '';
87
-
88
- if( $show_promo && ! empty( $start_date ) && ! empty( $end_date ) ){
89
- $start_date = strtotime( $start_date );
90
- $end_date = strtotime( $end_date );
91
-
92
- if( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ){
93
- //is valid promo
94
- $title = isset( $promo->title ) ? $promo->title : '';
95
- $description = isset( $promo->description ) ? $promo->description : '';
96
- $url = isset( $promo->link->url ) ? $promo->link->url : '';
97
- $url_label = isset( $promo->link->label ) ? $promo->link->label : '';
98
- $image_bg_color = isset( $promo->style->image_bg_color ) ? $promo->style->image_bg_color : '';
99
- $border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
100
- $background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
101
- $promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
102
- $banner = isset( $promo->banner ) ? $promo->banner : '';
103
- $style = $link = '';
104
- $show_notice = false;
105
- $original_promo_id = $promo_id;
106
-
107
- if( ! empty( $border_color ) ){
108
- $style .= "border-left-color: {$border_color};";
109
- }
110
-
111
- if( ! empty( $background_color ) ){
112
- $style .= "background-color: {$background_color};";
113
- }
114
-
115
- if( ! empty( $image_bg_color ) ){
116
- $image_bg_color = "background-color: {$image_bg_color};";
117
- }
118
-
119
- if( ! empty( $title ) ) {
120
- $promo_id .= $title;
121
- $title = sprintf( '%s: ', $title );
122
- $show_notice = true;
123
- }
124
-
125
- if( ! empty( $description ) ) {
126
- $promo_id .= $description;
127
- $description = sprintf( '%s', $description );
128
- $show_notice = true;
129
- }
130
-
131
- if( ! empty( $url ) && ! empty( $url_label )) {
132
- $promo_id .= $url . $url_label;
133
- $link = sprintf( '<a class="yith-promo-url" href="%s" target="_blank">%s</a>', $url, $url_label );
134
- $show_notice = true;
135
- }
136
-
137
- if( ! empty( $banner ) ){
138
- $banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
139
-
140
- if( ! empty( $url ) ){
141
- $banner = sprintf( '<a class="yith-promo-banner-image-link" href="%s" target="_blank" style="%s">%s</a>', $url, $image_bg_color, $banner);
142
- }
143
- }
144
-
145
- $unique_promo_id = "yith-notice-" . md5 ( $promo_id );
146
-
147
- if( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' == $_COOKIE[ 'hide_' . $unique_promo_id ] ){
148
- $show_notice = false;
149
- }
150
-
151
- if ( true === $show_notice ) :
152
- wp_enqueue_script( 'yith-promo' );
153
- ?>
154
- <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible <?php echo $original_promo_id;?>" style="<?php echo $style; ?>" data-expiry="<?php echo $promo->end_date; ?>">
155
- <p>
156
- <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
157
- <?php printf( "%s %s %s", $title, $description, $link ); ?>
158
- </p>
159
- </div>
160
- <?php endif;
161
- }
162
- }
163
- }
164
- }
165
- }
166
- }
167
- }
168
-
169
- if( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ){
170
- function yith_plugin_fw_notice_dismiss(){
171
- $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
172
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
173
- wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
174
- }
175
- }
176
-
177
- if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
178
- function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
179
- $xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+24 hours';
180
- $current = strtotime( current_time( 'Y-m-d H:i:s' ) );
181
- $expiry_date = strtotime( $xml_expiry_date, $current );
182
-
183
- if( $expiry_date <= $current ){
184
- $expiry_date = strtotime( '+24 hours', $current );
185
- }
186
-
187
- return $expiry_date;
188
- }
189
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/yit-plugin.php CHANGED
@@ -40,7 +40,6 @@ include_once( 'lib/yit-debug.php');
40
  include_once( 'lib/yith-dashboard.php' );
41
  include_once( 'lib/privacy/yit-privacy.php' );
42
  include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
43
- include_once( 'lib/promo/yith-promo.php' );
44
 
45
  /* === Gutenberg Support === */
46
  if( class_exists( 'WP_Block_Type_Registry' ) ){
@@ -157,11 +156,6 @@ if( ! function_exists( 'yit_plugin_fw_row_meta' ) ){
157
  }
158
  }
159
 
160
- //Add YITH Refer ID
161
- if( ! empty( $url ) && defined( 'YITH_REFER_ID' ) ){
162
- $url = add_query_arg( array( 'refer_id', YITH_REFER_ID ), $url );
163
- }
164
-
165
  if( ! empty( $url ) && ! empty( $label ) ){
166
  $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
167
  }
40
  include_once( 'lib/yith-dashboard.php' );
41
  include_once( 'lib/privacy/yit-privacy.php' );
42
  include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
 
43
 
44
  /* === Gutenberg Support === */
45
  if( class_exists( 'WP_Block_Type_Registry' ) ){
156
  }
157
  }
158
 
 
 
 
 
 
159
  if( ! empty( $url ) && ! empty( $label ) ){
160
  $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
161
  }
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: 5.1
7
- Stable tag: 1.6.6
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
  = Version 1.6.6 - Released: Apr 15, 2019 =
117
 
118
  * New: Support to WooCommerce 3.6.0 RC2
@@ -277,7 +281,7 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
277
 
278
  == Upgrade Notice ==
279
 
280
- Last Stable Tag 1.6.6
281
 
282
  == Suggestions ==
283
 
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: 5.1
7
+ Stable tag: 1.6.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
113
 
114
  == Changelog ==
115
 
116
+ = Version 1.6.7 - Released: Apr 23, 2019 =
117
+
118
+ * Update: plugin framework
119
+
120
  = Version 1.6.6 - Released: Apr 15, 2019 =
121
 
122
  * New: Support to WooCommerce 3.6.0 RC2
281
 
282
  == Upgrade Notice ==
283
 
284
+ Last Stable Tag 1.6.7
285
 
286
  == Suggestions ==
287
 
wpml-config.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <wpml-config>
3
+ <admin-texts>
4
+ <key name="ywctm_exclude_price_alternative_text"/>
5
+ <key name="ywctm_button_text"/>
6
+ </admin-texts>
7
+ </wpml-config>