Click to Chat for WhatsApp Chat - Version 3.9.1

Version Description

  • Enchantment: Greetings feature
  • PRO: New - Greetings - From filling
  • PRO: New - Greetings Actions - Time, Scroll
Download this release

Release Info

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

Code changes from version 3.9 to 3.9.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.9
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.9' );
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.9.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.9.1' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/admin/admin_assets/js/greetings.js CHANGED
@@ -22,6 +22,7 @@
22
  $('.ctc_greetings_settings.ctc_g_1').show();
23
  $('.pr_ht_ctc_greetings_1').show();
24
  $('.pr_ht_ctc_greetings_settings').show();
 
25
  }
26
 
27
  // greetings-2
@@ -29,6 +30,7 @@
29
  $('.ctc_greetings_settings.ctc_g_2').show();
30
  $('.pr_ht_ctc_greetings_2').show();
31
  $('.pr_ht_ctc_greetings_settings').show();
 
32
  }
33
 
34
  // on change
@@ -44,6 +46,7 @@
44
 
45
  // if not no - then first hide all and again display required fields..
46
  $(" .ctc_greetings_settings").hide();
 
47
 
48
  // greetings-1
49
  if (greetings_template == 'greetings-1') {
22
  $('.ctc_greetings_settings.ctc_g_1').show();
23
  $('.pr_ht_ctc_greetings_1').show();
24
  $('.pr_ht_ctc_greetings_settings').show();
25
+ $('.ctc_greetings_notes').show();
26
  }
27
 
28
  // greetings-2
30
  $('.ctc_greetings_settings.ctc_g_2').show();
31
  $('.pr_ht_ctc_greetings_2').show();
32
  $('.pr_ht_ctc_greetings_settings').show();
33
+ $('.ctc_greetings_notes').show();
34
  }
35
 
36
  // on change
46
 
47
  // if not no - then first hide all and again display required fields..
48
  $(" .ctc_greetings_settings").hide();
49
+ $('.ctc_greetings_notes').show();
50
 
51
  // greetings-1
