Abandoned Cart Lite for WooCommerce - Version 5.4

Version Description

(10.07.2019) =

  • Bug - Fixed an issue where carts were being marked as abandoned even after they have been successfully recovered.
  • Bug - Unsubscribe link in the test reminder email displayed some HTML content in Outlook.
  • Bug - The data tracking notice in the plugin when dismissed affected other dismissible notices as well.
  • Tweak - Made the plugin compatible with AeroCheckout plugin.
  • Tweak - The settings for the Pro version will now be displayed in the Lite version of the plugin.
Download this release

Release Info

Developer Dhruvin
Plugin Icon 128x128 Abandoned Cart Lite for WooCommerce
Version 5.4
Comparing to
See all releases

Code changes from version 5.3.4 to 5.4

assets/css/admin/wcap_add_to_cart_popup_modal.css ADDED
@@ -0,0 +1,547 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wcap_popup_main_div{
2
+ width: 100%;
3
+ height: 100%
4
+ }
5
+ .wcap_popup_main_table{
6
+ width: 100%;
7
+ height: 100%
8
+ }
9
+ .wcap_popup_main_table_tr{
10
+ width: 100%;
11
+ height: 100%
12
+ }
13
+ .wcap_popup_main_table_td_settings{
14
+ float:left;
15
+ width:52% ;
16
+ }
17
+ .wcap_popup_main_table_td_preview{
18
+ float:right;
19
+ width: 45%;
20
+ }
21
+
22
+ /* heading section */
23
+ .wcap_heading_section_table{
24
+ width: 100%;
25
+ }
26
+ .wcap_heading_section_tr{
27
+ width: 100%;
28
+ }
29
+ .wcap_heading_section_table_heading{
30
+ float: left;
31
+ }
32
+ .wcap_heading_section_text_field{
33
+ float:left;
34
+ width:52% ;
35
+ }
36
+ .wcap_heading_section_text_field_color{
37
+ float:right;
38
+ width: 45%;
39
+ }
40
+
41
+ .wcap_heading_section_text_email{
42
+ width: 95%;
43
+ font-size: 1em;
44
+ }
45
+ .wcap_popup_heading_color_picker{
46
+ width: 40%;
47
+ font-size: 1em;
48
+ }
49
+
50
+ /* text section */
51
+ .wcap_text_section_table{
52
+ width: 100%;
53
+ }
54
+ .wcap_text_section_tr{
55
+ width: 100%;
56
+ }
57
+ .wcap_text_section_table_heading{
58
+ float: left;
59
+ }
60
+ .wcap_text_section_text_field{
61
+ float:left;
62
+ width:52% ;
63
+ }
64
+ .wcap_text_section_field_color{
65
+ float:right;
66
+ width: 45%;
67
+ }
68
+
69
+ .wcap_text_section_input_text{
70
+ width: 95%;
71
+ font-size: 1em;
72
+ }
73
+ .wcap_popup_text_color_picker{
74
+ width: 40%;
75
+ font-size: 1em;
76
+ }
77
+
78
+ /* Email placeholder section */
79
+ .wcap_email_placeholder_section_table{
80
+ width: 100%;
81
+ }
82
+ .wcap_email_placeholder_section_tr{
83
+ width: 100%;
84
+ }
85
+ .wcap_email_placeholder_section_table_heading{
86
+ float: left;
87
+ }
88
+ .wcap_email_placeholder_section_text_field{
89
+ float:left;
90
+ width:80% ;
91
+ }
92
+ .wcap_email_placeholder_section_input_text{
93
+ width: 95%;
94
+ font-size: 1em;
95
+ }
96
+
97
+ /* button section */
98
+ .wcap_button_section_table{
99
+ width: 100%;
100
+ }
101
+ .wcap_button_section_tr{
102
+ width: 100%;
103
+ }
104
+ .wcap_button_section_table_heading{
105
+ float: left;
106
+ }
107
+ .wcap_button_section_text_field{
108
+ float:left;
109
+ width:95% ;
110
+ }
111
+ .wcap_button_section_input_text{
112
+ width: 80%;
113
+ font-size: 1em;
114
+ }
115
+
116
+ .wcap_button_color_section_tr{
117
+ width: 100%;
118
+ }
119
+
120
+ .wcap_button_color_section_text_field{
121
+ float:left;
122
+ width:49% ;
123
+ }
124
+ .wcap_button_text_color_section_text_field{
125
+ float:right;
126
+ width:49% ;
127
+ margin-left: 5px;
128
+ }
129
+
130
+ .wcap_button_color_picker{
131
+ width: 46%;
132
+ font-size: 1em;
133
+ }
134
+ .wcap_button_text_color_picker{
135
+ width: 46%;
136
+ font-size: 1em;
137
+ }
138
+
139
+ /* Non mandatory field text section */
140
+ .wcap_non_mandatory_modal_section_fields_div_table{
141
+ width: 100%;
142
+ }
143
+ .wcap_non_mandatory_modal_section_fields_tr{
144
+ width: 100%;
145
+ }
146
+ .wcap_non_mandatory_modal_section_fields_table_heading{
147
+ float: left;
148
+ }
149
+ .wcap_non_mandatory_modal_section_fields_text_field{
150
+ float:left;
151
+ width:95% ;
152
+ }
153
+ .wcap_non_mandatory_modal_section_fields_input_text{
154
+ width: 80%;
155
+ font-size: 1em;
156
+ }
157
+
158
+ /* popup preview */
159
+ .wcap_container {
160
+ position: relative;
161
+ top: 0;
162
+ bottom: 0;
163
+ right: 0;
164
+ left: 0;
165
+ background-color: rgba(0, 0, 0, 0.7);
166
+ overflow: auto;
167
+ padding: 0 10px;
168
+ background-color: transparent;
169
+ }
170
+
171
+ .wcap_popup_close{
172
+ position: absolute;
173
+ top: 5px;
174
+ right: 5px;
175
+ cursor: pointer;
176
+ color: #bbb;
177
+ z-index: 100;
178
+ padding: 9px;
179
+ background-size: 18px;
180
+ background-position: center;
181
+ background-image: url("../../images/atc_cancel_icon.svg");
182
+ background-repeat: no-repeat;
183
+ }
184
+
185
+ .wcap_container .wcap_popup_heading_container{
186
+ position: relative;
187
+ background: #f8f9fb;
188
+ border-bottom: 1px solid #dedede;
189
+ -webkit-border-radius: 5px 5px 0 0;
190
+ -moz-border-radius: 5px 5px 0 0;
191
+ -ms-border-radius: 5px 5px 0 0;
192
+ border-radius: 5px 5px 0 0;
193
+ padding-top: 18px;
194
+ padding-bottom: 16px;
195
+ text-align: center;
196
+ }
197
+
198
+ .wcap_container .wcap_popup_content {
199
+ position: relative;
200
+ z-index: 2;
201
+ -webkit-border-radius: 5px;
202
+ -moz-border-radius: 5px;
203
+ -ms-border-radius: 5px;
204
+ border-radius: 5px;
205
+ }
206
+
207
+ .wcap_container .wcap_popup_content > * {
208
+ padding-left: 18px;
209
+ padding-right: 18px;
210
+ }
211
+
212
+ .wcap_container .wcap_popup_icon {
213
+
214
+ background-image: url("../../images/atc_popup_icon.svg");
215
+ background-repeat: no-repeat;
216
+ display: block;
217
+ background-size: 65px;
218
+ background-position: center;
219
+ background-color: #fff;
220
+ background-repeat: no-repeat;
221
+ border: 2px solid #ecedf3;
222
+ border-radius: 50%;
223
+ margin: 0 auto;
224
+ margin-right: 5px;
225
+ margin-left: 2px;
226
+ position: relative;
227
+ height: 98px;
228
+ width: 98px;
229
+ }
230
+
231
+ .wcap_container .wcap_popup_heading {
232
+ padding-top: 10px;
233
+ margin: 0;
234
+ font-family: "Lato", sans-serif !important;
235
+ font-size: 37px;
236
+ font-weight: bold;
237
+ line-height: 36px;
238
+ color: #737f97;
239
+ text-align: center;
240
+ display: block;
241
+ text-transform: initial;
242
+ }
243
+
244
+ .wcap_container .wcap_popup_text {
245
+ color: #bbc9d2;
246
+ font-size: 16px;
247
+ line-height: 20px;
248
+ font-family: "Lato", sans-serif !important;
249
+ text-align: center;
250
+ text-transform: initial;
251
+ }
252
+
253
+ .wcap_container .wcap_popup_form {
254
+ position: relative;
255
+ text-align: left;
256
+ font-family: inherit;
257
+ padding-top: 26px;
258
+ padding-bottom: 15px;
259
+ background-color: #FFFFFF !important;
260
+ }
261
+
262
+ .wcap_container div {
263
+ display: block;
264
+ }
265
+
266
+ .wcap_container .wcap_popup_form:after {
267
+ content: '';
268
+ display: block;
269
+ position: absolute;
270
+ left: 50%;
271
+ top: -1px;
272
+ width: 0;
273
+ height: 0;
274
+ margin-left: -16px;
275
+ }
276
+
277
+ .wcap_container .wcap_popup_form:before {
278
+ content: '';
279
+ display: block;
280
+ position: absolute;
281
+ left: 50%;
282
+ top: -1px;
283
+ width: 0;
284
+ height: 0;
285
+ margin-left: -16px;
286
+ }
287
+
288
+ .wcap_container .wcap_popup_form:before {
289
+ left: 50%;
290
+ margin-left: -17px;
291
+ border-left: 17px solid transparent;
292
+ border-right: 17px solid transparent;
293
+ border-top: 17px solid #dedede;
294
+ }
295
+
296
+ .wcap_container .wcap_popup_form:after {
297
+ border-left: 16px solid transparent;
298
+ border-right: 16px solid transparent;
299
+ border-top: 16px solid #f8f9fb;
300
+ }
301
+
302
+ .wcap_container .wcap_popup_input_field_container {
303
+ position: relative;
304
+ }
305
+
306
+ .wcap_container input[type="text"].wcap_popup_input {
307
+ -webkit-appearance: none;
308
+ background: #fff !important;
309
+ border-width: 1px !important;
310
+ border-style: solid !important;
311
+ border-color: #ccc;
312
+ color: rgba(0, 0, 0, 0.75) !important;
313
+ display: block;
314
+ font-family: "Lato", sans-serif !important;
315
+ font-size: 18px !important;
316
+ font-style: normal;
317
+ line-height: 20px !important;
318
+ margin: 0 0 16px 0;
319
+ padding: 8px;
320
+ height: 42px;
321
+ width: 100%;
322
+ max-width: none !important;
323
+ margin-bottom: 10px;
324
+ outline: none !important;
325
+ box-shadow: none;
326
+ -webkit-box-sizing: border-box;
327
+ -moz-box-sizing: border-box;
328
+ -o-box-sizing: border-box;
329
+ -ms-box-sizing: border-box;
330
+ box-sizing: border-box;
331
+ -webkit-border-radius: 5px;
332
+ -moz-border-radius: 5px;
333
+ -ms-border-radius: 5px;
334
+ border-radius: 5px;
335
+ }
336
+
337
+ .wcap_container .wcap_popup_button {
338
+ position: relative;
339
+ cursor: pointer;
340
+ font-family: "Lato", sans-serif !important;
341
+ font-size: 20px;
342
+ font-weight: normal;
343
+ line-height: 20px;
344
+ text-decoration: none;
345
+ text-align: center;
346
+ text-shadow: none;
347
+ text-transform: initial;
348
+ width: auto;
349
+ height: auto;
350
+ min-width: initial;
351
+ outline: 0;
352
+ display: inline-block;
353
+ background-color: #228fff ;
354
+ border-top: none !important;
355
+ border-left: none !important;
356
+ border-right: none !important;
357
+ border-bottom: none !important;
358
+ color: #ffffff;
359
+ width: 100%;
360
+ margin: 0;
361
+ padding: 10px 0;
362
+ font-weight: bold;
363
+ cursor: pointer;
364
+ -webkit-border-radius: 5px;
365
+ -moz-border-radius: 5px;
366
+ -ms-border-radius: 5px;
367
+ border-radius: 5px;
368
+ }
369
+
370
+ .wcap_container .wcap_popup_wrapper {
371
+ position: relative;
372
+ top: 50%;
373
+ -webkit-backface-visibility: hidden;
374
+ -webkit-border-radius: 5px;
375
+ -moz-border-radius: 5px;
376
+ -ms-border-radius: 5px;
377
+ }
378
+
379
+ .wcap_popup_wrapper {
380
+ border: 1px solid #EBEBEC;
381
+ }
382
+
383
+ .wcap_container .wcap_popup_plus_sign {
384
+ background-image: url("../../images/atc_plus_icon.png");
385
+ background-repeat: no-repeat;
386
+ background-color: #228fff ;
387
+ background-repeat: no-repeat;
388
+ background-position: center;
389
+ background-size: 16px;
390
+ border-radius: 50%;
391
+ height: 24px;
392
+ left: 74px;
393
+ top: -3px;
394
+ position: absolute;
395
+ width: 24px;
396
+ }
397
+ @media (min-width: 530px){
398
+ .wcap_container .wcap_popup_icon_container {
399
+ position: relative;
400
+ padding-right: 6px;
401
+ display: table-cell;
402
+ vertical-align: middle;
403
+ width: 105px;
404
+ }
405
+
406
+ .wcap_container .wcap_popup_text_container {
407
+ display: table-cell;
408
+ vertical-align: top;
409
+ }
410
+ .wcap_popup_main_table_td_preview{
411
+ margin-top: 5%;
412
+ position: -webkit-sticky;
413
+ position: sticky;
414
+ top: 0;
415
+ padding-top: 75px;
416
+ }
417
+ .wcap_container .wcap_popup_text {
418
+ text-align: left;
419
+ }
420
+ }
421
+
422
+ .iris-picker {
423
+ z-index: 100;
424
+ display: none;
425
+ position: absolute !important;
426
+ border: 1px solid #ccc;
427
+ border-radius: 3px;
428
+ box-shadow: 0 1px 3px rgba(0,0,0,.2);
429
+ }
430
+ .colorpickpreview {
431
+ padding: 3px;
432
+ padding-left: 20px;
433
+ border: 1px solid #ddd;
434
+ border-right: 0;
435
+ margin-left: -3px;
436
+ }
437
+
438
+ /* To enable the popup modal */
439
+ .wcap-enable-atc-modal {
440
+ cursor: pointer;
441
+ text-indent: -999em;
442
+ display: block;
443
+ width: 38px;
444
+ height: 22px;
445
+ border-radius: 30px;
446
+ border: none;
447
+ position: relative;
448
+ box-sizing: border-box;
449
+ -webkit-transition: all .3s ease;
450
+ transition: all .3s ease;
451
+ box-shadow: inset 0 0 0 0 transparent;
452
+ }
453
+ .wcap-enable-atc-modal:focus {
454
+ outline: none;
455
+ }
456
+ .wcap-enable-atc-modal:before {
457
+ border-radius: 50%;
458
+ background: #ffffff;
459
+ content: '';
460
+ position: absolute;
461
+ display: block;
462
+ width: 18px;
463
+ height: 18px;
464
+ top: 2px;
465
+ left: 2px;
466
+ -webkit-transition: all .15s ease;
467
+ transition: all .15s ease;
468
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
469
+ }
470
+ .wcap-enable-atc-modal[wcap-atc-switch-modal-enable="on"] {
471
+ box-shadow: inset 0 0 0 11px #008000;
472
+ }
473
+ .wcap-enable-atc-modal[wcap-atc-switch-modal-enable="on"]:before {
474
+ -webkit-transform: translateX(16px);
475
+ transform: translateX(16px);
476
+ }
477
+ .wcap-enable-atc-modal[wcap-atc-switch-modal-enable="off"] {
478
+ background: #ccc;
479
+ }
480
+ .wcap-enable-atc-modal.wcap-loading {
481
+ cursor: default;
482
+ opacity: 0.5;
483
+ }
484
+
485
+ .wcap_non_mandatory_text_wrapper{
486
+ text-align: center;
487
+ }
488
+
489
+ .wcap_non_mandatory_text_wrapper a{
490
+ text-decoration:none;
491
+ }
492
+
493
+ /* To display the popup modal mandatory*/
494
+ .wcap-switch-atc-modal-mandatory {
495
+ cursor: pointer;
496
+ text-indent: -999em;
497
+ display: block;
498
+ width: 38px;
499
+ height: 22px;
500
+ border-radius: 30px;
501
+ border: none;
502
+ position: relative;
503
+ box-sizing: border-box;
504
+ -webkit-transition: all .3s ease;
505
+ transition: all .3s ease;
506
+ box-shadow: inset 0 0 0 0 transparent;
507
+ }
508
+ .wcap-switch-atc-modal-mandatory:focus {
509
+ outline: none;
510
+ }
511
+ .wcap-switch-atc-modal-mandatory:before {
512
+ border-radius: 50%;
513
+ background: #ffffff;
514
+ content: '';
515
+ position: absolute;
516
+ display: block;
517
+ width: 18px;
518
+ height: 18px;
519
+ top: 2px;
520
+ left: 2px;
521
+ -webkit-transition: all .15s ease;
522
+ transition: all .15s ease;
523
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
524
+ }
525
+ .wcap-switch-atc-modal-mandatory[
526
+ wcap-atc-switch-modal-mandatory="on"] {
527
+ box-shadow: inset 0 0 0 11px #008000;
528
+ }
529
+ .wcap-switch-atc-modal-mandatory[wcap-atc-switch-modal-mandatory="on"]:before {
530
+ -webkit-transform: translateX(16px);
531
+ transform: translateX(16px);
532
+ }
533
+ .wcap-switch-atc-modal-mandatory[wcap-atc-switch-modal-mandatory="off"] {
534
+ background: #ccc;
535
+ }
536
+ .wcap-switch-atc-modal-mandatory.wcap-loading {
537
+ cursor: default;
538
+ opacity: 0.5;
539
+ }
540
+
541
+ .wcap_atc_between_fields_space {
542
+ margin-top: 2%;
543
+ }
544
+
545
+ .wcap_reset_button {
546
+ margin-left: 5% !important;
547
+ }
assets/css/admin/wcap_add_to_cart_popup_modal.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wcap_popup_main_div{width:100%;height:100%}.wcap_popup_main_table{width:100%;height:100%}.wcap_popup_main_table_tr{width:100%;height:100%}.wcap_popup_main_table_td_settings{float:left;width:52%}.wcap_popup_main_table_td_preview{float:right;width:45%}.wcap_heading_section_table{width:100%}.wcap_heading_section_tr{width:100%}.wcap_heading_section_table_heading{float:left}.wcap_heading_section_text_field{float:left;width:52%}.wcap_heading_section_text_field_color{float:right;width:45%}.wcap_heading_section_text_email{width:95%;font-size:1em}.wcap_popup_heading_color_picker{width:40%;font-size:1em}.wcap_text_section_table{width:100%}.wcap_text_section_tr{width:100%}.wcap_text_section_table_heading{float:left}.wcap_text_section_text_field{float:left;width:52%}.wcap_text_section_field_color{float:right;width:45%}.wcap_text_section_input_text{width:95%;font-size:1em}.wcap_popup_text_color_picker{width:40%;font-size:1em}.wcap_email_placeholder_section_table{width:100%}.wcap_email_placeholder_section_tr{width:100%}.wcap_email_placeholder_section_table_heading{float:left}.wcap_email_placeholder_section_text_field{float:left;width:80%}.wcap_email_placeholder_section_input_text{width:95%;font-size:1em}.wcap_button_section_table{width:100%}.wcap_button_section_tr{width:100%}.wcap_button_section_table_heading{float:left}.wcap_button_section_text_field{float:left;width:95%}.wcap_button_section_input_text{width:80%;font-size:1em}.wcap_button_color_section_tr{width:100%}.wcap_button_color_section_text_field{float:left;width:49%}.wcap_button_text_color_section_text_field{float:right;width:49%;margin-left:5px}.wcap_button_color_picker{width:46%;font-size:1em}.wcap_button_text_color_picker{width:46%;font-size:1em}.wcap_non_mandatory_modal_section_fields_div_table{width:100%}.wcap_non_mandatory_modal_section_fields_tr{width:100%}.wcap_non_mandatory_modal_section_fields_table_heading{float:left}.wcap_non_mandatory_modal_section_fields_text_field{float:left;width:95%}.wcap_non_mandatory_modal_section_fields_input_text{width:80%;font-size:1em}.wcap_container{position:relative;top:0;bottom:0;right:0;left:0;background-color:rgba(0,0,0,.7);overflow:auto;padding:0 10px;background-color:transparent}.wcap_popup_close{position:absolute;top:5px;right:5px;cursor:pointer;color:#bbb;z-index:100;padding:9px;background-size:18px;background-position:center;background-image:url(../../images/atc_cancel_icon.svg);background-repeat:no-repeat}.wcap_container .wcap_popup_heading_container{position:relative;background:#f8f9fb;border-bottom:1px solid #dedede;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-ms-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;padding-top:18px;padding-bottom:16px;text-align:center}.wcap_container .wcap_popup_content{position:relative;z-index:2;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px}.wcap_container .wcap_popup_content>*{padding-left:18px;padding-right:18px}.wcap_container .wcap_popup_icon{background-image:url(../../images/atc_popup_icon.svg);background-repeat:no-repeat;display:block;background-size:65px;background-position:center;background-color:#fff;background-repeat:no-repeat;border:2px solid #ecedf3;border-radius:50%;margin:0 auto;margin-right:5px;margin-left:2px;position:relative;height:98px;width:98px}.wcap_container .wcap_popup_heading{padding-top:10px;margin:0;font-family:"Lato",sans-serif!important;font-size:37px;font-weight:700;line-height:36px;color:#737f97;text-align:center;display:block;text-transform:initial}.wcap_container .wcap_popup_text{color:#bbc9d2;font-size:16px;line-height:20px;font-family:"Lato",sans-serif!important;text-align:center;text-transform:initial}.wcap_container .wcap_popup_form{position:relative;text-align:left;font-family:inherit;padding-top:26px;padding-bottom:15px;background-color:#FFFFFF!important}.wcap_container div{display:block}.wcap_container .wcap_popup_form:after{content:'';display:block;position:absolute;left:50%;top:-1px;width:0;height:0;margin-left:-16px}.wcap_container .wcap_popup_form:before{content:'';display:block;position:absolute;left:50%;top:-1px;width:0;height:0;margin-left:-16px}.wcap_container .wcap_popup_form:before{left:50%;margin-left:-17px;border-left:17px solid transparent;border-right:17px solid transparent;border-top:17px solid #dedede}.wcap_container .wcap_popup_form:after{border-left:16px solid transparent;border-right:16px solid transparent;border-top:16px solid #f8f9fb}.wcap_container .wcap_popup_input_field_container{position:relative}.wcap_container input[type="text"].wcap_popup_input{-webkit-appearance:none;background:#fff!important;border-width:1px!important;border-style:solid!important;border-color:#ccc;color:rgba(0,0,0,.75)!important;display:block;font-family:"Lato",sans-serif!important;font-size:18px!important;font-style:normal;line-height:20px!important;margin:0 0 16px 0;padding:8px;height:42px;width:100%;max-width:none!important;margin-bottom:10px;outline:none!important;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px}.wcap_container .wcap_popup_button{position:relative;cursor:pointer;font-family:"Lato",sans-serif!important;font-size:20px;font-weight:400;line-height:20px;text-decoration:none;text-align:center;text-shadow:none;text-transform:initial;width:auto;height:auto;min-width:initial;outline:0;display:inline-block;background-color:#228fff;border-top:none!important;border-left:none!important;border-right:none!important;border-bottom:none!important;color:#fff;width:100%;margin:0;padding:10px 0;font-weight:700;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px}.wcap_container .wcap_popup_wrapper{position:relative;top:50%;-webkit-backface-visibility:hidden;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px}.wcap_popup_wrapper{border:1px solid #EBEBEC}.wcap_container .wcap_popup_plus_sign{background-image:url(../../images/atc_plus_icon.png);background-repeat:no-repeat;background-color:#228fff;background-repeat:no-repeat;background-position:center;background-size:16px;border-radius:50%;height:24px;left:74px;top:-3px;position:absolute;width:24px}@media (min-width:530px){.wcap_container .wcap_popup_icon_container{position:relative;padding-right:6px;display:table-cell;vertical-align:middle;width:105px}.wcap_container .wcap_popup_text_container{display:table-cell;vertical-align:top}.wcap_popup_main_table_td_preview{margin-top:5%;position:-webkit-sticky;position:sticky;top:0;padding-top:75px}.wcap_container .wcap_popup_text{text-align:left}}.iris-picker{z-index:100;display:none;position:absolute!important;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.2)}.colorpickpreview{padding:3px;padding-left:20px;border:1px solid #ddd;border-right:0;margin-left:-3px}.wcap-enable-atc-modal{cursor:pointer;text-indent:-999em;display:block;width:38px;height:22px;border-radius:30px;border:none;position:relative;box-sizing:border-box;-webkit-transition:all .3s ease;transition:all .3s ease;box-shadow:inset 0 0 0 0 transparent}.wcap-enable-atc-modal:focus{outline:none}.wcap-enable-atc-modal:before{border-radius:50%;background:#fff;content:'';position:absolute;display:block;width:18px;height:18px;top:2px;left:2px;-webkit-transition:all .15s ease;transition:all .15s ease;box-shadow:0 1px 3px rgba(0,0,0,.3)}.wcap-enable-atc-modal[wcap-atc-switch-modal-enable="on"]{box-shadow:inset 0 0 0 11px green}.wcap-enable-atc-modal[wcap-atc-switch-modal-enable="on"]:before{-webkit-transform:translateX(16px);transform:translateX(16px)}.wcap-enable-atc-modal[wcap-atc-switch-modal-enable="off"]{background:#ccc}.wcap-enable-atc-modal.wcap-loading{cursor:default;opacity:.5}.wcap_non_mandatory_text_wrapper{text-align:center}.wcap_non_mandatory_text_wrapper a{text-decoration:none}.wcap-switch-atc-modal-mandatory{cursor:pointer;text-indent:-999em;display:block;width:38px;height:22px;border-radius:30px;border:none;position:relative;box-sizing:border-box;-webkit-transition:all .3s ease;transition:all .3s ease;box-shadow:inset 0 0 0 0 transparent}.wcap-switch-atc-modal-mandatory:focus{outline:none}.wcap-switch-atc-modal-mandatory:before{border-radius:50%;background:#fff;content:'';position:absolute;display:block;width:18px;height:18px;top:2px;left:2px;-webkit-transition:all .15s ease;transition:all .15s ease;box-shadow:0 1px 3px rgba(0,0,0,.3)}.wcap-switch-atc-modal-mandatory[wcap-atc-switch-modal-mandatory="on"]{box-shadow:inset 0 0 0 11px green}.wcap-switch-atc-modal-mandatory[wcap-atc-switch-modal-mandatory="on"]:before{-webkit-transform:translateX(16px);transform:translateX(16px)}.wcap-switch-atc-modal-mandatory[wcap-atc-switch-modal-mandatory="off"]{background:#ccc}.wcap-switch-atc-modal-mandatory.wcap-loading{cursor:default;opacity:.5}.wcap_atc_between_fields_space{margin-top:2%}.wcap_reset_button{margin-left:5%!important}
assets/css/admin/wcap_preview_modal.css ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wcap-preview-modal {
2
+ /*display: none; /* Hidden by default */
3
+ position: fixed; /* Stay in place */
4
+ z-index: 160000; /* Sit on top */
5
+ padding-top: 30px; /* Location of the box */
6
+ left: 0;
7
+ top: 0;
8
+ width: 100%; /* Full width */
9
+ height: 100%; /* Full height */
10
+ overflow: auto; /* Enable scroll if needed */
11
+ background-color: rgb(0,0,0);
12
+ background-color: rgba(0,0,0,0.4);
13
+ font: inherit!important;
14
+ }
15
+
16
+ /* Modal Content */
17
+ .wcap-preview-contents {
18
+ position: relative;
19
+ background-color: #fff;
20
+ margin: auto;
21
+ margin-bottom: 40px;
22
+ padding: 0;
23
+ border: 1px solid #888;
24
+ width: 95%;
25
+ box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
26
+ -webkit-animation-name: animatetop;
27
+ -webkit-animation-duration: 0.4s;
28
+ animation-name: animatetop;
29
+ animation-duration: 0.4s;
30
+ border-radius: 10px;
31
+ text-align: left;
32
+ }
33
+
34
+ /* Add Animation */
35
+ @-webkit-keyframes animatetop {
36
+ from {top:-300px; opacity:0}
37
+ to {top:0; opacity:1}
38
+ }
39
+
40
+ @keyframes animatetop {
41
+ from {top:-300px; opacity:0}
42
+ to {top:0; opacity:1}
43
+ }
44
+
45
+ /* Modal Header Section */
46
+ .wcap-preview-header {
47
+ padding: 4px;
48
+ /*background-color: #5cb85c;
49
+ color: white;*/
50
+ border-bottom: 1px solid #ccc;
51
+ }
52
+
53
+ .wcap-preview-header-title {
54
+ width: 90%;
55
+ float: left;
56
+ text-align: center;
57
+ }
58
+
59
+ .wcap-preview-header-title h1 {
60
+ padding-left: 20px;
61
+ }
62
+
63
+ /* The Close Button */
64
+ .wcap-preview-header-close {
65
+ text-align: center;
66
+ cursor: pointer;
67
+ width: 10%;
68
+ float: right;
69
+ }
70
+
71
+ .wcap-preview-header-close::before {
72
+ font-size: 23px;
73
+ font-family: dashicons;
74
+ line-height: 53px;
75
+ speak: none;
76
+ -webkit-font-smoothing: antialiased;
77
+ content: "\f335";
78
+ }
79
+
80
+ .wcap-preview-header-close:hover,
81
+ .wcap-preview-header-close:focus {
82
+ color: #888;
83
+ text-decoration: none;
84
+ cursor: pointer;
85
+ }
86
+
87
+ /*.modal-body {padding: 2px 16px;}*/
88
+
89
+ .modal-footer {
90
+ padding: 15px;
91
+ /*background-color: #5cb85c;
92
+ color: white;*/
93
+ text-align: right;
94
+ }
95
+
96
+ .bkap_modal_button_class {
97
+ margin: 5px 10px;
98
+ }
99
+
100
+ .bkap_modal_price {
101
+ padding: 1em;
102
+ }
103
+
104
+ .bkap_save {
105
+ position: absolute;
106
+ width: 100%;
107
+ height: 100%;
108
+ background: url('../images/reschedule-save.gif') no-repeat center center;
109
+ z-index: 9;
110
+ display: none;
111
+ }
112
+
113
+ @media (max-width: 600px) {
114
+ .wcap-preview-contents {
115
+ width: 100%;
116
+ }
117
+ }
118
+
119
+ @media (min-width: 601px) and (max-width: 767px) {
120
+ .wcap-preview-contents {
121
+ width: 100%;
122
+ }
123
+ }
124
+
125
+ /*************************************************************/
126
+
127
+ .wcap-thumbnail-menu {
128
+ width: 200px;
129
+ /*z-index: 150;
130
+ position: absolute;*/
131
+ left: 0;
132
+ bottom: 0;
133
+ margin: 0;
134
+ padding: 10px 0;
135
+ border-right-width: 1px;
136
+ border-right-style: solid;
137
+ border-right-color: #ccc;
138
+ user-select: none;
139
+ top: 0;
140
+ background: #f3f3f3;
141
+ right: 0;
142
+ padding: 10px;
143
+ float: left;
144
+ }
145
+
146
+ .wcap-thumbnails {
147
+ /*border: 1px solid black;*/
148
+ background: #f3f3f3;
149
+ }
150
+
151
+ .wcap-image-label {
152
+ width: 100%;
153
+ /*height: 500px;
154
+ max-height:500px;*/
155
+ overflow:hidden;
156
+ }
157
+
158
+ .wcap-image-label .wcap-image {
159
+ max-width: 100%;
160
+ max-height: 100%;
161
+ }
162
+
163
+ .wcap-image-label .wcap-preview-btn {
164
+ position: absolute;
165
+ top: 10%;
166
+ left: 10%;
167
+ /*transform: translate(-50%, -50%);
168
+ -ms-transform: translate(-50%, -50%);*/
169
+ background-color: #555;
170
+ color: white;
171
+ /*font-size: 5px;*/
172
+ padding: 5px 5px;
173
+ border: none;
174
+ cursor: pointer;
175
+ border-radius: 5px;
176
+ text-align: center;
177
+ }
178
+
179
+ .wcap-preview-btn {
180
+ display: none;
181
+ }
182
+
183
+ .wcap-container:hover .wcap-preview-btn {
184
+ display: block;
185
+ background-color: black;
186
+ }
187
+
188
+ .wcap-radio {
189
+ position: absolute;
190
+ visibility: hidden;
191
+ }
192
+
193
+ label.wcap-image-label > input:checked + img.wcap-image{
194
+ padding: 2px;
195
+ border: 4px solid #f00;
196
+ }
includes/admin/wcap_add_cart_popup_modal.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * It will fetch the Add to cart data, generate and populate data in the modal.
4
+ * @author Tyche Softwares
5
+ * @package Abandoned-Cart-Pro-for-WooCommerce/Admin/Settings
6
+ * @since 6.0
7
+ */
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+ if ( ! class_exists( 'Wcap_Add_Cart_Popup_Modal' ) ) {
12
+
13
+ /**
14
+ * It will fetch the Add to cart data, generate and populate data in the modal.
15
+ * @since 6.0
16
+ */
17
+ class Wcap_Add_Cart_Popup_Modal {
18
+
19
+ /**
20
+ * This function will add the add to cart popup medal's settings.
21
+ * @since 6.0
22
+ */
23
+ public static function wcap_add_to_cart_popup_settings() {
24
+ $wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
25
+ $wcap_disabled_field = '';
26
+ if ( 'off' == $wcap_atc_enabled ) {
27
+ $wcap_disabled_field = 'disabled="disabled"';
28
+ }
29
+ ?>
30
+ <div id = "wcap_popup_main_div" class = "wcap_popup_main_div ">
31
+ <table id = "wcap_popup_main_table" class = "wcap_popup_main_table test_borders">
32
+ <tr id = "wcap_popup_main_table_tr" class = "wcap_popup_main_table_tr test_borders">
33
+ <td id = "wcap_popup_main_table_td_settings" class = "wcap_popup_main_table_td_settings test_borders">
34
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_enable_modal_section( $wcap_disabled_field ); ?>
35
+ <?php self::wcap_custom_pages_section( $wcap_disabled_field ); ?>
36
+ <div class = "wcap_atc_all_fields_container" >
37
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_heading_section( $wcap_disabled_field ); ?>
38
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_text_section( $wcap_disabled_field ); ?>
39
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_email_placeholder_section( $wcap_disabled_field ); ?>
40
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_button_section( $wcap_disabled_field ); ?>
41
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_mandatory_modal_section( $wcap_disabled_field ); ?>
42
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_non_mandatory_modal_section_field( $wcap_disabled_field ); ?>
43
+ </div>
44
+ </td>
45
+ <td id = "wcap_popup_main_table_td_preview" class = "wcap_popup_main_table_td_preview test_borders">
46
+ <div class = "wcap_atc_all_fields_container" >
47
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ); ?>
48
+ </div>
49
+ </td>
50
+ </tr>
51
+ <tr>
52
+ <td>
53
+ <div class = "wcap_atc_all_fields_container" >
54
+ <p class = "submit">
55
+ <input type = "submit" name = "submit" id = "submit" class = "button button-primary" value = "Save Changes" <?php echo $wcap_disabled_field; ?> >
56
+ <input type = "submit" name = "submit" id = "submit" class = "wcap_reset_button button button-primary" value = "Reset to default configuration" <?php echo $wcap_disabled_field; ?> >
57
+ </p>
58
+ </div>
59
+ </td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <?php
64
+ }
65
+
66
+ /**
67
+ * It will add the "Enable Add to cart popup modal" setting on the add to cart modal settings page.
68
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
69
+ * @since 6.0
70
+ */
71
+ public static function wcap_enable_modal_section( $wcap_disabled_field ){
72
+ ?>
73
+ <table class = "wcap_enable_atc wcap_atc_between_fields_space" id = "wcap_enable_atc" >
74
+ <th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> Enable Add to cart popup modal </th>
75
+ <tr>
76
+ <td>
77
+ <?php
78
+ $wcap_atc_enabled = get_option('wcap_atc_enable_modal');
79
+ $active_text = __( $wcap_atc_enabled, 'woocommerce-abandoned-cart' );
80
+ ?>
81
+ <button type = "button" class = "wcap-enable-atc-modal wcap-toggle-atc-modal-enable-status" wcap-atc-switch-modal-enable = 'off' ?> readonly>
82
+ <?php echo $active_text; ?>
83
+ </button>
84
+ </td>
85
+ </tr>
86
+ </table>
87
+ <?php
88
+ }
89
+
90
+ /**
91
+ * Adds a multi select searchable dropdown from where
92
+ * the admin can select custom pages on which the
93
+ * Add to Cart Popup modal should be displayed.
94
+ *
95
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
96
+ * @since 7.10.0
97
+ */
98
+ public static function wcap_custom_pages_section( $wcap_disabled_field ) {
99
+ global $woocommerce;
100
+ $post_title_array = array();
101
+ ?>
102
+ <table class = "wcap_custom_pages wcap_atc_between_fields_space" id = "wcap_custom_pages" >
103
+ <tr>
104
+ <th id="wcap_button_section_table_heading" class="wcap_button_section_table_heading"> <?php _e( 'Custom pages to display the pop-up modal on', 'woocommerce-abandoned-cart' );?> </th>
105
+ </tr>
106
+ <tr>
107
+ <td>
108
+ <?php
109
+ $custom_pages = get_option('wcap_custom_pages_list');
110
+ ?>
111
+ <?php if ( $woocommerce->version >= '3.0' ) { ?>
112
+ <select style="width:80%" multiple="multiple" class="wcap_page_select wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr__( 'Search for a Page&hellip;', 'woocommerce-abandoned-cart' )?>' data-action='wcap_json_find_pages' disabled>
113
+
114
+ <?php
115
+ if( is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
116
+ foreach( $custom_pages as $page_ids ) {
117
+ $post_id = $page_ids;
118
+ $post_title = get_the_title( $post_id );
119
+
120
+ printf( "<option value='%s' selected>%s</option>\n", $post_id, $post_title );
121
+ }
122
+ }
123
+ ?>
124
+ </select>
125
+ <?php } else {
126
+ if( is_array( $post_title_array ) && is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
127
+ foreach( $custom_pages as $page_ids ) {
128
+ $post_id = $page_ids;
129
+ $post_title = get_the_title( $post_id );
130
+ $post_title_array[$post_title] = $post_title;
131
+
132
+ }
133
+ }
134
+ ?>
135
+
136
+ <input type="hidden" style="width:80%" id = "wcap_page_select" class="wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr_e( 'Search for a Page&hellip;', 'woocommerce-abandoned-cart' )?>' data-multiple="true" data-action='wcap_json_find_pages' data-selected=" <?php echo esc_attr( json_encode( $post_title_array ) ); ?>" value="<?php echo implode( ',', array_keys( $post_title_array ) ); ?>" readonly/>
137
+
138
+ <?php } ?>
139
+
140
+ <?php $toolTip = __( 'Please add any custom pages (not created by WooCommerce) where you wish to display the Add to cart Pop-up Modal.', 'woocommerce-abandoned-cart' ); ?>
141
+ <?php echo wc_help_tip( $toolTip ); ?>
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <td colspan="2" style="text-align: justify;">
146
+ <?php _e( "<b>Note:</b> Please ensure that the Add to Cart button links on these pages are added with the correct classes and attributes to ensure the plugin can capture the cart data correctly. For further guidance, please check the documentation.", 'woocommerce-abandoned-cart' );?>
147
+ </td>
148
+ </tr>
149
+ </table>
150
+ <?php
151
+ }
152
+ /**
153
+ * It will Save the setting on the add to cart modal settings page.
154
+ * @since 6.0
155
+ */
156
+ public static function wcap_add_to_cart_popup_save_settings() {
157
+ if ( $_POST ['wcap_heading_section_text_email'] ) {
158
+ update_option ( 'wcap_heading_section_text_email', $_POST ['wcap_heading_section_text_email'] );
159
+ }
160
+ if ( $_POST ['wcap_popup_heading_color_picker'] ) {
161
+ update_option ( 'wcap_popup_heading_color_picker', $_POST ['wcap_popup_heading_color_picker'] );
162
+ }
163
+ if ( $_POST ['wcap_text_section_text'] ) {
164
+ update_option ( 'wcap_text_section_text', $_POST ['wcap_text_section_text'] );
165
+ }
166
+ if ( $_POST ['wcap_popup_text_color_picker'] ) {
167
+ update_option ( 'wcap_popup_text_color_picker', $_POST ['wcap_popup_text_color_picker'] );
168
+ }
169
+ if ( $_POST ['wcap_email_placeholder_section_input_text'] ) {
170
+ update_option ( 'wcap_email_placeholder_section_input_text', $_POST ['wcap_email_placeholder_section_input_text'] );
171
+ }
172
+ if ( $_POST ['wcap_button_section_input_text'] ) {
173
+ update_option ( 'wcap_button_section_input_text', $_POST ['wcap_button_section_input_text'] );
174
+ }
175
+ if ( $_POST ['wcap_button_color_picker'] ) {
176
+ update_option ( 'wcap_button_color_picker', $_POST ['wcap_button_color_picker'] );
177
+ }
178
+ if ( isset( $_POST ['wcap_button_text_color_picker'] ) ){
179
+ update_option ( 'wcap_button_text_color_picker', $_POST ['wcap_button_text_color_picker'] );
180
+ }
181
+ if ( isset( $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] ) ) {
182
+ update_option( 'wcap_non_mandatory_text', $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] );
183
+ }
184
+
185
+ $custom_pages = isset( $_POST[ 'wcap_page_select' ] ) ? $_POST[ 'wcap_page_select' ] : array();
186
+ update_option( 'wcap_custom_pages_list', $custom_pages );
187
+
188
+ }
189
+
190
+ /**
191
+ * It will add the setting for Heading section on the add to cart modal settings page.
192
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
193
+ * @since 6.0
194
+ */
195
+ public static function wcap_add_heading_section( $wcap_disabled_field ) {
196
+ ?>
197
+ <div id = "wcap_heading_section_div" class = "wcap_heading_section_div wcap_atc_between_fields_space">
198
+ <table id = "wcap_heading_section_table" class = "wcap_heading_section_table">
199
+ <th id = "wcap_heading_section_table_heading" class ="wcap_heading_section_table_heading"> Modal Heading </th>
200
+ <tr id = "wcap_heading_section_tr" class = "wcap_heading_section_tr" >
201
+ <td id = "wcap_heading_section_text_field" class = "wcap_heading_section_text_field test_borders">
202
+ <input id = "wcap_heading_section_text_email" v-model = "wcap_heading_section_text_email" name = "wcap_heading_section_text_email"class = "wcap_heading_section_text_email"
203
+ <?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Please enter your email address', 'woocommerce-abandoned-cart' ); ?>">
204
+ </td>
205
+ <td id = "wcap_heading_section_text_field_color" class = "wcap_heading_section_text_field_color test_borders">
206
+ <?php $wcap_popup_heading_color_picker = get_option( 'wcap_popup_heading_color_picker' ); ?>
207
+ <span class = "colorpickpreview" style = "background:<?php echo $wcap_popup_heading_color_picker; ?>"></span>
208
+ <input class = "wcap_popup_heading_color_picker colorpick" name = "wcap_popup_heading_color_picker" value = "#737f97" v-model = "wcap_popup_heading_color" v-on:input = "wcap_atc_popup_heading.color = $event.target.value"
209
+ <?php echo $wcap_disabled_field; ?> readonly >
210
+ </td>
211
+ </tr>
212
+ </table>
213
+ </div>
214
+ <?php
215
+ }
216
+
217
+ /**
218
+ * It will add the setting for Text displayed below heading section on the add to cart modal settings page.
219
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
220
+ * @since 6.0
221
+ */
222
+ public static function wcap_add_text_section( $wcap_disabled_field ) {
223
+ ?>
224
+ <div id = "wcap_text_section_div" class = "wcap_text_section_div wcap_atc_between_fields_space">
225
+ <table id = "wcap_text_section_table" class = "wcap_text_section_table">
226
+ <th id = "wcap_text_section_table_heading" class = "wcap_text_section_table_heading"> Modal Text </th>
227
+ <tr id = "wcap_text_section_tr" class = "wcap_text_section_tr" >
228
+ <td id = "wcap_text_section_text_field" class = "wcap_text_section_text_field test_borders">
229
+ <input id = "wcap_text_section_text" v-model = "wcap_text_section_text_field" class="wcap_text_section_input_text" name = "wcap_text_section_text"
230
+ <?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'To add this item to your cart, please enter your email address.','woocommerce-abandoned-cart' ); ?>">
231
+ </td>
232
+ <td id = "wcap_text_section_field_color" class = "wcap_text_section_field_color test_borders">
233
+ <?php $wcap_atc_popup_text_color = get_option( 'wcap_popup_text_color_picker' ); ?>
234
+ <span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_popup_text_color; ?>"></span>
235
+ <input class = "wcap_popup_text_color_picker colorpick" name = "wcap_popup_text_color_picker" value = "#bbc9d2" v-model = "wcap_popup_text_color" v-on:input = "wcap_atc_popup_text.color = $event.target.value"
236
+ <?php echo $wcap_disabled_field; ?> readonly>
237
+ </td>
238
+ </tr>
239
+ </table>
240
+ </div>
241
+ <?php
242
+ }
243
+
244
+ /**
245
+ * It will add the setting for email placeholder on the add to cart modal settings page.
246
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
247
+ * @since 6.0
248
+ */
249
+ public static function wcap_email_placeholder_section( $wcap_disabled_field ) {
250
+ ?>
251
+ <div id = "wcap_email_placeholder_section_div" class = "wcap_email_placeholder_section_div wcap_atc_between_fields_space">
252
+ <table id = "wcap_email_placeholder_section_table" class = "wcap_email_placeholder_section_table">
253
+ <th id = "wcap_email_placeholder_section_table_heading" class = "wcap_email_placeholder_section_table_heading"> Email placeholder </th>
254
+ <tr id = "wcap_email_placeholder_section_tr" class = "wcap_email_placeholder_section_tr" >
255
+ <td id = "wcap_email_placeholder_section_text_field" class = "wcap_email_placeholder_section_text_field test_borders">
256
+ <input id = "wcap_email_placeholder_section_input_text" v-model = "wcap_email_placeholder_section_input_text" class="wcap_email_placeholder_section_input_text" name = "wcap_email_placeholder_section_input_text"
257
+ <?php echo $wcap_disabled_field; ?> readonly value="<?php _e('Email address', 'woocommerce-abandoned-cart' ); ?>">
258
+ </td>
259
+ </tr>
260
+ </table>
261
+ </div>
262
+ <?php
263
+ }
264
+
265
+ /**
266
+ * It will add the setting for Add to cart button on the add to cart modal settings page.
267
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
268
+ * @since 6.0
269
+ */
270
+ public static function wcap_button_section( $wcap_disabled_field ) {
271
+ ?>
272
+ <div id = "wcap_button_section_div" class = "wcap_button_section_div wcap_atc_between_fields_space">
273
+ <table id = "wcap_button_section_table" class = "wcap_button_section_table">
274
+ <th id = "wcap_button_section_table_heading" class="wcap_button_section_table_heading"> Add to cart button text </th>
275
+ <tr>
276
+ <td id = "wcap_button_section_text_field" class = "wcap_button_section_text_field test_borders">
277
+ <input id = "wcap_button_section_input_text" v-model = "wcap_button_section_input_text" class="wcap_button_section_input_text" name = "wcap_button_section_input_text"
278
+ <?php echo $wcap_disabled_field ; ?> readonly value="<?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?>">
279
+ </td>
280
+ </tr>
281
+ <tr id = "wcap_button_color_section_tr" class = "wcap_button_color_section_tr">
282
+ <td id = "wcap_button_color_section_text_field" class = "wcap_button_color_section_text_field test_borders">
283
+ <?php $wcap_atc_button_bg_color = get_option( 'wcap_button_color_picker' ); ?>
284
+ <span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_button_bg_color; ?>"></span>
285
+ <input id = "wcap_button_color_picker" value = "#0085ba" v-model ="wcap_button_bg_color" v-on:input="wcap_atc_button.backgroundColor = $event.target.value" class="wcap_button_color_picker colorpick" name = "wcap_button_color_picker"
286
+ <?php echo $wcap_disabled_field; ?> readonly >
287
+ </td>
288
+ <td id = "wcap_button_text_color_section_text_field" class = "wcap_button_text_color_section_text_field test_borders">
289
+ <?php $wcap_button_text_color_picker = get_option('wcap_button_text_color_picker'); ?>
290
+ <span class = "colorpickpreview" style = "background:<?php echo $wcap_button_text_color_picker; ?>"></span>
291
+ <input id = "wcap_button_text_color_picker" value = "#ffffff" v-model = "wcap_button_text_color" v-on:input = "wcap_atc_button.color = $event.target.value" class="wcap_button_text_color_picker colorpick" name = "wcap_button_text_color_picker"
292
+ <?php echo $wcap_disabled_field; ?> readonly>
293
+ </td>
294
+ </tr>
295
+ </table>
296
+ </div>
297
+ <?php
298
+ }
299
+
300
+ /**
301
+ * It will add the setting for Email address mandatory field on the add to cart modal settings page.
302
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
303
+ * @since 6.0
304
+ */
305
+ public static function wcap_mandatory_modal_section( $wcap_disabled_field ) {
306
+ ?>
307
+ <table class = "wcap_atc_between_fields_space">
308
+ <th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> Email address is mandatory ? </th>
309
+ <tr>
310
+ <td>
311
+ <?php
312
+ $wcap_atc_email_mandatory = get_option( 'wcap_atc_mandatory_email' );
313
+ $active_text = __( $wcap_atc_email_mandatory, 'woocommerce-abandoned-cart' );
314
+ ?>
315
+ <button type = "button" class = "wcap-switch-atc-modal-mandatory wcap-toggle-atc-modal-mandatory" wcap-atc-switch-modal-mandatory = <?php echo $wcap_atc_email_mandatory; ?>
316
+ <?php echo $wcap_disabled_field; ?> readonly >
317
+ <?php echo $active_text; ?> </button>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+ <?php
322
+ }
323
+
324
+ /**
325
+ * It will add the setting for Email address non mandatory field on the add to cart modal settings page.
326
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
327
+ * @since 6.0
328
+ */
329
+ public static function wcap_non_mandatory_modal_section_field( $wcap_disabled_field ) {
330
+ $wcap_get_mandatory_field = get_option( 'wcap_atc_mandatory_email' );
331
+ $wcap_disabled_email_field = '';
332
+ if ( 'on' == $wcap_get_mandatory_field ) {
333
+ $wcap_disabled_email_field = 'disabled="disabled"';
334
+ }
335
+ ?>
336
+ <div id = "wcap_non_mandatory_modal_section_fields_div" class = "wcap_non_mandatory_modal_section_fields_div wcap_atc_between_fields_space">
337
+ <table id = "wcap_non_mandatory_modal_section_fields_div_table" class = "wcap_non_mandatory_modal_section_fields_div_table">
338
+ <th id = "wcap_non_mandatory_modal_section_fields_table_heading"
339
+ class="wcap_non_mandatory_modal_section_fields_table_heading"> Not mandatory text </th>
340
+ <tr id = "wcap_non_mandatory_modal_section_fields_tr" class = "wcap_non_mandatory_modal_section_fields_tr" >
341
+ <td id = "wcap_non_mandatory_modal_section_fields_text_field" class = "wcap_non_mandatory_modal_section_fields_text_field test_borders">
342
+ <input id = "wcap_non_mandatory_modal_section_fields_input_text" v-model = "wcap_non_mandatory_modal_input_text" class = "wcap_non_mandatory_modal_section_fields_input_text" name = "wcap_non_mandatory_modal_section_fields_input_text" readonly value="<?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?>"
343
+ <?php echo $wcap_disabled_field;
344
+ echo $wcap_disabled_email_field;
345
+ ?> >
346
+ </td>
347
+ </tr>
348
+ </table>
349
+ </div>
350
+ <?php
351
+ }
352
+
353
+ /**
354
+ * It will will show th preview of the Add To cart Popup modal with the changes made on any of the settings for it.
355
+ * @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
356
+ * @since 6.0
357
+ */
358
+ public static function wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ) {
359
+
360
+ ?>
361
+ <div class = "wcap_container">
362
+ <div class = "wcap_popup_wrapper">
363
+ <div class = "wcap_popup_content">
364
+ <div class = "wcap_popup_heading_container">
365
+ <div class = "wcap_popup_icon_container" >
366
+ <span class = "wcap_popup_icon" >
367
+ <span class = "wcap_popup_plus_sign" v-bind:style = "wcap_atc_button">
368
+ </span>
369
+ </span>
370
+ </div>
371
+ <div class = "wcap_popup_text_container">
372
+ <h2 class = "wcap_popup_heading" v-bind:style = "wcap_atc_popup_heading" ><?php _e( 'Please enter your email address.', 'woocommerce-abandoned-cart' ); ?></h2>
373
+ <div class = "wcap_popup_text" v-bind:style = "wcap_atc_popup_text" ><?php _e( 'To add this item to your cart, please enter your email address.', 'woocommerce-abandoned-cart' ); ?></div>
374
+ </div>
375
+ </div>
376
+ <div class = "wcap_popup_form">
377
+ <form action = "" name = "wcap_modal_form">
378
+ <div class = "wcap_popup_input_field_container" >
379
+ <input class = "wcap_popup_input" type = "text" value = "" name = "email" placeholder ="<?php _e( 'Email address', 'woocommerce-abandoned-cart' ); ?>"
380
+ <?php echo $wcap_disabled_field; ?> readonly >
381
+ </div>
382
+ <button class = "wcap_popup_button" v-bind:style = "wcap_atc_button"
383
+ <?php echo $wcap_disabled_field ; ?> ><?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?></button>
384
+ <br>
385
+ <br>
386
+ <div id = "wcap_non_mandatory_text_wrapper" class = "wcap_non_mandatory_text_wrapper">
387
+ <a class = "wcap_popup_non_mandatory_button" href = "" > <?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?></a>
388
+ </div>
389
+ </form>
390
+ </div>
391
+ <div class = "wcap_popup_close" ></div>
392
+ </div>
393
+ </div>
394
+ </div>
395
+ <?php
396
+ }
397
+ }
398
+ }
includes/admin/wcap_pro_settings.php ADDED
@@ -0,0 +1,955 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+
5
+ * Display all the settings in PRO
6
+
7
+ *
8
+
9
+ * @since 2.4
10
+
11
+ */
12
+
13
+ // Exit if accessed directly
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) exit;
16
+
17
+
18
+
19
+ if ( ! class_exists('WCAP_Pro_Settings' ) ) {
20
+
21
+
22
+
23
+ class WCAP_Pro_Settings {
24
+
25
+
26
+
27
+ /**
28
+
29
+ * Construct
30
+
31
+ * @since 2.4
32
+
33
+ */
34
+
35
+ public function __construct() {
36
+
37
+
38
+
39
+ add_action( 'admin_init', array( &$this, 'wcal_pro_settings' ) );
40
+
41
+ add_action( 'wcal_add_new_settings', array(&$this, 'wcap_pro_general_settings' ) );
42
+
43
+ }
44
+
45
+
46
+
47
+ static function wcap_atc_settings() {
48
+
49
+
50
+
51
+ wp_enqueue_style( 'wcap_modal_preview', WCAL_PLUGIN_URL . '/assets/css/admin/wcap_preview_modal.css' );
52
+
53
+ wp_enqueue_style( 'wcap_add_to_cart_popup_modal', WCAL_PLUGIN_URL . '/assets/css/admin/wcap_add_to_cart_popup_modal.min.css' );
54
+
55
+
56
+ $purchase_link = 'https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/';
57
+
58
+ ?>
59
+
60
+ <form method="post" action="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_atc_settings">
61
+
62
+ <p style="font-size:15px;">
63
+
64
+ <b><i><?php _e( "Upgrade to <a href='$purchase_link' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature.", 'woocommerce-abandoned-cart' ); ?></i></b>
65
+
66
+ </p>
67
+
68
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_to_cart_popup_settings(); ?>
69
+
70
+ </form>
71
+
72
+ <?php
73
+
74
+ }
75
+
76
+
77
+
78
+ static function wcap_fb_settings() {
79
+
80
+ ?>
81
+
82
+ <form method="post" action="options.php">
83
+
84
+ <?php
85
+
86
+ //settings_errors();
87
+
88
+ settings_fields( 'woocommerce_fb_settings' );
89
+
90
+ do_settings_sections( 'woocommerce_ac_fb_page' );
91
+
92
+ submit_button();
93
+
94
+ ?>
95
+
96
+ </form>
97
+
98
+ <?php
99
+
100
+ }
101
+
102
+
103
+
104
+ static function wcap_pro_general_settings() {
105
+
106
+
107
+
108
+ $upgrade_pro_msg = '<br><b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable the setting.</i></b>';
109
+
110
+
111
+
112
+ add_settings_field(
113
+
114
+ 'ac_enable_cart_emails',
115
+
116
+ __( 'Enable abandoned cart emails', 'woocommerce-abandoned-cart' ),
117
+
118
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_cart_emails_callback' ),
119
+
120
+ 'woocommerce_ac_page',
121
+
122
+ 'ac_lite_general_settings_section',
123
+
124
+ array( __( "Yes, enable the abandoned cart emails.$upgrade_pro_msg", 'woocommerce-abandoned-cart' ) )
125
+
126
+ );
127
+
128
+ add_settings_field(
129
+
130
+ 'ac_cart_abandoned_time_guest',
131
+
132
+ __( 'Cart abandoned cut-off time for guest users', 'woocommerce-abandoned-cart' ),
133
+
134
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cart_abandoned_time_guest_callback' ),
135
+
136
+ 'woocommerce_ac_page',
137
+
138
+ 'ac_lite_general_settings_section',
139
+
140
+ array( __( "For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed.$upgrade_pro_msg", 'woocommerce-abandoned-cart' ) )
141
+
142
+ );
143
+
144
+
145
+
146
+ add_settings_field(
147
+
148
+ 'ac_disable_guest_cart_email',
149
+
150
+ __( 'Do not track carts of guest users', 'woocommerce-abandoned-cart' ),
151
+
152
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_guest_cart_email_callback' ),
153
+
154
+ 'woocommerce_ac_page',
155
+
156
+ 'ac_lite_general_settings_section',
157
+
158
+ array( __( "Abandoned carts of guest users will not be tracked.$upgrade_pro_msg", 'woocommerce-abandoned-cart' ) )
159
+
160
+ );
161
+
162
+
163
+
164
+ add_settings_field(
165
+
166
+ 'ac_disable_logged_in_cart_email',
167
+
168
+ __( 'Do not track carts of logged-in users', 'woocommerce-abandoned-cart' ),
169
+
170
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_logged_in_cart_email_callback' ),
171
+
172
+ 'woocommerce_ac_page',
173
+
174
+ 'ac_lite_general_settings_section',
175
+
176
+ array( __( "Abandoned carts of logged-in users will not be tracked.$upgrade_pro_msg", 'woocommerce-abandoned-cart' ) )
177
+
178
+ );
179
+
180
+
181
+
182
+ add_settings_field(
183
+
184
+ 'ac_capture_email_address_from_url',
185
+
186
+ __( 'Capture Email address from URL', 'woocommerce-abandoned-cart' ),
187
+
188
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_capture_email_address_from_url' ),
189
+
190
+ 'woocommerce_ac_page',
191
+
192
+ 'ac_lite_general_settings_section',
193
+
194
+ array( __( "If your site URL contain the same key, then it will capture it as an email address of customer.$upgrade_pro_msg", 'woocommerce-abandoned-cart' ) )
195
+
196
+ );
197
+
198
+
199
+
200
+ register_setting(
201
+
202
+ 'woocommerce_ac_settings',
203
+
204
+ 'ac_enable_cart_emails'
205
+
206
+ );
207
+
208
+
209
+
210
+ register_setting(
211
+
212
+ 'woocommerce_ac_settings',
213
+
214
+ 'ac_cart_abandoned_time_guest'
215
+
216
+ );
217
+
218
+
219
+
220
+ register_setting(
221
+
222
+ 'woocommerce_ac_settings',
223
+
224
+ 'ac_disable_guest_cart_email'
225
+
226
+ );
227
+
228
+ register_setting(
229
+
230
+ 'woocommerce_ac_settings',
231
+
232
+ 'ac_disable_logged_in_cart_email'
233
+
234
+ );
235
+
236
+
237
+
238
+ register_setting(
239
+
240
+ 'woocommerce_ac_settings',
241
+
242
+ 'ac_capture_email_address_from_url'
243
+
244
+ );
245
+
246
+
247
+
248
+ add_settings_field(
249
+
250
+ 'wcap_product_image_size',
251
+
252
+ __( 'Product Image( H x W )', 'woocommerce-abandoned-cart' ),
253
+
254
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_product_image_size_callback' ),
255
+
256
+ 'woocommerce_ac_email_page',
257
+
258
+ 'ac_email_settings_section',
259
+
260
+ array( "This setting affects the dimension of the product image in the abandoned cart reminder email.$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
261
+
262
+ );
263
+
264
+
265
+
266
+ register_setting(
267
+
268
+ 'ac_email_settings_section',
269
+
270
+ 'wcap_product_image_size'
271
+
272
+ );
273
+
274
+
275
+
276
+ add_settings_section(
277
+
278
+ 'ac_cron_job_settings_section', // ID used to identify this section and with which to register options
279
+
280
+ __( 'Setting for sending Emails & SMS using WP Cron', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page
281
+
282
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cron_job_callback' ),// Callback used to render the description of the section
283
+
284
+ 'woocommerce_ac_page' // Page on which to add this section of options
285
+
286
+ );
287
+
288
+
289
+
290
+ add_settings_field(
291
+
292
+ 'wcap_use_auto_cron',
293
+
294
+ __( 'Send Abandoned cart emails automatically using WP Cron', 'woocommerce-abandoned-cart' ),
295
+
296
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_use_auto_cron_callback' ),
297
+
298
+ 'woocommerce_ac_page',
299
+
300
+ 'ac_cron_job_settings_section',
301
+
302
+ array( "Enabling this setting will send the abandoned cart reminder emails to the customer after the set time. If disabled, abandoned cart reminder emails will not be sent using WP Cron. You will need to set cron job manually from cPanel. If you are unsure how to set the cron job, please <a href= mailto:support@tychesoftwares.com>contact us</a> for it.$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
303
+
304
+ );
305
+
306
+
307
+
308
+ add_settings_field(
309
+
310
+ 'wcap_cron_time_duration',
311
+
312
+ __( 'Run Automated WP Cron after X minutes', 'woocommerce-abandoned-cart' ),
313
+
314
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cron_time_duration_callback' ),
315
+
316
+ 'woocommerce_ac_page',
317
+
318
+ 'ac_cron_job_settings_section',
319
+
320
+ array( "The duration in minutes after which a WP Cron job will run automatically for sending the abandoned cart reminder emails & SMS to the customers.$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
321
+
322
+ );
323
+
324
+
325
+
326
+ add_settings_section(
327
+
328
+ 'ac_restrict_settings_section', // ID used to identify this section and with which to register options
329
+
330
+ __( 'Rules to exclude capturing abandoned carts', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page
331
+
332
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_custom_restrict_callback' ),// Callback used to render the description of the section
333
+
334
+ 'woocommerce_ac_page' // Page on which to add this section of options
335
+
336
+ );
337
+
338
+
339
+
340
+ add_settings_field(
341
+
342
+ 'wcap_restrict_ip_address',
343
+
344
+ __( 'Do not capture abandoned carts for these IP addresses', 'woocommerce-abandoned-cart' ),
345
+
346
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_ip_address_callback' ),
347
+
348
+ 'woocommerce_ac_page',
349
+
350
+ 'ac_restrict_settings_section',
351
+
352
+ array( "The carts abandoned from these IP addresses will not be tracked by the plugin. Accepts wildcards, e.g <code>192.168.*</code> will block all IP addresses which starts from \"192.168\". <i>Separate IP addresses with commas.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
353
+
354
+ );
355
+
356
+
357
+
358
+ add_settings_field(
359
+
360
+ 'wcap_restrict_email_address',
361
+
362
+ __( 'Do not capture abandoned carts for these email addresses', 'woocommerce-abandoned-cart' ),
363
+
364
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_email_address_callback' ),
365
+
366
+ 'woocommerce_ac_page',
367
+
368
+ 'ac_restrict_settings_section',
369
+
370
+ array( "The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
371
+
372
+ );
373
+
374
+
375
+
376
+ add_settings_field(
377
+
378
+ 'wcap_restrict_domain_address',
379
+
380
+ __( 'Do not capture abandoned carts for email addresses from these domains', 'woocommerce-abandoned-cart' ),
381
+
382
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_domain_address_callback' ),
383
+
384
+ 'woocommerce_ac_page',
385
+
386
+ 'ac_restrict_settings_section',
387
+
388
+ array( "The carts abandoned from email addresses with these domains will not be tracked by the plugin. <i>Separate email address domains with commas.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
389
+
390
+ );
391
+
392
+
393
+
394
+
395
+
396
+ }
397
+
398
+ static function wcap_sms_settings() {
399
+ ?>
400
+
401
+ <form method="post" action="options.php">
402
+
403
+ <?php
404
+
405
+ settings_fields ( 'woocommerce_sms_settings' );
406
+
407
+ do_settings_sections( 'woocommerce_ac_sms_page' );
408
+
409
+ submit_button();
410
+
411
+ ?>
412
+
413
+ </form>
414
+
415
+ <div id="test_fields">
416
+
417
+ <h2><?php _e( 'Send Test SMS', 'woocommerce-abandoned-cart' ); ?></h2>
418
+
419
+ <div id="status_msg" style="background: white;border-left: #6389DA 4px solid;padding: 10px;display: none;width: 90%;"></div>
420
+
421
+ <table class="form-table">
422
+
423
+ <tr>
424
+
425
+ <th><?php _e( 'Recipient', 'woocommerce-abandoned-cart' ); ?></th>
426
+
427
+ <td>
428
+
429
+ <input id="test_number" name="test_number" type=text readonly />
430
+
431
+ <i><?php _e( 'Must be a valid phone number in E.164 format.', 'woocommerce-abandoned-cart' );?></i>
432
+
433
+ </td>
434
+
435
+ </tr>
436
+
437
+ <tr>
438
+
439
+ <th><?php _e( 'Message', 'woocommerce-abandoned-cart' );?></th>
440
+
441
+ <td><textarea id="test_msg" rows="4" cols="70" readonly ><?php _e( 'Hello World!', 'woocommerce-abandoned-cart' );?></textarea></td>
442
+
443
+ </tr>
444
+
445
+ <tr>
446
+
447
+ <td colspan="2"><input type="button" id="wcap_test_sms" class="button-primary" value="<?php _e( 'Send', 'wocommerce-ac' );?>" /></td>
448
+
449
+ </tr>
450
+
451
+ </table>
452
+
453
+ </div>
454
+
455
+ <?php
456
+
457
+ }
458
+
459
+
460
+
461
+ function wcal_pro_settings() {
462
+
463
+
464
+
465
+ $upgrade_pro_msg = '<br><b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable the setting.</i></b>';
466
+
467
+ /**
468
+
469
+ * New Settings for SMS Notifications
470
+
471
+ */
472
+
473
+ add_settings_section(
474
+
475
+ 'wcap_sms_settings_section', // ID used to identify this section and with which to register options
476
+
477
+ __( 'Twilio', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page
478
+
479
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_settings_section_callback' ), // Callback used to render the description of the section
480
+
481
+ 'woocommerce_ac_sms_page' // Page on which to add this section of options
482
+
483
+ );
484
+
485
+
486
+
487
+ add_settings_field(
488
+
489
+ 'wcap_enable_sms_reminders',
490
+
491
+ __( 'Enable SMS', 'woocommerce-abandoned-cart' ),
492
+
493
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_sms_reminders_callback' ),
494
+
495
+ 'woocommerce_ac_sms_page',
496
+
497
+ 'wcap_sms_settings_section',
498
+
499
+ array( "<i>Enable the ability to send reminder SMS for abandoned carts.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
500
+
501
+ );
502
+
503
+
504
+
505
+ add_settings_field(
506
+
507
+ 'wcap_sms_from_phone',
508
+
509
+ __( 'From', 'woocommerce-abandoned-cart' ),
510
+
511
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_from_phone_callback' ),
512
+
513
+ 'woocommerce_ac_sms_page',
514
+
515
+ 'wcap_sms_settings_section',
516
+
517
+ array( "<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart' )
518
+
519
+ );
520
+
521
+
522
+
523
+ add_settings_field(
524
+
525
+ 'wcap_sms_account_sid',
526
+
527
+ __( 'Account SID', 'woocommerce-abandoned-cart' ),
528
+
529
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_account_sid_callback' ),
530
+
531
+ 'woocommerce_ac_sms_page',
532
+
533
+ 'wcap_sms_settings_section',
534
+
535
+ array( "$upgrade_pro_msg" )
536
+
537
+ );
538
+
539
+
540
+
541
+ add_settings_field(
542
+
543
+ 'wcap_sms_auth_token',
544
+
545
+ __( 'Auth Token', 'woocommerce-abandoned-cart' ),
546
+
547
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_auth_token_callback' ),
548
+
549
+ 'woocommerce_ac_sms_page',
550
+
551
+ 'wcap_sms_settings_section',
552
+
553
+ array( "$upgrade_pro_msg" )
554
+
555
+ );
556
+
557
+
558
+
559
+
560
+
561
+ register_setting(
562
+
563
+ 'woocommerce_sms_settings',
564
+
565
+ 'wcap_enable_sms_reminders'
566
+
567
+ );
568
+
569
+
570
+
571
+ register_setting(
572
+
573
+ 'woocommerce_sms_settings',
574
+
575
+ 'wcap_sms_from_phone'
576
+
577
+ );
578
+
579
+
580
+
581
+ register_setting(
582
+
583
+ 'woocommerce_sms_settings',
584
+
585
+ 'wcap_sms_account_sid'
586
+
587
+ );
588
+
589
+
590
+
591
+ register_setting(
592
+
593
+ 'woocommerce_sms_settings',
594
+
595
+ 'wcap_sms_auth_token'
596
+
597
+ );
598
+
599
+
600
+
601
+ add_settings_section(
602
+
603
+ 'wcap_fb_settings_section',
604
+
605
+ __( 'Facebook Messenger Settings', 'woocommerce-abandoned-cart' ),
606
+
607
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_description' ),
608
+
609
+ 'woocommerce_ac_fb_page'
610
+
611
+ );
612
+
613
+
614
+
615
+ add_settings_field(
616
+
617
+ 'wcap_enable_fb_reminders',
618
+
619
+ __( 'Enable Facebook Messenger Reminders', 'woocommerce-abandoned-cart' ),
620
+
621
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
622
+
623
+ 'woocommerce_ac_fb_page',
624
+
625
+ 'wcap_fb_settings_section',
626
+
627
+ array( "<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_enable_fb_reminders' )
628
+
629
+ );
630
+
631
+
632
+
633
+ add_settings_field(
634
+
635
+ 'wcap_enable_fb_reminders_popup',
636
+
637
+ __( 'Facebook Messenger on Add to Cart Pop-up modal', 'woocommerce-abandoned-cart' ),
638
+
639
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
640
+
641
+ 'woocommerce_ac_fb_page',
642
+
643
+ 'wcap_fb_settings_section',
644
+
645
+ array( "<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_enable_fb_reminders_popup' )
646
+
647
+ );
648
+
649
+
650
+
651
+ add_settings_field(
652
+
653
+ 'wcap_fb_user_icon',
654
+
655
+ __( 'Icon size of user', 'woocommerce-abandoned-cart' ),
656
+
657
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_dropdown_callback' ),
658
+
659
+ 'woocommerce_ac_fb_page',
660
+
661
+ 'wcap_fb_settings_section',
662
+
663
+ array(
664
+
665
+ "<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>$upgrade_pro_msg",
666
+
667
+ 'woocommerce-abandoned-cart',
668
+
669
+ 'wcap_fb_user_icon',
670
+
671
+ array(
672
+
673
+ 'small' => __( 'Small', 'woocommerce-abandoned-cart' ),
674
+
675
+ 'medium' => __( 'Medium', 'woocommerce-abandoned-cart' ),
676
+
677
+ 'large' => __( 'Large', 'woocommerce-abandoned-cart' ),
678
+
679
+ 'standard' => __( 'Standard', 'woocommerce-abandoned-cart' ),
680
+
681
+ 'xlarge' => __( 'Extra Large', 'woocommerce-abandoned-cart' )
682
+
683
+ )
684
+
685
+ )
686
+
687
+ );
688
+
689
+
690
+
691
+ add_settings_field(
692
+
693
+ 'wcap_fb_consent_text',
694
+
695
+ __( 'Consent text', 'woocommerce-abandoned-cart' ),
696
+
697
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
698
+
699
+ 'woocommerce_ac_fb_page',
700
+
701
+ 'wcap_fb_settings_section',
702
+
703
+ array( "<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_fb_consent_text' )
704
+
705
+ );
706
+
707
+
708
+
709
+ add_settings_field(
710
+
711
+ 'wcap_fb_page_id',
712
+
713
+ __( 'Facebook Page ID', 'woocommerce-abandoned-cart' ),
714
+
715
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
716
+
717
+ 'woocommerce_ac_fb_page',
718
+
719
+ 'wcap_fb_settings_section',
720
+
721
+ array( "<i>Facebook Page ID in numberic format. You can find your page ID from <a href='https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger#fbpageid' target='_blank'>here</a></i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_fb_page_id' )
722
+
723
+ );
724
+
725
+
726
+
727
+ add_settings_field(
728
+
729
+ 'wcap_fb_app_id',
730
+
731
+ __( 'Messenger App ID', 'woocommerce-abandoned-cart' ),
732
+
733
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
734
+
735
+ 'woocommerce_ac_fb_page',
736
+
737
+ 'wcap_fb_settings_section',
738
+
739
+ array( "<i>Enter your Messenger App ID</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_fb_app_id' )
740
+
741
+ );
742
+
743
+
744
+
745
+ add_settings_field(
746
+
747
+ 'wcap_fb_page_token',
748
+
749
+ __( 'Facebook Page Token', 'woocommerce-abandoned-cart' ),
750
+
751
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
752
+
753
+ 'woocommerce_ac_fb_page',
754
+
755
+ 'wcap_fb_settings_section',
756
+
757
+ array( "<i>Enter your Facebook Page Token</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_fb_page_token' )
758
+
759
+ );
760
+
761
+
762
+
763
+ add_settings_field(
764
+
765
+ 'wcap_fb_verify_token',
766
+
767
+ __( 'Verify Token', 'woocommerce-abandoned-cart' ),
768
+
769
+ array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
770
+
771
+ 'woocommerce_ac_fb_page',
772
+
773
+ 'wcap_fb_settings_section',
774
+
775
+ array( "<i>Enter your Verify Token</i>$upgrade_pro_msg", 'woocommerce-abandoned-cart', 'wcap_fb_verify_token' )
776
+
777
+ );
778
+
779
+
780
+
781
+ register_setting(
782
+
783
+ 'woocommerce_fb_settings',
784
+
785
+ 'wcap_enable_fb_reminders'
786
+
787
+ );
788
+
789
+
790
+
791
+ register_setting(
792
+
793
+ 'woocommerce_fb_settings',
794
+
795
+ 'wcap_enable_fb_reminders_popup'
796
+
797
+ );
798
+
799
+
800
+
801
+ register_setting(
802
+
803
+ 'woocommerce_fb_settings',
804
+
805
+ 'wcap_fb_consent_text'
806
+
807
+ );
808
+
809
+
810
+
811
+ register_setting(
812
+
813
+ 'woocommerce_fb_settings',
814
+
815
+ 'wcap_fb_page_id'
816
+
817
+ );
818
+
819
+
820
+
821
+ register_setting(
822
+
823
+ 'woocommerce_fb_settings',
824
+
825
+ 'wcap_fb_user_icon'
826
+
827
+ );
828
+
829
+
830
+
831
+ register_setting(
832
+
833
+ 'woocommerce_fb_settings',
834
+
835
+ 'wcap_fb_app_id'
836
+
837
+ );
838
+
839
+
840
+
841
+ register_setting(
842
+
843
+ 'woocommerce_fb_settings',
844
+
845
+ 'wcap_fb_page_token'
846
+
847
+ );
848
+
849
+
850
+
851
+ register_setting(
852
+
853
+ 'woocommerce_fb_settings',
854
+
855
+ 'wcap_fb_verify_token'
856
+
857
+ );
858
+
859
+ }
860
+
861
+
862
+
863
+ public static function wcap_add_to_cart_popup_settings() {
864
+
865
+ $wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
866
+
867
+ $wcap_disabled_field = '';
868
+
869
+ if ( 'off' == $wcap_atc_enabled ) {
870
+
871
+ $wcap_disabled_field = 'disabled="disabled"';
872
+
873
+ }
874
+
875
+ ?>
876
+
877
+ <div id = "wcap_popup_main_div" class = "wcap_popup_main_div ">
878
+
879
+ <table id = "wcap_popup_main_table" class = "wcap_popup_main_table test_borders">
880
+
881
+ <tr id = "wcap_popup_main_table_tr" class = "wcap_popup_main_table_tr test_borders">
882
+
883
+ <td id = "wcap_popup_main_table_td_settings" class = "wcap_popup_main_table_td_settings test_borders">
884
+
885
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_enable_modal_section( $wcap_disabled_field ); ?>
886
+
887
+ <?php self::wcap_custom_pages_section( $wcap_disabled_field ); ?>
888
+
889
+ <div class = "wcap_atc_all_fields_container" >
890
+
891
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_heading_section( $wcap_disabled_field ); ?>
892
+
893
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_text_section( $wcap_disabled_field ); ?>
894
+
895
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_email_placeholder_section( $wcap_disabled_field ); ?>
896
+
897
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_button_section( $wcap_disabled_field ); ?>
898
+
899
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_mandatory_modal_section( $wcap_disabled_field ); ?>
900
+
901
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_non_mandatory_modal_section_field( $wcap_disabled_field ); ?>
902
+
903
+ </div>
904
+
905
+ </td>
906
+
907
+ <td id = "wcap_popup_main_table_td_preview" class = "wcap_popup_main_table_td_preview test_borders">
908
+
909
+ <div class = "wcap_atc_all_fields_container" >
910
+
911
+ <?php Wcap_Add_Cart_Popup_Modal::wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ); ?>
912
+
913
+ </div>
914
+
915
+ </td>
916
+
917
+ </tr>
918
+
919
+ <tr>
920
+
921
+ <td>
922
+
923
+ <div class = "wcap_atc_all_fields_container" >
924
+
925
+ <p class = "submit">
926
+
927
+ <input type = "submit" name = "submit" id = "submit" class = "button button-primary" value = "Save Changes" <?php echo $wcap_disabled_field; ?> >
928
+
929
+ <input type = "submit" name = "submit" id = "submit" class = "wcap_reset_button button button-primary" value = "Reset to default configuration" <?php echo $wcap_disabled_field; ?> >
930
+
931
+ </p>
932
+
933
+ </div>
934
+
935
+ </td>
936
+
937
+ </tr>
938
+
939
+ </table>
940
+
941
+ </div>
942
+
943
+ <?php
944
+
945
+ }
946
+
947
+
948
+
949
+ } // end of class
950
+
951
+ $WCAP_Pro_Settings = new WCAP_Pro_Settings();
952
+
953
+ } // end if
954
+
955
+ ?>
includes/admin/wcap_pro_settings_callbacks.php ADDED
@@ -0,0 +1,610 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+
5
+ * Callbacks for all the settings present in the PRO version
6
+
7
+ *
8
+
9
+ * @since 2.4
10
+
11
+ */
12
+
13
+ // Exit if accessed directly
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) exit;
16
+
17
+
18
+
19
+ if ( ! class_exists('WCAP_Pro_Settings_Callbacks' ) ) {
20
+
21
+
22
+
23
+ class WCAP_Pro_Settings_Callbacks {
24
+
25
+
26
+
27
+ /**
28
+
29
+ * Construct
30
+
31
+ * @since 4.9
32
+
33
+ */
34
+
35
+ public function __construct() {
36
+
37
+ }
38
+
39
+
40
+
41
+
42
+
43
+ public static function wcap_sms_settings_section_callback() {
44
+
45
+ _e( 'Configure your Twilio account settings below. Please note that due to some restrictions from Twilio, customers <i>may sometimes</i> receive delayed messages', 'woocommerce-abandoned-cart' );
46
+
47
+ }
48
+
49
+
50
+
51
+ /**
52
+
53
+ * Callback for enable SMS reminders
54
+
55
+ * @param array $args Argument given while adding the field
56
+
57
+ * @since 7.9
58
+
59
+ */
60
+
61
+ public static function wcap_enable_sms_reminders_callback( $args ) {
62
+
63
+
64
+
65
+ $wcap_enable_sms = get_option( 'wcap_enable_sms_reminders' );
66
+
67
+
68
+
69
+ if (isset( $wcap_enable_sms ) && $wcap_enable_sms == "" ) {
70
+
71
+ $wcap_enable_sms = 'off';
72
+
73
+ }
74
+
75
+
76
+
77
+ $html = '<input type="checkbox" id="wcap_enable_sms_reminders" name="wcap_enable_sms_reminders" value="on" ' . checked( 'on', $wcap_enable_sms, false ) . ' readonly disabled/>';
78
+
79
+
80
+
81
+ $html .= '<label for="wcap_enable_sms_reminders"> ' . $args[0] . '</label>';
82
+
83
+ echo $html;
84
+
85
+ }
86
+
87
+
88
+
89
+ /**
90
+
91
+ * Callback for From Phone Number
92
+
93
+ * @param array $args Argument given while adding the field
94
+
95
+ * @since 7.9
96
+
97
+ */
98
+
99
+ public static function wcap_sms_from_phone_callback( $args ) {
100
+
101
+
102
+
103
+ $wcap_from_phone = get_option( 'wcap_sms_from_phone' );
104
+
105
+
106
+
107
+ $html = "<input type='text' id='wcap_sms_from_phone' name='wcap_sms_from_phone' value='$wcap_from_phone' readonly />";
108
+
109
+
110
+
111
+ $html .= '<label for="wcap_from_phone"> ' . $args[0] . '</label>';
112
+
113
+ echo $html;
114
+
115
+ }
116
+
117
+
118
+
119
+ /**
120
+
121
+ * Callback for Account SID
122
+
123
+ * @param array $args Argument given while adding the field
124
+
125
+ * @since 7.9
126
+
127
+ */
128
+
129
+ public static function wcap_sms_account_sid_callback( $args ) {
130
+
131
+
132
+
133
+ $wcap_sms_account_sid = get_option( 'wcap_sms_account_sid' );
134
+
135
+
136
+
137
+ $html = "<input type='text' style='width:60%;' id='wcap_sms_account_sid' name='wcap_sms_account_sid' value='$wcap_sms_account_sid' readonly />";
138
+
139
+
140
+
141
+ $html .= '<label for="wcap_sms_account_sid"> ' . $args[0] . '</label>';
142
+
143
+ echo $html;
144
+
145
+ }
146
+
147
+
148
+
149
+ /**
150
+
151
+ * Callback for Auth Token
152
+
153
+ * @param array $args Argument given while adding the field
154
+
155
+ * @since 7.9
156
+
157
+ */
158
+
159
+ public static function wcap_sms_auth_token_callback( $args ) {
160
+
161
+
162
+
163
+ $wcap_sms_auth_token = get_option( 'wcap_sms_auth_token' );
164
+
165
+
166
+
167
+ $html = "<input type='text' style='width:60%;' id='wcap_sms_auth_token' name='wcap_sms_auth_token' value='$wcap_sms_auth_token' readonly />";
168
+
169
+
170
+
171
+ $html .= '<label for="wcap_sms_auth_token"> ' . $args[0] . '</label>';
172
+
173
+ echo $html;
174
+
175
+
176
+
177
+ }
178
+
179
+
180
+
181
+ static function wcap_fb_description(){
182
+
183
+ _e( 'Configure the plugin to send notifications to Facebook Messenger using the settings below. Please refer the <a href="https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger" target="_blank">following documentation</a> to complete the setup.', 'woocommerce-abandoned-cart' );
184
+ }
185
+
186
+
187
+
188
+ static function wcap_fb_checkbox_callback( $args ) {
189
+
190
+
191
+
192
+ $checkbox_value = get_option( $args[2] );
193
+
194
+
195
+
196
+ if (isset( $checkbox_value ) && $checkbox_value == "" ) {
197
+
198
+ $checkbox_value = 'off';
199
+
200
+ }
201
+
202
+
203
+
204
+ $html = "<input type='checkbox' id='$args[2]' name='$args[2]' value='on' " . checked( 'on', $checkbox_value, false ) . " readonly disabled/>";
205
+
206
+
207
+
208
+ $html .= '<label for="$args[2]"> ' . $args[0] . '</label>';
209
+
210
+
211
+
212
+ echo $html;
213
+
214
+ }
215
+
216
+
217
+
218
+ static function wcap_fb_text_callback( $args ) {
219
+
220
+
221
+
222
+ $saved_value = get_option( $args[2] );
223
+
224
+
225
+
226
+ $html = "<input type='text' id='$args[2]' name='$args[2]' value='$saved_value' readonly />";
227
+
228
+
229
+
230
+ $html .= '<label for="$args[2]"> ' . $args[0] . '</label>';
231
+
232
+ echo $html;
233
+
234
+ }
235
+
236
+
237
+
238
+ static function wcap_fb_dropdown_callback( $args ) {
239
+
240
+
241
+
242
+ $selected_value = get_option( $args[2] );
243
+
244
+ $selected = '';
245
+
246
+
247
+
248
+ $html = "<select name='$args[2]' id='$args[2]' disabled>";
249
+
250
+
251
+
252
+ foreach ( $args[3] as $key => $value ) {
253
+
254
+ $selected = $selected_value === $key ? 'selected="selected"' : '';
255
+
256
+ $html .= "<option value='$key' " . $selected . ">$value</option>";
257
+
258
+ }
259
+
260
+
261
+
262
+ $html .= "</select>";
263
+
264
+ $html .= '<label for="$args[2]"> ' . $args[0] . '</label>';
265
+
266
+ echo $html;
267
+
268
+ }
269
+
270
+
271
+
272
+ public static function wcap_enable_cart_emails_callback( $args ) {
273
+
274
+
275
+
276
+ $enable_cart_emails = get_option( 'ac_enable_cart_emails' );
277
+
278
+
279
+
280
+ if (isset( $enable_cart_emails ) && $enable_cart_emails == "" ) {
281
+
282
+ $enable_cart_emails = 'off';
283
+
284
+ }
285
+
286
+
287
+
288
+ $html = '<input type="checkbox" id="ac_enable_cart_emails" name="ac_enable_cart_emails" value="on" ' . checked( 'on', $enable_cart_emails, false ) . ' readonly disabled/>';
289
+
290
+
291
+
292
+ $html .= '<label for="ac_enable_cart_emails"> ' . $args[0] . '</label>';
293
+
294
+ echo $html;
295
+
296
+ }
297
+
298
+
299
+
300
+ public static function wcap_cart_abandoned_time_guest_callback($args) {
301
+
302
+
303
+
304
+ $cart_abandoned_time_guest = get_option( 'ac_cart_abandoned_time_guest' );
305
+
306
+
307
+
308
+ printf(
309
+
310
+ '<input type="text" id="ac_cart_abandoned_time_guest" name="ac_cart_abandoned_time_guest" value="%s" readonly />',
311
+
312
+ isset( $cart_abandoned_time_guest ) ? esc_attr( $cart_abandoned_time_guest ) : ''
313
+
314
+ );
315
+
316
+
317
+
318
+ $html = '<label for="ac_cart_abandoned_time_guest"> ' . $args[0] . '</label>';
319
+
320
+ echo $html;
321
+
322
+ }
323
+
324
+
325
+
326
+ public static function wcap_disable_guest_cart_email_callback( $args ) {
327
+
328
+
329
+
330
+ $disable_guest_cart_email = get_option( 'ac_disable_guest_cart_email' );
331
+
332
+
333
+
334
+ if ( isset( $disable_guest_cart_email ) && $disable_guest_cart_email == '' ) {
335
+
336
+ $disable_guest_cart_email = 'off';
337
+
338
+ }
339
+
340
+
341
+
342
+ $html='';
343
+
344
+ printf(
345
+
346
+ '<input type="checkbox" id="ac_disable_guest_cart_email" name="ac_disable_guest_cart_email" value="on"
347
+
348
+ '.checked( 'on', $disable_guest_cart_email, false ) . ' readonly disabled/>'
349
+
350
+ );
351
+
352
+
353
+
354
+ $html .= '<label for="ac_disable_guest_cart_email"> ' . $args[0] . '</label> <br> <div id ="wcap_atc_disable_msg" class="wcap_atc_disable_msg"></div>';
355
+
356
+ echo $html;
357
+
358
+ }
359
+
360
+
361
+
362
+ public static function wcap_disable_logged_in_cart_email_callback( $args ) {
363
+
364
+
365
+
366
+ $disable_logged_in_cart_email = get_option( 'ac_disable_logged_in_cart_email' );
367
+
368
+
369
+
370
+ if ( isset( $disable_logged_in_cart_email ) && $disable_logged_in_cart_email == '' ) {
371
+
372
+ $disable_logged_in_cart_email = 'off';
373
+
374
+ }
375
+
376
+
377
+
378
+ $html='';
379
+
380
+ printf(
381
+
382
+ '<input type="checkbox" id="ac_disable_logged_in_cart_email" name="ac_disable_logged_in_cart_email" value="on"
383
+
384
+ '.checked( 'on', $disable_logged_in_cart_email, false ) . ' readonly disabled/>'
385
+
386
+ );
387
+
388
+
389
+
390
+ $html .= '<label for="ac_disable_logged_in_cart_email"> ' . $args[0] . '</label>';
391
+
392
+ echo $html;
393
+
394
+ }
395
+
396
+
397
+
398
+ public static function wcap_capture_email_address_from_url( $args ) {
399
+
400
+
401
+
402
+ $ac_capture_email_address_from_url = get_option( 'ac_capture_email_address_from_url' );
403
+
404
+
405
+
406
+ printf(
407
+
408
+ '<input type="text" id="ac_capture_email_address_from_url" name="ac_capture_email_address_from_url" value="%s" readonly />',
409
+
410
+ isset( $ac_capture_email_address_from_url ) ? esc_attr( $ac_capture_email_address_from_url ) : ''
411
+
412
+ );
413
+
414
+
415
+
416
+ $html = '<label for="ac_capture_email_address_from_url_label"> ' . $args[0] . '</label>';
417
+
418
+ echo $html;
419
+
420
+ }
421
+
422
+
423
+
424
+ public static function wcap_product_image_size_callback( $args ) {
425
+
426
+
427
+
428
+ $wcap_product_image_height = get_option( 'wcap_product_image_height' );
429
+
430
+ $wcap_product_image_width = get_option( 'wcap_product_image_width' );
431
+
432
+
433
+
434
+ ?> <input type="text" id = "wcap_product_image_height" style= "width:50px" name="wcap_product_image_height" value="<?php echo $wcap_product_image_height; ?>" readonly />
435
+
436
+ <?php echo "x"; ?>
437
+
438
+ <input type="text" id = "wcap_product_image_width" style = "width:50px" name="wcap_product_image_width" value="<?php echo $wcap_product_image_width; ?>" readonly />
439
+
440
+ px
441
+
442
+ <?php
443
+
444
+
445
+
446
+ $html = '<label for="wcap_product_image_size"> ' . $args[0] . '</label>';
447
+
448
+ echo $html;
449
+
450
+ }
451
+
452
+
453
+
454
+ public static function wcap_cron_job_callback () {}
455
+
456
+
457
+
458
+ public static function wcap_use_auto_cron_callback( $args ) {
459
+
460
+
461
+
462
+ $enable_auto_cron = get_option( 'wcap_use_auto_cron' );
463
+
464
+
465
+
466
+ if( isset( $enable_auto_cron ) && '' == $enable_auto_cron ) {
467
+
468
+ $enable_auto_cron = 'off';
469
+
470
+ }
471
+
472
+
473
+
474
+ $html='';
475
+
476
+ printf(
477
+
478
+ '<input type="checkbox" id="wcap_use_auto_cron" name="wcap_use_auto_cron" value="on"
479
+
480
+ '.checked( 'on', $enable_auto_cron, false ) . ' readonly disabled/>'
481
+
482
+ );
483
+
484
+
485
+
486
+ $html .= '<label for="wcap_use_auto_cron_label"> ' . $args[0] . '</label>';
487
+
488
+ echo $html;
489
+
490
+ }
491
+
492
+
493
+
494
+ public static function wcap_cron_time_duration_callback( $args ) {
495
+
496
+
497
+
498
+ $wcap_cron_time_duration = get_option( 'wcap_cron_time_duration' );
499
+
500
+
501
+
502
+ printf(
503
+
504
+ '<input type="text" id="wcap_cron_time_duration" name="wcap_cron_time_duration" value="%s" readonly/>',
505
+
506
+ isset( $wcap_cron_time_duration ) ? esc_attr( $wcap_cron_time_duration ) : ''
507
+
508
+ );
509
+
510
+
511
+
512
+ $html = '<label for="wcap_cron_time_duration"> ' . $args[0] . '</label>';
513
+
514
+ echo $html;
515
+
516
+ }
517
+
518
+
519
+
520
+ public static function wcap_custom_restrict_callback () {}
521
+
522
+
523
+
524
+ public static function wcap_restrict_ip_address_callback( $args ) {
525
+
526
+
527
+
528
+ $wcap_restrict_ip_address = get_option( 'wcap_restrict_ip_address' );
529
+
530
+ $value = isset( $wcap_restrict_ip_address ) ? esc_attr( $wcap_restrict_ip_address ) : '';
531
+
532
+
533
+
534
+ printf(
535
+
536
+ '<textarea rows="4" cols="50" id="wcap_restrict_ip_address" name="wcap_restrict_ip_address" placeholder="Add an IP address" readonly />' . $value .'</textarea>'
537
+
538
+ );
539
+
540
+
541
+
542
+ $html = '<label for="wcap_restrict_ip_address_label"> ' . $args[0] . '</label>';
543
+
544
+ echo $html;
545
+
546
+ }
547
+
548
+
549
+
550
+ public static function wcap_restrict_email_address_callback( $args ) {
551
+
552
+
553
+
554
+ $wcap_restrict_email_address = get_option( 'wcap_restrict_email_address' );
555
+
556
+ $email_value = isset( $wcap_restrict_email_address ) ? esc_attr( $wcap_restrict_email_address ) : '';
557
+
558
+
559
+
560
+ printf(
561
+
562
+ '<textarea rows="4" cols="50" id="wcap_restrict_email_address" name="wcap_restrict_email_address" placeholder="Add an email address" readonly />' . $email_value .'</textarea>'
563
+
564
+ );
565
+
566
+
567
+
568
+ $html = '<label for="wcap_restrict_email_address_label"> ' . $args[0] . '</label>';
569
+
570
+ echo $html;
571
+
572
+ }
573
+
574
+
575
+
576
+ public static function wcap_restrict_domain_address_callback( $args ) {
577
+
578
+
579
+
580
+ $wcap_restrict_domain_address = get_option( 'wcap_restrict_domain_address' );
581
+
582
+ $domain_value = isset( $wcap_restrict_domain_address ) ? esc_attr( $wcap_restrict_domain_address ) : '';
583
+
584
+
585
+
586
+ printf(
587
+
588
+ '<textarea rows="4" cols="50" id="wcap_restrict_domain_address" name="wcap_restrict_domain_address" placeholder="Add an email domain name (Ex. hotmail.com)" readonly/>' . $domain_value .'</textarea>'
589
+
590
+ );
591
+
592
+
593
+
594
+ $html = '<label for="wcap_restrict_domain_address_label"> ' . $args[0] . '</label>';
595
+
596
+ echo $html;
597
+
598
+ }
599
+
600
+
601
+
602
+
603
+
604
+ } // end of class
605
+
606
+ $WCAP_Pro_Settings_Callbacks = new WCAP_Pro_Settings_Callbacks();
607
+
608
+ } // end if
609
+
610
+ ?>
includes/component/tracking-data/assets/js/dismiss-notice.js CHANGED
@@ -6,36 +6,18 @@
6
  */
7
  // Make notices dismissible
8
  jQuery(document).ready( function() {
9
- jQuery( '.notice.is-dismissible' ).each( function() {
10
- var $this = jQuery( this ),
11
- $button = jQuery( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ),
12
- btnText = commonL10n.dismiss || '';
13
-
14
- // Ensure plain text
15
- $button.find( '.screen-reader-text' ).text( btnText );
16
 
17
- $this.append( $button );
 
 
 
 
 
 
 
 
 
18
 
19
- /**
20
- * Event when close icon is clicked.
21
- * @fires event:notice-dismiss
22
- * @since 6.8
23
- */
24
- $button.on( 'click.notice-dismiss', function( event ) {
25
- event.preventDefault();
26
- $this.fadeTo( 100 , 0, function() {
27
- //alert();
28
- jQuery(this).slideUp( 100, function() {
29
- jQuery(this).remove();
30
- var data = {
31
- action: ts_dismiss_notice.ts_prefix_of_plugin + "_admin_notices"
32
- };
33
- var admin_url = ts_dismiss_notice.ts_admin_url;
34
-
35
- jQuery.post( admin_url , data, function( response ) {
36
- });
37
- });
38
- });
39
- });
40
  });
41
  });
6
  */
7
  // Make notices dismissible
8
  jQuery(document).ready( function() {
9
+ jQuery('.wcal-tracker').on( 'click', 'button.notice-dismiss', function(){
 
 
 
 
 
 
10
 
11
+ // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
12
+ var admin_url = jQuery( "#admin_url" ).val();
13
+ ajaxurl = admin_url + "admin-ajax.php";
14
+
15
+ var data = {
16
+ action: "wcal_admin_notices"
17
+ };
18
+
19
+ jQuery.post( ajaxurl, data, function( response ) {
20
+ });
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  });
23
  });
includes/component/tracking-data/ts-tracking.php CHANGED
@@ -113,7 +113,7 @@ class Wcal_TS_tracking {
113
  */
114
  public static function ts_reset_tracking_setting () {
115
 
116
- if ( isset ( $_GET [ 'ts_action' ] ) && 'reset_tracking' == $_GET [ 'ts_action' ] ) {
117
  delete_option( self::$plugin_prefix . '_allow_tracking' );
118
  delete_option( 'ts_tracker_last_send' );
119
  $ts_url = remove_query_arg( 'ts_action' );
@@ -156,7 +156,7 @@ class Wcal_TS_tracking {
156
  $domain_value = isset( $wcap_restrict_domain_address ) ? esc_attr( $wcap_restrict_domain_address ) : '';
157
  // Next, we update the name attribute to access this element's ID in the context of the display options array
158
  // We also access the show_header element of the options collection in the call to the checked() helper function
159
- $ts_action = self::$ts_settings_page . "&amp;ts_action=reset_tracking";
160
  printf( '<a href="'.$ts_action.'" class="button button-large reset_tracking">Reset</a>' );
161
 
162
  // Here, we'll take the first argument of the array and add it to a label next to the checkbox
@@ -198,7 +198,7 @@ class Wcal_TS_tracking {
198
  public static function ts_admin_notices_scripts() {
199
 
200
  wp_enqueue_script(
201
- 'ts_dismiss_notice',
202
  self::$ts_file_path . '/assets/js/dismiss-notice.js',
203
  '',
204
  '',
113
  */
114
  public static function ts_reset_tracking_setting () {
115
 
116
+ if ( isset ( $_GET [ 'ts_action' ] ) && 'wcal_reset_tracking' == $_GET [ 'ts_action' ] ) {
117
  delete_option( self::$plugin_prefix . '_allow_tracking' );
118
  delete_option( 'ts_tracker_last_send' );
119
  $ts_url = remove_query_arg( 'ts_action' );
156
  $domain_value = isset( $wcap_restrict_domain_address ) ? esc_attr( $wcap_restrict_domain_address ) : '';
157
  // Next, we update the name attribute to access this element's ID in the context of the display options array
158
  // We also access the show_header element of the options collection in the call to the checked() helper function
159
+ $ts_action = self::$ts_settings_page . "&amp;ts_action=" . self::$plugin_prefix . "_reset_tracking";
160
  printf( '<a href="'.$ts_action.'" class="button button-large reset_tracking">Reset</a>' );
161
 
162
  // Here, we'll take the first argument of the array and add it to a label next to the checkbox
198
  public static function ts_admin_notices_scripts() {
199
 
200
  wp_enqueue_script(
201
+ self::$plugin_prefix . 'ts_dismiss_notice',
202
  self::$ts_file_path . '/assets/js/dismiss-notice.js',
203
  '',
204
  '',
includes/wcal_class-guest.php CHANGED
@@ -18,7 +18,8 @@ if ( ! class_exists( 'woocommerce_guest_ac' ) ) {
18
  class woocommerce_guest_ac {
19
  var $a;
20
  public function __construct() {
21
- add_action( 'woocommerce_after_checkout_billing_form', 'user_side_js' );
 
22
  add_action( 'init','load_ac_ajax' );
23
  add_filter( 'woocommerce_checkout_fields', 'guest_checkout_fields' );
24
  }
18
  class woocommerce_guest_ac {
19
  var $a;
20
  public function __construct() {
21
+ add_action( 'woocommerce_after_checkout_billing_form', 'user_side_js' );
22
+ add_action( 'wfacp_footer_before_print_scripts', 'user_side_js' ); //Compatibility with Aero Checkout
23
  add_action( 'init','load_ac_ajax' );
24
  add_filter( 'woocommerce_checkout_fields', 'guest_checkout_fields' );
25
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares, d
4
  Tags: abandon cart, cart recovery, increase woocommerce conversion rate , recover woocommerce cart, increase sales with woocommerce
5
  Author URI: https://www.tychesoftwares.com/
6
  Requires at least: 1.3
7
- Tested up to: 5.1
8
  Stable tag: trunk
9
  License: GPLv2 or late
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -193,6 +193,14 @@ You can refer **[here](https://www.tychesoftwares.com/differences-between-pro-an
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
196
  = 5.3.4 (18.04.2019) =
197
 
198
  * This is a minor update to the plugin to remove the unwanted abandoned carts created for some customers after updating to the 5.3.2 release.
4
  Tags: abandon cart, cart recovery, increase woocommerce conversion rate , recover woocommerce cart, increase sales with woocommerce
5
  Author URI: https://www.tychesoftwares.com/
6
  Requires at least: 1.3
7
+ Tested up to: 5.2.2
8
  Stable tag: trunk
9
  License: GPLv2 or late
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
193
 
194
  == Changelog ==
195
 
196
+ = 5.4 (10.07.2019) =
197
+
198
+ * Bug - Fixed an issue where carts were being marked as abandoned even after they have been successfully recovered.
199
+ * Bug - Unsubscribe link in the test reminder email displayed some HTML content in Outlook.
200
+ * Bug - The data tracking notice in the plugin when dismissed affected other dismissible notices as well.
201
+ * Tweak - Made the plugin compatible with AeroCheckout plugin.
202
+ * Tweak - The settings for the Pro version will now be displayed in the Lite version of the plugin.
203
+
204
  = 5.3.4 (18.04.2019) =
205
 
206
  * This is a minor update to the plugin to remove the unwanted abandoned carts created for some customers after updating to the 5.3.2 release.
woocommerce-ac.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: This plugin captures abandoned carts by logged-in users & emails them about it.
6
  * <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
7
  * PRO Version.</a></strong>
8
- * Version: 5.3.4
9
  * Author: Tyche Softwares
10
  * Author URI: http://www.tychesoftwares.com/
11
  * Text Domain: woocommerce-abandoned-cart
12
  * Domain Path: /i18n/languages/
13
  * Requires PHP: 5.6
14
  * WC requires at least: 3.0.0
15
- * WC tested up to: 3.6
16
  *
17
  * @package Abandoned-Cart-Lite-for-WooCommerce
18
  */
@@ -29,6 +29,9 @@ require_once( 'includes/wcal_data_tracking_message.php' );
29
  require_once( 'includes/admin/wcal_privacy_erase.php' );
30
  require_once( 'includes/admin/wcal_privacy_export.php' );
31
 
 
 
 
32
  // Add a new interval of 15 minutes
33
  add_filter( 'cron_schedules', 'wcal_add_cron_schedule' );
34
 
@@ -108,7 +111,10 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
108
  * @since 1.0
109
  *
110
  */
111
- public function __construct() {
 
 
 
112
  $this->one_hour = 60 * 60;
113
  $this->three_hours = 3 * $this->one_hour;
114
  $this->six_hours = 6 * $this->one_hour;
@@ -151,7 +157,11 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
151
  add_action ( 'admin_menu', array( &$this, 'wcal_admin_menu' ) );
152
 
153
  // Actions to be done on cart update
154
- add_action ( 'woocommerce_cart_updated', array( &$this, 'wcal_store_cart_timestamp' ) );
 
 
 
 
155
 
156
  add_action ( 'admin_init', array( &$this, 'wcal_action_admin_init' ) );
157
 
@@ -874,7 +884,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
874
  $wcal_previous_version = get_option( 'wcal_previous_version' );
875
 
876
  if ( $wcal_previous_version != wcal_common::wcal_get_version() ) {
877
- update_option( 'wcal_previous_version', '5.3.4' );
878
  }
879
 
880
  /**
@@ -1937,27 +1947,56 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
1937
  <p><?php _e( 'Change settings for sending email notifications to Customers, to Admin etc.', 'woocommerce-abandoned-cart' ); ?></p>
1938
  <div id="content">
1939
  <?php
1940
- $wcal_general_settings_class = $wcal_email_setting = "";
1941
- if ( isset( $_GET[ 'wcal_section' ] ) ) {
1942
- $section = $_GET[ 'wcal_section' ];
1943
- } else {
1944
- $section = '';
1945
- }
1946
- if ( 'wcal_general_settings' == $section || '' == $section ) {
1947
- $wcal_general_settings_class = "current";
1948
- }
1949
- if ( 'wcal_email_settings' == $section ) {
1950
- $wcal_email_setting = "current";
1951
- }
1952
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1953
  <ul class="subsubsub" id="wcal_general_settings_list">
1954
  <li>
1955
  <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcal_general_settings" class="<?php echo $wcal_general_settings_class; ?>"><?php _e( 'General Settings', 'woocommerce-abandoned-cart' );?> </a> |
1956
  </li>
1957
  <li>
1958
- <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcal_email_settings" class="<?php echo $wcal_email_setting; ?>"><?php _e( 'Email Sending Settings', 'woocommerce-abandoned-cart' );?> </a>
1959
  </li>
1960
-
 
 
 
 
 
 
 
 
 
1961
  </ul>
1962
  <br class="clear">
1963
  <?php
@@ -1979,6 +2018,12 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
1979
  <?php submit_button(); ?>
1980
  </form>
1981
  <?php
 
 
 
 
 
 
1982
  }
1983
  ?>
1984
  </div>
@@ -3068,7 +3113,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
3068
  $body_email_preview = str_replace( '{{cart.abandoned_date}}', $test_date, $body_email_preview );
3069
  $cart_url = wc_get_page_permalink( 'cart' );
3070
  $body_email_preview = str_replace( '{{cart.link}}', $cart_url, $body_email_preview );
3071
- $body_email_preview = str_replace( '{{cart.unsubscribe}}', '<a href=#>unsubscribe</a>', $body_email_preview );
3072
  $wcal_price = wc_price( '100' );
3073
  $wcal_total_price = wc_price( '200' );
3074
  if ( class_exists( 'WP_Better_Emails' ) ) {
5
  * Description: This plugin captures abandoned carts by logged-in users & emails them about it.
6
  * <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
7
  * PRO Version.</a></strong>
8
+ * Version: 5.4
9
  * Author: Tyche Softwares
10
  * Author URI: http://www.tychesoftwares.com/
11
  * Text Domain: woocommerce-abandoned-cart
12
  * Domain Path: /i18n/languages/
13
  * Requires PHP: 5.6
14
  * WC requires at least: 3.0.0
15
+ * WC tested up to: 3.6.5
16
  *
17
  * @package Abandoned-Cart-Lite-for-WooCommerce
18
  */
29
  require_once( 'includes/admin/wcal_privacy_erase.php' );
30
  require_once( 'includes/admin/wcal_privacy_export.php' );
31
 
32
+ require_once( 'includes/admin/wcap_pro_settings.php' );
33
+ require_once( 'includes/admin/wcap_pro_settings_callbacks.php' );
34
+ require_once( 'includes/admin/wcap_add_cart_popup_modal.php' );
35
  // Add a new interval of 15 minutes
36
  add_filter( 'cron_schedules', 'wcal_add_cron_schedule' );
37
 
111
  * @since 1.0
112
  *
113
  */
114
+ public function __construct() {
115
+ if ( !defined( 'WCAL_PLUGIN_URL' ) ) {
116
+ define('WCAL_PLUGIN_URL', untrailingslashit(plugins_url('/', __FILE__)) );
117
+ }
118
  $this->one_hour = 60 * 60;
119
  $this->three_hours = 3 * $this->one_hour;
120
  $this->six_hours = 6 * $this->one_hour;
157
  add_action ( 'admin_menu', array( &$this, 'wcal_admin_menu' ) );
158
 
159
  // Actions to be done on cart update
160
+ add_action( 'woocommerce_add_to_cart', array( &$this, 'wcal_store_cart_timestamp' ), 100 );
161
+ add_action( 'woocommerce_cart_item_removed', array( &$this, 'wcal_store_cart_timestamp' ), 100 );
162
+ add_action( 'woocommerce_cart_item_restored', array( &$this, 'wcal_store_cart_timestamp' ), 100 );
163
+ add_action( 'woocommerce_after_cart_item_quantity_update', array( &$this, 'wcal_store_cart_timestamp' ), 100 );
164
+ add_action( 'woocommerce_calculate_totals', array( &$this, 'wcal_store_cart_timestamp' ), 100 );
165
 
166
  add_action ( 'admin_init', array( &$this, 'wcal_action_admin_init' ) );
167
 
884
  $wcal_previous_version = get_option( 'wcal_previous_version' );
885
 
886
  if ( $wcal_previous_version != wcal_common::wcal_get_version() ) {
887
+ update_option( 'wcal_previous_version', '5.4' );
888
  }
889
 
890
  /**
1947
  <p><?php _e( 'Change settings for sending email notifications to Customers, to Admin etc.', 'woocommerce-abandoned-cart' ); ?></p>
1948
  <div id="content">
1949
  <?php
1950
+ $wcal_general_settings_class = $wcal_email_setting = $wcap_sms_settings = $wcap_atc_settings = $wcap_fb_settings = "";
1951
+
1952
+ $section = isset( $_GET[ 'wcal_section' ] ) ? $_GET[ 'wcal_section' ] : '';
1953
+
1954
+ switch( $section ) {
1955
+
1956
+ case 'wcal_general_settings':
1957
+ case '':
1958
+ $wcal_general_settings_class = "current";
1959
+ break;
1960
+
1961
+ case 'wcal_email_settings':
1962
+ $wcal_email_setting = "current";
1963
+ break;
1964
+
1965
+ case 'wcap_sms_settings':
1966
+ $wcap_sms_settings = "current";
1967
+ break;
1968
+
1969
+ case 'wcap_atc_settings':
1970
+ $wcap_atc_settings = "current";
1971
+ break;
1972
+
1973
+ case 'wcap_fb_settings':
1974
+ $wcap_fb_settings = "current";
1975
+ break;
1976
+
1977
+ default:
1978
+ $wcal_general_settings_class = "current";
1979
+ break;
1980
+
1981
+ }
1982
+ ?>
1983
  <ul class="subsubsub" id="wcal_general_settings_list">
1984
  <li>
1985
  <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcal_general_settings" class="<?php echo $wcal_general_settings_class; ?>"><?php _e( 'General Settings', 'woocommerce-abandoned-cart' );?> </a> |
1986
  </li>
1987
  <li>
1988
+ <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcal_email_settings" class="<?php echo $wcal_email_setting; ?>"><?php _e( 'Email Sending Settings', 'woocommerce-abandoned-cart' );?> </a> |
1989
  </li>
1990
+ <li>
1991
+ <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_atc_settings" class="<?php echo $wcap_atc_settings; ?>"><?php _e( 'Add To Cart Popup Editor', 'woocommerce-ac' );?> </a> |
1992
+ </li>
1993
+ <li>
1994
+ <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_fb_settings" class="<?php echo $wcap_fb_settings; ?>"><?php _e( 'Facebook Messenger', 'woocommerce-ac' );?> </a> |
1995
+ </li>
1996
+ <li>
1997
+ <a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_sms_settings" class="<?php echo $wcap_sms_settings; ?>"><?php _e( 'SMS', 'woocommerce-ac' );?> </a>
1998
+ </li>
1999
+
2000
  </ul>
2001
  <br class="clear">
2002
  <?php
2018
  <?php submit_button(); ?>
2019
  </form>
2020
  <?php
2021
+ } elseif( 'wcap_atc_settings' == $section ) {
2022
+ WCAP_Pro_Settings::wcap_atc_settings();
2023
+ } elseif( 'wcap_fb_settings' == $section ) {
2024
+ WCAP_Pro_Settings::wcap_fb_settings();
2025
+ } elseif( 'wcap_sms_settings' == $section ) {
2026
+ WCAP_Pro_Settings::wcap_sms_settings();
2027
  }
2028
  ?>
2029
  </div>
3113
  $body_email_preview = str_replace( '{{cart.abandoned_date}}', $test_date, $body_email_preview );
3114
  $cart_url = wc_get_page_permalink( 'cart' );
3115
  $body_email_preview = str_replace( '{{cart.link}}', $cart_url, $body_email_preview );
3116
+ $body_email_preview = str_replace( '{{cart.unsubscribe}}', '#', $body_email_preview );
3117
  $wcal_price = wc_price( '100' );
3118
  $wcal_total_price = wc_price( '200' );
3119
  if ( class_exists( 'WP_Better_Emails' ) ) {