Click to Chat for WhatsApp Chat - Version 3.8

Version Description

= using FTP or similar = * Delete Click-to-Chat folder - your setting will not lost. * unzip Click-to-Chat file and * Upload "Click-to-Chat" folder to the "/wp-content/plugins/" directory. * Activate the plugin through the "Plugins" menu in WordPress.

= From Dashboard ( WordPress admin ) = * When a new version released - you can see 'update now' link at wp-admin -> plugins * click on 'update now' or * since WordPress 5.5, If auto update for the plugin is enabled.
plugin will update automatically when new version is released

After Activate the plugin, add WhatsApp Number at plugin settings.

Download this release

Release Info

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

Code changes from version 3.7.1 to 3.8

click-to-chat.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
- Version: 3.7.1
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) {
17
 
18
  // ctc - Version - update version at readme 'Stable tag'
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
- define( 'HT_CTC_VERSION', '3.7.1' );
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.8
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.8' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/admin/admin_assets/js/331.admin.js CHANGED
@@ -1,4 +1,4 @@
1
- // Click to Chat v3.2.9
2
  document.addEventListener('DOMContentLoaded', function () {
3
 
4
  // M.AutoInit();
@@ -28,56 +28,137 @@ document.addEventListener('DOMContentLoaded', function () {
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  // show/hide settings
32
- function ht_ctc_show_hide_options() {
33
 
34
  // default display
35
- var val = $('.select_show_or_hide').find(":selected").val();
 
36
  if (val == 'show') {
37
- $(".showbased").show();
 
 
 
38
  } else if (val == 'hide') {
39
- $(".hidebased").show();
 
 
 
40
  }
 
41
 
42
  // on change
43
- $(".select_show_or_hide").on("change", function (e) {
44
 
45
  var change_val = e.target.value;
46
- $(".showbased").hide();
47
- $(".hidebased").hide();
 
 
 
 
 
 
 
48
 
49
  if (change_val == 'show') {
50
- $(".showbased").show(500);
 
 
 
 
51
  } else if (change_val == 'hide') {
52
- $(".hidebased").show(500);
 
 
 
 
53
  }
 
 
 
 
54
  });
55
 
56
  }
57
- ht_ctc_show_hide_options();
58
 
59
- // call to action
60
- var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
61
- cta_styles.forEach(ht_ctc_admin_cta);
62
 
63
- function ht_ctc_admin_cta(style) {
64
- // default display
65
- var val = $(style + ' .select_cta_type').find(":selected").val();
66
- if (val == 'hide') {
67
- $(style + " .cta_stick").hide();
 
 
 
 
 
 
 
 
68
  }
69
 
70
- // on change
71
- $(style + " .select_cta_type").on("change", function (e) {
72
- var change_val = e.target.value;
73
- if (change_val == 'hide') {
74
- $(style + " .cta_stick").hide(100);
75
  } else {
76
- $(style + " .cta_stick").show(200);
77
  }
 
78
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
 
 
81
  function ht_ctc_admin_animations() {
82
  // default display
83
  var val = $('.select_an_type').find(":selected").val();
@@ -100,40 +181,31 @@ document.addEventListener('DOMContentLoaded', function () {
100
  }
101
  });
102
  }
103
- ht_ctc_admin_animations();
104
-
105
- // on change - styles
106
- $(".chat_select_style").on("change", function (e) {
107
- $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
108
- });
109
 
110
- // Deskop, Mobile
111
- if ($('#hideon_desktop').is(':checked')) {
112
- $(".ht_ctc_admin_desktop").hide();
113
- }
114
 
115
- if ($('#hideon_mobile').is(':checked')) {
116
- $(".ht_ctc_admin_mobile").hide();
117
- }
118
 
119
- $(".hidebasedondevice").on("change", function (e) {
120
- if ($('#hideon_desktop').is(':checked')) {
121
- $(".ht_ctc_admin_desktop").hide();
122
  } else {
123
- $(".ht_ctc_admin_desktop").show();
124
  }
125
 
126
- if ($('#hideon_mobile').is(':checked')) {
127
- $(".ht_ctc_admin_mobile").hide();
128
- } else {
129
- $(".ht_ctc_admin_mobile").show();
130
- }
131
- });
 
 
 
 
 
 
132
 
133
- // hide nothing or hide only on one device.
134
- $(document).on('click', '.hidebasedondevice', function () {
135
- $('.hidebasedondevice').not(this).prop('checked', false);
136
- });
137
 
138
  // WhatsApp number
139
  function wn() {
@@ -149,6 +221,12 @@ document.addEventListener('DOMContentLoaded', function () {
149
  $("#whatsapp_number").on("change paste keyup", function (e) {
150
  num = $("#whatsapp_number").val();
151
  call();
 
 
 
 
 
 
152
  });
153
 
154
  function call() {
@@ -157,7 +235,125 @@ document.addEventListener('DOMContentLoaded', function () {
157
  }
158
 
159
  }
160
- wn();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  // webhook
163
  function hook() {
@@ -178,7 +374,7 @@ document.addEventListener('DOMContentLoaded', function () {
178
  });
179
 
180
  }
181
- hook();
182
 
183
  // things based on screen size
184
  function ss() {
@@ -193,17 +389,26 @@ document.addEventListener('DOMContentLoaded', function () {
193
  $("#whatsapp_number").attr('data-position', 'bottom');
194
  }
195
  }
196
- ss();
197
 
198
  function other() {
199
 
 
 
 
 
 
 
 
 
 
 
200
  // hover text on save_changes button
201
  var text = $('#ctc_save_changes_hover_text').text();
202
  $("#submit").attr('title', text);
203
 
204
  // analytics - ga4 display only if ga is enabled.
205
  $("#google_analytics").on("change", function (e) {
206
- console.log('change worked');
207
  if ($('#google_analytics').is(':checked')) {
208
  $(".ctc_ga4").show();
209
  } else {
@@ -217,10 +422,133 @@ document.addEventListener('DOMContentLoaded', function () {
217
  $(".ctc_ga4").hide();
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
- other();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
 
223
  });
224
 
225
 
226
- })(jQuery);
1
+ // Click to Chat
2
  document.addEventListener('DOMContentLoaded', function () {
3
 
4
  // M.AutoInit();
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
31
+
32
+ // functions
33
+ show_hide_options();
34
+ styles();
35
+ call_to_action();
36
+ ht_ctc_admin_animations();
37
+ desktop_mobile();
38
+ wn();
39
+ hook();
40
+ ss();
41
+ other();
42
+
43
+ try {
44
+ woo_page();
45
+ collapsible();
46
+ } catch (e) { }
47
+
48
+
49
+
50
  // show/hide settings
51
+ function show_hide_options() {
52
 
53
  // default display
54
+ var val = $('.global_display:checked').val();
55
+
56
  if (val == 'show') {
57
+ $('.global_show_or_hide_icon').addClass('dashicons dashicons-visibility');
58
+ $(".hide_settings").show();
59
+ $(".show_hide_types .show_btn").attr('disabled', 'disabled');
60
+ $(".show_hide_types .show_box").hide();
61
  } else if (val == 'hide') {
62
+ $('.global_show_or_hide_icon').addClass('dashicons dashicons-hidden');
63
+ $(".show_settings").show();
64
+ $(".show_hide_types .hide_btn").attr('disabled', 'disabled');
65
+ $(".show_hide_types .hide_box").hide();
66
  }
67
+ $('.global_show_or_hide_label').html('(' + val + ')');
68
 
69
  // on change
70
+ $(".global_display").on("change", function (e) {
71
 
72
  var change_val = e.target.value;
73
+ var add_class = '';
74
+ var remove_class = '';
75
+
76
+ $(".hide_settings").hide();
77
+ $(".show_settings").hide();
78
+ $(".show_hide_types .show_btn").removeAttr('disabled');
79
+ $(".show_hide_types .hide_btn").removeAttr('disabled');
80
+ $(".show_hide_types .show_box").hide();
81
+ $(".show_hide_types .hide_box").hide();
82
 
83
  if (change_val == 'show') {
84
+ add_class = 'dashicons dashicons-visibility';
85
+ remove_class = 'dashicons-hidden';
86
+ $(".hide_settings").show(500);
87
+ $(".show_hide_types .show_btn").attr('disabled', 'disabled');
88
+ $(".show_hide_types .hide_box").show();
89
  } else if (change_val == 'hide') {
90
+ add_class = 'dashicons dashicons-hidden';
91
+ remove_class = 'dashicons-visibility';
92
+ $(".show_settings").show(500);
93
+ $(".show_hide_types .hide_btn").attr('disabled', 'disabled');
94
+ $(".show_hide_types .show_box").show();
95
  }
96
+ $('.global_show_or_hide_label').html('(' + change_val + ')');
97
+ $('.global_show_or_hide_icon').removeClass(remove_class);
98
+ $('.global_show_or_hide_icon').addClass(add_class);
99
+
100
  });
101
 
102
  }
 
103
 
 
 
 
104
 
105
+ // styles
106
+ function styles() {
107
+
108
+ // on change - styles
109
+ $(".chat_select_style").on("change", function (e) {
110
+ $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
111
+ });
112
+
113
+ // style-1 - add icon
114
+ if ($('.s1_add_icon').is(':checked')) {
115
+ $(".s1_icon_settings").show();
116
+ } else {
117
+ $(".s1_icon_settings").hide();
118
  }
119
 
120
+ $(".s1_add_icon").on("change", function (e) {
121
+ console.log('change');
122
+
123
+ if ($('.s1_add_icon').is(':checked')) {
124
+ $(".s1_icon_settings").show(200);
125
  } else {
126
+ $(".s1_icon_settings").hide(200);
127
  }
128
+
129
  });
130
+
131
+ }
132
+
133
+
134
+
135
+ // call to actions
136
+ function call_to_action() {
137
+ var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
138
+ cta_styles.forEach(ht_ctc_admin_cta);
139
+
140
+ function ht_ctc_admin_cta(style) {
141
+ // default display
142
+ var val = $(style + ' .select_cta_type').find(":selected").val();
143
+ if (val == 'hide') {
144
+ $(style + " .cta_stick").hide();
145
+ }
146
+
147
+ // on change
148
+ $(style + " .select_cta_type").on("change", function (e) {
149
+ var change_val = e.target.value;
150
+ if (change_val == 'hide') {
151
+ $(style + " .cta_stick").hide(100);
152
+ } else {
153
+ $(style + " .cta_stick").show(200);
154
+ }
155
+ });
156
+ }
157
+
158
  }
159
 
160
+
161
+
162
  function ht_ctc_admin_animations() {
163
  // default display
164
  var val = $('.select_an_type').find(":selected").val();
181
  }
182
  });
183
  }
 
 
 
 
 
 
184
 
 
 
 
 
185
 
186
+ // Deskop, Mobile - same settings
187
+ function desktop_mobile() {
 
188
 
189
+ // same setting
190
+ if ($('.same_settings').is(':checked')) {
191
+ $(".not_samesettings").hide();
192
  } else {
193
+ $(".not_samesettings").show();
194
  }
195
 
196
+ $(".same_settings").on("change", function (e) {
197
+
198
+ if ($('.same_settings').is(':checked')) {
199
+ $(".not_samesettings").hide(900);
200
+ $(".select_styles_issue_checkbox").hide();
201
+ } else {
202
+ $(".not_samesettings").show(900);
203
+ }
204
+
205
+ });
206
+
207
+ }
208
 
 
 
 
 
209
 
210
  // WhatsApp number
211
  function wn() {
221
  $("#whatsapp_number").on("change paste keyup", function (e) {
222
  num = $("#whatsapp_number").val();
223
  call();
224
+
225
+ if (num && 0 == num.charAt(0)) {
226
+ $('.ctc_wn_initial_zero').show(500);
227
+ } else {
228
+ $('.ctc_wn_initial_zero').hide(500);
229
+ }
230
  });
231
 
232
  function call() {
235
  }
236
 
237
  }
238
+
239
+ // woo page..
240
+ function woo_page() {
241
+
242
+ // Woo single product page - woo position
243
+ var position_val = $('.woo_single_position_select').find(":selected").val();
244
+ // woo add to cart layout
245
+ var style_val = $('.woo_single_style_select').find(":selected").val();
246
+
247
+ if (position_val && '' !== position_val && 'select' !== position_val) {
248
+ $('.woo_single_position_settings').show();
249
+ }
250
+ if (position_val && 'select' == position_val) {
251
+ hide_cart_layout();
252
+ } else if (style_val && style_val == '1' || style_val == '8') {
253
+ // if position_val is not 'select'
254
+ show_cart_layout();
255
+ }
256
+
257
+ // on change - select position
258
+ $('.woo_single_position_select').on("change", function (e) {
259
+ var position_change_val = e.target.value;
260
+ var style_val = $('.woo_single_style_select').find(":selected").val();
261
+
262
+ if (position_change_val == 'select') {
263
+ $('.woo_single_position_settings').hide(200);
264
+ hide_cart_layout();
265
+ } else {
266
+ $('.woo_single_position_settings').show(200);
267
+ if (style_val == '1' || style_val == '8') {
268
+ show_cart_layout();
269
+ }
270
+ }
271
+ });
272
+
273
+ // on change - style - for cart layout
274
+ $('.woo_single_style_select').on("change", function (e) {
275
+ var style_change_val = e.target.value;
276
+
277
+ if (style_change_val == '1' || style_change_val == '8') {
278
+ show_cart_layout();
279
+ } else {
280
+ hide_cart_layout();
281
+ }
282
+ });
283
+
284
+ // position center is checked
285
+ if ($('#woo_single_position_center').is(':checked')) {
286
+ $(".woo_single_position_center_checked_content").show();
287
+ }
288
+
289
+ $("#woo_single_position_center").on("change", function (e) {
290
+ if ($('#woo_single_position_center').is(':checked')) {
291
+ $(".woo_single_position_center_checked_content").show(200);
292
+ } else {
293
+ $(".woo_single_position_center_checked_content").hide(100);
294
+ }
295
+ });
296
+
297
+
298
+
299
+ // woo shop page ..
300
+ if ($('#woo_shop_add_whatsapp').is(':checked')) {
301
+ $(".woo_shop_add_whatsapp_settings").show();
302
+
303
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
304
+ if (shop_style_val == '1' || shop_style_val == '8') {
305
+ shop_show_cart_layout();
306
+ }
307
+ }
308
+
309
+
310
+
311
+
312
+ $("#woo_shop_add_whatsapp").on("change", function (e) {
313
+ if ($('#woo_shop_add_whatsapp').is(':checked')) {
314
+ $(".woo_shop_add_whatsapp_settings").show(200);
315
+
316
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
317
+
318
+ if (shop_style_val == '1' || shop_style_val == '8') {
319
+ shop_show_cart_layout();
320
+ }
321
+
322
+ } else {
323
+ $(".woo_shop_add_whatsapp_settings").hide(100);
324
+ shop_hide_cart_layout(100);
325
+ }
326
+ });
327
+
328
+
329
+ // on change - style - for cart layout
330
+ $('.woo_shop_style').on("change", function (e) {
331
+ var shop_style_change_val = e.target.value;
332
+
333
+ if (shop_style_change_val == '1' || shop_style_change_val == '8') {
334
+ shop_show_cart_layout();
335
+ } else {
336
+ shop_hide_cart_layout();
337
+ }
338
+ });
339
+
340
+
341
+ function show_cart_layout() {
342
+ $(".woo_single_position_settings_cart_layout").show(200);
343
+ }
344
+ function hide_cart_layout() {
345
+ $(".woo_single_position_settings_cart_layout").hide(200);
346
+ }
347
+
348
+ function shop_show_cart_layout() {
349
+ $(".woo_shop_cart_layout").show(200);
350
+ }
351
+ function shop_hide_cart_layout() {
352
+ $(".woo_shop_cart_layout").hide(200);
353
+ }
354
+
355
+ }
356
+
357
 
358
  // webhook
359
  function hook() {
374
  });
375
 
376
  }
377
+
378
 
379
  // things based on screen size
380
  function ss() {
389
  $("#whatsapp_number").attr('data-position', 'bottom');
390
  }
391
  }
392
+
393
 
394
  function other() {
395
 
396
+ // google ads - checkbox
397
+ $('.ga_ads_display').on('click', function (e) {
398
+ $('.ga_ads_checkbox').toggle(500);
399
+ });
400
+
401
+ // display - call gtag_report_conversion by default if checked.
402
+ if ($('#ga_ads').is(':checked')) {
403
+ $(".ga_ads_checkbox").show();
404
+ }
405
+
406
  // hover text on save_changes button
407
  var text = $('#ctc_save_changes_hover_text').text();
408
  $("#submit").attr('title', text);
409
 
410
  // analytics - ga4 display only if ga is enabled.
411
  $("#google_analytics").on("change", function (e) {
 
412
  if ($('#google_analytics').is(':checked')) {
413
  $(".ctc_ga4").show();
414
  } else {
422
  $(".ctc_ga4").hide();
423
  }
424
 
425
+ // select styles issue
426
+
427
+ if ($('#select_styles_issue').is(':checked')) {
428
+ $(".select_styles_issue_checkbox").show();
429
+ }
430
+ $('.select_styles_issue_description').on('click', function (e) {
431
+ $('.select_styles_issue_checkbox').toggle(500);
432
+ });
433
+
434
+
435
+ // s3e - shadow on hover
436
+ if (!$('#s3_box_shadow').is(':checked')) {
437
+ $(".s3_box_shadow_hover").show();
438
+ }
439
+
440
+ $('#s3_box_shadow').on('change', function (e) {
441
+ if ($('#s3_box_shadow').is(':checked')) {
442
+ $(".s3_box_shadow_hover").hide(400);
443
+ } else {
444
+ $(".s3_box_shadow_hover").show(500);
445
+ }
446
+ });
447
+
448
  }
449
+
450
+ // collapsible..
451
+ function collapsible() {
452
+
453
+ var ht_ctc_admin = {};
454
+
455
+ if (localStorage.getItem('ht_ctc_admin')) {
456
+ ht_ctc_admin = localStorage.getItem('ht_ctc_admin');
457
+ ht_ctc_admin = JSON.parse(ht_ctc_admin);
458
+ }
459
+ // else {
460
+ // ht_ctc_admin = demo;
461
+ // demo = JSON.stringify(demo);
462
+ // localStorage.setItem('ht_ctc_admin', demo);
463
+ // }
464
+
465
+ // get items from ht_ctc_admin
466
+ function ctc_getItem(item) {
467
+ if (ht_ctc_admin[item]) {
468
+ return ht_ctc_admin[item];
469
+ } else {
470
+ return false;
471
+ }
472
+ }
473
+
474
+ // set items to ht_ctc_admin storage
475
+ function ctc_setItem(name, value) {
476
+ ht_ctc_admin[name] = value;
477
+ var newValues = JSON.stringify(ht_ctc_admin);
478
+ localStorage.setItem('ht_ctc_admin', newValues);
479
+ }
480
+
481
+ /**
482
+ * ht_ctc_sidebar_contat - not added, as it may cause view distraction..
483
+ */
484
+ var styles_list = [
485
+ 'ht_ctc_s1',
486
+ 'ht_ctc_s2',
487
+ 'ht_ctc_s3',
488
+ 'ht_ctc_s3_1',
489
+ 'ht_ctc_s4',
490
+ 'ht_ctc_s5',
491
+ 'ht_ctc_s6',
492
+ 'ht_ctc_s7',
493
+ 'ht_ctc_s7_1',
494
+ 'ht_ctc_s8',
495
+ 'ht_ctc_s99',
496
+ 'ht_ctc_webhooks',
497
+ 'ht_ctc_analytics',
498
+ 'ht_ctc_animations',
499
+ 'ht_ctc_other_settings',
500
+ 'ht_ctc_enable_share_group',
501
+ 'ht_ctc_debug',
502
+ 'ht_ctc_device_settings',
503
+ 'ht_ctc_show_hide_settings',
504
+ 'ht_ctc_woo_1',
505
+ 'ht_ctc_woo_shop',
506
+ 'ht_ctc_woo_cart',
507
+ 'ht_ctc_woo_checkout',
508
+ 'ht_ctc_woo_myaccount',
509
+ ];
510
+
511
+ var default_active = [
512
+ 'ht_ctc_device_settings',
513
+ 'ht_ctc_show_hide_settings',
514
+ 'ht_ctc_woo_1',
515
+ 'ht_ctc_webhooks',
516
+ 'ht_ctc_analytics',
517
+ 'ht_ctc_animations',
518
+ 'ht_ctc_other_settings',
519
+ ];
520
+
521
+
522
+ styles_list.forEach(e => {
523
+
524
+ // one known issue.. is already active its not working as expected.
525
+ var is_col = (ctc_getItem('col_' + e)) ? ctc_getItem('col_' + e) : '';
526
+ if ('open' == is_col) {
527
+ $('.' + e + ' li').addClass('active');
528
+ } else if ('close' == is_col) {
529
+ $('.' + e + ' li').removeClass('active');
530
+ } else if (default_active.includes(e)) {
531
+ // if not changed then for default_active list add active..
532
+ $('.' + e + ' li').addClass('active');
533
+ }
534
+
535
+
536
+ $('.' + e).collapsible({
537
+ onOpenEnd() {
538
+ ctc_setItem('col_' + e, 'open');
539
+ },
540
+ onCloseEnd() {
541
+ ctc_setItem('col_' + e, 'close');
542
+ }
543
+ });
544
+
545
+ });
546
+
547
+ }
548
+
549
+
550
 
551
  });
552
 
553
 
554
+ })(jQuery);
new/admin/admin_assets/js/333.admin.js CHANGED
@@ -28,14 +28,24 @@ document.addEventListener('DOMContentLoaded', function () {
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
31
- // var toast = false;
32
- // if (typeof M !== "undefined" && M.toast) {
33
- // toast = true;
34
- // }
35
 
36
- // if (toast) {
37
- // M.toast({ html: 'Hided on Mobile devices', classes: 'rounded' });
38
- // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  // show/hide settings
41
  function show_hide_options() {
@@ -90,32 +100,65 @@ document.addEventListener('DOMContentLoaded', function () {
90
  });
91
 
92
  }
93
- show_hide_options();
94
 
95
 
 
 
96
 
97
- // call to action
98
- var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
99
- cta_styles.forEach(ht_ctc_admin_cta);
 
100
 
101
- function ht_ctc_admin_cta(style) {
102
- // default display
103
- var val = $(style + ' .select_cta_type').find(":selected").val();
104
- if (val == 'hide') {
105
- $(style + " .cta_stick").hide();
106
  }
107
 
108
- // on change
109
- $(style + " .select_cta_type").on("change", function (e) {
110
- var change_val = e.target.value;
111
- if (change_val == 'hide') {
112
- $(style + " .cta_stick").hide(100);
113
  } else {
114
- $(style + " .cta_stick").show(200);
115
  }
 
116
  });
 
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  function ht_ctc_admin_animations() {
120
  // default display
121
  var val = $('.select_an_type').find(":selected").val();
@@ -138,12 +181,7 @@ document.addEventListener('DOMContentLoaded', function () {
138
  }
139
  });
140
  }
141
- ht_ctc_admin_animations();
142
-
143
- // on change - styles
144
- $(".chat_select_style").on("change", function (e) {
145
- $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
146
- });
147
 
148
  // Deskop, Mobile - same settings
149
  function desktop_mobile() {
@@ -167,7 +205,7 @@ document.addEventListener('DOMContentLoaded', function () {
167
  });
168
 
169
  }
170
- desktop_mobile()
171
 
172
  // WhatsApp number
173
  function wn() {
@@ -197,29 +235,53 @@ document.addEventListener('DOMContentLoaded', function () {
197
  }
198
 
199
  }
200
- wn();
201
 
202
  // woo page..
203
  function woo_page() {
204
 
205
  // Woo single product page - woo position
206
- var val = $('.woo_single_position_select').find(":selected").val();
207
-
208
- if (val && '' !== val && 'select' !== val) {
 
 
209
  $('.woo_single_position_settings').show();
210
  }
 
 
 
 
 
 
211
 
212
- // on change
213
  $('.woo_single_position_select').on("change", function (e) {
214
- var change_val = e.target.value;
 
215
 
216
- if (change_val == 'select') {
217
  $('.woo_single_position_settings').hide(200);
 
218
  } else {
219
  $('.woo_single_position_settings').show(200);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
  });
222
 
 
223
  if ($('#woo_single_position_center').is(':checked')) {
224
  $(".woo_single_position_center_checked_content").show();
225
  }
@@ -237,19 +299,61 @@ document.addEventListener('DOMContentLoaded', function () {
237
  // woo shop page ..
238
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
239
  $(".woo_shop_add_whatsapp_settings").show();
 
 
 
 
 
240
  }
241
 
 
 
 
242
  $("#woo_shop_add_whatsapp").on("change", function (e) {
243
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
244
  $(".woo_shop_add_whatsapp_settings").show(200);
 
 
 
 
 
 
 
245
  } else {
246
  $(".woo_shop_add_whatsapp_settings").hide(100);
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
248
  });
249
 
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  }
252
- woo_page();
253
 
254
  // webhook
255
  function hook() {
@@ -270,7 +374,7 @@ document.addEventListener('DOMContentLoaded', function () {
270
  });
271
 
272
  }
273
- hook();
274
 
275
  // things based on screen size
276
  function ss() {
@@ -285,10 +389,20 @@ document.addEventListener('DOMContentLoaded', function () {
285
  $("#whatsapp_number").attr('data-position', 'bottom');
286
  }
287
  }
288
- ss();
289
 
290
  function other() {
291
 
 
 
 
 
 
 
 
 
 
 
292
  // hover text on save_changes button
293
  var text = $('#ctc_save_changes_hover_text').text();
294
  $("#submit").attr('title', text);
@@ -332,7 +446,6 @@ document.addEventListener('DOMContentLoaded', function () {
332
  });
333
 
334
  }
335
- other();
336
 
337
  // collapsible..
338
  function collapsible() {
@@ -432,9 +545,8 @@ document.addEventListener('DOMContentLoaded', function () {
432
  });
433
 
434
  }
435
- try {
436
- collapsible();
437
- } catch (e) { }
438
 
439
  });
440
 
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
 
 
 
 
31
 
32
+ // functions
33
+ show_hide_options();
34
+ styles();
35
+ call_to_action();
36
+ ht_ctc_admin_animations();
37
+ desktop_mobile();
38
+ wn();
39
+ hook();
40
+ ss();
41
+ other();
42
+
43
+ try {
44
+ woo_page();
45
+ collapsible();
46
+ } catch (e) {}
47
+
48
+
49
 
50
  // show/hide settings
51
  function show_hide_options() {
100
  });
101
 
102
  }
 
103
 
104
 
105
+ // styles
106
+ function styles() {
107
 
108
+ // on change - styles
109
+ $(".chat_select_style").on("change", function (e) {
110
+ $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
111
+ });
112
 
113
+ // style-1 - add icon
114
+ if ($('.s1_add_icon').is(':checked')) {
115
+ $(".s1_icon_settings").show();
116
+ } else {
117
+ $(".s1_icon_settings").hide();
118
  }
119
 
120
+ $(".s1_add_icon").on("change", function (e) {
121
+ console.log('change');
122
+
123
+ if ($('.s1_add_icon').is(':checked')) {
124
+ $(".s1_icon_settings").show(200);
125
  } else {
126
+ $(".s1_icon_settings").hide(200);
127
  }
128
+
129
  });
130
+
131
  }
132
 
133
+
134
+
135
+ // call to actions
136
+ function call_to_action() {
137
+ var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
138
+ cta_styles.forEach(ht_ctc_admin_cta);
139
+
140
+ function ht_ctc_admin_cta(style) {
141
+ // default display
142
+ var val = $(style + ' .select_cta_type').find(":selected").val();
143
+ if (val == 'hide') {
144
+ $(style + " .cta_stick").hide();
145
+ }
146
+
147
+ // on change
148
+ $(style + " .select_cta_type").on("change", function (e) {
149
+ var change_val = e.target.value;
150
+ if (change_val == 'hide') {
151
+ $(style + " .cta_stick").hide(100);
152
+ } else {
153
+ $(style + " .cta_stick").show(200);
154
+ }
155
+ });
156
+ }
157
+
158
+ }
159
+
160
+
161
+
162
  function ht_ctc_admin_animations() {
163
  // default display
164
  var val = $('.select_an_type').find(":selected").val();
181
  }
182
  });
183
  }
184
+
 
 
 
 
 
185
 
186
  // Deskop, Mobile - same settings
187
  function desktop_mobile() {
205
  });
206
 
207
  }
208
+
209
 
210
  // WhatsApp number
211
  function wn() {
235
  }
236
 
237
  }
 
238
 
239
  // woo page..
240
  function woo_page() {
241
 
242
  // Woo single product page - woo position
243
+ var position_val = $('.woo_single_position_select').find(":selected").val();
244
+ // woo add to cart layout
245
+ var style_val = $('.woo_single_style_select').find(":selected").val();
246
+
247
+ if (position_val && '' !== position_val && 'select' !== position_val) {
248
  $('.woo_single_position_settings').show();
249
  }
250
+ if (position_val && 'select' == position_val) {
251
+ hide_cart_layout();
252
+ } else if (style_val && style_val == '1' || style_val == '8') {
253
+ // if position_val is not 'select'
254
+ show_cart_layout();
255
+ }
256
 
257
+ // on change - select position
258
  $('.woo_single_position_select').on("change", function (e) {
259
+ var position_change_val = e.target.value;
260
+ var style_val = $('.woo_single_style_select').find(":selected").val();
261
 
262
+ if (position_change_val == 'select') {
263
  $('.woo_single_position_settings').hide(200);
264
+ hide_cart_layout();
265
  } else {
266
  $('.woo_single_position_settings').show(200);
267
+ if (style_val == '1' || style_val == '8') {
268
+ show_cart_layout();
269
+ }
270
+ }
271
+ });
272
+
273
+ // on change - style - for cart layout
274
+ $('.woo_single_style_select').on("change", function (e) {
275
+ var style_change_val = e.target.value;
276
+
277
+ if (style_change_val == '1' || style_change_val == '8') {
278
+ show_cart_layout();
279
+ } else {
280
+ hide_cart_layout();
281
  }
282
  });
283
 
284
+ // position center is checked
285
  if ($('#woo_single_position_center').is(':checked')) {
286
  $(".woo_single_position_center_checked_content").show();
287
  }
299
  // woo shop page ..
300
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
301
  $(".woo_shop_add_whatsapp_settings").show();
302
+
303
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
304
+ if (shop_style_val == '1' || shop_style_val == '8') {
305
+ shop_show_cart_layout();
306
+ }
307
  }
308
 
309
+
310
+
311
+
312
  $("#woo_shop_add_whatsapp").on("change", function (e) {
313
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
314
  $(".woo_shop_add_whatsapp_settings").show(200);
315
+
316
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
317
+
318
+ if (shop_style_val == '1' || shop_style_val == '8') {
319
+ shop_show_cart_layout();
320
+ }
321
+
322
  } else {
323
  $(".woo_shop_add_whatsapp_settings").hide(100);
324
+ shop_hide_cart_layout(100);
325
+ }
326
+ });
327
+
328
+
329
+ // on change - style - for cart layout
330
+ $('.woo_shop_style').on("change", function (e) {
331
+ var shop_style_change_val = e.target.value;
332
+
333
+ if (shop_style_change_val == '1' || shop_style_change_val == '8') {
334
+ shop_show_cart_layout();
335
+ } else {
336
+ shop_hide_cart_layout();
337
  }
338
  });
339
 
340
 
341
+ function show_cart_layout() {
342
+ $(".woo_single_position_settings_cart_layout").show(200);
343
+ }
344
+ function hide_cart_layout() {
345
+ $(".woo_single_position_settings_cart_layout").hide(200);
346
+ }
347
+
348
+ function shop_show_cart_layout() {
349
+ $(".woo_shop_cart_layout").show(200);
350
+ }
351
+ function shop_hide_cart_layout() {
352
+ $(".woo_shop_cart_layout").hide(200);
353
+ }
354
+
355
  }
356
+
357
 
358
  // webhook
359
  function hook() {
374
  });
375
 
376
  }