52
  if (greetings_template == 'greetings-1') {
new/admin/admin_commons/admin-sidebar-content.php CHANGED
@@ -39,7 +39,7 @@ $othersettings = get_option('ht_ctc_othersettings');
39
  <div class="collapsible-header"><?php _e( 'PRO', 'click-to-chat-for-whatsapp' ); ?></div>
40
  <div class="collapsible-body">
41
  <p class="description">Random Numbers</p>
42
- <p class="description">Fixed/Absolute Position types</p>
43
  <p class="description">Webhooks - dynamic variables</p>
44
  <p class="description">Google Ads Conversion</p>
45
  <p class="description">Business Hours</p>
@@ -51,9 +51,10 @@ $othersettings = get_option('ht_ctc_othersettings');
51
  <p class="description">&emsp;selected days in a week</p>
52
  <p class="description">&emsp;selected time range in a day</p>
53
  <p class="description">&emsp;website visitor login status</p>
 
54
  <p class="description">Page level settings: style, time, scroll dealy</p>
55
  <p class="description">Add WhatsApp in WooCommerce Product pages</p>
56
- <p class="description">Form Filling (coming soon)</p>
57
  <p class="description">More features</p>
58
 
59
  <p class="description" style="text-align: center; position:sticky; bottom:2px; margin-top:20px;"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/" class="waves-effect waves-light btn" style="width: 100%;">PRO Version</a></p>
39
  <div class="collapsible-header"><?php _e( 'PRO', 'click-to-chat-for-whatsapp' ); ?></div>
40
  <div class="collapsible-body">
41
  <p class="description">Random Numbers</p>
42
+ <p class="description">Form Filling</p>
43
  <p class="description">Webhooks - dynamic variables</p>
44
  <p class="description">Google Ads Conversion</p>
45
  <p class="description">Business Hours</p>
51
  <p class="description">&emsp;selected days in a week</p>
52
  <p class="description">&emsp;selected time range in a day</p>
53
  <p class="description">&emsp;website visitor login status</p>
54
+ <p class="description">Fixed/Absolute Position types</p>
55
  <p class="description">Page level settings: style, time, scroll dealy</p>
56
  <p class="description">Add WhatsApp in WooCommerce Product pages</p>
57
+ <p class="description">Greetings time, scroll actions</p>
58
  <p class="description">More features</p>
59
 
60
  <p class="description" style="text-align: center; position:sticky; bottom:2px; margin-top:20px;"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/" class="waves-effect waves-light btn" style="width: 100%;">PRO Version</a></p>
new/admin/class-ht-ctc-admin-greetings-page.php CHANGED
@@ -268,7 +268,7 @@ class HT_CTC_Admin_Greetings {
268
  'title' => __( 'Initial stage', 'click-to-chat-for-whatsapp'),
269
  'db' => 'g_init',
270
  'template' => 'select',
271
- 'description' => "Open: Displays by default until user closes the first time <br>(Once user closes the Greetings Dialog on any page, greetings dialog won't display until user clicks to open again) <br> Close: Hidden by default and displays when user clicks <span class='g_user_closed_content'><span>",
272
  'list' => [
273
  'open' => 'Open',
274
  'close' => 'Close',
@@ -368,23 +368,30 @@ class HT_CTC_Admin_Greetings {
368
  <!-- sidebar content -->
369
  <div class="col s12 m9 l7 xl4 ht-ctc-admin-sidebar ht-ctc-greetings-admin-sidebar sticky-sidebar">
370
 
 
 
 
 
371
  <div class="sidebar-content">
372
  <div class="col s12 m8 l12 xl12">
373
  <div class="row">
374
  <ul class="collapsible popout ht_ctc_sidebar_contat">
375
  <li class="active">
376
- <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
377
  <div class="collapsible-body">
378
- <p class="description"><strong>New Feature</strong>: We are planning to improve this feature. <br> Contact us for any suggestions <br><br></p>
379
- <p class="description"><a href="http://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank"><?php _e( 'WhatsApp', 'click-to-chat-for-whatsapp' ); ?></a></p>
380
- <p class="description"><a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
381
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">Support Page</a></p>
382
  </div>
383
  </li>
384
  </ul>
385
  </div>
386
  </div>
387
  </div>
 
 
 
 
388
 
389
  </div>
390
 
@@ -442,7 +449,7 @@ class HT_CTC_Admin_Greetings {
442
  );
443
  }
444
 
445
-
446
 
447
 
448
  }
@@ -451,13 +458,27 @@ class HT_CTC_Admin_Greetings {
451
  public function ht_ctc_greetings_section_cb() {
452
  ?>
453
  <h1 id="greetings_settings">Greetings Dialog</h1>
454
- <p class="description"> <b style="color:#42a69a;">New feature: </b> We are planning to expand this feature. please <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support">contact us</a> for any suggestions</p>
455
  <br>
456
  <?php
457
  do_action('ht_ctc_ah_admin' );
458
 
459
  }
460
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
461
 
462
 
463
 
268
  'title' => __( 'Initial stage', 'click-to-chat-for-whatsapp'),
269
  'db' => 'g_init',
270
  'template' => 'select',
271
+ 'description' => "Open: Displays by default until user closes the first time <br>(Once user closes the Greetings Dialog on any page, greetings dialog won't display until user clicks to open again) <br> Close: Hidden by default and displays when user clicks - <a target='_blank' href='https://holithemes.com/plugins/click-to-chat/greetings-actions/'>more info</a>",
272
  'list' => [
273
  'open' => 'Open',
274
  'close' => 'Close',
368
  <!-- sidebar content -->
369
  <div class="col s12 m9 l7 xl4 ht-ctc-admin-sidebar ht-ctc-greetings-admin-sidebar sticky-sidebar">
370
 
371
+ <?php
372
+ if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
373
+ ?>
374
+
375
  <div class="sidebar-content">
376
  <div class="col s12 m8 l12 xl12">
377
  <div class="row">
378
  <ul class="collapsible popout ht_ctc_sidebar_contat">
379
  <li class="active">
380
+ <div class="collapsible-header"><?php _e( 'PRO', 'click-to-chat-for-whatsapp' ); ?></div>
381
  <div class="collapsible-body">
382
+ <p class="description">Greetings - Form filling</p>
383
+ <p class="description">Time, Scroll Actions</p>
384
+ <p class="description" style="text-align: center; position:sticky; bottom:2px; margin-top:20px;"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/" class="waves-effect waves-light btn" style="width: 100%;">PRO Version</a></p>
 
385
  </div>
386
  </li>
387
  </ul>
388
  </div>
389
  </div>
390
  </div>
391
+
392
+ <?php
393
+ }
394
+ ?>
395
 
396
  </div>
397
 
449
  );
450
  }
451
 
452
+ add_settings_field( 'ctc_g_content', '', array( $this, 'ctc_g_content_cb' ), 'ht_ctc_greetings_page_settings_section', 'ht_ctc_greetings_page_settings_sections_add' );
453
 
454
 
455
  }
