Click to Chat for WhatsApp Chat - Version 3.12

Version Description

  • New: URL Open Target window - New, Same, popup.
  • URL structure for desktop: wa.me, web.whatsapp
  • URL structure for mobile: wa.me, WhatsApp://
  • Web WhatsApp settings moved to other settings page with enchantments.
Download this release

Release Info

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

Code changes from version 3.9.11 to 3.12

Files changed (32) hide show
  1. click-to-chat.php +2 -2
  2. new/admin/admin_assets/js/admin.js +41 -0
  3. new/admin/admin_assets/js/greetings.js +3 -20
  4. new/admin/admin_commons/admin-device-settings.php +3 -3
  5. new/admin/admin_commons/class-ht-ctc-admin-hooks.php +0 -7
  6. new/admin/class-ht-ctc-admin-greetings-page.php +4 -1
  7. new/admin/class-ht-ctc-admin-main-page.php +3 -33
  8. new/admin/class-ht-ctc-admin-other-settings.php +138 -8
  9. new/admin/db/class-ht-ctc-db.php +0 -2
  10. new/admin/db/class-ht-ctc-db2.php +0 -1
  11. new/inc/assets/js/app.js +1 -1
  12. new/inc/assets/js/dev/app.dev.js +49 -10
  13. new/inc/assets/js/dev/woo.dev.js +4 -1
  14. new/inc/assets/js/woo.js +1 -1
  15. new/inc/chat/class-ht-ctc-chat.php +54 -9
  16. new/inc/commons/class-ht-ctc-scripts.php +9 -2
  17. new/inc/greetings/class-ht-ctc-chat-greetings.php +6 -1
  18. new/inc/styles/style-99.php +1 -1
  19. new/tools/woo/class-ht-ctc-woo.php +7 -2
  20. new/tools/woo/woo-admin/class-ht-ctc-admin-woo-page.php +17 -32
  21. new/tools/woo/woo-single-styles/woo-style-1.php +67 -0
  22. new/tools/woo/woo-single-styles/woo-style-2.php +39 -0
  23. new/tools/woo/woo-single-styles/woo-style-3.php +46 -0
  24. new/tools/woo/woo-single-styles/woo-style-3_1.php +74 -0
  25. new/tools/woo/woo-single-styles/woo-style-4.php +64 -0
  26. new/tools/woo/woo-single-styles/woo-style-5.php +86 -0
  27. new/tools/woo/woo-single-styles/woo-style-6.php +25 -0
  28. new/tools/woo/woo-single-styles/woo-style-7.php +61 -0
  29. new/tools/woo/woo-single-styles/woo-style-7_1.php +78 -0
  30. new/tools/woo/woo-single-styles/woo-style-8.php +78 -0
  31. new/tools/woo/woo-single-styles/woo-style-99.php +42 -0
  32. readme.txt +66 -37
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.11
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.11' );
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.12
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.12' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/admin/admin_assets/js/admin.js CHANGED
@@ -108,6 +108,7 @@ document.addEventListener('DOMContentLoaded', function () {
108
  wn();
109
  hook();
110
  ss();
 
111
  other();
112
 
113
  try {
@@ -309,6 +310,44 @@ document.addEventListener('DOMContentLoaded', function () {
309
 
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  // woo page..
313
  function woo_page() {
314
 
@@ -551,6 +590,7 @@ document.addEventListener('DOMContentLoaded', function () {
551
  'ht_ctc_woo_1',
552
  'ht_ctc_woo_shop',
553
  'ctc_g_opt_in',
 
554
  ];
555
 
556
  var default_active = [
@@ -561,6 +601,7 @@ document.addEventListener('DOMContentLoaded', function () {
561
  'ht_ctc_analytics',
562
  'ht_ctc_animations',
563
  'ht_ctc_other_settings',
 
564
  ];
565
 
566
 
108
  wn();
109
  hook();
110
  ss();
111
+ url_structure();
112
  other();
113
 
114
  try {
310
 
311
  }
312
 
313
+ // url structure - custom url..
314
+ function url_structure() {
315
+ // default display
316
+ var url_structure_d = $('.url_structure_d').find(":selected").val();
317
+ if (url_structure_d == 'custom_url') {
318
+ $(".custom_url_desktop").show();
319
+ }
320
+
321
+ var url_structure_m = $('.url_structure_m').find(":selected").val();
322
+ if (url_structure_m == 'custom_url') {
323
+ $(".custom_url_mobile").show();
324
+ }
325
+
326
+ // on change
327
+ $(".url_structure_d").on("change", function (e) {
328
+
329
+ var change_url_structure_d = e.target.value;
330
+
331
+ if (change_url_structure_d == 'custom_url') {
332
+ $(".custom_url_desktop").show(500);
333
+ } else {
334
+ $(".custom_url_desktop").hide(500);
335
+ }
336
+ });
337
+ $(".url_structure_m").on("change", function (e) {
338
+
339
+ var change_url_structure_m = e.target.value;
340
+
341
+ if (change_url_structure_m == 'custom_url') {
342
+ $(".custom_url_mobile").show(500);
343
+ } else {
344
+ $(".custom_url_mobile").hide(500);
345
+ }
346
+ });
347
+
348
+
349
+ }
350
+
351
  // woo page..
352
  function woo_page() {
353
 
590
  'ht_ctc_woo_1',
591
  'ht_ctc_woo_shop',
592
  'ctc_g_opt_in',
593
+ 'url_structure',
594
  ];
595
 
596
  var default_active = [
601
  'ht_ctc_analytics',
602
  'ht_ctc_animations',
603
  'ht_ctc_other_settings',
604
+ 'url_structure',
605
  ];
606
 
607
 
new/admin/admin_assets/js/greetings.js CHANGED
@@ -6,32 +6,17 @@
6
  console.log('greetings.js');
7
 
8
  if (document.querySelector('.pr_greetings_template')) {
9
- console.log('-- pr_greetings_template --');
10
  try {
11
  greetings_template();
12
- } catch (e) {
13
- console.log('catch greetings_template');
14
- }
15
  }
16
 
17
  if (document.querySelector('.ctc-admin-greetings-page') || document.querySelector('.ctc-admin-woo-page')) {
18
- console.log('-- ctc-admin-greetings-page or ctc-admin-woo-page --');
19
  try {
20
  editor();
21
- } catch (e) {
22
- console.log('catch editor');
23
- }
24
  }
25
 
26
- // // md - reinstall
27
- // setTimeout(() => {
28
- // try {
29
- // $('select').formSelect();
30
- // } catch (e) {
31
- // console.log('catch select formSelect');
32
- // }
33
- // }, 500);
34
-
35
  /**
36
  * display settings based on Greetings template selection
37
  */
@@ -122,9 +107,7 @@
122
  if (document.getElementById("header_content_ifr")) {
123
  try {
124
  tiny_bg_color();
125
- } catch (e) {
126
- console.log('catch tiny_bg_color');
127
- }
128
  } else {
129
  check++;
130
  if (check < check_times) {
6
  console.log('greetings.js');
7
 
8
  if (document.querySelector('.pr_greetings_template')) {
 
9
  try {
10
  greetings_template();
11
+ } catch (e) {}
 
 
12
  }
13
 
14
  if (document.querySelector('.ctc-admin-greetings-page') || document.querySelector('.ctc-admin-woo-page')) {
 
15
  try {
16
  editor();
17
+ } catch (e) {}
 
 
18
  }
19
 
 
 
 
 
 
 
 
 
 
20
  /**
21
  * display settings based on Greetings template selection
22
  */
107
  if (document.getElementById("header_content_ifr")) {
108
  try {
109
  tiny_bg_color();
110
+ } catch (e) { }
 
 
111
  } else {
112
  check++;
113
  if (check < check_times) {
new/admin/admin_commons/admin-device-settings.php CHANGED
@@ -49,7 +49,7 @@ $position_type_values = apply_filters( 'ht_ctc_fh_position_type_values', $positi
49
  <blockquote class="not_samesettings" style="margin-bottom: 25px;">Desktop:</blockquote>
50
 
51
  <!-- style -->
52
- <p class="description ht_ctc_admin_desktop ht_ctc_subtitle"><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?> <span class="not_samesettings"><?php _e( ' (Desktop)', 'click-to-chat-for-whatsapp' ); ?></span>:</p class="description">
53
  <div class="row ht_ctc_admin_desktop">
54
  <div class="input-field col s12 m12">
55
  <select name="<?= $dbrow; ?>[style_desktop]" class="chat_select_style select_style_desktop">
@@ -161,7 +161,7 @@ if ( isset( $options['same_settings'] ) ) {
161
  <blockquote class="not_samesettings " style="margin-bottom: 25px;"><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>:</blockquote>
162
 
163
  <!-- style -->
164
- <p class="description ht_ctc_admin_mobile ht_ctc_subtitle not_samesettings"><?php _e( 'Select Style (Mobile)', 'click-to-chat-for-whatsapp' ); ?>:</p class="description">
165
  <div class="row ht_ctc_admin_mobile not_samesettings">
166
  <div class="input-field col s12 m12">
167
  <select name="<?= $dbrow; ?>[style_mobile]" class="chat_select_style select_style_mobile">
@@ -182,7 +182,7 @@ if ( isset( $options['same_settings'] ) ) {
182
  </div>
183
 
184
  <!-- position type - mobile -->
185
- <p class="description ht_ctc_admin_mobile ht_ctc_subtitle not_samesettings"><?php _e( 'Position Type', 'click-to-chat-for-whatsapp' ); ?>:</p class="description">
186
  <div class="row ht_ctc_admin_mobile not_samesettings">
187
  <div class="input-field col s12 m12">
188
  <select name="<?php echo $dbrow ?>[position_type_mobile]" class="chat_select_position_type">
49
  <blockquote class="not_samesettings" style="margin-bottom: 25px;">Desktop:</blockquote>
50
 
51
  <!-- style -->
52
+ <p class="description ht_ctc_admin_desktop ht_ctc_subtitle"><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?> <span class="not_samesettings"><?php _e( ' (Desktop)', 'click-to-chat-for-whatsapp' ); ?></span>:</p>
53
  <div class="row ht_ctc_admin_desktop">
54
  <div class="input-field col s12 m12">
55
  <select name="<?= $dbrow; ?>[style_desktop]" class="chat_select_style select_style_desktop">
161
  <blockquote class="not_samesettings " style="margin-bottom: 25px;"><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>:</blockquote>
162
 
163
  <!-- style -->
164
+ <p class="description ht_ctc_admin_mobile ht_ctc_subtitle not_samesettings"><?php _e( 'Select Style (Mobile)', 'click-to-chat-for-whatsapp' ); ?>:</p>
165
  <div class="row ht_ctc_admin_mobile not_samesettings">
166
  <div class="input-field col s12 m12">
167
  <select name="<?= $dbrow; ?>[style_mobile]" class="chat_select_style select_style_mobile">
182
  </div>
183
 
184
  <!-- position type - mobile -->
185
+ <p class="description ht_ctc_admin_mobile ht_ctc_subtitle not_samesettings"><?php _e( 'Position Type', 'click-to-chat-for-whatsapp' ); ?>:</p>
186
  <div class="row ht_ctc_admin_mobile not_samesettings">
187
  <div class="input-field col s12 m12">
188
  <select name="<?php echo $dbrow ?>[position_type_mobile]" class="chat_select_position_type">
new/admin/admin_commons/class-ht-ctc-admin-hooks.php CHANGED
@@ -171,10 +171,6 @@ class HT_CTC_Admin_Others {
171
 
172
  }
173
 
174
- // // todo -comment this.. - added here for testing..
175
- // add_action('admin_notices', array( $this, 'pro_notice') );
176
- // add_action('admin_footer', array( $this, 'admin_pro_notice_scripts') );
177
-
178
  }
179
 
180
  function ifnumberblank() {
@@ -182,7 +178,6 @@ class HT_CTC_Admin_Others {
182
  <div class="notice notice-info is-dismissible">
183
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat'); ?>"><?php _e( 'Add WhatsApp Number', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'and let visitors chat', 'click-to-chat-for-whatsapp' ); ?>.</p>
184
  <!-- <p>Click to Chat is almost ready. <a href="<?php // echo admin_url('admin.php?page=click-to-chat');?>">Add WhatsApp Number</a> to display the chat options and let visitors chat.</p> -->
185
- <!-- <a href="?dismis">Dismiss</a> -->
186
  </div>
187
  <?php
188
  }
@@ -191,7 +186,6 @@ class HT_CTC_Admin_Others {
191
  ?>
192
  <div class="notice notice-info is-dismissible">
193
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat-group-feature'); ?>"><?php _e( 'Add WhatsApp Group ID', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'to let visitors join in your WhatsApp Group', 'click-to-chat-for-whatsapp' ); ?>.</p>
194
- <!-- <a href="?dismis">Dismiss</a> -->
195
  </div>
196
  <?php
197
  }
@@ -200,7 +194,6 @@ class HT_CTC_Admin_Others {
200
  ?>
201
  <div class="notice notice-info is-dismissible">
202
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat-share-feature'); ?>"><?php _e( 'Add Share Text', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'to let vistiors Share your Webpages', 'click-to-chat-for-whatsapp' ); ?>.</p>
203
- <!-- <a href="?dismis">Dismiss</a> -->
204
  </div>
205
  <?php
206
  }
171
 
172
  }
173
 
 
 
 
 
174
  }
175
 
176
  function ifnumberblank() {
178
  <div class="notice notice-info is-dismissible">
179
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat'); ?>"><?php _e( 'Add WhatsApp Number', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'and let visitors chat', 'click-to-chat-for-whatsapp' ); ?>.</p>
180
  <!-- <p>Click to Chat is almost ready. <a href="<?php // echo admin_url('admin.php?page=click-to-chat');?>">Add WhatsApp Number</a> to display the chat options and let visitors chat.</p> -->
 
181
  </div>
182
  <?php
183
  }
186
  ?>
187
  <div class="notice notice-info is-dismissible">
188
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat-group-feature'); ?>"><?php _e( 'Add WhatsApp Group ID', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'to let visitors join in your WhatsApp Group', 'click-to-chat-for-whatsapp' ); ?>.</p>
 
189
  </div>
190
  <?php
191
  }
194
  ?>
195
  <div class="notice notice-info is-dismissible">
196
  <p><?php _e( 'Click to Chat is almost ready', 'click-to-chat-for-whatsapp' ); ?>. <a href="<?= admin_url('admin.php?page=click-to-chat-share-feature'); ?>"><?php _e( 'Add Share Text', 'click-to-chat-for-whatsapp' ); ?></a> <?php _e( 'to let vistiors Share your Webpages', 'click-to-chat-for-whatsapp' ); ?>.</p>
 
197
  </div>
198
  <?php
199
  }
new/admin/class-ht-ctc-admin-greetings-page.php CHANGED
@@ -15,9 +15,12 @@ class HT_CTC_Admin_Greetings {
15
  public $values = '';
16
 
17
  public function __construct() {
 
 
18
 
19
- add_action('admin_menu', [$this, 'menu'] );
20
 
 
21
 
22
 
23
  // only if options.php or this settings page..
15
  public $values = '';
16
 
17
  public function __construct() {
18
+ $this->hooks();
19
+ }
20
 
21
+ public function hooks() {
22
 
23
+ add_action('admin_menu', [$this, 'menu'] );
24
 
25
 
26
  // only if options.php or this settings page..
new/admin/class-ht-ctc-admin-main-page.php CHANGED
@@ -84,7 +84,6 @@ class HT_CTC_Admin_Main_Page {
84
  add_settings_field( 'number', __( 'WhatsApp Number', 'click-to-chat-for-whatsapp'), array( $this, 'number_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
85
  add_settings_field( 'prefilled', __( 'Pre-Filled Message', 'click-to-chat-for-whatsapp'), array( $this, 'prefilled_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
86
  add_settings_field( 'cta', __( 'Call to Action', 'click-to-chat-for-whatsapp'), array( $this, 'cta_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
87
- add_settings_field( 'ctc_webandapi', __( 'Web WhatsApp', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_webandapi_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
88
  add_settings_field( 'ctc_desktop', __( 'Style, Position', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_device_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
89
  add_settings_field( 'ctc_show_hide', __( 'Display Settings', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_show_hide_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
90
 
@@ -214,43 +213,15 @@ class HT_CTC_Admin_Main_Page {
214
  <p class= "description">To Change Pre-filled Message, Call to action for WooCommerce Single Product Pages <a target="_blank" href="<?= $woo_link ?>">( Click to Chat -> WooCommerce )</a></p>
215
  <?php
216
  }
 
 
217
  ?>
 
218
  </div>
219
  </div>
220
  <?php
221
  }
222
 
223
- // If checked web / api whatsapp link. If unchecked wa.me links
224
- function ctc_webandapi_cb() {
225
- $options = get_option('ht_ctc_chat_options');
226
- $dbrow = 'ht_ctc_chat_options';
227
-
228
- if ( isset( $options['webandapi'] ) ) {
229
- ?>
230
- <p>
231
- <label>
232
- <input name="ht_ctc_chat_options[webandapi]" type="checkbox" value="1" <?php checked( $options['webandapi'], 1 ); ?> id="webandapi" />
233
- <span><?php _e( 'Web WhatsApp on Desktop', 'click-to-chat-for-whatsapp' ); ?></span>
234
- </label>
235
- </p>
236
- <?php
237
- } else {
238
- ?>
239
- <p>
240
- <label>
241
- <input name="ht_ctc_chat_options[webandapi]" type="checkbox" value="1" id="webandapi" />
242
- <span><?php _e( 'Web WhatsApp on Desktop', 'click-to-chat-for-whatsapp' ); ?></span>
243
- </label>
244
- </p>
245
- <?php
246
- }
247
- ?>
248
- <p class="description"><?php _e( 'If checked opens Web.WhatsApp directly on Desktop and in mobile WhatsApp App', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/web-whatsapp/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
249
- <br>
250
-
251
- <?php
252
- }
253
-
254
 
255
  // device based settings - style, position
256
  function ctc_device_cb() {
@@ -261,7 +232,6 @@ class HT_CTC_Admin_Main_Page {
261
  include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-device-settings.php';
262
  }
263
 
264
-
265
  // show/hide
266
  function ctc_show_hide_cb() {
267
  $options = get_option('ht_ctc_chat_options');
84
  add_settings_field( 'number', __( 'WhatsApp Number', 'click-to-chat-for-whatsapp'), array( $this, 'number_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
85
  add_settings_field( 'prefilled', __( 'Pre-Filled Message', 'click-to-chat-for-whatsapp'), array( $this, 'prefilled_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
86
  add_settings_field( 'cta', __( 'Call to Action', 'click-to-chat-for-whatsapp'), array( $this, 'cta_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
 
87
  add_settings_field( 'ctc_desktop', __( 'Style, Position', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_device_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
88
  add_settings_field( 'ctc_show_hide', __( 'Display Settings', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_show_hide_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
89
 
213
  <p class= "description">To Change Pre-filled Message, Call to action for WooCommerce Single Product Pages <a target="_blank" href="<?= $woo_link ?>">( Click to Chat -> WooCommerce )</a></p>
214
  <?php
215
  }
216
+
217
+ $other_settings_link = admin_url( 'admin.php?page=click-to-chat-other-settings#url_structure' );
218
  ?>
219
+ <p class= "description" style="margin-top:40px;"><strong>'Web WhatsApp'</strong> feature is moved to 'Other Settings' <a target="_blank" href="<?= $other_settings_link ?>">( Click to Chat -> Other Settings - URL Structure )</a></p>
220
  </div>
221
  </div>
222
  <?php
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
  // device based settings - style, position
227
  function ctc_device_cb() {
232
  include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-device-settings.php';
233
  }
234
 
 
235
  // show/hide
236
  function ctc_show_hide_cb() {
237
  $options = get_option('ht_ctc_chat_options');
new/admin/class-ht-ctc-admin-other-settings.php CHANGED
@@ -186,6 +186,9 @@ class HT_CTC_Admin_Other_Settings {
186
 
187
  <?php
188
 
 
 
 
189
  // Google Ads gtag_report_conversion
190
  $ga_ads_checkbox = ( isset( $options['ga_ads']) ) ? esc_attr( $options['ga_ads'] ) : '';
191
 
@@ -434,6 +437,7 @@ class HT_CTC_Admin_Other_Settings {
434
  function ht_ctc_othersettings_cb() {
435
 
436
  $options = get_option('ht_ctc_othersettings');
 
437
  $dbrow = 'ht_ctc_othersettings';
438
 
439
  $aria = (isset($options['aria'])) ? 1 : '';
@@ -446,10 +450,127 @@ class HT_CTC_Admin_Other_Settings {
446
  ?>
447
 
448
  <p class="description"><?php _e( 'All this below settings are not important to everyone', 'click-to-chat-for-whatsapp' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
 
450
  <ul class="collapsible ht_ctc_other_settings" data-collapsible="accordion" id="ht_ctc_othersettings">
451
  <li class="">
452
- <div class="collapsible-header"><?php _e( 'Advanced Settings', 'click-to-chat-for-whatsapp' ); ?></div>
453
  <div class="collapsible-body">
454
 
455
  <!-- z-index -->
@@ -466,12 +587,17 @@ class HT_CTC_Admin_Other_Settings {
466
 
467
  <!-- aria -->
468
  <div class="row">
469
- <p id="aria">
 
 
 
470
  <label>
471
  <input name="<?php echo $dbrow ?>[aria]" type="checkbox" value="1" <?php checked( $aria, 1 ); ?> id="aria" />
472
- <span><?php _e( 'Add aria-hidden=true - hide for Accessibility API (screen readers)', 'click-to-chat-for-whatsapp' ); ?></span>
 
473
  </label>
474
- </p>
 
475
  </div>
476
 
477
  <?php
@@ -479,12 +605,9 @@ class HT_CTC_Admin_Other_Settings {
479
  // in other settings
480
  do_action('ht_ctc_ah_admin_in_os');
481
  ?>
482
-
483
  </div>
484
  </li>
485
  </ul>
486
-
487
-
488
  <br>
489
 
490
  <!-- enable group, share features -->
@@ -611,6 +734,7 @@ class HT_CTC_Admin_Other_Settings {
611
 
612
  ?>
613
 
 
614
  <p class="description">
615
  <ul>
616
  Basic Troubleshoot
@@ -646,7 +770,13 @@ class HT_CTC_Admin_Other_Settings {
646
  ?>
647
 
648
  <br><br>
649
- <p class="description"><?php _e( 'If any issue: Please contact us', 'click-to-chat-for-whatsapp' ); ?> <br> <?php _e( 'Mail', 'click-to-chat-for-whatsapp' ); ?>: <a href="mailto:ctc@holithemes.com">ctc@holithemes.com</a> <br> <a target="_blank" href="https://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question"><?php _e( 'WhatsApp Us', 'click-to-chat-for-whatsapp' ); ?></a></p>
 
 
 
 
 
 
650
 
651
 
652
  </div>
186
 
187
  <?php
188
 
189
+ do_action('ht_ctc_ah_admin_after_fb_pixel');
190
+
191
+
192
  // Google Ads gtag_report_conversion
193
  $ga_ads_checkbox = ( isset( $options['ga_ads']) ) ? esc_attr( $options['ga_ads'] ) : '';
194
 
437
  function ht_ctc_othersettings_cb() {
438
 
439
  $options = get_option('ht_ctc_othersettings');
440
+ $chat_options = get_option('ht_ctc_chat_options');
441
  $dbrow = 'ht_ctc_othersettings';
442
 
443
  $aria = (isset($options['aria'])) ? 1 : '';
450
  ?>
451
 
452
  <p class="description"><?php _e( 'All this below settings are not important to everyone', 'click-to-chat-for-whatsapp' ); ?></p>
453
+ <?php
454
+
455
+ // url strucutre
456
+ $url_target_d = ( isset( $options['url_target_d']) ) ? esc_attr( $options['url_target_d'] ) :'_blank';
457
+ $url_structure_d = ( isset( $options['url_structure_d']) ) ? esc_attr( $options['url_structure_d'] ) :'';
458
+ $url_structure_m = ( isset( $options['url_structure_m']) ) ? esc_attr( $options['url_structure_m'] ) :'';
459
+
460
+ $custom_link_d = ( isset( $options['custom_link_d']) ) ? esc_attr( $options['custom_link_d'] ) :'';
461
+ $custom_link_m = ( isset( $options['custom_link_m']) ) ? esc_attr( $options['custom_link_m'] ) :'';
462
+
463
+ /**
464
+ * web whatsapp - deskop - if new settings not updated, based on settings set before 3.12
465
+ * url_structure_d = '' (blank means user not updated new settings)
466
+ * isset( $chat_options['webandapi'] )- existing user no need to check this new settings and update the page. no issue.
467
+ */
468
+ if ( '' == $url_structure_d && isset( $chat_options['webandapi'] ) ) {
469
+ $url_structure_d = 'web';
470
+ }
471
+
472
+ $url_structure_d_list = array(
473
+ 'default' => '(' . __( 'Default', 'click-to-chat-for-') .') wa.me',
474
+ 'web' => 'Web WhatsApp',
475
+ // 'custom_url' => __( 'Custom URL', 'click-to-chat-for-whatsapp' ),
476
+ );
477
+
478
+ $url_structure_m_list = array(
479
+ 'default' => '(' . __( 'Default', 'click-to-chat-for-') .') wa.me',
480
+ 'wa_colon' => 'WhatsApp://',
481
+ // 'custom_url' => __( 'Custom URL', 'click-to-chat-for-whatsapp' ),
482
+ );
483
+
484
+ ?>
485
+
486
+ <ul class="collapsible url_structure" id="url_structure">
487
+ <li class="">
488
+ <div class="collapsible-header" id="showhide_settings"><?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></div>
489
+ <div class="collapsible-body">
490
+
491
+ <p class="description ht_ctc_subtitle" style="margin-bottom: 11px;"><?php _e( 'Desktop', 'click-to-chat-for-whatsapp' ); ?>:</p>
492
+ <div class="row">
493
+ <div class="col s6">
494
+ <p><?php _e( 'Open links in', 'click-to-chat-for-whatsapp' ); ?></p>
495
+ </div>
496
+ <div class="input-field col s6">
497
+ <select name="<?= $dbrow; ?>[url_target_d]" class="url_target_d">
498
+ <option value="_blank" <?= $url_target_d == '_blank' ? 'SELECTED' : ''; ?> ><?php _e( 'New Tab', 'click-to-chat-for-whatsapp' ); ?></option>
499
+ <option value="popup" <?= $url_target_d == 'popup' ? 'SELECTED' : ''; ?> ><?php _e( 'Pop-up', 'click-to-chat-for-whatsapp' ); ?></option>
500
+ <option value="_self" <?= $url_target_d == '_self' ? 'SELECTED' : ''; ?> ><?php _e( 'Same Tab', 'click-to-chat-for-whatsapp' ); ?></option>
501
+ </select>
502
+ <label><?php _e( 'Open links in', 'click-to-chat-for-whatsapp' ); ?></label>
503
+ </div>
504
+ </div>
505
+
506
+ <div class="row">
507
+ <div class="col s6">
508
+ <p><?php _e( 'Desktop', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></p>
509
+ </div>
510
+ <div class="input-field col s6">
511
+ <select name="<?= $dbrow; ?>[url_structure_d]" class="url_structure_d">
512
+ <?php
513
+ foreach ( $url_structure_d_list as $key => $value ) {
514
+ ?>
515
+ <option value="<?= $key ?>" <?= $url_structure_d == $key ? 'SELECTED' : ''; ?> ><?= $value ?></option>
516
+ <?php
517
+ }
518
+ ?>
519
+ </select>
520
+ <label><?php _e( 'Desktop', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></label>
521
+ </div>
522
+ </div>
523
+
524
+ <div class="row custom_url_desktop ctc_init_display_none">
525
+ <div class="col s6">
526
+ <p><?php _e( 'Desktop', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'Custom URL', 'click-to-chat-for-whatsapp' ); ?></p>
527
+ </div>
528
+ <div class="input-field col s6">
529
+ <input placeholder="" name="<?= $dbrow; ?>[custom_link_d]" value="<?= $custom_link_d ?>" id="custom_link_d" type="text">
530
+ <label><?php _e( 'Desktop', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'Custom URL', 'click-to-chat-for-whatsapp' ); ?></label>
531
+ <p class="description"><?php _e( 'Add Full URL for Desktop', 'click-to-chat-for-whatsapp' ); ?></p>
532
+ </div>
533
+ </div>
534
+
535
+ <p class="description ht_ctc_subtitle" style="margin-bottom: 11px;"><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>:</p>
536
+ <div class="row">
537
+ <div class="col s6">
538
+ <p><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></p>
539
+ </div>
540
+ <div class="input-field col s6">
541
+ <select name="<?= $dbrow; ?>[url_structure_m]" class="url_structure_m">
542
+ <?php
543
+ foreach ( $url_structure_m_list as $key => $value ) {
544
+ ?>
545
+ <option value="<?= $key ?>" <?= $url_structure_m == $key ? 'SELECTED' : ''; ?> ><?= $value ?></option>
546
+ <?php
547
+ }
548
+ ?>
549
+ </select>
550
+ <label><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></label>
551
+ </div>
552
+ </div>
553
+
554
+ <div class="row custom_url_mobile ctc_init_display_none">
555
+ <div class="col s6">
556
+ <p><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'Custom URL', 'click-to-chat-for-whatsapp' ); ?></p>
557
+ </div>
558
+ <div class="input-field col s6">
559
+ <input placeholder="" name="<?= $dbrow; ?>[custom_link_m]" value="<?= $custom_link_m ?>" id="custom_link_m" type="text">
560
+ <label><?php _e( 'Mobile', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'Custom URL', 'click-to-chat-for-whatsapp' ); ?></label>
561
+ <p class="description"><?php _e( 'Add Full URL for Mobile', 'click-to-chat-for-whatsapp' ); ?></p>
562
+ </div>
563
+ </div>
564
+
565
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/url-structure/"><?php _e( 'URL Structure', 'click-to-chat-for-whatsapp' ); ?></a> </p>
566
+ </div>
567
+ </li>
568
+ </ul>
569
+ <br>
570
 
571
  <ul class="collapsible ht_ctc_other_settings" data-collapsible="accordion" id="ht_ctc_othersettings">
572
  <li class="">
573
+ <div class="collapsible-header"><?php _e( 'z-index, Aria', 'click-to-chat-for-whatsapp' ); ?></div>
574
  <div class="collapsible-body">
575
 
576
  <!-- z-index -->
587
 
588
  <!-- aria -->
589
  <div class="row">
590
+ <div class="col s6">
591
+ <p><?php _e( 'Add aria-hidden=true', 'click-to-chat-for-whatsapp' ); ?></p>
592
+ </div>
593
+ <div class="col s6">
594
  <label>
595
  <input name="<?php echo $dbrow ?>[aria]" type="checkbox" value="1" <?php checked( $aria, 1 ); ?> id="aria" />
596
+ <span><?php _e( 'Add aria-hidden=true', 'click-to-chat-for-whatsapp' ); ?></span>
597
+ <p class="description"><?php _e( 'hide for Accessibility API (screen readers)', 'click-to-chat-for-whatsapp' ); ?></p>
598
  </label>
599
+ <br>
600
+ </div>
601
  </div>
602
 
603
  <?php
605
  // in other settings
606
  do_action('ht_ctc_ah_admin_in_os');
607
  ?>
 
608
  </div>
609
  </li>
610
  </ul>
 
 
611
  <br>
612
 
613
  <!-- enable group, share features -->
734
 
735
  ?>
736
 
737
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/faq"><?php _e( 'FAQ', 'click-to-chat-for-whatsapp' ); ?> (<?php _e( 'Frequently Asked Questions', 'click-to-chat-for-whatsapp' ); ?>)</a></p>
738
  <p class="description">
739
  <ul>
740
  Basic Troubleshoot
770
  ?>
771
 
772
  <br><br>
773
+ <p class="description">
774
+ <?php _e( 'If any issue? Please, contact us', 'click-to-chat-for-whatsapp' ); ?>
775
+ <br>
776
+ <?php _e( 'Mail', 'click-to-chat-for-whatsapp' ); ?>: <a href="mailto:ctc@holithemes.com">ctc@holithemes.com</a>
777
+ <br>
778
+ <?php _e( 'Chat', 'click-to-chat-for-whatsapp' ); ?>: <a target="_blank" href="https://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question"><?php _e( 'WhatsApp Us', 'click-to-chat-for-whatsapp' ); ?></a>
779
+ </p>
780
 
781
 
782
  </div>
new/admin/db/class-ht-ctc-db.php CHANGED
@@ -104,8 +104,6 @@ class HT_CTC_DB {
104
  * checkboxes ..
105
  * hide/show options ..
106
  * same_settings - desktop, mobile same settings. i.e. apply dekstop setting to mobile - since v3.3.3 for new users auto checks
107
- *
108
- * webandapi if checked ? web/api.whatsapp(mobile,desktop) : wa.me
109
  *
110
  * @since 3.2.7 - cc, num - better user interface to add number
111
  *
104
  * checkboxes ..
105
  * hide/show options ..
106
  * same_settings - desktop, mobile same settings. i.e. apply dekstop setting to mobile - since v3.3.3 for new users auto checks
 
 
107
  *
108
  * @since 3.2.7 - cc, num - better user interface to add number
109
  *
new/admin/db/class-ht-ctc-db2.php CHANGED
@@ -128,7 +128,6 @@ class HT_CTC_DB2 {
128
  * share chat
129
  *
130
  * checkboxes
131
- * webandapi
132
  * show/hide ..
133
  */
134
  public function ht_ctc_share() {
128
  * share chat
129
  *
130
  * checkboxes
 
131
  * show/hide ..
132
  */
133
  public function ht_ctc_share() {
new/inc/assets/js/app.js CHANGED
@@ -1 +1 @@
1
- !function(f){f(function(){var o=window.location.href,a=void 0!==document.title?document.title:"",n=void 0!==screen.width&&1024<screen.width?"no":"yes",_="",c={};function i(t){return c[t]||!1}function s(t,e){c[t]=e;e=JSON.stringify(c);localStorage.setItem("ht_ctc_storage",e)}localStorage.getItem("ht_ctc_storage")&&(c=localStorage.getItem("ht_ctc_storage"),c=JSON.parse(c));var t,r="";if("undefined"!=typeof ht_ctc_chat_var)r=ht_ctc_chat_var,e(),h();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),r=JSON.parse(t))}catch(t){r={}}e(),h()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(_=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function h(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:r}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==r.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:r,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||m(e)}),f(".ht_ctc_chat_greetings_box").length&&f(document).on("click",".ht_ctc_chat_style",function(t){f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?u("user_closed"):d("user_opened")}),f(document).on("click",".ctc_greetings_close_btn",function(t){u("user_closed")}),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),!document.querySelector("#ctc_opt")||f("#ctc_opt").is(":checked")||i("g_optin")?m(e):f(".ctc_opt_in").show(400).fadeOut("1").fadeIn("1"),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))}),document.querySelector("#ctc_opt")&&f("#ctc_opt").on("change",function(t){f("#ctc_opt").is(":checked")&&(f(".ctc_opt_in").hide(100),s("g_optin","y"),setTimeout(()=>{m(e)},500))})),f(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,o);e=encodeURIComponent(e),r.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),p(this),v(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){m(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),m(this)})}function d(t){f(".ctc_cta_stick").remove(),f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),s("g_action",t),"user_opened"==t&&s("g_user_action",t)}function u(t){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),s("g_action",t),"user_closed"==t&&s("g_user_action",t)}function l(t){var e;"yes"==n?"show"==r.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=r.pos_m+r.css,g(t)):"show"==r.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=r.pos_d+r.css,g(t))}function g(e){try{f(e).show(parseInt(r.se))}catch(t){e.style.display="block"}var t,c;!function(){if(f(".ht_ctc_chat_greetings_box").length){if(r.g_device){if("yes"!==n&&"mobile"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove();if("yes"==n&&"desktop"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:r,greetings_open:d,greetings_close:u}})),r.g_init&&"open"==r.g_init&&"user_closed"!==i("g_user_action")&&d("init"),f(document).on("click",".ctc_greetings, #ctc_greetings",function(t){u("element"),d("element")})}}(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",r.ani)},c),f(".ht-ctc-chat").hover(function(){f(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){f(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=r.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=a+", "+o;(r.ga||r.ga4)&&("undefined"!=typeof gtag?r.ga4?gtag("event","click to chat",{number:e,title:a,url:o}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:a,url:o,event_category:c,event_label:t,event_action:n}),r.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),r.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:a,URL:o})}function m(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:r}}));var e=r.number,c=r.pre_filled;t.hasAttribute("data-number")&&(e=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(c=t.getAttribute("data-pre_filled")),c=c.replace(/\[url]/gi,o),c=encodeURIComponent(c),""!=e?(r.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+c,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+c,"_blank","noopener"),p(t),v(e)):f(".ht-ctc-chat").html(_)}function v(t){var e,c;r.hook_url&&(e=r.hook_url,c={},r.hook_v&&(c=r.hook_v),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:r,number:t}})),e=r.hook_url,c=r.hook_v,data=JSON.stringify(c),f.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
1
+ !function(f){f(function(){var a=window.location.href,o=void 0!==document.title?document.title:"",_=void 0!==screen.width&&1024<screen.width?"no":"yes",s="",c={};function n(t){return c[t]||!1}function i(t,e){c[t]=e;e=JSON.stringify(c);localStorage.setItem("ht_ctc_storage",e)}localStorage.getItem("ht_ctc_storage")&&(c=localStorage.getItem("ht_ctc_storage"),c=JSON.parse(c));var t,r="";if("undefined"!=typeof ht_ctc_chat_var)r=ht_ctc_chat_var,e(),h();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),r=JSON.parse(t))}catch(t){r={}}e(),h()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(s=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function h(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:r}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==r.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:r,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||m(e)}),f(".ht_ctc_chat_greetings_box").length&&f(document).on("click",".ht_ctc_chat_style",function(t){f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?d("user_closed"):u("user_opened")}),f(document).on("click",".ctc_greetings_close_btn",function(t){d("user_closed")}),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),!document.querySelector("#ctc_opt")||f("#ctc_opt").is(":checked")||n("g_optin")?m(e):f(".ctc_opt_in").show(400).fadeOut("1").fadeIn("1"),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))}),document.querySelector("#ctc_opt")&&f("#ctc_opt").on("change",function(t){f("#ctc_opt").is(":checked")&&(f(".ctc_opt_in").hide(100),i("g_optin","y"),setTimeout(()=>{m(e)},500))})),f(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,a);e=encodeURIComponent(e),r.url_structure_d&&"yes"!==_?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),p(this),v(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){m(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),m(this)})}function u(t){f(".ctc_cta_stick").remove(),f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),i("g_action",t),"user_opened"==t&&i("g_user_action",t)}function d(t){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),i("g_action",t),"user_closed"==t&&i("g_user_action",t)}function l(t){var e;"yes"==_?"show"==r.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=r.pos_m+r.css,g(t)):"show"==r.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=r.pos_d+r.css,g(t))}function g(e){try{f(e).show(parseInt(r.se))}catch(t){e.style.display="block"}var t,c;!function(){if(f(".ht_ctc_chat_greetings_box").length){if(r.g_device){if("yes"!==_&&"mobile"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove();if("yes"==_&&"desktop"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:r,greetings_open:u,greetings_close:d}})),r.g_init&&"open"==r.g_init&&"user_closed"!==n("g_user_action")&&u("init"),f(document).on("click",".ctc_greetings, #ctc_greetings",function(t){d("element"),u("element")})}}(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",r.ani)},c),f(".ht-ctc-chat").hover(function(){f(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){f(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=r.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=o+", "+a;(r.ga||r.ga4)&&("undefined"!=typeof gtag?r.ga4?gtag("event","click to chat",{number:e,title:o,url:a}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:o,url:a,event_category:c,event_label:t,event_action:n}),r.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),r.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:o,URL:a})}function m(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:r}}));var e,c,n=r.number,o=r.pre_filled;t.hasAttribute("data-number")&&(n=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(o=t.getAttribute("data-pre_filled")),o=o.replace(/\[url]/gi,a),o=encodeURIComponent(o),""!=n?(e="https://wa.me/"+n+"?text="+o,c=r.url_target_d||"_blank","yes"==_?r.url_structure_m&&(e="whatsapp://send?phone="+n+"&text="+o,c="_self"):r.url_structure_d&&(e="https://web.whatsapp.com/send?phone="+n+"&text="+o),o="popup"==c?"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=750,height=400,left=100,top=100":"noopener",window.open(e,c,o),p(t),v(n)):f(".ht-ctc-chat").html(s)}function v(t){var e,c;r.hook_url&&(e=r.hook_url,c={},r.hook_v&&(c=r.hook_v),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:r,number:t}})),e=r.hook_url,c=r.hook_v,data=JSON.stringify(c),f.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
new/inc/assets/js/dev/app.dev.js CHANGED
@@ -130,7 +130,7 @@
130
  } else {
131
  ht_ctc_link(ht_ctc_chat);
132
  }
133
-
134
  document.dispatchEvent(
135
  new CustomEvent("ht_ctc_event_greetings")
136
  );
@@ -186,11 +186,11 @@
186
  // Display greetings - device based
187
  if (ctc.g_device) {
188
  if (is_mobile !== 'yes' && 'mobile' == ctc.g_device) {
189
- // in desktop, mobile only
190
  $('.ht_ctc_chat_greetings_box').remove();
191
  return;
192
  } else if (is_mobile == 'yes' && 'desktop' == ctc.g_device) {
193
- // in mobile, desktop only
194
  $('.ht_ctc_chat_greetings_box').remove();
195
  return;
196
  }
@@ -440,15 +440,54 @@
440
  return;
441
  }
442
 
443
- // web/api.whatsapp or wa.me
444
- if (ctc.web && is_mobile !== 'yes') {
445
- // web.whatsapp - if web api is enabled and is not mobile
446
- window.open('https://web.whatsapp.com/send' + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  } else {
448
- // wa.me
449
- window.open('https://wa.me/' + number + '?text=' + pre_filled, '_blank', 'noopener');
 
 
 
 
 
 
 
 
 
 
 
450
  }
451
 
 
 
 
 
 
 
 
 
 
452
  // analytics
453
  ht_ctc_chat_analytics(values);
454
 
@@ -467,7 +506,7 @@
467
  pre_filled = pre_filled.replace(/\[url]/gi, url);
468
  pre_filled = encodeURIComponent(pre_filled);
469
 
470
- if (ctc.web && is_mobile !== 'yes') {
471
  // web.whatsapp - if web api is enabled and is not mobile
472
  window.open('https://web.whatsapp.com/send' + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
473
  } else {
130
  } else {
131
  ht_ctc_link(ht_ctc_chat);
132
  }
133
+
134
  document.dispatchEvent(
135
  new CustomEvent("ht_ctc_event_greetings")
136
  );
186
  // Display greetings - device based
187
  if (ctc.g_device) {
188
  if (is_mobile !== 'yes' && 'mobile' == ctc.g_device) {
189
+ // in desktop: mobile only
190
  $('.ht_ctc_chat_greetings_box').remove();
191
  return;
192
  } else if (is_mobile == 'yes' && 'desktop' == ctc.g_device) {
193
+ // in mobile: desktop only
194
  $('.ht_ctc_chat_greetings_box').remove();
195
  return;
196
  }
440
  return;
441
  }
442
 
443
+ // navigations links..
444
+ // 1.base_url
445
+ var base_url = 'https://wa.me/' + number + '?text=' + pre_filled;
446
+
447
+ // 2.url_target - _blank, _self or if popup type just add a name - here popup only
448
+ var url_target = (ctc.url_target_d) ? ctc.url_target_d : '_blank';
449
+
450
+ if (is_mobile == 'yes') {
451
+ console.log('-- mobile --');
452
+ // mobile
453
+ if (ctc.url_structure_m) {
454
+ console.log('-- url struture: whatsapp:// --');
455
+ // whatsapp://.. is selected.
456
+ base_url = 'whatsapp://send?phone=' + number + '&text=' + pre_filled;
457
+ // for whatsapp://.. url open target is _self.
458
+ url_target = '_self';
459
+ }
460
+ // custom url mobile
461
+ if (ctc.custom_link_m && '' !== ctc.custom_link_m) {
462
+ console.log('custom link');
463
+ base_url = ctc.custom_link_m;
464
+ }
465
+
466
  } else {
467
+ // desktop
468
+ console.log('-- desktop --');
469
+ if (ctc.url_structure_d) {
470
+ console.log('-- url struture: web whatsapp --');
471
+ // web whatsapp is enabled/selected.
472
+ base_url = 'https://web.whatsapp.com/send' + '?phone=' + number + '&text=' + pre_filled;
473
+ }
474
+
475
+ // custom url desktop
476
+ if (ctc.custom_link_d && '' !== ctc.custom_link_d) {
477
+ console.log('custom link');
478
+ base_url = ctc.custom_link_d;
479
+ }
480
  }
481
 
482
+ // 3.specs - specs - if popup then add 'pop_window_features' else 'noopener'
483
+ var pop_window_features = 'scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=750,height=400,left=100,top=100';
484
+ var specs = ('popup' == url_target) ? pop_window_features : 'noopener';
485
+ console.log('-- specs: ' + specs + ' --');
486
+
487
+ window.open(base_url, url_target, specs);
488
+
489
+
490
+
491
  // analytics
492
  ht_ctc_chat_analytics(values);
493
 
506
  pre_filled = pre_filled.replace(/\[url]/gi, url);
507
  pre_filled = encodeURIComponent(pre_filled);
508
 
509
+ if (ctc.url_structure_d && is_mobile !== 'yes') {
510
  // web.whatsapp - if web api is enabled and is not mobile
511
  window.open('https://web.whatsapp.com/send' + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
512
  } else {
new/inc/assets/js/dev/woo.dev.js CHANGED
@@ -20,7 +20,7 @@ $(function () {
20
  cart_layout();
21
  } else if (document.querySelector('.ctc_woo_place')) {
22
  // && !document.querySelector('.ctc_woo_schedule')
23
- // in shop page - cart button might not exists, dispay (might be added display none)
24
  console.log('woo ctc_woo_place show');
25
  display_ctc_woo_place();
26
  }
@@ -30,6 +30,9 @@ $(function () {
30
 
31
  function display_ctc_woo_place() {
32
  if (!document.querySelector('.ctc_woo_schedule')) {
 
 
 
33
  $('.ctc_woo_place').show();
34
  }
35
  }
20
  cart_layout();
21
  } else if (document.querySelector('.ctc_woo_place')) {
22
  // && !document.querySelector('.ctc_woo_schedule')
23
+ // in shop page - cart button might not exists, display (might be added display none)
24
  console.log('woo ctc_woo_place show');
25
  display_ctc_woo_place();
26
  }
30
 
31
  function display_ctc_woo_place() {
32
  if (!document.querySelector('.ctc_woo_schedule')) {
33
+ $('.ctc_woo_place').css({
34
+ "display": $('.ctc_woo_place').attr('data-dt')
35
+ });
36
  $('.ctc_woo_place').show();
37
  }
38
  }
new/inc/assets/js/woo.js CHANGED
@@ -1 +1 @@
1
- !function(l){l(function(){try{document.querySelector(".single_add_to_cart_button")||document.querySelector(".add_to_cart_button")?function(){var t,o,c,e=document.querySelector(".single_add_to_cart_button"),r=document.querySelector(".add_to_cart_button");if(document.querySelector(".ctc_woo_single_cart_layout .s1_btn")&&(t=document.querySelector(".ctc_woo_single_cart_layout .s1_btn"),o=l(t).css("color"),c=l(t).css("background-color"),e&&(_(e,t),l(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s()),document.querySelector(".ctc_woo_shop_cart_layout .s1_btn")){let t=document.querySelectorAll(".ctc_woo_shop_cart_layout .s1_btn");r&&t.length&&(o=l(t).css("color"),c=l(t).css("background-color"),t.forEach(t=>{_(r,t)}),l(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s()}function n(t){l(t).css({"min-height":l(e).css("min-height"),"font-size":l(e).css("font-size"),"font-weight":l(e).css("font-weight"),"letter-spacing":l(e).css("letter-spacing"),"border-radius":l(e).css("border-radius"),width:"fit-content"}),s()}function _(t,o){const c=window.getComputedStyle(t);Array.from(c).forEach(t=>o.style.setProperty(t,c.getPropertyValue(t),c.getPropertyPriority(t)))}document.querySelector(".ctc_woo_shop_cart_layout .s_8")&&n(document.querySelector(".ctc_woo_shop_cart_layout .s_8")),document.querySelector(".ctc_woo_single_cart_layout .s_8")&&n(document.querySelector(".ctc_woo_single_cart_layout .s_8"))}():document.querySelector(".ctc_woo_place")&&s()}catch(t){}function s(){document.querySelector(".ctc_woo_schedule")||l(".ctc_woo_place").show()}})}(jQuery);
1
+ !function(l){l(function(){try{document.querySelector(".single_add_to_cart_button")||document.querySelector(".add_to_cart_button")?function(){var t,o,c,e=document.querySelector(".single_add_to_cart_button"),r=document.querySelector(".add_to_cart_button");if(document.querySelector(".ctc_woo_single_cart_layout .s1_btn")&&(t=document.querySelector(".ctc_woo_single_cart_layout .s1_btn"),o=l(t).css("color"),c=l(t).css("background-color"),e&&(_(e,t),l(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s()),document.querySelector(".ctc_woo_shop_cart_layout .s1_btn")){let t=document.querySelectorAll(".ctc_woo_shop_cart_layout .s1_btn");r&&t.length&&(o=l(t).css("color"),c=l(t).css("background-color"),t.forEach(t=>{_(r,t)}),l(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s()}function n(t){l(t).css({"min-height":l(e).css("min-height"),"font-size":l(e).css("font-size"),"font-weight":l(e).css("font-weight"),"letter-spacing":l(e).css("letter-spacing"),"border-radius":l(e).css("border-radius"),width:"fit-content"}),s()}function _(t,o){const c=window.getComputedStyle(t);Array.from(c).forEach(t=>o.style.setProperty(t,c.getPropertyValue(t),c.getPropertyPriority(t)))}document.querySelector(".ctc_woo_shop_cart_layout .s_8")&&n(document.querySelector(".ctc_woo_shop_cart_layout .s_8")),document.querySelector(".ctc_woo_single_cart_layout .s_8")&&n(document.querySelector(".ctc_woo_single_cart_layout .s_8"))}():document.querySelector(".ctc_woo_place")&&s()}catch(t){}function s(){document.querySelector(".ctc_woo_schedule")||(l(".ctc_woo_place").css({display:l(".ctc_woo_place").attr("data-dt")}),l(".ctc_woo_place").show())}})}(jQuery);
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -130,6 +130,8 @@ class HT_CTC_Chat {
130
 
131
  // number
132
  $number = (isset($options['number'])) ? esc_attr($options['number']) : '';
 
 
133
 
134
  // safe side action .. if number not saved in new method
135
  if ( '' == $number ) {
@@ -142,17 +144,32 @@ class HT_CTC_Chat {
142
  $ht_ctc_chat['number'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['number'], 'Click to Chat for WhatsApp', 'number' );
143
 
144
  // call to action
145
- $ht_ctc_chat['call_to_action'] = (isset($ht_ctc_pagelevel['call_to_action'])) ? esc_attr($ht_ctc_pagelevel['call_to_action']) : __( esc_attr( $options['call_to_action'] ) , 'click-to-chat-for-whatsapp' );
146
  $ht_ctc_chat['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action' );
147
 
148
  // prefilled text
149
- $ht_ctc_chat['pre_filled'] = (isset($ht_ctc_pagelevel['pre_filled'])) ? esc_attr($ht_ctc_pagelevel['pre_filled']) : __( esc_attr( $options['pre_filled'] ) , 'click-to-chat-for-whatsapp' );
150
  $ht_ctc_chat['pre_filled'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['pre_filled'], 'Click to Chat for WhatsApp', 'pre_filled' );
151
 
152
- // wa: wa.me / web: web/api.whatsapp,
153
- $ht_ctc_chat['webandapi'] = 'wa';
154
- if ( isset( $options['webandapi'] ) ) {
155
- $ht_ctc_chat['webandapi'] = 'web';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
 
158
  // need to run the updater backup
@@ -200,6 +217,8 @@ class HT_CTC_Chat {
200
  $ht_ctc_os['show_effect'] = '';
201
  $ht_ctc_os['an_type'] = '';
202
 
 
 
203
  // hooks
204
  $ht_ctc_chat = apply_filters( 'ht_ctc_fh_chat', $ht_ctc_chat );
205
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
@@ -308,9 +327,35 @@ class HT_CTC_Chat {
308
  'ani' => $ht_ctc_os['an_type'],
309
  );
310
 
311
- // web whatsapp
312
- if ( 'web' == $ht_ctc_chat['webandapi'] ) {
313
- $ctc['web'] = 'y';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
  }
315
 
316
  // ga
130
 
131
  // number
132
  $number = (isset($options['number'])) ? esc_attr($options['number']) : '';
133
+ $call_to_action = (isset($options['call_to_action'])) ? __(esc_attr($options['call_to_action']) , 'click-to-chat-for-whatsapp' ) : '';
134
+ $pre_filled = (isset($options['pre_filled'])) ? __(esc_attr($options['pre_filled']) , 'click-to-chat-for-whatsapp' ) : '';
135
 
136
  // safe side action .. if number not saved in new method
137
  if ( '' == $number ) {
144
  $ht_ctc_chat['number'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['number'], 'Click to Chat for WhatsApp', 'number' );
145
 
146
  // call to action
147
+ $ht_ctc_chat['call_to_action'] = (isset($ht_ctc_pagelevel['call_to_action'])) ? esc_attr($ht_ctc_pagelevel['call_to_action']) : $call_to_action;
148
  $ht_ctc_chat['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action' );
149
 
150
  // prefilled text
151
+ $ht_ctc_chat['pre_filled'] = (isset($ht_ctc_pagelevel['pre_filled'])) ? esc_attr($ht_ctc_pagelevel['pre_filled']) : $pre_filled;
152
  $ht_ctc_chat['pre_filled'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['pre_filled'], 'Click to Chat for WhatsApp', 'pre_filled' );
153
 
154
+ $ht_ctc_chat['url_target_d'] = ( isset( $othersettings['url_target_d'] ) ) ? esc_attr($othersettings['url_target_d']) : '_blank';
155
+ $ht_ctc_chat['url_structure_d'] = ( isset( $othersettings['url_structure_d'] ) ) ? esc_attr($othersettings['url_structure_d']) : '';
156
+ $ht_ctc_chat['url_structure_m'] = ( isset( $othersettings['url_structure_m'] ) ) ? esc_attr($othersettings['url_structure_m']) : '';
157
+
158
+ $ht_ctc_chat['custom_link_d'] = ( isset( $othersettings['custom_link_d'] ) ) ? esc_attr($othersettings['custom_link_d']) : '';
159
+ $ht_ctc_chat['custom_link_m'] = ( isset( $othersettings['custom_link_m'] ) ) ? esc_attr($othersettings['custom_link_m']) : '';
160
+
161
+
162
+ /**
163
+ * compatibility with settings - web whatsapp - desktop - if new settings not updated, based on settings set before 3.12
164
+ *
165
+ * @since 3.12 - $ht_ctc_chat - url_structure_d, url_structure_m, url_target_d
166
+ * @removed since 3.12 - webandapi, $ctc['web']
167
+ * and added 'url_structure_d', $ctc['url_structure_d']
168
+ *
169
+ * url_structure_d = '' (blank means user not updated new settings)
170
+ */
171
+ if ( isset( $options['webandapi'] ) && '' == $ht_ctc_chat['url_structure_d'] ) {
172
+ $ht_ctc_chat['url_structure_d'] = 'web';
173
  }
174
 
175
  // need to run the updater backup
217
  $ht_ctc_os['show_effect'] = '';
218
  $ht_ctc_os['an_type'] = '';
219
 
220
+
221
+
222
  // hooks
223
  $ht_ctc_chat = apply_filters( 'ht_ctc_fh_chat', $ht_ctc_chat );
224
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
327
  'ani' => $ht_ctc_os['an_type'],
328
  );
329
 
330
+ // desktop url structure if web whatsapp
331
+ if ( 'web' == $ht_ctc_chat['url_structure_d'] ) {
332
+ $ctc['url_structure_d'] = 'web';
333
+ }
334
+
335
+ // mobile url structure if whatsapp://..
336
+ if ( 'wa_colon' == $ht_ctc_chat['url_structure_m'] ) {
337
+ $ctc['url_structure_m'] = 'wa_colon';
338
+ }
339
+
340
+ // url_target_d
341
+ $ctc['url_target_d'] = $ht_ctc_chat['url_target_d'];
342
+
343
+ // custom url - desktop
344
+ if ( 'custom_url' == $ht_ctc_chat['url_structure_d'] && '' !== $ht_ctc_chat['custom_link_d'] ) {
345
+ if ( function_exists('wp_http_validate_url') && wp_http_validate_url($ht_ctc_chat['custom_link_d']) ) {
346
+ $ctc['custom_link_d'] = $ht_ctc_chat['custom_link_d'];
347
+ } else {
348
+ $ctc['custom_link_d'] = '';
349
+ }
350
+ }
351
+
352
+ // custom url - mobile
353
+ if ( 'custom_url' == $ht_ctc_chat['url_structure_m'] && '' !== $ht_ctc_chat['custom_link_m'] ) {
354
+ if ( function_exists('wp_http_validate_url') && wp_http_validate_url($ht_ctc_chat['custom_link_m']) ) {
355
+ $ctc['custom_link_m'] = $ht_ctc_chat['custom_link_m'];
356
+ } else {
357
+ $ctc['custom_link_m'] = '';
358
+ }
359
  }
360
 
361
  // ga
new/inc/commons/class-ht-ctc-scripts.php CHANGED
@@ -12,6 +12,13 @@ if ( ! class_exists( 'HT_CTC_Scripts' ) ) :
12
 
13
  class HT_CTC_Scripts {
14
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * Register styles - front end ( non admin )
@@ -73,8 +80,8 @@ class HT_CTC_Scripts {
73
 
74
  }
75
 
76
- $ht_ctc_scripts = new HT_CTC_Scripts();
77
 
78
- add_action('wp_enqueue_scripts', array( $ht_ctc_scripts, 'register_scripts' ), 1 );
 
79
 
80
  endif; // END class_exists check
12
 
13
  class HT_CTC_Scripts {
14
 
15
+ public function __construct() {
16
+ $this->hooks();
17
+ }
18
+
19
+ public function hooks() {
20
+ add_action('wp_enqueue_scripts', [$this, 'register_scripts'], 1 );
21
+ }
22
 
23
  /**
24
  * Register styles - front end ( non admin )
80
 
81
  }
82
 
 
83
 
84
+ new HT_CTC_Scripts();
85
+
86
 
87
  endif; // END class_exists check
new/inc/greetings/class-ht-ctc-chat-greetings.php CHANGED
@@ -166,7 +166,12 @@ class HT_CTC_Chat_Greetings {
166
  $box_shadow = '0px 0px 5px 1px rgba(0,0,0,.14)';
167
  }
168
 
 
 
169
  if ( is_file( $ht_ctc_greetings['path'] ) ) {
 
 
 
170
 
171
  $script = '';
172
  // $script = 'dev';
@@ -190,7 +195,7 @@ class HT_CTC_Chat_Greetings {
190
 
191
  <div style="position: relative; bottom: 18px; cursor: auto;" class="ht_ctc_greetings">
192
 
193
- <div class="ht_ctc_chat_greetings_box" style="display: none; position: absolute; bottom: 0px; <?= $g_position_r_l ?>: 0px; min-width: 300px; max-width: 400px; ">
194
 
195
  <span style=" cursor:pointer; float:<?= $g_position_r_l ?>;" class="ctc_greetings_close_btn">
196
  <svg style="color:#ffffff; background-color:lightgray; border-radius:50%;" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
166
  $box_shadow = '0px 0px 5px 1px rgba(0,0,0,.14)';
167
  }
168
 
169
+ $g_box_classes = '';
170
+
171
  if ( is_file( $ht_ctc_greetings['path'] ) ) {
172
+
173
+ $template = $ht_ctc_greetings['greetings_template'];
174
+ $g_box_classes = " template-$template";
175
 
176
  $script = '';
177
  // $script = 'dev';
195
 
196
  <div style="position: relative; bottom: 18px; cursor: auto;" class="ht_ctc_greetings">
197
 
198
+ <div class="ht_ctc_chat_greetings_box <?= $g_box_classes ?>" style="display: none; position: absolute; bottom: 0px; <?= $g_position_r_l ?>: 0px; min-width: 300px; max-width: 400px; ">
199
 
200
  <span style=" cursor:pointer; float:<?= $g_position_r_l ?>;" class="ctc_greetings_close_btn">
201
  <svg style="color:#ffffff; background-color:lightgray; border-radius:50%;" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
new/inc/styles/style-99.php CHANGED
@@ -16,7 +16,7 @@ $s_99_mobile_img_width = esc_attr( $s_99_options['s99_mobile_img_width'] );
16
  // img - url, width, height based on device
17
  $s_99_img_css = "";
18
 
19
- if( 'yes' == $is_mobile ) {
20
  $s_99_own_image = esc_html( $s_99_options['s99_mobile_img_url'] );
21
  $s_99_img_css .= ( '' !== $s_99_mobile_img_height ) ? "height: $s_99_mobile_img_height; " : "height: 40px; ";
22
 
16
  // img - url, width, height based on device
17
  $s_99_img_css = "";
18
 
19
+ if( isset($is_mobile) && 'yes' == $is_mobile ) {
20
  $s_99_own_image = esc_html( $s_99_options['s99_mobile_img_url'] );
21
  $s_99_img_css .= ( '' !== $s_99_mobile_img_height ) ? "height: $s_99_mobile_img_height; " : "height: 40px; ";
22
 
new/tools/woo/class-ht-ctc-woo.php CHANGED
@@ -268,6 +268,12 @@ class HT_CTC_WOO_Pages {
268
  $class_names .= " ctc_woo_schedule";
269
  $display_from_js = 'yes';
270
  }
 
 
 
 
 
 
271
 
272
  if ('yes' == $display_from_js) {
273
  $css .= "display: none;";
@@ -275,8 +281,7 @@ class HT_CTC_WOO_Pages {
275
  $css .= "display: $woo_single_block_type;";
276
  }
277
 
278
-
279
- $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $ht_ctc_woo_single_product['style']. '.php';
280
 
281
  if ( is_file( $path ) ) {
282
  ?>
268
  $class_names .= " ctc_woo_schedule";
269
  $display_from_js = 'yes';
270
  }
271
+
272
+ $style = $ht_ctc_woo_single_product['style'];
273
+
274
+ // if ( 'inline-block' == $woo_single_block_type ) {
275
+ // $woo_single_block_type = "inline-flex";
276
+ // }
277
 
278
  if ('yes' == $display_from_js) {
279
  $css .= "display: none;";
281
  $css .= "display: $woo_single_block_type;";
282
  }
283
 
284
+ $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/tools/woo/woo-single-styles/woo-style-' . $style. '.php';
 
285
 
286
  if ( is_file( $path ) ) {
287
  ?>
new/tools/woo/woo-admin/class-ht-ctc-admin-woo-page.php CHANGED
@@ -92,9 +92,9 @@ class HT_CTC_Admin_Woo_Page {
92
  ?>
93
  <h1 id="woo_settings">Click to Chat - WooCommerce</h1>
94
  <p class="description">
95
- Overwrite:
96
  <a class="open_tab" data-tab="overwrite_tab-1" href="#overwrite_tab-1">Single product</a> | <a class="open_tab" data-tab="overwrite_tab-2" href="#overwrite_tab-2">Shop, Cart, Checkout, Account</a> <br>
97
- Add WhatsApp:
98
  <a class="open_tab" data-tab="add_whatsapp_tab-1" href="#add_whatsapp_tab-1">Single product</a> | <a class="open_tab" data-tab="add_whatsapp_tab-2" href="#add_whatsapp_tab-2">Shop</a> | <a class="open_tab" data-tab="add_whatsapp_tab-3" href="#add_whatsapp_tab-3">Advanced</a>
99
  </p>
100
  <br>
@@ -133,10 +133,19 @@ class HT_CTC_Admin_Woo_Page {
133
 
134
  $woo_places = [
135
  'select' => '-- Select --',
136
- 'woocommerce_after_single_product_summary' => 'After Product Summary'
 
 
 
 
 
 
 
 
 
137
  ];
138
 
139
- $woo_places = apply_filters( 'ht_ctc_fh_admin_woo_places', $woo_places );
140
 
141
  $woo_single_position_center = ( isset( $woo_options['woo_single_position_center']) ) ? esc_attr( $woo_options['woo_single_position_center'] ) : '';
142
  $woo_single_layout_cart_btn = ( isset( $woo_options['woo_single_layout_cart_btn']) ) ? esc_attr( $woo_options['woo_single_layout_cart_btn'] ) : '';
@@ -201,12 +210,6 @@ class HT_CTC_Admin_Woo_Page {
201
 
202
  <?php
203
  do_action('ht_ctc_ah_admin_after_woo_overwrite_single_settings');
204
-
205
- if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
206
- ?>
207
- <p class="description">PRO: <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/woocommerce-single-product-pages/#greetings">Greetings Settings for WooCommerce Single product pages</a></p>
208
- <?php
209
- }
210
  ?>
211
 
212
  <br><br>
@@ -315,10 +318,12 @@ class HT_CTC_Admin_Woo_Page {
315
  <option value="99" <?= $woo_style == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Add your own image / GIF (Style-99)', 'click-to-chat-for-whatsapp' ); ?></option>
316
  </select>
317
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=woo"><?php _e( 'List of Styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize the styles</a></span> </p>
318
- <p class="description"><strong>Recommended Styles: 1, 8</strong></p>
319
  </div>
320
  </div>
321
 
 
 
322
  <p class="description ctc_init_display_none woo_single_position_settings">These styles and their position appears based on how the Theme is developed. </p>
323
  <br>
324
 
@@ -384,28 +389,8 @@ class HT_CTC_Admin_Woo_Page {
384
 
385
  </details>
386
 
387
- <p class="description" style="margin-bottom:15px;"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/"><?php _e( 'Add WhatsApp in WooCommerce Single Product pages', 'click-to-chat-for-whatsapp' ); ?></a></p>
388
- <?php
389
-
390
- if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
391
- ?>
392
- <p class="description">
393
- <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO</a><br>
394
- Before Main Content <br>
395
- Before Product <br>
396
- Before Product Summary <br>
397
- Product Summary <br>
398
- Before Add to Cart Form <br>
399
- Before Cart Button <br>
400
- After Cart Button <br>
401
- After Add to Cart Form <br>
402
- After Product <br>
403
- </p>
404
- <?php
405
- }
406
-
407
- ?>
408
 
 
409
  <br><br>
410
  </div>
411
  </div>
92
  ?>
93
  <h1 id="woo_settings">Click to Chat - WooCommerce</h1>
94
  <p class="description">
95
+ <strong>Overwrite</strong>:
96
  <a class="open_tab" data-tab="overwrite_tab-1" href="#overwrite_tab-1">Single product</a> | <a class="open_tab" data-tab="overwrite_tab-2" href="#overwrite_tab-2">Shop, Cart, Checkout, Account</a> <br>
97
+ <strong>Add WhatsApp</strong>:
98
  <a class="open_tab" data-tab="add_whatsapp_tab-1" href="#add_whatsapp_tab-1">Single product</a> | <a class="open_tab" data-tab="add_whatsapp_tab-2" href="#add_whatsapp_tab-2">Shop</a> | <a class="open_tab" data-tab="add_whatsapp_tab-3" href="#add_whatsapp_tab-3">Advanced</a>
99
  </p>
100
  <br>
133
 
134
  $woo_places = [
135
  'select' => '-- Select --',
136
+ 'woocommerce_before_main_content' => 'Before Main Content',
137
+ 'woocommerce_before_single_product' => 'Before Product',
138
+ 'woocommerce_before_single_product_summary' => 'Before Product Summary',
139
+ 'woocommerce_single_product_summary' => 'Product Summary',
140
+ 'woocommerce_before_add_to_cart_form' => 'Before Add to Cart Form',
141
+ 'woocommerce_before_add_to_cart_button' => 'Before Cart Button',
142
+ 'woocommerce_after_add_to_cart_button' => 'After Cart Button',
143
+ 'woocommerce_after_add_to_cart_form' => 'After Add to Cart Form',
144
+ 'woocommerce_after_single_product' => 'After Product',
145
+ 'woocommerce_after_single_product_summary' => 'After Product Summary',
146
  ];
147
 
148
+ // $woo_places = apply_filters( 'ht_ctc_fh_admin_woo_places', $woo_places );
149
 
150
  $woo_single_position_center = ( isset( $woo_options['woo_single_position_center']) ) ? esc_attr( $woo_options['woo_single_position_center'] ) : '';
151
  $woo_single_layout_cart_btn = ( isset( $woo_options['woo_single_layout_cart_btn']) ) ? esc_attr( $woo_options['woo_single_layout_cart_btn'] ) : '';
210
 
211
  <?php
212
  do_action('ht_ctc_ah_admin_after_woo_overwrite_single_settings');
 
 
 
 
 
 
213
  ?>
214
 
215
  <br><br>
318
  <option value="99" <?= $woo_style == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Add your own image / GIF (Style-99)', 'click-to-chat-for-whatsapp' ); ?></option>
319
  </select>
320
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=woo"><?php _e( 'List of Styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><a target="_blank" href="<?= admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize the styles</a></span> </p>
321
+ <p class="description"><strong>Recommended Styles: 1, 4, 8</strong></p>
322
  </div>
323
  </div>
324
 
325
+ <p class="description ctc_init_display_none woo_single_position_settings"><a class="open_tab" data-tab="overwrite_tab-1" href="#overwrite_tab-1" style="margin-bottom: 15px;">Prefilled, Call to action</a></p>
326
+
327
  <p class="description ctc_init_display_none woo_single_position_settings">These styles and their position appears based on how the Theme is developed. </p>
328
  <br>
329
 
389
 
390
  </details>
391
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
 
393
+ <p class="description" style="margin-bottom:15px;"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/"><?php _e( 'Add WhatsApp in WooCommerce Single Product pages', 'click-to-chat-for-whatsapp' ); ?></a></p>
394
  <br><br>
395
  </div>
396
  </div>
new/tools/woo/woo-single-styles/woo-style-1.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 1
4
+ *
5
+ * theme button
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ $s1_options = get_option( 'ht_ctc_s1' );
12
+ $s1_options = apply_filters( 'ht_ctc_fh_s1_options', $s1_options );
13
+
14
+ $s1_css = "";
15
+ $s1_css .= "cursor:pointer; display:flex; align-items:center; justify-content:center;";
16
+ $s1_text_color = (isset( $s1_options['s1_text_color'])) ? esc_attr( $s1_options['s1_text_color'] ) : '';
17
+ $s1_css .= ('' !== $s1_text_color) ? "color:$s1_text_color;": "";
18
+ $s1_bg_color = (isset( $s1_options['s1_bg_color'])) ? esc_attr( $s1_options['s1_bg_color'] ) : '';
19
+ $s1_css .= ('' !== $s1_bg_color) ? "background-color:$s1_bg_color;": "";
20
+
21
+ $s1_add_icon = ( isset( $s1_options['s1_add_icon']) ) ? esc_attr( $s1_options['s1_add_icon'] ) : '';
22
+ $s1_icon_color = ( isset( $s1_options['s1_icon_color']) ) ? esc_attr( $s1_options['s1_icon_color'] ) : '';
23
+ $s1_icon_size = ( isset( $s1_options['s1_icon_size']) ) ? esc_attr( $s1_options['s1_icon_size'] ) : '';
24
+
25
+ if ('' == $s1_icon_size) {
26
+ $s1_icon_size = '15';
27
+ }
28
+
29
+ if ('' == $s1_icon_color) {
30
+ $s1_icon_color = '#ffffff';
31
+ }
32
+
33
+ $s1_style = ('' !== $s1_css) ? "style='$s1_css'": "";
34
+
35
+ $s1_fullwidth_css = "";
36
+
37
+ if ( '' == $call_to_action ) {
38
+ $call_to_action = "WhatsApp us";
39
+ }
40
+
41
+ if ( isset( $s1_options['s1_m_fullwidth'] ) ) {
42
+ $s1_fullwidth_css = "@media(max-width:1201px){.ht-ctc.style-1{left:unset !important;right:0px !important;}.ht-ctc.style-1,.ht-ctc .s1_btn{width:100%;}}";
43
+
44
+ ?>
45
+ <style id="ht-ctc-s1"><?= $s1_fullwidth_css ?></style>
46
+ <?php
47
+ }
48
+
49
+ ?>
50
+ <button <?= $s1_style; ?> class="ctc-analytics s1_btn ctc_cta">
51
+ <?php
52
+ if ('' !== $s1_add_icon) {
53
+
54
+ $s1_svg_css = "margin-right:6px;";
55
+
56
+ $s1_svg_attrs = array(
57
+ 'color' => "$s1_icon_color",
58
+ 'icon_size' => "$s1_icon_size",
59
+ 'type' => "$type",
60
+ 'ht_ctc_svg_css' => "$s1_svg_css",
61
+ );
62
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
63
+ echo ht_ctc_singlecolor( $s1_svg_attrs );
64
+ }
65
+ ?>
66
+ <?= $call_to_action ?>
67
+ </button>
new/tools/woo/woo-single-styles/woo-style-2.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 2
4
+ *
5
+ * Andriod like - WhatsApp icon
6
+ *
7
+ * @included from
8
+ * class-ht-ctc-chat.php (class-ht-ctc- chat/group/share .php)
9
+ * class-ht-ctc-woo.php
10
+ *
11
+ * External variable are from included files:
12
+ * $call_to_action
13
+ */
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) exit;
16
+
17
+ $s2_options = get_option( 'ht_ctc_s2' );
18
+ $s2_options = apply_filters( 'ht_ctc_fh_s2_options', $s2_options );
19
+
20
+ $s2_img_size = esc_attr( $s2_options['s2_img_size'] );
21
+ $img_size = esc_attr( $s2_options['s2_img_size'] );
22
+ if ( '' == $img_size ) {
23
+ $img_size = "50px";
24
+ }
25
+
26
+ $rtl_css = "";
27
+ if ( function_exists('is_rtl') && is_rtl() ) {
28
+ $rtl_css = "flex-direction:row-reverse;";
29
+ }
30
+
31
+ $s2_css = "display:inline-flex; justify-content: center; align-items: center; $rtl_css ";
32
+
33
+ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$img_size; width:$img_size;";
34
+
35
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
36
+ ?>
37
+ <div title="<?= $call_to_action ?>" style="<?= $s2_css; ?>" class="ctc-analytics">
38
+ <?= ht_ctc_style_2_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
39
+ </div>
new/tools/woo/woo-single-styles/woo-style-3.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 3
4
+ *
5
+ * WhatsApp icon
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ $s3_options = get_option( 'ht_ctc_s3' );
12
+ $s3_options = apply_filters( 'ht_ctc_fh_s3_options', $s3_options );
13
+ $s3_type = ( isset( $s3_options['s3_type']) ) ? esc_attr( $s3_options['s3_type'] ) : 'simple';
14
+
15
+ $s3_img_size = esc_attr( $s3_options['s3_img_size'] );
16
+ $img_size = esc_attr( $s3_options['s3_img_size'] );
17
+ if ( '' == $img_size ) {
18
+ $img_size = "50px";
19
+ }
20
+
21
+ $rtl_css = "";
22
+ if ( function_exists('is_rtl') && is_rtl() ) {
23
+ $rtl_css = "flex-direction:row-reverse;";
24
+ }
25
+
26
+ $s3_css = "display:inline-flex;justify-content:center;align-items:center;$rtl_css ";
27
+ $s3_cta_textcolor = (isset( $s3_options['cta_textcolor'])) ? esc_attr( $s3_options['cta_textcolor'] ) : '';
28
+ $s3_cta_bgcolor = (isset( $s3_options['cta_bgcolor'])) ? esc_attr( $s3_options['cta_bgcolor'] ) : '#ffffff';
29
+ $s3_cta_font_size = (isset( $s3_options['cta_font_size'])) ? esc_attr( $s3_options['cta_font_size'] ) : '';
30
+
31
+ $s3_cta_textcolor = ('' !== $s3_cta_textcolor) ? "color: $s3_cta_textcolor" : "";
32
+ $s3_cta_bgcolor = ('' !== $s3_cta_bgcolor) ? "background-color: $s3_cta_bgcolor" : "";
33
+ $s3_cta_font_size = ('' !== $s3_cta_font_size) ? "font-size: $s3_cta_font_size" : "";
34
+
35
+ $s3_cta_css = "padding: 0px 16px; line-height: 1.6; $s3_cta_font_size; $s3_cta_bgcolor; $s3_cta_textcolor; border-radius:10px; margin:0 10px; ";
36
+ $s3_cta_class = "ht-ctc-cta ";
37
+
38
+
39
+ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$img_size; width:$img_size;";
40
+
41
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
42
+
43
+ ?>
44
+ <div title="<?= $call_to_action ?>" style="<?= $s3_css ?>">
45
+ <?= ht_ctc_style_3_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
46
+ </div>
new/tools/woo/woo-single-styles/woo-style-3_1.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 3_1 - s3 extend
4
+ *
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ $s3_1_options = get_option( 'ht_ctc_s3_1' );
10
+ $s3_1_options = apply_filters( 'ht_ctc_fh_s3_1_options', $s3_1_options );
11
+
12
+ $img_size = esc_attr( $s3_1_options['s3_img_size'] );
13
+ if ( '' == $img_size ) {
14
+ $img_size = "40px";
15
+ }
16
+
17
+ // Call to action
18
+ $s3_1_cta_type = (isset( $s3_1_options['cta_type'])) ? esc_attr( $s3_1_options['cta_type'] ) : 'hover';
19
+
20
+ $s3_1_cta_textcolor = (isset( $s3_1_options['cta_textcolor'])) ? esc_attr( $s3_1_options['cta_textcolor'] ) : '';
21
+ $s3_1_cta_bgcolor = (isset( $s3_1_options['cta_bgcolor'])) ? esc_attr( $s3_1_options['cta_bgcolor'] ) : '#ffffff';
22
+ $s3_1_cta_font_size = (isset( $s3_1_options['cta_font_size'])) ? esc_attr( $s3_1_options['cta_font_size'] ) : '';
23
+
24
+ $s3_1_cta_textcolor = ('' !== $s3_1_cta_textcolor) ? "color: $s3_1_cta_textcolor" : "";
25
+ $s3_1_cta_bgcolor = ('' !== $s3_1_cta_bgcolor) ? "background-color: $s3_1_cta_bgcolor" : "";
26
+ $s3_1_cta_font_size = ('' !== $s3_1_cta_font_size) ? "font-size: $s3_1_cta_font_size" : "";
27
+
28
+ $s3_1_cta_css = "padding: 0px 16px; line-height: 1.6; $s3_1_cta_font_size; $s3_1_cta_bgcolor; $s3_1_cta_textcolor; border-radius:10px; margin:0 10px; ";
29
+ $s3_1_cta_class = "ht-ctc-cta ";
30
+
31
+ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$img_size; width:$img_size;";
32
+
33
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
34
+
35
+
36
+ $rtl_css = "";
37
+ if ( function_exists('is_rtl') && is_rtl() ) {
38
+ $rtl_css = "flex-direction:row-reverse;";
39
+ }
40
+
41
+ $s3_1_css = "display:inline-flex;justify-content:center;align-items:center;$rtl_css ";
42
+
43
+ // extend
44
+ $s3_1_padding = ( isset( $s3_1_options['s3_padding']) ) ? esc_attr( $s3_1_options['s3_padding'] ) : '';
45
+ $s3_1_bg_color = ( isset( $s3_1_options['s3_bg_color']) ) ? esc_attr( $s3_1_options['s3_bg_color'] ) : '#25D366';
46
+ $s3_1_bg_color_hover = ( isset( $s3_1_options['s3_bg_color_hover']) ) ? esc_attr( $s3_1_options['s3_bg_color_hover'] ) : '#25D366';
47
+
48
+ $s3_1_box_shadow = "";
49
+ if ( isset( $s3_1_options['s3_box_shadow'])) {
50
+ $s3_1_box_shadow = "box-shadow: 0px 0px 11px rgba(0,0,0,.5);";
51
+ }
52
+ $s3_1_extend_css = "background-color: $s3_1_bg_color; padding: $s3_1_padding; border-radius: 50%; $s3_1_box_shadow";
53
+
54
+ $s3_1_box_shadow_hover = "";
55
+ if ( isset( $s3_1_options['s3_box_shadow_hover'])) {
56
+ $s3_1_box_shadow_hover = "box-shadow:0px 0px 11px rgba(0,0,0,.5);";
57
+ }
58
+ // hover css
59
+ $s3_1_hover_css = "background-color:$s3_1_bg_color_hover !important;$s3_1_box_shadow_hover";
60
+
61
+ $others = array(
62
+ 'bg_color' => "$s3_1_bg_color",
63
+ );
64
+
65
+ ?>
66
+ <style id="ht-ctc-s3">
67
+ .ht-ctc .ctc_s_3_1:hover svg stop{stop-color:<?= $s3_1_bg_color_hover ?>;}.ht-ctc .ctc_s_3_1:hover .ht_ctc_padding,.ht-ctc .ctc_s_3_1:hover .ctc_cta_stick{<?= $s3_1_hover_css ?>}
68
+ </style>
69
+
70
+ <div title="<?= $call_to_action ?>" style="<?= $s3_1_css ?>" class="ctc_s_3_1">
71
+ <div class="ctc-analytics ht_ctc_padding" style="<?= $s3_1_extend_css ?>">
72
+ <?= ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others ); ?>
73
+ </div>
74
+ </div>
new/tools/woo/woo-single-styles/woo-style-4.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 4
4
+ *
5
+ * Chip
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ $s4_options = get_option( 'ht_ctc_s4' );
12
+ $s4_options = apply_filters( 'ht_ctc_fh_s4_options', $s4_options );
13
+
14
+ $s4_text_color = esc_attr( $s4_options['s4_text_color'] );
15
+ $s4_bg_color = esc_attr( $s4_options['s4_bg_color'] );
16
+ $s4_img_url = esc_attr( $s4_options['s4_img_url'] );
17
+ $s4_img_position = ( isset( $s4_options['s4_img_position']) ) ? esc_attr( $s4_options['s4_img_position'] ) : 'left';
18
+ $s4_img_size = ( isset( $s4_options['s4_img_size']) ) ? esc_attr( $s4_options['s4_img_size'] ) : '';
19
+ if ( '' == $s4_img_size ) {
20
+ $s4_img_size = "32px";
21
+ }
22
+
23
+ if ( '' == $call_to_action ) {
24
+ $call_to_action = "WhatsApp us";
25
+ }
26
+
27
+ if ( 'left' == $s4_img_position ) {
28
+ $s4_margin = "0 8px 0 -12px;";
29
+ // $s4_margin = "0 8px 0 -13px;";
30
+ $s4_order = "0";
31
+ } else {
32
+ $s4_margin = "0 -12px 0 8px;";
33
+ $s4_order = "1";
34
+ }
35
+
36
+ $rtl_css = "";
37
+ if ( is_rtl() ) {
38
+ $rtl_css = "flex-direction:row-reverse;";
39
+ }
40
+
41
+
42
+ $s4_chip_css = "display:inline-flex;justify-content: center;align-items: center;background-color:$s4_bg_color;color:$s4_text_color;padding:0 12px;border-radius:25px;font-size:13px;line-height:32px;$rtl_css ";
43
+ $s4_chip_svg_css ="margin:$s4_margin;order:$s4_order;";
44
+ $s4_chip_img_css ="margin:$s4_margin;order:$s4_order;height:$s4_img_size;width:$s4_img_size;border-radius:50%";
45
+ $ht_ctc_svg_css = "pointer-events:none; display: block; height:$s4_img_size; width:$s4_img_size;";
46
+ ?>
47
+
48
+ <div class="chip ctc-analytics" style="<?= $s4_chip_css ?>">
49
+ <?php
50
+ if ( '' == $s4_img_url ) {
51
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
52
+ $type = "$type-s4";
53
+ ?>
54
+ <span style="<?= $s4_chip_svg_css ?>"><?= ht_ctc_style_3_svg( $s4_img_size, $type, $ht_ctc_svg_css ); ?></span>
55
+ <?php
56
+ } else {
57
+ // if user changed the image
58
+ ?>
59
+ <img style="<?= $s4_chip_img_css ?>" src="<?= $s4_img_url ?>" alt="<?= $call_to_action ?>">
60
+ <?php
61
+ }
62
+ ?>
63
+ <span class="ctc_cta"><?= $call_to_action ?></span>
64
+ </div>
new/tools/woo/woo-single-styles/woo-style-5.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 5
4
+ * image with content slider
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ $s5_options = get_option( 'ht_ctc_s5' );
10
+ $s5_options = apply_filters( 'ht_ctc_fh_s5_options', $s5_options );
11
+
12
+ $s5_line_1 = esc_attr( $s5_options['s5_line_1'] );
13
+ $s5_line_2 = esc_attr( $s5_options['s5_line_2'] );
14
+ $s5_line_1_color = esc_attr( $s5_options['s5_line_1_color'] );
15
+ $s5_line_2_color = esc_attr( $s5_options['s5_line_2_color'] );
16
+ $s5_background_color = esc_attr( $s5_options['s5_background_color'] );
17
+ $s5_border_color = esc_attr( $s5_options['s5_border_color'] );
18
+ $s5_img = esc_attr( $s5_options['s5_img'] );
19
+ $s5_img_height = esc_attr( $s5_options['s5_img_height'] );
20
+ $s5_img_width = esc_attr( $s5_options['s5_img_width'] );
21
+ $s5_content_height = esc_attr( $s5_options['s5_content_height'] );
22
+ $s5_content_width = esc_attr( $s5_options['s5_content_width'] );
23
+ $s5_img_position = esc_attr( $s5_options['s5_img_position'] );
24
+
25
+ // if its came from woo page..
26
+ if ( isset($calling_from) && 'woo_page' == $calling_from ) {
27
+ $s5_img_position = 'left';
28
+ }
29
+
30
+ // default image - if user not added any image
31
+ if ( '' == $s5_img ) {
32
+ $s5_img = plugins_url( './new/inc/assets/img/new_style8.jpg', HT_CTC_PLUGIN_FILE );
33
+ }
34
+
35
+ if ( '' == $s5_line_1 ) {
36
+ $s5_line_1 = $call_to_action;
37
+ }
38
+
39
+ $rtl_css = "";
40
+ if ( function_exists('is_rtl') && is_rtl() ) {
41
+ $rtl_css = "flex-direction:row-reverse;";
42
+ }
43
+
44
+ $s5_cta_style = "display: -ms-flexbox;display: -webkit-flex; display: flex;$rtl_css ";
45
+
46
+
47
+ $s5_img_style = '';
48
+ $s5_img_style .= 'height: '.$s5_img_height.'; width: '.$s5_img_width.'; z-index: 999999; ';
49
+ if ( 'right' == $s5_img_position ) {
50
+ $s5_img_style .= 'order: 1;';
51
+ }
52
+
53
+ $s5_content_style = '';
54
+ $s5_content_style .= 'flex-direction: column; justify-content: center; align-items: center; ';
55
+ $s5_content_style .= ' background-color: '.$s5_background_color.'; border: 1px solid '.$s5_border_color.'; height: '.$s5_content_height.'; width: '.$s5_content_width.'; ';
56
+ if ( 'right' == $s5_img_position ) {
57
+ $s5_content_style .= 'margin-right: -4px;';
58
+ } elseif ( 'left' == $s5_img_position ) {
59
+ $s5_content_style .= 'margin-left: -4px;';
60
+ }
61
+
62
+ $s5_css_code = '
63
+ .ht-ctc-style-5 .s5_img{box-shadow:2px 5px 10px rgba(0,0,0,.5)}.ht-ctc-style-5 .s5_content{box-shadow:2px 5px 10px rgba(0,0,0,.5);border-radius:5px}.ht-ctc-style-5 .s5_content span{padding:5px;overflow:hidden}.ht-ctc-style-5 .s5_content .heading{font-size:20px}.ht-ctc-style-5 .s5_content .description{font-size:12px}.ht-ctc-style-5 .s5_content.right{animation:1s s5_translate_right}.ht-ctc-style-5 .s5_content.left{animation:1s s5_translate_left}@keyframes s5_translate_right{0%{transform:translateX(55px)}100%{transform:translateX(0)}}@keyframes s5_translate_left{0%{transform:translateX(-55px)}100%{transform:translateX(0)}}
64
+ ';
65
+
66
+ $o = '';
67
+ $o .= '<style>';
68
+ $o .= '.ht-ctc-style-5 .s5_content{display:none}.ht-ctc-style-5 .s5_cta:hover .s5_content{display:flex}';
69
+ $o .= $s5_css_code;
70
+ $o .= '</style>';
71
+
72
+ echo $o;
73
+
74
+ ?>
75
+
76
+ <div class="ht-ctc-style-5 ctc-analytics" style="cursor: pointer; z-index: 99999999;" >
77
+
78
+ <div class="s5_cta" style="<?= $s5_cta_style ?>" >
79
+ <img class="s5_img ctc-analytics" src="<?= $s5_img ?>" style="<?= $s5_img_style ?>" alt="<?= $call_to_action ?>">
80
+ <div class="s5_content ctc-analytics ctc_cta_stick <?= $s5_img_position ?>" style="<?= $s5_content_style ?>" >
81
+ <span class="heading ctc-analytics ctc_cta" style="color: <?= $s5_line_1_color ?>"><?= $s5_line_1 ?></span>
82
+ <span class="description ctc-analytics" style="color: <?= $s5_line_2_color ?>"><?= $s5_line_2 ?></span>
83
+ </div>
84
+ </div>
85
+
86
+ </div>
new/tools/woo/woo-single-styles/woo-style-6.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 6
4
+ *
5
+ * link
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ $s6_options = get_option( 'ht_ctc_s6' );
12
+ $s6_options = apply_filters( 'ht_ctc_fh_s6_options', $s6_options );
13
+
14
+ $s6_txt_color = esc_attr( $s6_options['s6_txt_color'] );
15
+ $s6_txt_color_on_hover = esc_attr( $s6_options['s6_txt_color_on_hover'] );
16
+ $s6_txt_decoration = esc_attr( $s6_options['s6_txt_decoration'] );
17
+ $s6_txt_decoration_on_hover = esc_attr( $s6_options['s6_txt_decoration_on_hover'] );
18
+ ?>
19
+
20
+ <a class="ctc-analytics ctc_cta" style="color: <?= $s6_txt_color ?>; text-decoration: <?= $s6_txt_decoration ?>;"
21
+ onmouseover = "this.style.color = '<?= $s6_txt_color_on_hover ?>', this.style.textDecoration = '<?= $s6_txt_decoration_on_hover ?>' "
22
+ onmouseout = "this.style.color = '<?= $s6_txt_color ?>', this.style.textDecoration = '<?= $s6_txt_decoration ?>' "
23
+ >
24
+ <?= $call_to_action ?>
25
+ </a>
new/tools/woo/woo-single-styles/woo-style-7.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 7
4
+ * icon with customize padding
5
+ */
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $s7_options = get_option( 'ht_ctc_s7' );
9
+ $s7_options = apply_filters( 'ht_ctc_fh_s7_options', $s7_options );
10
+
11
+ $s7_icon_size = esc_attr( $s7_options['s7_icon_size'] );
12
+ $s7_icon_color = esc_attr( $s7_options['s7_icon_color'] );
13
+ $s7_icon_color_hover = esc_attr( $s7_options['s7_icon_color_hover'] );
14
+ $s7_border_size = esc_attr( $s7_options['s7_border_size'] );
15
+ $s7_border_color = esc_attr( $s7_options['s7_border_color'] );
16
+ $s7_border_color_hover = esc_attr( $s7_options['s7_border_color_hover'] );
17
+ $s7_border_radius = esc_attr( $s7_options['s7_border_radius'] );
18
+
19
+ // Call to action
20
+ $s7_cta_type = (isset( $s7_options['cta_type'])) ? esc_attr( $s7_options['cta_type'] ) : 'hover';
21
+ $s7_cta_textcolor = (isset( $s7_options['cta_textcolor'])) ? esc_attr( $s7_options['cta_textcolor'] ) : '';
22
+ $s7_cta_bgcolor = (isset( $s7_options['cta_bgcolor'])) ? esc_attr( $s7_options['cta_bgcolor'] ) : '#ffffff';
23
+
24
+ $s7_cta_font_size = (isset( $s7_options['cta_font_size'])) ? esc_attr( $s7_options['cta_font_size'] ) : '';
25
+
26
+ $s7_cta_font_size = ('' !== $s7_cta_font_size) ? "font-size: $s7_cta_font_size;" : "";
27
+
28
+ $rtl_css = "";
29
+ if ( function_exists('is_rtl') && is_rtl() ) {
30
+ $rtl_css = "flex-direction:row-reverse;";
31
+ }
32
+
33
+ $s7_n1_styles = "display:inline-flex;justify-content:center;align-items:center;$rtl_css ";
34
+ $s7_icon_css = "font-size: $s7_icon_size; color: $s7_icon_color; padding: $s7_border_size; background-color: $s7_border_color; border-radius: $s7_border_radius;";
35
+
36
+ $s7_cta_css = "padding: 0px 16px; $s7_cta_font_size color: $s7_cta_textcolor; background-color: $s7_cta_bgcolor; border-radius:10px; margin:0 10px; ";
37
+ $s7_cta_class = "ht-ctc-cta ";
38
+
39
+ // svg values
40
+ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$s7_icon_size; width:$s7_icon_size;";
41
+ $s7_svg_attrs = array(
42
+ 'color' => "$s7_icon_color",
43
+ 'icon_size' => "$s7_icon_size",
44
+ 'type' => "$type",
45
+ 'ht_ctc_svg_css' => "$ht_ctc_svg_css",
46
+ );
47
+
48
+ // hover
49
+ $s7_hover_icon_styles = ".ht-ctc .ctc_s_7:hover .ctc_s_7_icon_padding, .ht-ctc .ctc_s_7:hover .ctc_cta_stick{background-color:$s7_border_color_hover !important;}.ht-ctc .ctc_s_7:hover svg g path{fill:$s7_icon_color_hover !important;}";
50
+
51
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
52
+ ?>
53
+ <style id="ht-ctc-s7">
54
+ <?= $s7_hover_icon_styles ?>
55
+ </style>
56
+
57
+ <div title="<?= $call_to_action ?>" class="ctc_s_7 ctc-analytics" style="<?= $s7_n1_styles; ?>">
58
+ <div class="ctc_s_7_icon_padding ctc-analytics " style="<?= $s7_icon_css ?>">
59
+ <?= ht_ctc_singlecolor( $s7_svg_attrs ); ?>
60
+ </div>
61
+ </div>
new/tools/woo/woo-single-styles/woo-style-7_1.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 7
4
+ * icon with customize padding
5
+ */
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $s7_1_options = get_option( 'ht_ctc_s7_1' );
9
+ $s7_1_options = apply_filters( 'ht_ctc_fh_s7_1_options', $s7_1_options );
10
+
11
+ $s7_icon_size = esc_attr( $s7_1_options['s7_icon_size'] );
12
+ $s7_icon_color = esc_attr( $s7_1_options['s7_icon_color'] );
13
+ $s7_icon_color_hover = esc_attr( $s7_1_options['s7_icon_color_hover'] );
14
+ $s7_bgcolor = esc_attr( $s7_1_options['s7_bgcolor'] );
15
+ $s7_bgcolor_hover = esc_attr( $s7_1_options['s7_bgcolor_hover'] );
16
+ $s7_border_size = esc_attr( $s7_1_options['s7_border_size'] );
17
+
18
+ // Call to action
19
+ $s7_cta_type = (isset( $s7_1_options['cta_type'])) ? esc_attr( $s7_1_options['cta_type'] ) : 'hover';
20
+ $s7_1_cta_font_size = (isset( $s7_1_options['cta_font_size'])) ? esc_attr( $s7_1_options['cta_font_size'] ) : '';
21
+
22
+ $s7_1_cta_font_size = ('' !== $s7_1_cta_font_size) ? "font-size: $s7_1_cta_font_size" : "";
23
+
24
+ // Call to action - Order
25
+ $s7_cta_order = "1";
26
+ $s7_hover_cta_padding_css = "padding-right: 21px;";
27
+ $s7_show_cta_padding_css = "padding:5px 10px 5px 20px;";
28
+ if ( isset($side_2) && 'right' == $side_2) {
29
+ // if side_2 is right then cta is left
30
+ $s7_cta_order = "0";
31
+ $s7_hover_cta_padding_css = "padding-left: 21px;";
32
+ $s7_show_cta_padding_css = "padding:5px 20px 5px 5px;";
33
+ }
34
+
35
+ $rtl_css = "";
36
+ if ( function_exists('is_rtl') && is_rtl() ) {
37
+ $rtl_css = "flex-direction:row-reverse;";
38
+
39
+ if ( isset($side_2) && 'right' == $side_2) {
40
+ $s7_show_cta_padding_css = "padding:5px 10px 5px 20px;";
41
+ } else {
42
+ $s7_show_cta_padding_css = "padding:5px 20px 5px 10px;";
43
+ }
44
+ }
45
+
46
+ $s7_n1_styles = "display:inline-flex;justify-content:center;align-items:center;$rtl_css ";
47
+ $s7_cta_css = "$s7_1_cta_font_size; ";
48
+ $s7_icon_padding_css = "";
49
+ $s7_cta_class = "ht-ctc-cta ";
50
+ $s7_hover_styles = "";
51
+
52
+ $s7_n1_styles .= "$s7_show_cta_padding_css background-color:$s7_bgcolor;border-radius:25px;";
53
+ $s7_cta_css .= " color: $s7_icon_color; border-radius:10px; margin:0 10px; order: $s7_cta_order; ";
54
+ $s7_icon_padding_css .= "";
55
+ $s7_hover_styles = ".ht-ctc .ctc_s_7_1:hover{background-color:$s7_bgcolor_hover !important;}.ht-ctc .ctc_s_7_1:hover .ctc_s_7_1_cta{color:$s7_icon_color_hover !important;}.ht-ctc .ctc_s_7_1:hover svg g path{fill:$s7_icon_color_hover !important;}";
56
+
57
+ // svg values
58
+ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$s7_icon_size; width:$s7_icon_size;";
59
+ $s7_svg_attrs = array(
60
+ 'color' => "$s7_icon_color",
61
+ 'icon_size' => "$s7_icon_size",
62
+ 'type' => "$type",
63
+ 'ht_ctc_svg_css' => "$ht_ctc_svg_css",
64
+ );
65
+
66
+
67
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
68
+ ?>
69
+ <style id="ht-ctc-s7_1">
70
+ <?= $s7_hover_styles ?>
71
+ </style>
72
+
73
+ <div class="ctc_s_7_1 ctc-analytics" style="<?= $s7_n1_styles; ?>">
74
+ <p class="ctc_s_7_1_cta ctc-analytics ctc_cta <?= $s7_cta_class ?>" style="<?= $s7_cta_css ?>"><?= $call_to_action; ?></p>
75
+ <div class="ctc_s_7_icon_padding ctc-analytics " style="<?= $s7_icon_padding_css ?>">
76
+ <?= ht_ctc_singlecolor( $s7_svg_attrs ); ?>
77
+ </div>
78
+ </div>
new/tools/woo/woo-single-styles/woo-style-8.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 8
4
+ *
5
+ * Button with icon
6
+ *
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ $s8_options = get_option( 'ht_ctc_s8' );
12
+ $s8_options = apply_filters( 'ht_ctc_fh_s8_options', $s8_options );
13
+
14
+ $s8_icon_color = esc_attr( $s8_options['s8_icon_color'] );
15
+ $s8_icon_color_on_hover = esc_attr( $s8_options['s8_icon_color_on_hover'] );
16
+ $s8_txt_color = esc_attr( $s8_options['s8_txt_color'] );
17
+ $s8_txt_color_on_hover = esc_attr( $s8_options['s8_txt_color_on_hover'] );
18
+ $s8_bg_color = esc_attr( $s8_options['s8_bg_color'] );
19
+ $s8_bg_color_on_hover = esc_attr( $s8_options['s8_bg_color_on_hover'] );
20
+
21
+ $s8_icon_position = esc_attr( $s8_options['s8_icon_position'] );
22
+ $s8_btn_size = esc_attr( $s8_options['s8_btn_size'] );
23
+
24
+ $s8_icon_size = ('' == esc_attr( $s8_options['s8_icon_size'] )) ? "17px" : esc_attr( $s8_options['s8_icon_size'] );
25
+
26
+ $s8_text_size = esc_attr( $s8_options['s8_text_size'] );
27
+ $s8_text_size_css = ('' == $s8_text_size) ? "" : "font-size: $s8_text_size;";
28
+ // $s8_text_size_css = ('' == $s8_text_size) ? "font-size: 16px;" : "font-size: $s8_text_size;";
29
+
30
+ $s8_height = '36px';
31
+ if ('btn-large' == $s8_btn_size) {
32
+ $s8_height = '54px';
33
+ }
34
+
35
+ $s8_svg_attrs = array (
36
+ 'color' => "$s8_icon_color",
37
+ 'icon_size' => "$s8_icon_size",
38
+ 'type' => "$type",
39
+ 'ht_ctc_svg_css' => 'display:block;',
40
+ );
41
+
42
+ $s8_fullwidth_css = "";
43
+ if ( isset( $s8_options['s8_m_fullwidth'] ) ) {
44
+ $s8_fullwidth_css = "@media(max-width:1201px){.ht-ctc.style-8{left:unset !important;right:0px !important;}.ht-ctc.style-8,.ht-ctc-style-8,.ht-ctc-style-8 .s_8{width: 100%;}}";
45
+ }
46
+
47
+ $rtl_css = "";
48
+ if ( function_exists('is_rtl') && is_rtl() ) {
49
+ $rtl_css = "flex-direction:row-reverse;";
50
+ }
51
+
52
+ $s8_icon_css = ( 'right' == $s8_icon_position ) ? "order:1;margin-left: 15px;" : "order:0;margin-right: 15px;";
53
+ $s8_text_css = "color:$s8_txt_color; $s8_text_size_css ";
54
+ $s8_main_span_css = "display: flex; $rtl_css padding: 0 2rem;letter-spacing: .5px;transition: .2s ease-out;text-align: center;justify-content: center;align-items: center;border-radius:2px;height:$s8_height;line-height:$s8_height;vertical-align:middle;box-shadow:0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.2);box-sizing:inherit;background-color:$s8_bg_color;";
55
+
56
+ // if ( isset($calling_from) && 'woo_page' == $calling_from ) {
57
+ // // if its from woo pages..
58
+ // } else {}
59
+
60
+ ?>
61
+
62
+ <style id="ht-ctc-s8">
63
+ .ht-ctc-style-8 .s_8 svg{<?= $s8_icon_css ?>;}.ht-ctc .ht-ctc-style-8:hover .s_8 svg g path{fill:<?= $s8_icon_color_on_hover ?> !important;}.ht-ctc .ht-ctc-style-8:hover .s_8 .ht-ctc-s8-text{color:<?= $s8_txt_color_on_hover ?> !important;}.ht-ctc .ht-ctc-style-8:hover .s_8{box-shadow: 0 3px 3px 0 rgba(7,6,6,.14), 0 1px 7px 0 rgba(0,0,0,.12), 0 3px 1px -1px rgba(0,0,0,.2) !important; transition: .2s ease-out !important; background-color:<?= $s8_bg_color_on_hover ?> !important; }<?= $s8_fullwidth_css ?>
64
+ </style>
65
+
66
+ <div class = "ht-ctc-style-8 ctc-analytics" >
67
+ <span class="s_8 waves-effect waves-light ctc-analytics" style="<?= $s8_main_span_css ?>">
68
+ <?php
69
+ if ('hide' !== $s8_icon_position) {
70
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
71
+ echo ht_ctc_singlecolor( $s8_svg_attrs );
72
+ }
73
+ ?>
74
+ <span class="ht-ctc-s8-text s8_span ctc-analytics ctc_cta" style="<?= $s8_text_css; ?>">
75
+ <?= $call_to_action ?>
76
+ </span>
77
+ </span>
78
+ </div>
new/tools/woo/woo-single-styles/woo-style-99.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Style - 99
4
+ * own image / GIF
5
+ */
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $s_99_options = get_option( 'ht_ctc_s99' );
9
+ $s_99_options = apply_filters( 'ht_ctc_fh_s99_options', $s_99_options );
10
+
11
+ $s_99_desktop_img_height = esc_attr( $s_99_options['s99_desktop_img_height'] );
12
+ $s_99_desktop_img_width = esc_attr( $s_99_options['s99_desktop_img_width'] );
13
+ $s_99_mobile_img_height = esc_attr( $s_99_options['s99_mobile_img_height'] );
14
+ $s_99_mobile_img_width = esc_attr( $s_99_options['s99_mobile_img_width'] );
15
+
16
+ // img - url, width, height based on device
17
+ $s_99_img_css = "";
18
+
19
+ if( isset($is_mobile) && 'yes' == $is_mobile ) {
20
+ $s_99_own_image = esc_html( $s_99_options['s99_mobile_img_url'] );
21
+ $s_99_img_css .= ( '' !== $s_99_mobile_img_height ) ? "height: $s_99_mobile_img_height; " : "height: 40px; ";
22
+
23
+ if ( '' !== $s_99_mobile_img_width ) {
24
+ $s_99_img_css .= "width: $s_99_mobile_img_width; ";
25
+ }
26
+ } else {
27
+ $s_99_own_image = esc_html( $s_99_options['s99_dekstop_img_url'] );
28
+ $s_99_img_css .= ( '' !== $s_99_desktop_img_height ) ? "height: $s_99_desktop_img_height; " : "height: 50px; ";
29
+
30
+ if ( '' !== $s_99_desktop_img_width ) {
31
+ $s_99_img_css .= "width: $s_99_desktop_img_width; ";
32
+ }
33
+ }
34
+
35
+ // fallback image
36
+ if ( '' == $s_99_own_image ) {
37
+ $s_99_own_image = plugins_url( './new/inc/assets/img/whatsapp-logo.svg', HT_CTC_PLUGIN_FILE );
38
+ }
39
+
40
+ ?>
41
+
42
+ <img class="own-img ctc-analytics ctc_cta" title="<?= $call_to_action ?>" id="style-99" src="<?= $s_99_own_image ?>" style="<?= $s_99_img_css ?>" alt="<?= $call_to_action ?>">
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
- Tested up to: 6.0
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.9.11
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
@@ -12,7 +12,7 @@ Let's make your Web page visitors Contact you through "WhatsApp", "WhatsApp Busi
12
 
13
  == Description ==
14
 
15
- Let's make your Web page visitors Contact you through "WhatsApp", "WhatsApp Business" with a single Click (WhatsApp Chat, Group, Share)
16
 
17
  WhatsApp connectivity for WordPress websites! Engage customers and generate leads!
18
 
@@ -37,7 +37,7 @@ Select a Style that matches your Website design.
37
  * Shortcodes
38
  * Different Styles, Positions for Mobile, Desktop
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/) | ✏️[Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/)
43
 
@@ -48,10 +48,9 @@ Instead of selecting a pre-defined style, add any Image/Animated-image/GIF.
48
 
49
  == 🌈 Custom Element ==
50
 
51
- Convert any Element as WhatsApp Chat Element by adding
52
 
53
- * Class name: 'ctc_chat' (or)
54
- * Id name: 'ctc_chat' (or)
55
  * Href/link: '#ctc_chat'
56
 
57
  The custom design will navigate to WhatsApp based on plugin settings (WhatsApp Number, pre-filled message, .... ).
@@ -67,13 +66,13 @@ Encourage user engagement by displaying the perfect message at the perfect time
67
  * [Greetings-2](https://holithemes.com/plugins/click-to-chat/greetings-2/): Content Specific Design
68
  * [Greetings-Form](https://holithemes.com/plugins/click-to-chat/greetings-form/): Form Filling before initializing the chat [PRO]
69
 
70
- = [Actions](https://holithemes.com/plugins/click-to-chat/greetings-actions/) =
71
 
72
  **Click**: Display Greetings When Clicks on any element with Class name: 'ctc_greetings'
73
  **ViewPort**: Display Greetings When an element is in viewport(25% margin) with Class name: 'ctc_greetings_now' [PRO]
74
  **Time, Scroll** Display Greetings based on time, scroll [PRO]
75
 
76
-
77
 
78
  == ✳️ Position to Place ==
79
 
@@ -83,7 +82,7 @@ Encourage user engagement by displaying the perfect message at the perfect time
83
 
84
  == ⏩ Pre-filled Message ==
85
 
86
- Text that appears at the WhatsApp chat window when the user clicks on the WhatsApp Image/button.
87
 
88
  Users can start the conversation easily.
89
 
@@ -100,9 +99,13 @@ With these variables, we can understand from which page the user started WhatsAp
100
 
101
  == 🎁 WooCommerce ==
102
 
103
- = WooCommerce Single product pages =
104
 
105
- Separate 'pre-filled message', 'call to action' settings for WooCommerce Single product pages.
 
 
 
 
106
 
107
  Additional variables, specific to WooCommerce single product page to change values dynamically
108
 
@@ -111,11 +114,9 @@ Additional variables, specific to WooCommerce single product page to change valu
111
  **{regular_price}** -> Regular product price (with out any sale)
112
  **{sku}** -> Stock keeping unit
113
 
114
- = Add WhatsApp in WooCommerce Product pages =
115
 
116
- * After product summary
117
-
118
- PRO:
119
 
120
  * Before Main Content
121
  * Before Product
@@ -126,10 +127,11 @@ PRO:
126
  * After Cart Button
127
  * After Add to Cart Form
128
  * After Product
 
129
 
130
  [Add WhatsApp Icon/Button in WooCommerce Product pages](https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/)
131
 
132
- = WooCommerce Shop Page =
133
 
134
  Add WhatsApp at WooCommerce Products list (shop page, related products list)
135
 
@@ -137,8 +139,8 @@ Add WhatsApp at WooCommerce Products list (shop page, related products list)
137
 
138
  = 📒 Page Level Settings =
139
 
140
- At the page-level, we can overwrite the settings for each post. we can add different Whatsapp Number, Prefilled Message, Call to Action.
141
- (while editing the post, at the right sidebar 'Click to Chat' metabox)
142
 
143
  * WhatsApp Number
144
  * Call to Action
@@ -150,6 +152,7 @@ PRO:
150
  * Styles
151
  * Time Delay
152
  * Scroll Delay
 
153
 
154
  [Page-level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
155
 
@@ -185,16 +188,17 @@ Connect other applications using Integrate, Automation tools like Zapier, IFTTT,
185
  * {number} - WhatsApp Number for that icon/button
186
  * Greetings
187
  * Greetings From filling before initiating the chat
188
- * Display/reappear based on Time, page scroll
189
  * Position to place
190
- * Fixed: Fixed position to the screen (default, available in Free version)
191
- * Absolute: Fixed position to the body content. (Moves when the user scrolls page)
192
  * Time Delay - Displays WhatsApp after some time delay
193
  * Scroll Action - Displays WhatsApp after user scrolls the page of a given percentage
194
- * Display based on Website visitors login status
195
- * Page-level settings - Change styles, time, scroll delay.
196
  * WooCommerce
197
- * Mulitple position to add WhatsApp in product pages.
 
198
 
199
  [PRO](https://holithemes.com/plugins/click-to-chat/pricing/)
200
 
@@ -215,9 +219,9 @@ Setup for [WPML](https://holithemes.com/plugins/click-to-chat/translate-click-to
215
 
216
  == 🚀 Performance ==
217
 
218
- * Rich in features but the frontend of the site content is very lightweight.
219
 
220
- We highly concentrate on speed, performance.
221
 
222
  == 👓 Display Settings ==
223
 
@@ -237,6 +241,12 @@ PRO:
237
  * Selected Days in a week
238
  * Website visitor login status
239
 
 
 
 
 
 
 
240
  == ⛳ Shortcodes ==
241
 
242
  Use shortcodes to add WhatsApp icon/button with inline the Post content, widget area.
@@ -255,9 +265,9 @@ To change the WhatsApp number use the 'number' attribute
255
 
256
  = Group =
257
 
258
- Enable Group chat feature and add WhatsApp Group id at the plugin settings.
259
 
260
- Make it easy for your customers to join your Whatsapp Group.
261
 
262
  [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/)
263
 
@@ -278,7 +288,7 @@ Help by [Translating the plugin](https://translate.wordpress.org/projects/wp-plu
278
  1. Chat Settings - Enter WhatsApp Number, prefilled message, call to action, desktop: web view / desktop app view
279
  1. Style, position to place (at any position of the screen) - Desktop, Mobile
280
  1. Add WhatsApp Menu item (Custom Element)
281
- 1. Change Values at page level: 'WhatsApp Number', 'Call to action', 'Group ID'
282
  1. Shortcodes - add style with inline the content
283
  1. Style - 5 - Image with content box
284
  1. Style - 8 - Materialize button
@@ -291,14 +301,14 @@ Help by [Translating the plugin](https://translate.wordpress.org/projects/wp-plu
291
  1. Webhooks
292
  1. prefilled, call to action for WooCommerce single product pages
293
  1. Animations
294
- 1. Analytics - Google analytics, Facebook Pixel, Google Ads Conversations
295
 
296
 
297
  == Installation ==
298
 
299
  = From Dashboard ( WordPress admin ) =
300
  * plugins -> Add New
301
- * search for 'click to chat for whatsapp'
302
  * click on Install Now and then Active.
303
 
304
  = using FTP or similar =
@@ -352,7 +362,7 @@ E.g.
352
  I like to buy this {product}, {url}
353
 
354
 
355
- With this prefilled text, we can know from which page the user started the conversation, purpose of the contact, and their details
356
 
357
  = Call to Action =
358
 
@@ -375,7 +385,7 @@ Select styles based on Device.
375
 
376
  **For selecting styles: plugin detects the device(mobile, desktop) based on HTTP User Agent (using wp_is_mobile)**
377
 
378
- Styles are customizable according to your theme/usecase.
379
 
380
  = Position to place the styles =
381
 
@@ -397,7 +407,7 @@ right: 50%
397
  bottom: 50%
398
  right: 10px
399
 
400
- Plugin supports all CSS units as suffix. (px, %, rem,...)
401
 
402
  [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
403
 
@@ -429,6 +439,12 @@ E.g.
429
 
430
  "Click to Chat" don't collect any of the user data and don't use cookies.
431
 
 
 
 
 
 
 
432
  = Show/Hide on Selected pages/devices =
433
 
434
  [Show only on selected pages](https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
@@ -456,7 +472,7 @@ Share Text - E.g.
456
 
457
  = AMP Compatibility =
458
 
459
- Click to Chat is Compatible with (AMP)[https://wordpress.org/plugins/amp/] plugin. AMP wont load plugins JavaScript file, limited functionality available.
460
 
461
  = 🔧 Basic Troubleshooting =
462
 
@@ -503,7 +519,20 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
503
 
504
  == Changelog ==
505
 
506
- = 3.9.10 =
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  * Fix: compatibility issues
508
 
509
  = 3.9.10 =
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
+ Tested up to: 6.0.1
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.12
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
12
 
13
  == Description ==
14
 
15
+ Let's make your Web page visitors Contact you through "WhatsApp" or "WhatsApp Business" with a single Click (WhatsApp Chat, Group, Share)
16
 
17
  WhatsApp connectivity for WordPress websites! Engage customers and generate leads!
18
 
37
  * Shortcodes
38
  * Different Styles, Positions for Mobile, Desktop
39
  * All pre-defined styles are customizable
40
+ * Select style and customize it to match the website design.
41
 
42
  [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/) | ✏️[Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/)
43
 
48
 
49
  == 🌈 Custom Element ==
50
 
51
+ Convert any Element as a WhatsApp Chat Element by adding
52
 
53
+ * Class/ID name: 'ctc_chat' (or)
 
54
  * Href/link: '#ctc_chat'
55
 
56
  The custom design will navigate to WhatsApp based on plugin settings (WhatsApp Number, pre-filled message, .... ).
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/): Form Filling before initializing the chat [PRO]
68
 
69
+ = Greetings Actions =
70
 
71
  **Click**: Display Greetings When Clicks on any element with Class name: 'ctc_greetings'
72
  **ViewPort**: Display Greetings When an element is in viewport(25% margin) with Class name: 'ctc_greetings_now' [PRO]
73
  **Time, Scroll** Display Greetings based on time, scroll [PRO]
74
 
75
+ [Actions](https://holithemes.com/plugins/click-to-chat/greetings-actions/)
76
 
77
  == ✳️ Position to Place ==
78
 
82
 
83
  == ⏩ Pre-filled Message ==
84
 
85
+ Text that appears in the WhatsApp chat window when the user clicks on the WhatsApp Image/button.
86
 
87
  Users can start the conversation easily.
88
 
99
 
100
  == 🎁 WooCommerce ==
101
 
102
+ = Overwrite Settings =
103
 
104
+ Separate settings for WooCommerce Single product pages
105
+
106
+ * Pre-filled Message
107
+ * Call to Action
108
+ * Greetings Template, Content [PRO]
109
 
110
  Additional variables, specific to WooCommerce single product page to change values dynamically
111
 
114
  **{regular_price}** -> Regular product price (with out any sale)
115
  **{sku}** -> Stock keeping unit
116
 
117
+ For Shop, Cart, Checkout, and Account pages can overwrite at page level settings
118
 
119
+ = Add WhatsApp - Single Product Pages =
 
 
120
 
121
  * Before Main Content
122
  * Before Product
127
  * After Cart Button
128
  * After Add to Cart Form
129
  * After Product
130
+ * After product summary
131
 
132
  [Add WhatsApp Icon/Button in WooCommerce Product pages](https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/)
133
 
134
+ = Add WhatsApp - Shop Page =
135
 
136
  Add WhatsApp at WooCommerce Products list (shop page, related products list)
137
 
139
 
140
  = 📒 Page Level Settings =
141
 
142
+ At the page level, we can overwrite the settings for each post. we can add different Whatsapp Number, Prefilled Message, Call to Action for each post
143
+ (while editing the post, at the right sidebar 'Click to Chat' meta box)
144
 
145
  * WhatsApp Number
146
  * Call to Action
152
  * Styles
153
  * Time Delay
154
  * Scroll Delay
155
+ * Greetings Template, Content
156
 
157
  [Page-level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
158
 
188
  * {number} - WhatsApp Number for that icon/button
189
  * Greetings
190
  * Greetings From filling before initiating the chat
191
+ * Actions: Display/reappear based on Time, page scroll, Click, When an element is in ViewPort
192
  * Position to place
193
+ * Fixed: Fixed position on the screen (default position)
194
+ * Absolute: Fixed position to the body content. (Moves when the user scrolls the page)
195
  * Time Delay - Displays WhatsApp after some time delay
196
  * Scroll Action - Displays WhatsApp after user scrolls the page of a given percentage
197
+ * Display based on Website visitor's login status
198
+ * Page-level settings - Change styles, time delay, scroll delay, Greetings Template, and Greetings Content
199
  * WooCommerce
200
+ * Overwrite greetings template, Content for Single product pages.
201
+ * Overwrite settings for Shop, Checkout, and Account pages at page level settings
202
 
203
  [PRO](https://holithemes.com/plugins/click-to-chat/pricing/)
204
 
219
 
220
  == 🚀 Performance ==
221
 
222
+ * Rich in features but the front end of the site content is very lightweight.
223
 
224
+ We highly concentrate on speed and performance.
225
 
226
  == 👓 Display Settings ==
227
 
241
  * Selected Days in a week
242
  * Website visitor login status
243
 
244
+ == Opt-in ==
245
+
246
+ Make the website users opt-in / accept consent before initiating the chat.
247
+
248
+ Opt-in[https://holithemes.com/plugins/click-to-chat/opt-in/]
249
+
250
  == ⛳ Shortcodes ==
251
 
252
  Use shortcodes to add WhatsApp icon/button with inline the Post content, widget area.
265
 
266
  = Group =
267
 
268
+ Enable the Group chat feature and add WhatsApp Group id at the plugin settings.
269
 
270
+ Make it easy for your customers to join Whatsapp Group.
271
 
272
  [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/)
273
 
288
  1. Chat Settings - Enter WhatsApp Number, prefilled message, call to action, desktop: web view / desktop app view
289
  1. Style, position to place (at any position of the screen) - Desktop, Mobile
290
  1. Add WhatsApp Menu item (Custom Element)
291
+ 1. Change Values at the page level: 'WhatsApp Number', 'Call to action', 'Group ID'
292
  1. Shortcodes - add style with inline the content
293
  1. Style - 5 - Image with content box
294
  1. Style - 8 - Materialize button
301
  1. Webhooks
302
  1. prefilled, call to action for WooCommerce single product pages
303
  1. Animations
304
+ 1. Analytics - Google Analytics, Facebook Pixel, Google Ads Conversations
305
 
306
 
307
  == Installation ==
308
 
309
  = From Dashboard ( WordPress admin ) =
310
  * plugins -> Add New
311
+ * search for 'click to chat'
312
  * click on Install Now and then Active.
313
 
314
  = using FTP or similar =
362
  I like to buy this {product}, {url}
363
 
364
 
365
+ With this prefilled text, we can know from which page the user started the conversation, the purpose of the contact, and their details
366
 
367
  = Call to Action =
368
 
385
 
386
  **For selecting styles: plugin detects the device(mobile, desktop) based on HTTP User Agent (using wp_is_mobile)**
387
 
388
+ Styles are customizable according to website theme.
389
 
390
  = Position to place the styles =
391
 
407
  bottom: 50%
408
  right: 10px
409
 
410
+ Plugin supports all CSS units as the suffix. (px, %, rem,...)
411
 
412
  [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
413
 
439
 
440
  "Click to Chat" don't collect any of the user data and don't use cookies.
441
 
442
+ = Opt-in =
443
+
444
+ User consent before starting the chat.
445
+
446
+ Opt-in[https://holithemes.com/plugins/click-to-chat/opt-in/]
447
+
448
  = Show/Hide on Selected pages/devices =
449
 
450
  [Show only on selected pages](https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
472
 
473
  = AMP Compatibility =
474
 
475
+ Click to Chat is Compatible with (AMP)[https://wordpress.org/plugins/amp/] plugin. AMP won't load plugins JavaScript files so limited functionality available.
476
 
477
  = 🔧 Basic Troubleshooting =
478
 
519
 
520
  == Changelog ==
521
 
522
+ = 3.12 =
523
+ * New: URL Open Target window - New, Same, popup.
524
+ * URL structure for desktop: wa.me, web.whatsapp
525
+ * URL structure for mobile: wa.me, WhatsApp://
526
+ * Web WhatsApp settings moved to other settings page with enchantments.
527
+
528
+ = 3.11 =
529
+ * Enchantment: added hooks for developers to create Extenstions
530
+ * Updated Admin settings page content
531
+
532
+ = 3.10 =
533
+ * More position to Add WhatsApp at WooCommerce Single product pages
534
+
535
+ = 3.9.11 =
536
  * Fix: compatibility issues
537
 
538
  = 3.9.10 =