377
+
378
 
379
  // things based on screen size
380
  function ss() {
389
  $("#whatsapp_number").attr('data-position', 'bottom');
390
  }
391
  }
392
+
393
 
394
  function other() {
395
 
396
+ // google ads - checkbox
397
+ $('.ga_ads_display').on('click', function (e) {
398
+ $('.ga_ads_checkbox').toggle(500);
399
+ });
400
+
401
+ // display - call gtag_report_conversion by default if checked.
402
+ if ($('#ga_ads').is(':checked')) {
403
+ $(".ga_ads_checkbox").show();
404
+ }
405
+
406
  // hover text on save_changes button
407
  var text = $('#ctc_save_changes_hover_text').text();
408
  $("#submit").attr('title', text);
446
  });
447
 
448
  }
 
449
 
450
  // collapsible..
451
  function collapsible() {
545
  });
546
 
547
  }
548
+
549
+
 
550
 
551
  });
552
 
new/admin/admin_assets/js/admin.js CHANGED
@@ -28,14 +28,24 @@ document.addEventListener('DOMContentLoaded', function () {
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
31
- // var toast = false;
32
- // if (typeof M !== "undefined" && M.toast) {
33
- // toast = true;
34
- // }
35
 
36
- // if (toast) {
37
- // M.toast({ html: 'Hided on Mobile devices', classes: 'rounded' });
38
- // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  // show/hide settings
41
  function show_hide_options() {
@@ -90,32 +100,65 @@ document.addEventListener('DOMContentLoaded', function () {
90
  });
91
 
92
  }
93
- show_hide_options();
94
 
95
 
 
 
96
 
97
- // call to action
98
- var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
99
- cta_styles.forEach(ht_ctc_admin_cta);
 
100
 
101
- function ht_ctc_admin_cta(style) {
102
- // default display
103
- var val = $(style + ' .select_cta_type').find(":selected").val();
104
- if (val == 'hide') {
105
- $(style + " .cta_stick").hide();
106
  }
107
 
108
- // on change
109
- $(style + " .select_cta_type").on("change", function (e) {
110
- var change_val = e.target.value;
111
- if (change_val == 'hide') {
112
- $(style + " .cta_stick").hide(100);
113
  } else {
114
- $(style + " .cta_stick").show(200);
115
  }
 
116
  });
 
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  function ht_ctc_admin_animations() {
120
  // default display
121
  var val = $('.select_an_type').find(":selected").val();
@@ -138,12 +181,7 @@ document.addEventListener('DOMContentLoaded', function () {
138
  }
139
  });
140
  }
141
- ht_ctc_admin_animations();
142
 
143
- // on change - styles
144
- $(".chat_select_style").on("change", function (e) {
145
- $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
146
- });
147
 
148
  // Deskop, Mobile - same settings
149
  function desktop_mobile() {
@@ -167,7 +205,7 @@ document.addEventListener('DOMContentLoaded', function () {
167
  });
168
 
169
  }
170
- desktop_mobile()
171
 
172
  // WhatsApp number
173
  function wn() {
@@ -197,29 +235,53 @@ document.addEventListener('DOMContentLoaded', function () {
197
  }
198
 
199
  }
200
- wn();
201
 
202
  // woo page..
203
  function woo_page() {
204
 
205
  // Woo single product page - woo position
206
- var val = $('.woo_single_position_select').find(":selected").val();
 
 
207
 
208
- if (val && '' !== val && 'select' !== val) {
209
  $('.woo_single_position_settings').show();
210
  }
 
 
 
 
 
 
211
 
212
- // on change
213
  $('.woo_single_position_select').on("change", function (e) {
214
- var change_val = e.target.value;
 
215
 
216
- if (change_val == 'select') {
217
  $('.woo_single_position_settings').hide(200);
 
218
  } else {
219
  $('.woo_single_position_settings').show(200);
 
 
 
220
  }
221
  });
222
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  if ($('#woo_single_position_center').is(':checked')) {
224
  $(".woo_single_position_center_checked_content").show();
225
  }
@@ -237,19 +299,61 @@ document.addEventListener('DOMContentLoaded', function () {
237
  // woo shop page ..
238
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
239
  $(".woo_shop_add_whatsapp_settings").show();
 
 
 
 
 
240
  }
241
 
 
 
 
242
  $("#woo_shop_add_whatsapp").on("change", function (e) {
243
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
244
  $(".woo_shop_add_whatsapp_settings").show(200);
 
 
 
 
 
 
 
245
  } else {
246
  $(".woo_shop_add_whatsapp_settings").hide(100);
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
248
  });
249
 
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  }
252
- woo_page();
253
 
254
  // webhook
255
  function hook() {
@@ -270,7 +374,7 @@ document.addEventListener('DOMContentLoaded', function () {
270
  });
271
 
272
  }
273
- hook();
274
 
275
  // things based on screen size
276
  function ss() {
@@ -285,10 +389,20 @@ document.addEventListener('DOMContentLoaded', function () {
285
  $("#whatsapp_number").attr('data-position', 'bottom');
286
  }
287
  }
288
- ss();
289
 
290
  function other() {
291
 
 
 
 
 
 
 
 
 
 
 
292
  // hover text on save_changes button
293
  var text = $('#ctc_save_changes_hover_text').text();
294
  $("#submit").attr('title', text);
@@ -332,7 +446,6 @@ document.addEventListener('DOMContentLoaded', function () {
332
  });
333
 
334
  }
335
- other();
336
 
337
  // collapsible..
338
  function collapsible() {
@@ -432,9 +545,8 @@ document.addEventListener('DOMContentLoaded', function () {
432
  });
433
 
434
  }
435
- try {
436
- collapsible();
437
- } catch (e) { }
438
 
439
  });
440
 
28
  $('.tooltipped').tooltip();
29
  $('.ht-ctc-color').wpColorPicker();
30
 
 
 
 
 
31
 
32
+ // functions
33
+ show_hide_options();
34
+ styles();
35
+ call_to_action();
36
+ ht_ctc_admin_animations();
37
+ desktop_mobile();
38
+ wn();
39
+ hook();
40
+ ss();
41
+ other();
42
+
43
+ try {
44
+ woo_page();
45
+ collapsible();
46
+ } catch (e) { }
47
+
48
+
49
 
50
  // show/hide settings
51
  function show_hide_options() {
100
  });
101
 
102
  }
 
103
 
104
 
105
+ // styles
106
+ function styles() {
107
 
108
+ // on change - styles
109
+ $(".chat_select_style").on("change", function (e) {
110
+ $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
111
+ });
112
 
113
+ // style-1 - add icon
114
+ if ($('.s1_add_icon').is(':checked')) {
115
+ $(".s1_icon_settings").show();
116
+ } else {
117
+ $(".s1_icon_settings").hide();
118
  }
119
 
120
+ $(".s1_add_icon").on("change", function (e) {
121
+ console.log('change');
122
+
123
+ if ($('.s1_add_icon').is(':checked')) {
124
+ $(".s1_icon_settings").show(200);
125
  } else {
126
+ $(".s1_icon_settings").hide(200);
127
  }
128
+
129
  });
130
+
131
  }
132
 
133
+
134
+
135
+ // call to actions
136
+ function call_to_action() {
137
+ var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
138
+ cta_styles.forEach(ht_ctc_admin_cta);
139
+
140
+ function ht_ctc_admin_cta(style) {
141
+ // default display
142
+ var val = $(style + ' .select_cta_type').find(":selected").val();
143
+ if (val == 'hide') {
144
+ $(style + " .cta_stick").hide();
145
+ }
146
+
147
+ // on change
148
+ $(style + " .select_cta_type").on("change", function (e) {
149
+ var change_val = e.target.value;
150
+ if (change_val == 'hide') {
151
+ $(style + " .cta_stick").hide(100);
152
+ } else {
153
+ $(style + " .cta_stick").show(200);
154
+ }
155
+ });
156
+ }
157
+
158
+ }
159
+
160
+
161
+
162
  function ht_ctc_admin_animations() {
163
  // default display
164
  var val = $('.select_an_type').find(":selected").val();
181
  }
182
  });