458
  public function ht_ctc_greetings_section_cb() {
459
  ?>
460
  <h1 id="greetings_settings">Greetings Dialog</h1>
461
+ <p class="description"> <b style="color:#42a69a;">New feature: </b> please <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support">contact us</a> for any suggestions</p>
462
  <br>
463
  <?php
464
  do_action('ht_ctc_ah_admin' );
465
 
466
  }
467
 
468
+ public function ctc_g_content_cb() {
469
+
470
+ if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
471
+ ?>
472
+ <div class="ctc_greetings_settings ctc_greetings_notes">
473
+ <p class="description"><a href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO Features</a></p>
474
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/greetings-form/">Greetings Form</a>: Form filling before initiating the chat</p>
475
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/greetings-actions/">Actions</a>: Display/reappear based on time, scroll Actions</p>
476
+ </div>
477
+ <?php
478
+ }
479
+
480
+ }
481
+
482
 
483
 
484
 
new/admin/class-ht-ctc-admin-main-page.php CHANGED
@@ -278,7 +278,7 @@ class HT_CTC_Admin_Main_Page {
278
  ?>
279
  <div style="margin-bottom: 25px;">
280
  <p class="description">Business Hour (online/offline)</p>
281
- <p class="description">&emsp;Hide When offline</p>
282
  <p class="description">&emsp;Change WhatsApp Number When Offline</p>
283
  <p class="description">&emsp;Change Call to Action When Offline</p>
284
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO</a></p>
@@ -303,6 +303,7 @@ class HT_CTC_Admin_Main_Page {
303
 
304
  ?>
305
  <p class="description"><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize Styles</a></p>
 
306
  <p class="description"><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-other-settings' ); ?>">Other Settings</a></p>
307
  <p class="description"><a target="_blank" href="<?= $woo_link ?>">WooCommerce</a> <?= $woo_text ?></p>
308
  <br>
278
  ?>
279
  <div style="margin-bottom: 25px;">
280
  <p class="description">Business Hour (online/offline)</p>
281
+ <p class="description">&emsp;Hide When offline (or)</p>
282
  <p class="description">&emsp;Change WhatsApp Number When Offline</p>
283
  <p class="description">&emsp;Change Call to Action When Offline</p>
284
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO</a></p>
303
 
304
  ?>
305
  <p class="description"><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize Styles</a></p>
306
+ <p class="description"><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-greetings' ); ?>">Greetings Dialog</a></p>
307
  <p class="description"><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-other-settings' ); ?>">Other Settings</a></p>
308
  <p class="description"><a target="_blank" href="<?= $woo_link ?>">WooCommerce</a> <?= $woo_text ?></p>
309
  <br>
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -18,6 +18,8 @@ class HT_CTC_Chat {
18
  */
19
  public function chat() {
20
 
 
 
21
  $options = get_option('ht_ctc_chat_options');
22
  $othersettings = get_option('ht_ctc_othersettings');
23
  $greetings = get_option('ht_ctc_greetings_options');
18
  */
19
  public function chat() {
20
 
21
+ do_action('ht_ctc_ah_start_the_chat');
22
+
23
  $options = get_option('ht_ctc_chat_options');
24
  $othersettings = get_option('ht_ctc_othersettings');
25
  $greetings = get_option('ht_ctc_greetings_options');
new/inc/greetings/greetings_styles/g-cta-1.php CHANGED
@@ -28,7 +28,7 @@ if ('' == $s1_icon_color) {
28
 
29
  $s1_style = ('' !== $s1_css) ? "style='$s1_css'": "";
30
  ?>
31
- <button <?= $s1_style; ?> class="ctc-analytics g_s1_cta_btn">
32
  <?php
33
  if ('' !== $s1_add_icon) {
34
 
28
 
29
  $s1_style = ('' !== $s1_css) ? "style='$s1_css'": "";
30
  ?>
31
+ <button <?= $s1_style; ?> class="ctc-analytics g_s1_cta_btn ctc_cta">
32
  <?php
33
  if ('' !== $s1_add_icon) {
34
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
- Tested up to: 5.9.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.9
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
@@ -20,7 +20,7 @@ WhatsApp connectivity for WordPress websites! Engage customers and generate lead
20
 
21
  == WhatsApp Chat ==
22
 
23
- Add your 'WhatsApp' or 'WhatsApp Business' Number. And let your website visitors contact you with a single click.
24
 
25
  **📱 Mobile:** Navigates to WhatsApp Mobile App.
26
 
@@ -39,7 +39,7 @@ Select a Style that matches your Website design.
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
42
- [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht) | ✏️ [Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
43
 
44
 
45
  = 🌼 Add Own Image =
@@ -58,6 +58,17 @@ The custom design will navigate to WhatsApp based on plugin settings (WhatsApp N
58
 
59
  [Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
60
 
 
 
 
 
 
 
 
 
 
 
 
61
  == ✳️ Position to Place ==
62
 
63
  * Add WhatsApp at any position of the screen
@@ -166,6 +177,9 @@ Connect other applications using Integrate, Automation tools like Zapier, IFTTT,
166
  * {url} - replace with current page URL
167
  * {time} - time the user interacted with WhatsApp Button/Icon
168
  * {number} - WhatsApp Number for that icon/button
 
 
 
169
  * Position to place
170
  * Fixed: Fixed position to the screen (default, available in Free version)
171
  * Absolute: Fixed position to the body content. (Moves when the user scrolls page)
@@ -482,6 +496,11 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
482
 
483
  == Changelog ==
484
 
 
 
 
 
 
485
  = 3.9 =
486
  * New: Greetings Dialogs
487
  * Greetings 1: Customizable Design
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
+ Tested up to: 5.9.3
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.9.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
20
 
21
  == WhatsApp Chat ==
22
 
23
+ Add 'WhatsApp' or 'WhatsApp Business' Number. And let your website visitors contact you with a single click.
24
 
25
  **📱 Mobile:** Navigates to WhatsApp Mobile App.
26
 
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
42
+ [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht) | [Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht) ✏️
43
 
44
 
45
  = 🌼 Add Own Image =
58
 
59
  [Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
60
 
61
+ == Greetings Dialog ==
62
+
63
+ Encourage user engagement by displaying the perfect Greetings message
64
+
65
+ * [Greetings-1](https://holithemes.com/plugins/click-to-chat/greetings-1/): Customizable Design
66
+ * [Greetings-2](https://holithemes.com/plugins/click-to-chat/greetings-2/): Content Specific Design
67
+ * [Greetings-Form](https://holithemes.com/plugins/click-to-chat/greetings-form/) [pro]: Form Filling before initializing the chat
68
+
69
+ [Actions](https://holithemes.com/plugins/click-to-chat/greetings-actions/) [pro]: Display/reappear based on Time, Scroll
70
+
71
+
72
  == ✳️ Position to Place ==
73
 
74
  * Add WhatsApp at any position of the screen
177
  * {url} - replace with current page URL
178
  * {time} - time the user interacted with WhatsApp Button/Icon
179
  * {number} - WhatsApp Number for that icon/button
180
+ * Greetings
181
+ * Greetings From filling before initiating the chat
182
+ * Display/reappear based Time, Scroll Actions
183
  * Position to place
184
  * Fixed: Fixed position to the screen (default, available in Free version)
185
  * Absolute: Fixed position to the body content. (Moves when the user scrolls page)
496
 
497
  == Changelog ==
498
 
499
+ = 3.9.1 =
500
+ * Enchantment: Greetings feature
501
+ * PRO: New - [Greetings - From filling](https://holithemes.com/plugins/click-to-chat/greetings-form/)
502
+ * PRO: New - [Greetings Actions - Time, Scroll](https://holithemes.com/plugins/click-to-chat/greetings-actions/)
503
+
504
  = 3.9 =
505
  * New: Greetings Dialogs
506
  * Greetings 1: Customizable Design