Click to Chat for WhatsApp Chat - Version 3.7.1

Version Description

  • Fix: Variables for WooCommerce
Download this release

Release Info

Developer bhvreddy
Plugin Icon 128x128 Click to Chat for WhatsApp Chat
Version 3.7.1
Comparing to
See all releases

Code changes from version 3.7 to 3.7.1

click-to-chat.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
- Version: 3.7
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) {
17
 
18
  // ctc - Version - update version at readme 'Stable tag'
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
- define( 'HT_CTC_VERSION', '3.7' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
+ Version: 3.7.1
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
17
 
18
  // ctc - Version - update version at readme 'Stable tag'
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
+ define( 'HT_CTC_VERSION', '3.7.1' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/tools/woo/class-ht-ctc-woo.php CHANGED
@@ -234,14 +234,21 @@ class HT_CTC_WOO_Pages {
234
  // if woocommerce single product page
235
  if ( function_exists( 'is_product' ) && function_exists( 'wc_get_product' )) {
236
  if ( is_product() ) {
237
-
 
 
 
 
 
238
  $product = wc_get_product();
239
 
240
- $name = $product->get_name();
241
- // $title = $product->get_title();
242
- $price = $product->get_price();
243
- $regular_price = $product->get_regular_price();
244
- $sku = $product->get_sku();
 
 
245
 
246
  $page_id = get_the_ID();
247
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
234
  // if woocommerce single product page
235
  if ( function_exists( 'is_product' ) && function_exists( 'wc_get_product' )) {
236
  if ( is_product() ) {
237
+
238
+ $name = '';
239
+ $price = '';
240
+ $regular_price = '';
241
+ $sku = '';
242
+
243
  $product = wc_get_product();
244
 
245
+ if ( is_object($product) && method_exists($product, 'get_name') ) {
246
+ $name = $product->get_name();
247
+ // $title = $product->get_title();
248
+ $price = $product->get_price();
249
+ $regular_price = $product->get_regular_price();
250
+ $sku = $product->get_sku();
251
+ }
252
 
253
  $page_id = get_the_ID();
254
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Requires at least: 4.6
3
  Tested up to: 5.8.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.7
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, WhatsApp WooCommerce, whatsapp wordpress, whatsapp floating button, whatsapp icon, holithemes
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -481,6 +481,9 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
481
 
482
  == Changelog ==
483
 
 
 
 
484
  = 3.7 =
485
  * Enchantment: Admin settings
486
  * Enchantment: Add your own image style.
3
  Tested up to: 5.8.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.7.1
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, WhatsApp WooCommerce, whatsapp wordpress, whatsapp floating button, whatsapp icon, holithemes
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
481
 
482
  == Changelog ==
483
 
484
+ = 3.7.1 =
485
+ * Fix: Variables for WooCommerce
486
+
487
  = 3.7 =
488
  * Enchantment: Admin settings
489
  * Enchantment: Add your own image style.