183
  }
 
184
 
 
 
 
 
185
 
186
  // Deskop, Mobile - same settings
187
  function desktop_mobile() {
205
  });
206
 
207
  }
208
+
209
 
210
  // WhatsApp number
211
  function wn() {
235
  }
236
 
237
  }
 
238
 
239
  // woo page..
240
  function woo_page() {
241
 
242
  // Woo single product page - woo position
243
+ var position_val = $('.woo_single_position_select').find(":selected").val();
244
+ // woo add to cart layout
245
+ var style_val = $('.woo_single_style_select').find(":selected").val();
246
 
247
+ if (position_val && '' !== position_val && 'select' !== position_val) {
248
  $('.woo_single_position_settings').show();
249
  }
250
+ if (position_val && 'select' == position_val) {
251
+ hide_cart_layout();
252
+ } else if (style_val && style_val == '1' || style_val == '8') {
253
+ // if position_val is not 'select'
254
+ show_cart_layout();
255
+ }
256
 
257
+ // on change - select position
258
  $('.woo_single_position_select').on("change", function (e) {
259
+ var position_change_val = e.target.value;
260
+ var style_val = $('.woo_single_style_select').find(":selected").val();
261
 
262
+ if (position_change_val == 'select') {
263
  $('.woo_single_position_settings').hide(200);
264
+ hide_cart_layout();
265
  } else {
266
  $('.woo_single_position_settings').show(200);
267
+ if (style_val == '1' || style_val == '8') {
268
+ show_cart_layout();
269
+ }
270
  }
271
  });
272
 
273
+ // on change - style - for cart layout
274
+ $('.woo_single_style_select').on("change", function (e) {
275
+ var style_change_val = e.target.value;
276
+
277
+ if (style_change_val == '1' || style_change_val == '8') {
278
+ show_cart_layout();
279
+ } else {
280
+ hide_cart_layout();
281
+ }
282
+ });
283
+
284
+ // position center is checked
285
  if ($('#woo_single_position_center').is(':checked')) {
286
  $(".woo_single_position_center_checked_content").show();
287
  }
299
  // woo shop page ..
300
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
301
  $(".woo_shop_add_whatsapp_settings").show();
302
+
303
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
304
+ if (shop_style_val == '1' || shop_style_val == '8') {
305
+ shop_show_cart_layout();
306
+ }
307
  }
308
 
309
+
310
+
311
+
312
  $("#woo_shop_add_whatsapp").on("change", function (e) {
313
  if ($('#woo_shop_add_whatsapp').is(':checked')) {
314
  $(".woo_shop_add_whatsapp_settings").show(200);
315
+
316
+ var shop_style_val = $('.woo_shop_style').find(":selected").val();
317
+
318
+ if (shop_style_val == '1' || shop_style_val == '8') {
319
+ shop_show_cart_layout();
320
+ }
321
+
322
  } else {
323
  $(".woo_shop_add_whatsapp_settings").hide(100);
324
+ shop_hide_cart_layout(100);
325
+ }
326
+ });
327
+
328
+
329
+ // on change - style - for cart layout
330
+ $('.woo_shop_style').on("change", function (e) {
331
+ var shop_style_change_val = e.target.value;
332
+
333
+ if (shop_style_change_val == '1' || shop_style_change_val == '8') {
334
+ shop_show_cart_layout();
335
+ } else {
336
+ shop_hide_cart_layout();
337
  }
338
  });
339
 
340
 
341
+ function show_cart_layout() {
342
+ $(".woo_single_position_settings_cart_layout").show(200);
343
+ }
344
+ function hide_cart_layout() {
345
+ $(".woo_single_position_settings_cart_layout").hide(200);
346
+ }
347
+
348
+ function shop_show_cart_layout() {
349
+ $(".woo_shop_cart_layout").show(200);
350
+ }
351
+ function shop_hide_cart_layout() {
352
+ $(".woo_shop_cart_layout").hide(200);
353
+ }
354
+
355
  }
356
+
357
 
358
  // webhook
359
  function hook() {
374
  });
375
 
376
  }
377
+
378
 
379
  // things based on screen size
380
  function ss() {
389
  $("#whatsapp_number").attr('data-position', 'bottom');
390
  }
391
  }
392
+
393
 
394
  function other() {
395
 
396
+ // google ads - checkbox
397
+ $('.ga_ads_display').on('click', function (e) {
398
+ $('.ga_ads_checkbox').toggle(500);
399
+ });
400
+
401
+ // display - call gtag_report_conversion by default if checked.
402
+ if ($('#ga_ads').is(':checked')) {
403
+ $(".ga_ads_checkbox").show();
404
+ }
405
+
406
  // hover text on save_changes button
407
  var text = $('#ctc_save_changes_hover_text').text();
408
  $("#submit").attr('title', text);
446
  });
447
 
448
  }
 
449
 
450
  // collapsible..
451
  function collapsible() {
545
  });
546
 
547
  }
548
+
549
+
 
550
 
551
  });
552
 
new/admin/admin_commons/admin-sidebar-content.php CHANGED
@@ -18,9 +18,9 @@ $othersettings = get_option('ht_ctc_othersettings');
18
  <li class="active">
19
  <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
20
  <div class="collapsible-body">
21
- <p class="description"><a href="http://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank"><?php _e( 'WhatsApp', 'click-to-chat-for-whatsapp' ); ?></a></p>
22
  <p class="description"><a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
23
- <!-- <p class="description"><?php _e( 'For any queries, suggestions', 'click-to-chat-for-whatsapp' ); ?>. <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">Contact Us</a></p> -->
24
  </div>
25
  </li>
26
  </ul>
18
  <li class="active">
19
  <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
20
  <div class="collapsible-body">
21
+ <p class="description"><a href="https://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank"><?php _e( 'WhatsApp', 'click-to-chat-for-whatsapp' ); ?></a></p>
22
  <p class="description"><a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
23
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">Support Page</a></p>
24
  </div>
25
  </li>
26
  </ul>
new/admin/class-ht-ctc-admin-customize-styles.php CHANGED
@@ -235,6 +235,11 @@ class HT_CTC_Admin_Customize_Styles {
235
 
236
  $s1_text_color = ( isset( $options['s1_text_color']) ) ? esc_attr( $options['s1_text_color'] ) : '';
237
  $s1_bg_color = ( isset( $options['s1_bg_color']) ) ? esc_attr( $options['s1_bg_color'] ) : '';
 
 
 
 
 
238
 
239
  ?>
240
  <ul class="collapsible ht_ctc_s1" data-collapsible="accordion">
@@ -242,9 +247,65 @@ class HT_CTC_Admin_Customize_Styles {
242
  <div class="collapsible-header"><?php _e( 'Style 1', 'click-to-chat-for-whatsapp' ); ?></div>
243
  <div class="collapsible-body">
244
 
245
- <p class="description"><?php _e( 'Style-1 is a button that appears like themes button', 'click-to-chat-for-whatsapp' ); ?></p>
246
  <br><br>
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  <!-- Full Width on Mobile -->
249
  <div class="row">
250
  <div class="col s6">
@@ -272,31 +333,11 @@ class HT_CTC_Admin_Customize_Styles {
272
  <?php
273
  }
274
  ?>
275
- <p class="description"><?php _e( 'Position for Mobile may need to change', 'click-to-chat-for-whatsapp' ); ?></p>
276
  </div>
277
  </div>
278
 
279
- <!-- Text color -->
280
- <div class="row">
281
- <div class="col s6">
282
- <p><?php _e( 'Text Color', 'click-to-chat-for-whatsapp' ); ?></p>
283
- </div>
284
- <div class="input-field col s6">
285
- <input class="ht-ctc-color" name="<?= $dbrow; ?>[s1_text_color]" value="<?= $s1_text_color; ?>" type="text">
286
- </div>
287
- </div>
288
 
289
- <!-- background color -->
290
- <div class="row">
291
- <div class="col s6">
292
- <p><?php _e( 'Background Color', 'click-to-chat-for-whatsapp' ); ?></p>
293
- </div>
294
- <div class="input-field col s6">
295
- <input class="ht-ctc-color" name="<?= $dbrow; ?>[s1_bg_color]" value="<?= $s1_bg_color; ?>" type="text">
296
- </div>
297
- </div>
298
-
299
- <!-- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/style-1/"><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></a></p> -->
300
 
301
  </div>
302
  </div>
@@ -1343,37 +1384,6 @@ class HT_CTC_Admin_Customize_Styles {
1343
  <div class="collapsible-header"><?php _e( 'Style 8', 'click-to-chat-for-whatsapp' ); ?></div>
1344
  <div class="collapsible-body">
1345
 
1346
- <!-- Full Width on Mobile -->
1347
- <div class="row">
1348
- <div class="col s6">
1349
- <p><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></p>
1350
- </div>
1351
- <div class="input-field col s6">
1352
- <?php
1353
- if ( isset( $options['s8_m_fullwidth'] ) ) {
1354
- ?>
1355
- <p>
1356
- <label>
1357
- <input name="<?= $dbrow; ?>[s8_m_fullwidth]" type="checkbox" value="1" <?php checked( $options['s8_m_fullwidth'], 1 ); ?> id="s8_m_fullwidth" />
1358
- <span><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></span>
1359
- </label>
1360
- </p>
1361
- <?php
1362
- } else {
1363
- ?>
1364
- <p>
1365
- <label>
1366
- <input name="<?= $dbrow; ?>[s8_m_fullwidth]" type="checkbox" value="1" id="s8_m_fullwidth" />
1367
- <span><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></span>
1368
- </label>
1369
- </p>
1370
- <?php
1371
- }
1372
- ?>
1373
- <p class="description"><?php _e( 'Position for Mobile may need to change', 'click-to-chat-for-whatsapp' ); ?></p>
1374
- </div>
1375
- </div>
1376
-
1377
  <!-- text color -->
1378
  <div class="row">
1379
  <div class="col s6">
@@ -1501,7 +1511,37 @@ class HT_CTC_Admin_Customize_Styles {
1501
  </div>
1502
  </div>
1503
 
1504
- <!-- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/style-8/"><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></a></p> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1505
 
1506
 
1507
  </div>
@@ -1625,7 +1665,9 @@ class HT_CTC_Admin_Customize_Styles {
1625
 
1626
  $new_input = array();
1627
 
 
1628
  $add_suffix = array(
 
1629
  's2_img_size',
1630
  's3_img_size',
1631
  's3_padding',
@@ -1650,6 +1692,9 @@ class HT_CTC_Admin_Customize_Styles {
1650
  if( isset( $input[$key] ) ) {
1651
 
1652
  if ( in_array( $key, $add_suffix ) ) {
 
 
 
1653
  if ( is_numeric($input[$key]) ) {
1654
  $input[$key] = $input[$key] . 'px';
1655
  }
235
 
236
  $s1_text_color = ( isset( $options['s1_text_color']) ) ? esc_attr( $options['s1_text_color'] ) : '';
237
  $s1_bg_color = ( isset( $options['s1_bg_color']) ) ? esc_attr( $options['s1_bg_color'] ) : '';
238
+ $s1_icon_color = ( isset( $options['s1_icon_color']) ) ? esc_attr( $options['s1_icon_color'] ) : '';
239
+ $s1_icon_size = ( isset( $options['s1_icon_size']) ) ? esc_attr( $options['s1_icon_size'] ) : '16';
240
+
241
+ $s1_m_fullwidth_checkbox = ( isset( $options['s1_m_fullwidth']) ) ? esc_attr( $options['s1_m_fullwidth'] ) : '';
242
+ $s1_add_icon_checkbox = ( isset( $options['s1_add_icon']) ) ? esc_attr( $options['s1_add_icon'] ) : '';
243
 
244
  ?>
245
  <ul class="collapsible ht_ctc_s1" data-collapsible="accordion">
247
  <div class="collapsible-header"><?php _e( 'Style 1', 'click-to-chat-for-whatsapp' ); ?></div>
248
  <div class="collapsible-body">
249
 
250
+ <p class="description"><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?>: <?php _e( 'button that appears like themes button', 'click-to-chat-for-whatsapp' ); ?></p>
251
  <br><br>
252
 
253
+ <!-- Text color -->
254
+ <div class="row">
255
+ <div class="col s6">
256
+ <p><?php _e( 'Text Color', 'click-to-chat-for-whatsapp' ); ?></p>
257
+ </div>
258
+ <div class="input-field col s6">
259
+ <input class="ht-ctc-color" name="<?= $dbrow; ?>[s1_text_color]" value="<?= $s1_text_color; ?>" type="text">
260
+ </div>
261
+ </div>
262
+
263
+ <!-- background color -->
264
+ <div class="row">
265
+ <div class="col s6">
266
+ <p><?php _e( 'Background Color', 'click-to-chat-for-whatsapp' ); ?></p>
267
+ </div>
268
+ <div class="input-field col s6">
269
+ <input class="ht-ctc-color" name="<?= $dbrow; ?>[s1_bg_color]" value="<?= $s1_bg_color; ?>" type="text">
270
+ </div>
271
+ </div>
272
+
273
+ <!-- Add icon -->
274
+ <div class="row">
275
+ <div class="col s6">
276
+ <p><?php _e( 'Add Icon', 'click-to-chat-for-whatsapp' ); ?></p>
277
+ </div>
278
+ <div class="input-field col s6">
279
+ <p>
280
+ <label>
281
+ <input name="<?= $dbrow; ?>[s1_add_icon]" type="checkbox" value="1" <?php checked( $s1_add_icon_checkbox, 1 ); ?> class="s1_add_icon" id="s1_add_icon" />
282
+ <span><?php _e( 'Add Icon', 'click-to-chat-for-whatsapp' ); ?></span>
283
+ </label>
284
+ </p>
285
+ </div>
286
+ </div>
287
+
288
+ <!-- Icon color -->
289
+ <div class="row s1_icon_settings">
290
+ <div class="col s6">
291
+ <p><?php _e( 'Icon Color', 'click-to-chat-for-whatsapp' ); ?></p>
292
+ </div>
293
+ <div class="input-field col s6">
294
+ <input class="ht-ctc-color" name="<?= $dbrow; ?>[s1_icon_color]" value="<?= $s1_icon_color; ?>" type="text">
295
+ </div>
296
+ </div>
297
+
298
+ <!-- icon size -->
299
+ <div class="row s1_icon_settings">
300
+ <div class="col s6">
301
+ <p><?php _e( 'Icon Size', 'click-to-chat-for-whatsapp' ); ?></p>
302
+ </div>
303
+ <div class="input-field col s6">
304
+ <input name="<?= $dbrow; ?>[s1_icon_size]" value="<?= $s1_icon_size ?>" id="s1_icon_size" type="text" class="s1_icon_size" >
305
+ <label for="s1_icon_size"><?php _e( 'Icon Size', 'click-to-chat-for-whatsapp' ); ?> (e.g. 15px)</label>
306
+ </div>
307
+ </div>
308
+
309
  <!-- Full Width on Mobile -->
310
  <div class="row">
311
  <div class="col s6">
333
  <?php
334
  }
335
  ?>
 
336
  </div>
337
  </div>
338
 
 
 
 
 
 
 
 
 
 
339
 
340
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/style-1/"><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></a></p>
 
 
 
 
 
 
 
 
 
 
341
 
342
  </div>
343
  </div>
1384
  <div class="collapsible-header"><?php _e( 'Style 8', 'click-to-chat-for-whatsapp' ); ?></div>
1385
  <div class="collapsible-body">
1386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1387
  <!-- text color -->
1388
  <div class="row">
1389
  <div class="col s6">
1511
  </div>
1512
  </div>
1513
 
1514
+ <!-- Full Width on Mobile -->
1515
+ <div class="row">
1516
+ <div class="col s6">
1517
+ <p><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></p>
1518
+ </div>
1519
+ <div class="input-field col s6">
1520
+ <?php
1521
+ if ( isset( $options['s8_m_fullwidth'] ) ) {
1522
+ ?>
1523
+ <p>
1524
+ <label>
1525
+ <input name="<?= $dbrow; ?>[s8_m_fullwidth]" type="checkbox" value="1" <?php checked( $options['s8_m_fullwidth'], 1 ); ?> id="s8_m_fullwidth" />
1526
+ <span><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></span>
1527
+ </label>
1528
+ </p>
1529
+ <?php
1530
+ } else {
1531
+ ?>
1532
+ <p>
1533
+ <label>
1534
+ <input name="<?= $dbrow; ?>[s8_m_fullwidth]" type="checkbox" value="1" id="s8_m_fullwidth" />
1535
+ <span><?php _e( 'Full Width on Mobile', 'click-to-chat-for-whatsapp' ); ?></span>
1536
+ </label>
1537
+ </p>
1538
+ <?php
1539
+ }
1540
+ ?>
1541
+ </div>
1542
+ </div>
1543
+
1544
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/style-8/"><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></a></p>
1545
 
1546
 
1547
  </div>
1665
 
1666
  $new_input = array();
1667
 
1668
+ // add px suffix, remove spaces
1669
  $add_suffix = array(
1670
+ 's1_icon_size',
1671
  's2_img_size',
1672
  's3_img_size',
1673
  's3_padding',
1692
  if( isset( $input[$key] ) ) {
1693
 
1694
  if ( in_array( $key, $add_suffix ) ) {
1695
+
1696
+ $input[$key] = str_replace( ' ', '', $input[$key] );
1697
+
1698
  if ( is_numeric($input[$key]) ) {
1699
  $input[$key] = $input[$key] . 'px';
1700
  }
new/admin/class-ht-ctc-admin-other-settings.php CHANGED
@@ -187,37 +187,37 @@ class HT_CTC_Admin_Other_Settings {
187
  <?php
188
 
189
  // Google Ads gtag_report_conversion
190
- if ( isset( $options['ga_ads'] ) ) {
191
- ?>
192
- <p>
193
- <label>
194
- <input name="<?= $dbrow; ?>[ga_ads]" type="checkbox" value="1" <?php checked( $options['ga_ads'], 1 ); ?> id="ga_ads" />
195
- <span><?php _e( 'Google Ads Conversion', 'click-to-chat-for-whatsapp' ); ?></span>
196
- </label>
197
- </p>
198
- <?php
199
- } else {
200
- ?>
201
- <p>
202
- <label>
203
- <input name="<?= $dbrow; ?>[ga_ads]" type="checkbox" value="1" id="ga_ads" />
204
- <span><?php _e( 'Google Ads Conversion', 'click-to-chat-for-whatsapp' ); ?></span>
205
- </label>
206
- </p>
207
- <?php
208
- }
209
- ?>
210
- <p class="description"><?php _e( 'call gtag_report_conversion function, when user clicks', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/google-ads-conversion/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
211
- <?php
212
-
213
- do_action('ht_ctc_ah_admin_google_ads');
214
 
215
  if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
216
  ?>
217
  <br>
218
- <p class="description"><a href="https://holithemes.com/plugins/click-to-chat/google-ads-conversion/#pro_block">PRO</a>: Add Conversion ID, Conversion label direclty (no need to setup gtag_report_conversion)</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  <?php
220
  }
 
 
 
 
221
  ?>
222
 
223
  </div>
@@ -646,7 +646,7 @@ 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="http://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>
187
  <?php
188
 
189
  // Google Ads gtag_report_conversion
190
+ $ga_ads_checkbox = ( isset( $options['ga_ads']) ) ? esc_attr( $options['ga_ads'] ) : '';
191
+
192
+ /**
193
+ * @updated 3.8
194
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
  if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
197
  ?>
198
  <br>
199
+ <p class="description ht_ctc_subtitle">Google Ads Conversion - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/google-ads-conversion/">PRO</a></p>
200
+ <br>
201
+ <p class="description"><span class="ga_ads_display" style="font-size: 0.7em;">Call <span style="color: #039be5; cursor: pointer;">gtag_report_conversion</span> function - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-gtag_report_conversion-function/">more info</a></span></p>
202
+ <br>
203
+ <div class="ga_ads_checkbox" style="display:none;">
204
+ <p>
205
+ <label>
206
+ <input name="<?= $dbrow; ?>[ga_ads]" type="checkbox" value="1" <?php checked( $ga_ads_checkbox, 1 ); ?> id="ga_ads" />
207
+ <span><?php _e( 'Google Ads Conversion', 'click-to-chat-for-whatsapp' ); ?> (<?php _e( 'call gtag_report_conversion function', 'click-to-chat-for-whatsapp' ); ?>)</span>
208
+ </label>
209
+ </p>
210
+ <p class="description"><?php _e( 'call gtag_report_conversion function, when user clicks', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-gtag_report_conversion-function/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
211
+ <!-- <p class="description">This feature requires to add JavaScript code on your website i.e. add gtag_report_conversion function</p> -->
212
+ <br>
213
+ <p class="description"><a href="https://holithemes.com/plugins/click-to-chat/google-ads-conversion/"><strong>PRO</strong></a>: Add Conversion ID, Conversion label direclty (no need to setup gtag_report_conversion function)</p>
214
+ </div>
215
  <?php
216
  }
217
+
218
+ // enable, conversion id, label
219
+ do_action('ht_ctc_ah_admin_google_ads');
220
+
221
  ?>
222
 
223
  </div>
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>
new/admin/db/class-ht-ctc-db.php CHANGED
@@ -219,6 +219,7 @@ class HT_CTC_DB {
219
  'v3_3_3' => $time,
220
  'v3_3_5' => $time,
221
  'v3_7' => $time,
 
222
  );
223
 
224
  $db_values = get_option( 'ht_ctc_plugin_details', array() );
219
  'v3_3_3' => $time,
220
  'v3_3_5' => $time,
221
  'v3_7' => $time,
222
+ 'v3_8' => $time,
223
  );
224
 
225
  $db_values = get_option( 'ht_ctc_plugin_details', array() );
new/admin/db/class-ht-ctc-db2.php CHANGED
@@ -220,6 +220,8 @@ class HT_CTC_DB2 {
220
 
221
  's1_text_color' => '',
222
  's1_bg_color' => '',
 
 
223
 
224
  );
225
 
@@ -588,6 +590,7 @@ class HT_CTC_DB2 {
588
  *
589
  * @since 3.7
590
  * first_install_time - as add_option, first_install_time avaible only since 3.7
 
591
  */
592
  public function ht_ctc_one_time() {
593
 
220
 
221
  's1_text_color' => '',
222
  's1_bg_color' => '',
223
+ 's1_icon_color' => '',
224
+ 's1_icon_size' => '16',
225
 
226
  );
227
 
590
  *
591
  * @since 3.7
592
  * first_install_time - as add_option, first_install_time avaible only since 3.7
593
+ * if no first_install_time - then installed before v3.7 (as this options will save using add_option)
594
  */
595
  public function ht_ctc_one_time() {
596
 
new/inc/assets/img/ht-ctc-svg-images.php CHANGED
@@ -89,7 +89,7 @@ function ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others ) {
89
 
90
  /**
91
  * plain icon
92
- * @uses at style 7, 7_1, 8
93
  */
94
  function ht_ctc_singlecolor( $svg_attrs ) {
95
 
89
 
90
  /**
91
  * plain icon
92
+ * @uses at style 1, 7, 7_1, 8
93
  */
94
  function ht_ctc_singlecolor( $svg_attrs ) {
95
 
new/inc/assets/js/dev/woo.dev.js ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Click to Chat - woo
3
+ *
4
+ * currenlty only loads - if cart layout option is checked and only in woo single product pages only.
5
+ *
6
+ * @since 3.8
7
+ *
8
+ * cart layout
9
+ */
10
+ (function ($) {
11
+
12
+ // ready
13
+ $(function () {
14
+
15
+ console.log('woo dev js');
16
+
17
+ // cart layout
18
+ try {
19
+ if (document.querySelector('.single_add_to_cart_button') || document.querySelector('.add_to_cart_button')) {
20
+ cart_layout();
21
+ } else if (document.querySelector('.ctc_woo_place')) {
22
+ // in shop page - cart button might not exists, dispay (might be added display none)
23
+ $('.ctc_woo_place').show();
24
+ }
25
+ } catch (e) {
26
+ console.log('error: cart_layout');
27
+ }
28
+
29
+ function cart_layout() {
30
+
31
+ console.log('inside cart layout');
32
+
33
+ let single_cart = document.querySelector('.single_add_to_cart_button');
34
+ let shop_cart = document.querySelector('.add_to_cart_button');
35
+
36
+
37
+ // s1 - single product
38
+ if (document.querySelector('.ctc_woo_single_cart_layout .s1_btn')) {
39
+
40
+ console.log('single product - s1 btn exits. ');
41
+
42
+ let single_s1 = document.querySelector('.ctc_woo_single_cart_layout .s1_btn');
43
+
44
+ var s1_color = $(single_s1).css('color');
45
+ var s1_bg_color = $(single_s1).css('background-color');
46
+
47
+ if (single_cart) {
48
+ copyNodeStyle(single_cart, single_s1);
49
+
50
+ $(single_s1).css({
51
+ "display": 'inline-flex',
52
+ "width": 'fit-content',
53
+ "align-items": 'center',
54
+ "color": s1_color,
55
+ "background-color": s1_bg_color,
56
+ });
57
+ }
58
+
59
+ $('.ctc_woo_place').show();
60
+
61
+ }
62
+
63
+ // s1 - shop, archive products
64
+ if (document.querySelector('.ctc_woo_shop_cart_layout .s1_btn')) {
65
+
66
+ console.log('shop page - s1 btn exits. ');
67
+
68
+ let shop_s1 = document.querySelectorAll('.ctc_woo_shop_cart_layout .s1_btn');
69
+
70
+ if (shop_cart && shop_s1.length) {
71
+
72
+ console.log('cart available');
73
+
74
+ var s1_color = $(shop_s1).css('color');
75
+ var s1_bg_color = $(shop_s1).css('background-color');
76
+
77
+ shop_s1.forEach(e => {
78
+ copyNodeStyle(shop_cart, e);
79
+ });
80
+
81
+ $(shop_s1).css({
82
+ "display": 'inline-flex',
83
+ "width": 'fit-content',
84
+ "align-items": 'center',
85
+ "color": s1_color,
86
+ "background-color": s1_bg_color,
87
+ });
88
+
89
+ }
90
+ $('.ctc_woo_place').show();
91
+ }
92
+
93
+ // s8 - shop, archive products
94
+ if (document.querySelector('.ctc_woo_shop_cart_layout .s_8')) {
95
+ let single_s8 = document.querySelector('.ctc_woo_shop_cart_layout .s_8');
96
+ s8(single_s8);
97
+ }
98
+
99
+ // s8 - single product
100
+ if (document.querySelector('.ctc_woo_single_cart_layout .s_8')) {
101
+ let single_s8 = document.querySelector('.ctc_woo_single_cart_layout .s_8');
102
+ s8(single_s8);
103
+ }
104
+
105
+ function s8(style) {
106
+
107
+ $(style).css({
108
+ // "display": 'inline-flex',
109
+ "min-height": $(single_cart).css('min-height'),
110
+ "font-size": $(single_cart).css('font-size'),
111
+ "font-weight": $(single_cart).css('font-weight'),
112
+ "letter-spacing": $(single_cart).css('letter-spacing'),
113
+ "border-radius": $(single_cart).css('border-radius'),
114
+ "width": 'fit-content',
115
+ });
116
+ $('.ctc_woo_place').show();
117
+
118
+ }
119
+
120
+ function copyNodeStyle(sourceNode, targetNode) {
121
+ const computedStyle = window.getComputedStyle(sourceNode);
122
+ Array.from(computedStyle).forEach(key => targetNode.style.setProperty(key, computedStyle.getPropertyValue(key), computedStyle.getPropertyPriority(key)))
123
+ }
124
+
125
+ }
126
+
127
+
128
+
129
+
130
+ });
131
+
132
+ }) (jQuery);
new/inc/assets/js/woo.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(s){s(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=s(t).css("color"),c=s(t).css("background-color"),e&&(_(e,t),s(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s(".ctc_woo_place").show()),document.querySelector(".ctc_woo_shop_cart_layout .s1_btn")){let t=document.querySelectorAll(".ctc_woo_shop_cart_layout .s1_btn");r&&t.length&&(o=s(t).css("color"),c=s(t).css("background-color"),t.forEach(t=>{_(r,t)}),s(t).css({display:"inline-flex",width:"fit-content","align-items":"center",color:o,"background-color":c})),s(".ctc_woo_place").show()}function n(t){s(t).css({"min-height":s(e).css("min-height"),"font-size":s(e).css("font-size"),"font-weight":s(e).css("font-weight"),"letter-spacing":s(e).css("letter-spacing"),"border-radius":s(e).css("border-radius"),width:"fit-content"}),s(".ctc_woo_place").show()}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(".ctc_woo_place").show()}catch(t){}})}(jQuery);
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -33,7 +33,15 @@ class HT_CTC_Chat {
33
  $ht_ctc_settings = array();
34
 
35
  $page_id = get_the_ID();
36
- // $page_id = get_queried_object_id()
 
 
 
 
 
 
 
 
37
 
38
  $page_url = get_permalink();
39
  $post_title = esc_html( get_the_title() );
33
  $ht_ctc_settings = array();
34
 
35
  $page_id = get_the_ID();
36
+ // $page_id = get_queried_object_id();
37
+
38
+ // $object_id = get_queried_object_id();
39
+ // if (0 == $object_id || '' == $object_id) {
40
+ // $page_id = get_the_ID();
41
+ // } else {
42
+ // $page_id = $object_id;
43
+ // }
44
+
45
 
46
  $page_url = get_permalink();
47
  $post_title = esc_html( get_the_title() );
new/inc/commons/class-ht-ctc-scripts.php CHANGED
@@ -28,11 +28,13 @@ class HT_CTC_Scripts {
28
  // js
29
  // $js = 'app.js';
30
  $js = '332.app.js';
 
31
  $group_js = 'group.js';
32
  $share_js = 'share.js';
33
 
34
  if ( isset($os['debug_mode']) ) {
35
  $js = 'dev/app.dev.js';
 
36
  $group_js = 'dev/group.dev.js';
37
  $share_js = 'dev/share.dev.js';
38
  }
@@ -42,6 +44,18 @@ class HT_CTC_Scripts {
42
  // app.js for all (chat)
43
  wp_enqueue_script( 'ht_ctc_app_js', plugins_url( "new/inc/assets/js/$js", HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, $load_app_js_bottom );
44
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  // group.js
47
  if ( isset ( $os['enable_group'] ) ) {
28
  // js
29
  // $js = 'app.js';
30
  $js = '332.app.js';
31
+ $woo_js = 'woo.js';
32
  $group_js = 'group.js';
33
  $share_js = 'share.js';
34
 
35
  if ( isset($os['debug_mode']) ) {
36
  $js = 'dev/app.dev.js';
37
+ $woo_js = 'dev/woo.dev.js';
38
  $group_js = 'dev/group.dev.js';
39
  $share_js = 'dev/share.dev.js';
40
  }
44
  // app.js for all (chat)
45
  wp_enqueue_script( 'ht_ctc_app_js', plugins_url( "new/inc/assets/js/$js", HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, $load_app_js_bottom );
46
 
47
+ // woocommerce
48
+ if ( class_exists( 'WooCommerce' ) ) {
49
+
50
+ // if - cart layout option is checked.
51
+ $woo_options = get_option('ht_ctc_woo_options');
52
+
53
+ if ( isset( $woo_options['woo_single_layout_cart_btn']) || isset( $woo_options['woo_shop_layout_cart_btn']) ) {
54
+ wp_enqueue_script( 'ht_ctc_woo_js', plugins_url( "new/inc/assets/js/$woo_js", HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, $load_app_js_bottom );
55
+ }
56
+
57
+ }
58
+
59
 
60
  // group.js
61
  if ( isset ( $os['enable_group'] ) ) {
new/inc/styles/style-1.php CHANGED
@@ -12,12 +12,24 @@ $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;";
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_style = ('' !== $s1_css) ? "style='$s1_css'": "";
22
 
23
  $s1_fullwidth_css = "";
@@ -35,4 +47,21 @@ if ( isset( $s1_options['s1_m_fullwidth'] ) ) {
35
  }
36
 
37
  ?>
38
- <button <?= $s1_style; ?> class="ctc-analytics s1_btn ctc_cta"><?= $call_to_action ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = "";
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/class-ht-ctc-woo.php CHANGED
@@ -104,6 +104,7 @@ class HT_CTC_WOO_Pages {
104
 
105
 
106
  $woo_shop_margin_top = ( isset( $woo_options['woo_shop_margin_top']) ) ? esc_attr( $woo_options['woo_shop_margin_top'] ) : '';
 
107
  $woo_shop_margin_right = ( isset( $woo_options['woo_shop_margin_right']) ) ? esc_attr( $woo_options['woo_shop_margin_right'] ) : '';
108
  $woo_shop_margin_bottom = ( isset( $woo_options['woo_shop_margin_bottom']) ) ? esc_attr( $woo_options['woo_shop_margin_bottom'] ) : '';
109
  $woo_shop_margin_left = ( isset( $woo_options['woo_shop_margin_left']) ) ? esc_attr( $woo_options['woo_shop_margin_left'] ) : '';
@@ -129,12 +130,20 @@ class HT_CTC_WOO_Pages {
129
  $css .= "margin-bottom:$woo_shop_margin_bottom;";
130
  }
131
 
 
 
 
 
 
 
 
 
132
 
133
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
134
 
135
  if ( is_file( $path ) ) {
136
  ?>
137
- <div class="ctc_chat ctc_woo_place" style="<?= $css ?>" data-pre_filled="<?= $pre_filled ?>">
138
  <?php include $path; ?>
139
  </div>
140
  <?php
@@ -164,7 +173,6 @@ class HT_CTC_WOO_Pages {
164
  $page_id = get_the_ID();
165
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
166
 
167
-
168
  $type = 'chat';
169
  $calling_from = 'woo_page';
170
  $style = ( isset( $woo_options['woo_style']) ) ? esc_attr( $woo_options['woo_style'] ) : '8';
@@ -183,6 +191,7 @@ class HT_CTC_WOO_Pages {
183
  }
184
 
185
  $woo_single_position_center = ( isset( $woo_options['woo_single_position_center']) ) ? esc_attr( $woo_options['woo_single_position_center'] ) : '';
 
186
  $woo_single_margin_top = ( isset( $woo_options['woo_single_margin_top']) ) ? esc_attr( $woo_options['woo_single_margin_top'] ) : '';
187
  $woo_single_margin_right = ( isset( $woo_options['woo_single_margin_right']) ) ? esc_attr( $woo_options['woo_single_margin_right'] ) : '';
188
  $woo_single_margin_bottom = ( isset( $woo_options['woo_single_margin_bottom']) ) ? esc_attr( $woo_options['woo_single_margin_bottom'] ) : '';
@@ -211,12 +220,21 @@ class HT_CTC_WOO_Pages {
211
  $css .= "margin-bottom:$woo_single_margin_bottom;";
212
  }
213
 
 
 
 
 
 
 
 
 
 
214
 
215
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
216
 
217
  if ( is_file( $path ) ) {
218
  ?>
219
- <div class="ctc_chat ctc_woo_place" style="<?= $css ?>">
220
  <?php include $path; ?>
221
  </div>
222
  <?php
104
 
105
 
106
  $woo_shop_margin_top = ( isset( $woo_options['woo_shop_margin_top']) ) ? esc_attr( $woo_options['woo_shop_margin_top'] ) : '';
107
+ $woo_shop_layout_cart_btn = ( isset( $woo_options['woo_shop_layout_cart_btn']) ) ? esc_attr( $woo_options['woo_shop_layout_cart_btn'] ) : '';
108
  $woo_shop_margin_right = ( isset( $woo_options['woo_shop_margin_right']) ) ? esc_attr( $woo_options['woo_shop_margin_right'] ) : '';
109
  $woo_shop_margin_bottom = ( isset( $woo_options['woo_shop_margin_bottom']) ) ? esc_attr( $woo_options['woo_shop_margin_bottom'] ) : '';
110
  $woo_shop_margin_left = ( isset( $woo_options['woo_shop_margin_left']) ) ? esc_attr( $woo_options['woo_shop_margin_left'] ) : '';
130
  $css .= "margin-bottom:$woo_shop_margin_bottom;";
131
  }
132
 
133
+ $class_names = "";
134
+ $class_names .= "ctc_chat ctc_woo_place";
135
+
136
+ // shop cart layout
137
+ if ('' !== $woo_shop_layout_cart_btn) {
138
+ $class_names .= " ctc_woo_shop_cart_layout";
139
+ $css .= "display: none;";
140
+ }
141
 
142
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
143
 
144
  if ( is_file( $path ) ) {
145
  ?>
146
+ <div class="<?= $class_names ?>" style="<?= $css ?>" data-pre_filled="<?= $pre_filled ?>">
147
  <?php include $path; ?>
148
  </div>
149
  <?php
173
  $page_id = get_the_ID();
174
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
175
 
 
176
  $type = 'chat';
177
  $calling_from = 'woo_page';
178
  $style = ( isset( $woo_options['woo_style']) ) ? esc_attr( $woo_options['woo_style'] ) : '8';
191
  }
192
 
193
  $woo_single_position_center = ( isset( $woo_options['woo_single_position_center']) ) ? esc_attr( $woo_options['woo_single_position_center'] ) : '';
194
+ $woo_single_layout_cart_btn = ( isset( $woo_options['woo_single_layout_cart_btn']) ) ? esc_attr( $woo_options['woo_single_layout_cart_btn'] ) : '';
195
  $woo_single_margin_top = ( isset( $woo_options['woo_single_margin_top']) ) ? esc_attr( $woo_options['woo_single_margin_top'] ) : '';
196
  $woo_single_margin_right = ( isset( $woo_options['woo_single_margin_right']) ) ? esc_attr( $woo_options['woo_single_margin_right'] ) : '';
197
  $woo_single_margin_bottom = ( isset( $woo_options['woo_single_margin_bottom']) ) ? esc_attr( $woo_options['woo_single_margin_bottom'] ) : '';
220
  $css .= "margin-bottom:$woo_single_margin_bottom;";
221
  }
222
 
223
+ $class_names = "";
224
+ $class_names .= "ctc_chat ctc_woo_place";
225
+
226
+ // single - cart layout
227
+ if ('' !== $woo_single_layout_cart_btn) {
228
+ $class_names .= " ctc_woo_single_cart_layout";
229
+ $css .= "display: none;";
230
+ }
231
+
232
 
233
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
234
 
235
  if ( is_file( $path ) ) {
236
  ?>
237
+ <div class="<?= $class_names ?>" style="<?= $css ?>">
238
  <?php include $path; ?>
239
  </div>
240
  <?php
new/tools/woo/woo-admin/class-ht-ctc-admin-woo-page.php CHANGED
@@ -139,6 +139,7 @@ class HT_CTC_Admin_Woo_Page {
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_margin_top = ( isset( $woo_options['woo_single_margin_top']) ) ? esc_attr( $woo_options['woo_single_margin_top'] ) : '';
143
  $woo_single_margin_right = ( isset( $woo_options['woo_single_margin_right']) ) ? esc_attr( $woo_options['woo_single_margin_right'] ) : '';
144
  $woo_single_margin_bottom = ( isset( $woo_options['woo_single_margin_bottom']) ) ? esc_attr( $woo_options['woo_single_margin_bottom'] ) : '';
@@ -151,6 +152,7 @@ class HT_CTC_Admin_Woo_Page {
151
  $woo_shop_style = ( isset( $woo_options['woo_shop_style']) ) ? esc_attr( $woo_options['woo_shop_style'] ) : '1';
152
  $woo_shop_pre_filled = ( isset( $woo_options['woo_shop_pre_filled']) ) ? esc_attr( $woo_options['woo_shop_pre_filled'] ) : '';
153
  $woo_shop_call_to_action = ( isset( $woo_options['woo_shop_call_to_action']) ) ? esc_attr( $woo_options['woo_shop_call_to_action'] ) : '';
 
154
  $woo_shop_add_whatsapp = ( isset( $woo_options['woo_shop_add_whatsapp']) ) ? esc_attr( $woo_options['woo_shop_add_whatsapp'] ) : '';
155
 
156
  $woo_shop_position_center = ( isset( $woo_options['woo_shop_position_center']) ) ? esc_attr( $woo_options['woo_shop_position_center'] ) : '';
@@ -228,7 +230,7 @@ class HT_CTC_Admin_Woo_Page {
228
  <p><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?></p>
229
  </div>
230
  <div class="input-field col s6">
231
- <select name="<?= $dbrow; ?>[woo_style]" class="">
232
  <option value="1" <?= $woo_style == 1 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></option>
233
  <option value="2" <?= $woo_style == 2 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-2', 'click-to-chat-for-whatsapp' ); ?></option>
234
  <option value="3" <?= $woo_style == 3 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-3', 'click-to-chat-for-whatsapp' ); ?></option>
@@ -245,50 +247,73 @@ class HT_CTC_Admin_Woo_Page {
245
  </div>
246
  </div>
247
 
248
- <p class="description ctc_init_display_none woo_single_position_settings">The styles and its position appears based on how Theme is developed.</p>
249
- <p class="description ctc_init_display_none woo_single_position_settings">This below settings are useful to adjust its appearance</p>
250
 
251
- <!-- display - center -->
252
- <div class="row woo_single_position_settings" style="display: none;">
253
- <div class="col s6" style="padding-top: 14px;">
254
- <p><?php _e( 'Display Center', 'click-to-chat-for-whatsapp' ); ?></p>
255
- </div>
256
- <div class="input-field col s6">
257
- <label>
258
- <input name="<?= $dbrow; ?>[woo_single_position_center]" type="checkbox" value="1" <?php checked( $woo_single_position_center, 1 ); ?> id="woo_single_position_center" />
259
- <span><?php _e( 'Display center with in available space', 'click-to-chat-for-whatsapp' ); ?></span>
260
- </label>
261
- </div>
262
- </div>
263
-
264
- <!-- display: block, inline-block .. -->
265
- <div class="row ctc_init_display_none woo_single_position_settings">
266
- <div class="col s6" style="padding-top: 14px;">
267
- <p><?php _e( 'Display Block Type', 'click-to-chat-for-whatsapp' ); ?></p>
268
  </div>
269
- <div class="input-field col s6">
270
- <select name="<?= $dbrow; ?>[woo_single_block_type]" class="">
271
- <option value="block" <?= $woo_single_block_type == 'block' ? 'SELECTED' : ''; ?> >block</option>
272
- <option value="inline" <?= $woo_single_block_type == 'inline' ? 'SELECTED' : ''; ?> >inline</option>
273
- <option value="inline-block" <?= $woo_single_block_type == 'inline-block' ? 'SELECTED' : ''; ?> >inline-block</option>
274
- </select>
275
- <p class="woo_single_position_center_checked_content" style="float: right; display: none;"><?php _e( "If 'Display Center' is checked, 'Display Block Type': 'block' works better", 'click-to-chat-for-whatsapp' ); ?></p>
 
 
 
 
 
276
  </div>
277
- </div>
278
-
279
- <!-- margin -->
280
- <div class="row ctc_init_display_none woo_single_position_settings">
281
- <div class="col s6" style="padding-top: 14px;">
282
- <p><?php _e( 'Spacing (Margin)', 'click-to-chat-for-whatsapp' ); ?></p>
 
 
 
 
 
 
 
 
283
  </div>
284
- <div class="input-field col s6" style="display: flex; margin-bottom: 1px;">
285
- <input name="ht_ctc_woo_options[woo_single_margin_top]" value="<?= $woo_single_margin_top ?>" id="woo_single_margin_top" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Top" data-position="top" data-tooltip="<?php _e( 'Top', 'click-to-chat-for-whatsapp' ); ?>">
286
- <input name="ht_ctc_woo_options[woo_single_margin_bottom]" value="<?= $woo_single_margin_bottom ?>" id="woo_single_margin_bottom" type="text" style="display:inline; margin-right:8px;" class="input-margin tooltipped" placeholder="Bottom" data-position="bottom" data-tooltip="<?php _e( 'Bottom', 'click-to-chat-for-whatsapp' ); ?>">
287
- <input name="ht_ctc_woo_options[woo_single_margin_left]" value="<?= $woo_single_margin_left ?>" id="woo_single_margin_left" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Left" data-position="left" data-tooltip="<?php _e( 'Left', 'click-to-chat-for-whatsapp' ); ?>">
288
- <input name="ht_ctc_woo_options[woo_single_margin_right]" value="<?= $woo_single_margin_right ?>" id="woo_single_margin_right" type="text" style="display:inline;" class="input-margin tooltipped" placeholder="Right" data-position="right" data-tooltip="<?php _e( 'Right', 'click-to-chat-for-whatsapp' ); ?>">
 
 
 
 
 
 
 
 
289
  </div>
290
- <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
291
- </div>
 
 
 
292
 
293
 
294
  </div>
@@ -342,7 +367,7 @@ class HT_CTC_Admin_Woo_Page {
342
  <p><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?></p>
343
  </div>
344
  <div class="input-field col s6">
345
- <select name="<?= $dbrow; ?>[woo_shop_style]" class="">
346
  <option value="1" <?= $woo_shop_style == 1 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></option>
347
  <option value="2" <?= $woo_shop_style == 2 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-2', 'click-to-chat-for-whatsapp' ); ?></option>
348
  <option value="3" <?= $woo_shop_style == 3 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-3', 'click-to-chat-for-whatsapp' ); ?></option>
@@ -359,34 +384,57 @@ class HT_CTC_Admin_Woo_Page {
359
  </div>
360
  </div>
361
 
362
- <!-- display - center -->
363
- <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
364
- <div class="col s6" style="padding-top: 14px;">
365
- <p><?php _e( 'Display Center', 'click-to-chat-for-whatsapp' ); ?></p>
366
- </div>
367
- <div class="input-field col s6">
368
- <label>
369
- <input name="<?= $dbrow; ?>[woo_shop_position_center]" type="checkbox" value="1" <?php checked( $woo_shop_position_center, 1 ); ?> id="woo_shop_position_center" />
370
- <span><?php _e( 'Display center', 'click-to-chat-for-whatsapp' ); ?></span>
371
- </label>
 
 
 
 
 
 
372
  </div>
373
- </div>
374
 
375
- <!-- margin -->
376
- <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
377
- <div class="col s6" style="padding-top: 14px;">
378
- <p><?php _e( 'Spacing (Margin)', 'click-to-chat-for-whatsapp' ); ?></p>
 
 
 
 
 
 
 
379
  </div>
380
- <div class="input-field col s6" style="display: flex; margin-bottom: 1px;">
381
- <input name="ht_ctc_woo_options[woo_shop_margin_top]" value="<?= $woo_shop_margin_top ?>" id="woo_shop_margin_top" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Top" data-position="top" data-tooltip="<?php _e( 'Top', 'click-to-chat-for-whatsapp' ); ?>">
382
- <input name="ht_ctc_woo_options[woo_shop_margin_bottom]" value="<?= $woo_shop_margin_bottom ?>" id="woo_shop_margin_bottom" type="text" style="display:inline; margin-right:8px;" class="input-margin tooltipped" placeholder="Bottom" data-position="bottom" data-tooltip="<?php _e( 'Bottom', 'click-to-chat-for-whatsapp' ); ?>">
383
- <input name="ht_ctc_woo_options[woo_shop_margin_left]" value="<?= $woo_shop_margin_left ?>" id="woo_shop_margin_left" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Left" data-position="left" data-tooltip="<?php _e( 'Left', 'click-to-chat-for-whatsapp' ); ?>">
384
- <input name="ht_ctc_woo_options[woo_shop_margin_right]" value="<?= $woo_shop_margin_right ?>" id="woo_shop_margin_right" type="text" style="display:inline;" class="input-margin tooltipped" placeholder="Right" data-position="right" data-tooltip="<?php _e( 'Right', 'click-to-chat-for-whatsapp' ); ?>">
 
 
 
 
 
 
 
 
385
  </div>
386
- <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
387
- </div>
 
 
 
 
388
 
389
- <br>
390
 
391
  </div>
392
  </div>
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'] ) : '';
143
  $woo_single_margin_top = ( isset( $woo_options['woo_single_margin_top']) ) ? esc_attr( $woo_options['woo_single_margin_top'] ) : '';
144
  $woo_single_margin_right = ( isset( $woo_options['woo_single_margin_right']) ) ? esc_attr( $woo_options['woo_single_margin_right'] ) : '';
145
  $woo_single_margin_bottom = ( isset( $woo_options['woo_single_margin_bottom']) ) ? esc_attr( $woo_options['woo_single_margin_bottom'] ) : '';
152
  $woo_shop_style = ( isset( $woo_options['woo_shop_style']) ) ? esc_attr( $woo_options['woo_shop_style'] ) : '1';
153
  $woo_shop_pre_filled = ( isset( $woo_options['woo_shop_pre_filled']) ) ? esc_attr( $woo_options['woo_shop_pre_filled'] ) : '';
154
  $woo_shop_call_to_action = ( isset( $woo_options['woo_shop_call_to_action']) ) ? esc_attr( $woo_options['woo_shop_call_to_action'] ) : '';
155
+ $woo_shop_layout_cart_btn = ( isset( $woo_options['woo_shop_layout_cart_btn']) ) ? esc_attr( $woo_options['woo_shop_layout_cart_btn'] ) : '';
156
  $woo_shop_add_whatsapp = ( isset( $woo_options['woo_shop_add_whatsapp']) ) ? esc_attr( $woo_options['woo_shop_add_whatsapp'] ) : '';
157
 
158
  $woo_shop_position_center = ( isset( $woo_options['woo_shop_position_center']) ) ? esc_attr( $woo_options['woo_shop_position_center'] ) : '';
230
  <p><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?></p>
231
  </div>
232
  <div class="input-field col s6">
233
+ <select name="<?= $dbrow; ?>[woo_style]" class="woo_single_style_select">
234
  <option value="1" <?= $woo_style == 1 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></option>
235
  <option value="2" <?= $woo_style == 2 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-2', 'click-to-chat-for-whatsapp' ); ?></option>
236
  <option value="3" <?= $woo_style == 3 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-3', 'click-to-chat-for-whatsapp' ); ?></option>
247
  </div>
248
  </div>
249
 
250
+ <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>
251
+ <br>
252
 
253
+ <details open class="description ctc_init_display_none woo_single_position_settings">
254
+ <summary style="padding: 5px; background-color: #eeeeee; cursor: pointer; width: fit-content;">Adjust settings compatible with the theme design</summary>
255
+
256
+ <!-- style 1, 8 - add to cart layout -->
257
+ <div class="woo_single_position_settings_cart_layout" style="display: none;">
258
+ <div class="row">
259
+ <div class="col s6" style="padding-top: 14px;">
260
+ <p>Button layout <br><span style="font-size:0.8em;">WhatsApp button looks like 'Add to Cart' button</span></p>
261
+ </div>
262
+ <div class="input-field col s6">
263
+ <label>
264
+ <input name="<?= $dbrow; ?>[woo_single_layout_cart_btn]" type="checkbox" value="1" <?php checked( $woo_single_layout_cart_btn, 1 ); ?> id="woo_single_layout_cart_btn" />
265
+ <span>Displays like 'Add to Cart' button</span>
266
+ </label>
267
+ </div>
268
+ </div>
 
269
  </div>
270
+
271
+ <!-- display - center -->
272
+ <div class="row woo_single_position_settings" style="display: none;">
273
+ <div class="col s6" style="padding-top: 14px;">
274
+ <p><?php _e( 'Display Center', 'click-to-chat-for-whatsapp' ); ?></p>
275
+ </div>
276
+ <div class="input-field col s6">
277
+ <label>
278
+ <input name="<?= $dbrow; ?>[woo_single_position_center]" type="checkbox" value="1" <?php checked( $woo_single_position_center, 1 ); ?> id="woo_single_position_center" />
279
+ <span><?php _e( 'Display center within available space', 'click-to-chat-for-whatsapp' ); ?></span>
280
+ </label>
281
+ </div>
282
  </div>
283
+
284
+ <!-- display: block, inline-block .. -->
285
+ <div class="row ctc_init_display_none woo_single_position_settings">
286
+ <div class="col s6" style="padding-top: 14px;">
287
+ <p><?php _e( 'Display Block Type', 'click-to-chat-for-whatsapp' ); ?></p>
288
+ </div>
289
+ <div class="input-field col s6">
290
+ <select name="<?= $dbrow; ?>[woo_single_block_type]" class="">
291
+ <option value="block" <?= $woo_single_block_type == 'block' ? 'SELECTED' : ''; ?> >block</option>
292
+ <option value="inline" <?= $woo_single_block_type == 'inline' ? 'SELECTED' : ''; ?> >inline</option>
293
+ <option value="inline-block" <?= $woo_single_block_type == 'inline-block' ? 'SELECTED' : ''; ?> >inline-block</option>
294
+ </select>
295
+ <p class="woo_single_position_center_checked_content" style="display: none;">Recommended type: 'block'</p>
296
+ </div>
297
  </div>
298
+
299
+ <!-- margin -->
300
+ <div class="row ctc_init_display_none woo_single_position_settings">
301
+ <div class="col s6" style="padding-top: 14px;">
302
+ <p><?php _e( 'Spacing (Margin)', 'click-to-chat-for-whatsapp' ); ?></p>
303
+ </div>
304
+ <div class="input-field col s6" style="display: flex; margin-bottom: 1px;">
305
+ <input name="ht_ctc_woo_options[woo_single_margin_top]" value="<?= $woo_single_margin_top ?>" id="woo_single_margin_top" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Top" data-position="top" data-tooltip="<?php _e( 'Top', 'click-to-chat-for-whatsapp' ); ?>">
306
+ <input name="ht_ctc_woo_options[woo_single_margin_bottom]" value="<?= $woo_single_margin_bottom ?>" id="woo_single_margin_bottom" type="text" style="display:inline; margin-right:8px;" class="input-margin tooltipped" placeholder="Bottom" data-position="bottom" data-tooltip="<?php _e( 'Bottom', 'click-to-chat-for-whatsapp' ); ?>">
307
+ <input name="ht_ctc_woo_options[woo_single_margin_left]" value="<?= $woo_single_margin_left ?>" id="woo_single_margin_left" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Left" data-position="left" data-tooltip="<?php _e( 'Left', 'click-to-chat-for-whatsapp' ); ?>">
308
+ <input name="ht_ctc_woo_options[woo_single_margin_right]" value="<?= $woo_single_margin_right ?>" id="woo_single_margin_right" type="text" style="display:inline;" class="input-margin tooltipped" placeholder="Right" data-position="right" data-tooltip="<?php _e( 'Right', 'click-to-chat-for-whatsapp' ); ?>">
309
+ </div>
310
+ <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
311
  </div>
312
+
313
+ <br>
314
+ <p class="description ctc_init_display_none woo_single_position_settings" 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>
315
+ </details>
316
+
317
 
318
 
319
  </div>
367
  <p><?php _e( 'Select Style', 'click-to-chat-for-whatsapp' ); ?></p>
368
  </div>
369
  <div class="input-field col s6">
370
+ <select name="<?= $dbrow; ?>[woo_shop_style]" class="woo_shop_style">
371
  <option value="1" <?= $woo_shop_style == 1 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-1', 'click-to-chat-for-whatsapp' ); ?></option>
372
  <option value="2" <?= $woo_shop_style == 2 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-2', 'click-to-chat-for-whatsapp' ); ?></option>
373
  <option value="3" <?= $woo_shop_style == 3 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-3', 'click-to-chat-for-whatsapp' ); ?></option>
384
  </div>
385
  </div>
386
 
387
+ <details open class="description ctc_init_display_none woo_shop_add_whatsapp_settings">
388
+ <summary style="padding: 5px; background-color: #eeeeee; cursor: pointer; width: fit-content;">Adjust settings compatible with the theme design</summary>
389
+
390
+ <!-- style 1, 8 - shop - add to cart layout -->
391
+ <div class="woo_shop_cart_layout" style="display: none;">
392
+ <div class="row">
393
+ <div class="col s6" style="padding-top: 14px;">
394
+ <p>Button layout <br><span style="font-size:0.8em;">WhatsApp button looks like 'Add to Cart' button</span></p>
395
+ </div>
396
+ <div class="input-field col s6">
397
+ <label>
398
+ <input name="<?= $dbrow; ?>[woo_shop_layout_cart_btn]" type="checkbox" value="1" <?php checked( $woo_shop_layout_cart_btn, 1 ); ?> id="woo_shop_layout_cart_btn" />
399
+ <span>Displays like 'Add to Cart' button</span>
400
+ </label>
401
+ </div>
402
+ </div>
403
  </div>
 
404
 
405
+ <!-- display - center -->
406
+ <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
407
+ <div class="col s6" style="padding-top: 14px;">
408
+ <p><?php _e( 'Display Center', 'click-to-chat-for-whatsapp' ); ?></p>
409
+ </div>
410
+ <div class="input-field col s6">
411
+ <label>
412
+ <input name="<?= $dbrow; ?>[woo_shop_position_center]" type="checkbox" value="1" <?php checked( $woo_shop_position_center, 1 ); ?> id="woo_shop_position_center" />
413
+ <span><?php _e( 'Display center', 'click-to-chat-for-whatsapp' ); ?></span>
414
+ </label>
415
+ </div>
416
  </div>
417
+
418
+ <!-- margin -->
419
+ <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
420
+ <div class="col s6" style="padding-top: 14px;">
421
+ <p><?php _e( 'Spacing (Margin)', 'click-to-chat-for-whatsapp' ); ?></p>
422
+ </div>
423
+ <div class="input-field col s6" style="display: flex; margin-bottom: 1px;">
424
+ <input name="ht_ctc_woo_options[woo_shop_margin_top]" value="<?= $woo_shop_margin_top ?>" id="woo_shop_margin_top" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Top" data-position="top" data-tooltip="<?php _e( 'Top', 'click-to-chat-for-whatsapp' ); ?>">
425
+ <input name="ht_ctc_woo_options[woo_shop_margin_bottom]" value="<?= $woo_shop_margin_bottom ?>" id="woo_shop_margin_bottom" type="text" style="display:inline; margin-right:8px;" class="input-margin tooltipped" placeholder="Bottom" data-position="bottom" data-tooltip="<?php _e( 'Bottom', 'click-to-chat-for-whatsapp' ); ?>">
426
+ <input name="ht_ctc_woo_options[woo_shop_margin_left]" value="<?= $woo_shop_margin_left ?>" id="woo_shop_margin_left" type="text" style="display:inline; margin-right:4px;" class="input-margin tooltipped" placeholder="Left" data-position="left" data-tooltip="<?php _e( 'Left', 'click-to-chat-for-whatsapp' ); ?>">
427
+ <input name="ht_ctc_woo_options[woo_shop_margin_right]" value="<?= $woo_shop_margin_right ?>" id="woo_shop_margin_right" type="text" style="display:inline;" class="input-margin tooltipped" placeholder="Right" data-position="right" data-tooltip="<?php _e( 'Right', 'click-to-chat-for-whatsapp' ); ?>">
428
+ </div>
429
+ <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
430
  </div>
431
+ <br>
432
+
433
+ <br>
434
+ <p class="description ctc_init_display_none woo_shop_add_whatsapp_settings"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/whatsapp-chat-in-woocommerce-shop-page/"><?php _e( 'WooCommerce Shop page', 'click-to-chat-for-whatsapp' ); ?></a></p>
435
+ </details>
436
+
437
 
 
438
 
439
  </div>
440
  </div>
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
- Tested up to: 5.8.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.7.1
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, WhatsApp WooCommerce, whatsapp wordpress, whatsapp floating button, whatsapp icon, holithemes
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -16,7 +16,7 @@ Let's make your Web page visitors Contact you through "WhatsApp", "WhatsApp Busi
16
 
17
  WhatsApp connectivity for WordPress websites! Engage customers and generate leads!
18
 
19
- [Demo](https://holithemes.com/plugins/click-to-chat/list-of-styles/) | [Documentation](https://holithemes.com/plugins/click-to-chat/)
20
 
21
  == WhatsApp Chat ==
22
 
@@ -39,9 +39,7 @@ Select a Style that matches your Website design.
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
42
- [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
43
-
44
- ✏️ [Styles are customizable](https://holithemes.com/plugins/click-to-chat/customize-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
45
 
46
 
47
  = 🌼 Add Own Image =
@@ -50,7 +48,8 @@ Instead of selecting a pre-defined style, add any Image/Animated-image/GIF.
50
 
51
  == 🌈 Custom Element ==
52
 
53
- Convert any Element/Design as WhatsApp Chat Element by adding
 
54
  * Class name: 'ctc_chat' (or)
55
  * Id name: 'ctc_chat' (or)
56
  * Href/link: '#ctc_chat'
@@ -61,7 +60,7 @@ The custom design will navigate to WhatsApp based on plugin settings (WhatsApp N
61
 
62
  == ✳️ Position to Place ==
63
 
64
- * Add styles at any position of the screen
65
  (not limited to fixed positions).
66
  * Different positions for Mobile and Desktop.
67
 
@@ -95,10 +94,12 @@ Additional variables, specific to WooCommerce single product page to change valu
95
  **{regular_price}** -> Regular product price (with out any sale)
96
  **{sku}** -> Stock keeping unit
97
 
 
98
 
99
  * After product summary
100
 
101
  PRO:
 
102
  * Before Main Content
103
  * Before Product
104
  * Before Product Summary
@@ -113,14 +114,14 @@ PRO:
113
 
114
  = WooCommerce Shop Page =
115
 
116
- Add WhatsApp button/icon at WooCommerce Products list (shop page, related products list)
117
 
118
  [Shop page](https://holithemes.com/plugins/click-to-chat/whatsapp-chat-in-woocommerce-shop-page/)
119
 
120
  = 📒 Change Settings at page level =
121
 
122
- At page level we can overwrite the settings. Each post we can add different Whatsapp Number, Prefilled Message, Call to Action.
123
- (while editing the post, at the right side bar 'Click to Chat' metabox)
124
 
125
  * WhatsApp Number
126
  * Call to Action
@@ -130,10 +131,10 @@ At page level we can overwrite the settings. Each post we can add different What
130
  PRO:
131
 
132
  * Styles
133
- * Time Dealy
134
- * Scroll Dealy
135
 
136
- [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
137
 
138
  == 📈 Analytics ==
139
 
@@ -147,7 +148,7 @@ Creates an Event when the user clicks on the WhatsApp Icon/button.
147
 
148
  == Webhooks ==
149
 
150
- Connect other applications using Integarate, Automation tools like Zapier, IFTTT, Pipedream
151
 
152
  [Webhooks](https://holithemes.com/plugins/click-to-chat/webhooks)
153
 
@@ -159,19 +160,19 @@ Connect other applications using Integarate, Automation tools like Zapier, IFTTT
159
  * Change call to Action When Offline
160
  or
161
  * Hide When Offline
162
- * Show/Hide in selected time range in a day
163
  * Show/Hide on selected days in a week
164
  * Webhooks - Dynamic variables
165
- * {url} - replace with current page url
166
  * {time} - time the user interacted with WhatsApp Button/Icon
167
  * {number} - WhatsApp Number for that icon/button
168
  * Position to place
169
- * Fixed: fixed position to the scren (default, available in Free version)
170
- * Absolute: Fixed position to the body content. (Moves when user scrolls the page)
171
- * Time Dealy - Display after some time dealy
172
- * Scroll Action - Display after user scroll the page of given percentage
173
  * Display based on Website visitors login status
174
- * Page level settings - Change styles, time, scroll delay.
175
  * WooCommerce
176
  * Mulitple position to add WhatsApp in product pages.
177
 
@@ -181,7 +182,7 @@ Connect other applications using Integarate, Automation tools like Zapier, IFTTT
181
 
182
  Click to Chat is Compatible with translate plugins. [WPML](https://wpml.org/), Polylang.
183
 
184
- Easy to setup different values for each language
185
 
186
  * WhatsApp Number
187
  * Call to Action
@@ -193,7 +194,7 @@ Setup for [WPML](https://holithemes.com/plugins/click-to-chat/translate-click-to
193
 
194
  == 🚀 Performance ==
195
 
196
- * Rich in features but the frontend of the site content is very light weight.
197
 
198
  We highly concentrate on speed, performance.
199
 
@@ -211,21 +212,21 @@ PRO:
211
 
212
  * Time delay
213
  * Scroll delay
214
- * Selected Days in a week
215
  * Selected time range in a day
 
216
  * Website visitor login status
217
 
218
  == ⛳ Shortcodes ==
219
 
220
- Use shortcodes to add the icon/button with inline the Posts content, widgets.
221
 
222
- change the default setting values using shortcode attributes - WhatsApp Number, Style, Prefilled message, Call to Action.
223
 
224
  = Chat Shortcodes =
225
 
226
  [ht-ctc-chat]
227
 
228
- To change the WhatsApp number use 'number' attribute
229
 
230
  [ht-ctc-chat number=915123456789]
231
 
@@ -233,7 +234,7 @@ To change the WhatsApp number use 'number' attribute
233
 
234
  = Group =
235
 
236
- Enable Group chat feature and add WhatsApp Group id in the plugin setting page.
237
 
238
  Make it easy for your customers to join your Whatsapp Group.
239
 
@@ -247,7 +248,7 @@ Let users share your website with their WhatsApp contacts and get more leads.
247
 
248
  = Help Translate The Plugin =
249
 
250
- Help by [Translating the plugin](https://translate.wordpress.org/projects/wp-plugins/click-to-chat-for-whatsapp/) to available in more languages
251
 
252
 
253
  == screenshots ==
@@ -458,9 +459,9 @@ For any issues with the plugin / suggestions:
458
 
459
  = ⭐️ Give Support =
460
 
461
- If you like the plugin, please support the developers by giving [5 star rating](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post)
462
 
463
- Thank you so much from "Click to Chat" developers, HoliThemes.
464
 
465
  == Upgrade Notice ==
466
 
@@ -481,110 +482,8 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
481
 
482
  == Changelog ==
483
 
484
- = 3.7.1 =
485
- * Fix: Variables for WooCommerce
486
-
487
- = 3.7 =
488
- * Enchantment: Admin settings
489
- * Enchantment: Add your own image style.
490
- * update z-index now for chat, group, share features
491
-
492
- = 3.6 =
493
- * Enchantment: settings pages
494
-
495
- = 3.5.3 =
496
- * New: Display settings for WooCommerce Thank you page
497
- * Fix: Display based on Category settings not found issue
498
-
499
- = 3.5.2 =
500
- * New: z-Index settings
501
- * Enchantment: Admin settings.
502
-
503
- = 3.5.1 =
504
- * Fix: Customize styles settings not saving
505
-
506
- = 3.5 =
507
- * New: Add Styles at WooCommerce Shop page. (Products Archive)
508
- * Enchantment: Style-7 font size settings.
509
- * Enchantment: Custom Element (convert any element to navigate to WhatsApp Chat)
510
-
511
- = 3.4 =
512
- * New: Add Styles with in WooCommerce Product pages
513
-
514
- = 3.3.11 =
515
- * Fix: Dynamic Variables on archive pages getting the last value.
516
- * Enchantment: Add own image Style
517
-
518
- = 3.3.10 =
519
- * Enchantment: Number field, added helper text
520
- * Enchantment: Position Type
521
-
522
- = 3.3.9 =
523
- * Introducing PRO Version
524
- * Enchantment: variable for prefilled, call to action for WooCommerce pages at page level settings
525
-
526
- = 3.3.8 =
527
- * Fix: syntax error while updating the plugin.
528
-
529
- = 3.3.7 =
530
- * Enchantment: Webhook feature
531
- * Fix: admin menu icon issue
532
-
533
- = 3.3.6 =
534
- * Enchantment: Customize styles settings
535
-
536
- = 3.3.5 =
537
- * New: aria-hidden attribute settings for Accessibility API
538
- * Enchantment: Call to Action, Pre-filled Message (supports emojis)
539
- * Enchantment: User Interface
540
- * Show effect is now called as Entery effects
541
-
542
- = 3.3.4 =
543
- * Display Settings for WooCommerce Cart, Checkout, Account, Shop page
544
- * Enchantment: WhatsApp Number field
545
-
546
- = 3.3.3 =
547
- * User Interface: Display settings
548
- * New: Display settings for custom post types
549
- * User Interface: same_settings for mobile, desktop
550
- * User Interface: WooCommerce related settings now in seperate page
551
-
552
- = 3.3.2 =
553
- * Enchantment: Google Analytics
554
- * Enchantment: Web WhatsApp
555
- * code: php echo shorthand
556
-
557
- = 3.3.1 =
558
- * New: Webhooks
559
- * Enchantment: position to place settings
560
-
561
- = 3.3 =
562
- * New: Custom Element/Design, Create an element/design and add
563
- * Class name: ctc_chat (or)
564
- * ID name: ctc_chat (or)
565
- * Href/link attribute: #ctc_chat
566
-
567
- = 3.2.9 =
568
- * Performance Improvement
569
- * Fix: WooCommerce Prefilled Message Muliple lines
570
- * Removed recommended tools page
571
-
572
- = 3.2.8 =
573
- * Google Ads - If enabled, calls gtag_report_conversion.
574
- * Enhancement: User Interface
575
-
576
- = 3.2.7 =
577
- * Enhancement: WhatsApp Number field. (country code and Number)
578
- * Enhancement: Change Settings at page level. (Click to Chat - Meta box)
579
-
580
- = 3.2.6 =
581
- * Enhancement: AMP Compatibility
582
- * Fix: Shortcode prefilled, call to action for WooCommerce single product pages
583
- * Updated: dashicons
584
-
585
- = 3.2.5 =
586
- * Showcase - [Add your website to Click-to-Chat portfolio](https://docs.google.com/forms/d/e/1FAIpQLSdPgUgjaZLxfEk-jRQUd8efV-SNh5eOgc2Qe5Xl9uz0ti8tEw/viewform?usp=sf_link)
587
- * Show/Hide settings at page level
588
- * Fix: Shortcode navigation, if loaded dynamically.
589
 
590
  [changelog](https://holithemes.com/plugins/click-to-chat/changelog/)
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
+ Tested up to: 5.9.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.8
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
16
 
17
  WhatsApp connectivity for WordPress websites! Engage customers and generate leads!
18
 
19
+ [Demo](https://holithemes.com/plugins/click-to-chat/list-of-styles/) | [Documentation](https://holithemes.com/plugins/click-to-chat/) | [Support](https://holithemes.com/plugins/click-to-chat/support/)
20
 
21
  == WhatsApp Chat ==
22
 
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
42
+ [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht) | ✏️ [Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
 
 
43
 
44
 
45
  = 🌼 Add Own Image =
48
 
49
  == 🌈 Custom Element ==
50
 
51
+ Convert any Element/Design as WhatsApp Chat Element by adding
52
+
53
  * Class name: 'ctc_chat' (or)
54
  * Id name: 'ctc_chat' (or)
55
  * Href/link: '#ctc_chat'
60
 
61
  == ✳️ Position to Place ==
62
 
63
+ * Add WhatsApp at any position of the screen
64
  (not limited to fixed positions).
65
  * Different positions for Mobile and Desktop.
66
 
94
  **{regular_price}** -> Regular product price (with out any sale)
95
  **{sku}** -> Stock keeping unit
96
 
97
+ = Add WhatsApp in WooCommerce Product pages =
98
 
99
  * After product summary
100
 
101
  PRO:
102
+
103
  * Before Main Content
104
  * Before Product
105
  * Before Product Summary
114
 
115
  = WooCommerce Shop Page =
116
 
117
+ Add WhatsApp at WooCommerce Products list (shop page, related products list)
118
 
119
  [Shop page](https://holithemes.com/plugins/click-to-chat/whatsapp-chat-in-woocommerce-shop-page/)
120
 
121
  = 📒 Change Settings at page level =
122
 
123
+ At the page-level, we can overwrite the settings. For each post, we can add different Whatsapp Number, Prefilled Message, Call to Action.
124
+ (while editing the post, at the right sidebar 'Click to Chat' meta box)
125
 
126
  * WhatsApp Number
127
  * Call to Action
131
  PRO:
132
 
133
  * Styles
134
+ * Time Delay
135
+ * Scroll Delay
136
 
137
+ [Page-level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
138
 
139
  == 📈 Analytics ==
140
 
148
 
149
  == Webhooks ==
150
 
151
+ Connect other applications using Integrate, Automation tools like Zapier, IFTTT, Pipedream
152
 
153
  [Webhooks](https://holithemes.com/plugins/click-to-chat/webhooks)
154
 
160
  * Change call to Action When Offline
161
  or
162
  * Hide When Offline
163
+ * Show/Hide on selected time range in a day
164
  * Show/Hide on selected days in a week
165
  * Webhooks - Dynamic variables
166
+ * {url} - replace with current page URL
167
  * {time} - time the user interacted with WhatsApp Button/Icon
168
  * {number} - WhatsApp Number for that icon/button
169
  * Position to place
170
+ * Fixed: Fixed position to the screen (default, available in Free version)
171
+ * Absolute: Fixed position to the body content. (Moves when the user scrolls page)
172
+ * Time Delay - Displays WhatsApp after some time delay
173
+ * Scroll Action - Displays WhatsApp after user scrolls the page of a given percentage
174
  * Display based on Website visitors login status
175
+ * Page-level settings - Change styles, time, scroll delay.
176
  * WooCommerce
177
  * Mulitple position to add WhatsApp in product pages.
178
 
182
 
183
  Click to Chat is Compatible with translate plugins. [WPML](https://wpml.org/), Polylang.
184
 
185
+ Easy to set up different values for each language
186
 
187
  * WhatsApp Number
188
  * Call to Action
194
 
195
  == 🚀 Performance ==
196
 
197
+ * Rich in features but the frontend of the site content is very lightweight.
198
 
199
  We highly concentrate on speed, performance.
200
 
212
 
213
  * Time delay
214
  * Scroll delay
 
215
  * Selected time range in a day
216
+ * Selected Days in a week
217
  * Website visitor login status
218
 
219
  == ⛳ Shortcodes ==
220
 
221
+ Use shortcodes to add the icon/button with inline the Post content, widget area.
222
 
223
+ change the default setting values using shortcode attributes - WhatsApp Number, Style, Pre-filled message, Call to Action.
224
 
225
  = Chat Shortcodes =
226
 
227
  [ht-ctc-chat]
228
 
229
+ To change the WhatsApp number use the 'number' attribute
230
 
231
  [ht-ctc-chat number=915123456789]
232
 
234
 
235
  = Group =
236
 
237
+ Enable Group chat feature and add WhatsApp Group id at the plugin settings.
238
 
239
  Make it easy for your customers to join your Whatsapp Group.
240
 
248
 
249
  = Help Translate The Plugin =
250
 
251
+ Help by [Translating the plugin](https://translate.wordpress.org/projects/wp-plugins/click-to-chat-for-whatsapp/) to be available in more languages
252
 
253
 
254
  == screenshots ==
459
 
460
  = ⭐️ Give Support =
461
 
462
+ If you like the plugin, support the developers by giving [5 star rating](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post)
463
 
464
+ Thank you so much in advance from "Click to Chat" Team
465
 
466
  == Upgrade Notice ==
467
 
482
 
483
  == Changelog ==
484
 
485
+ = 3.8 =
486
+ * Enchantment: Style-1 button with icon.
487
+ * Enchantment: WhatsApp at WooCommerce Shop, single product pages
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488
 
489
  [changelog](https://holithemes.com/plugins/click-to-chat/changelog/)