WooCommerce Cart Abandonment Recovery - Version 1.1.1

Version Description

Download this release

Release Info

Developer sandesh055
Plugin Icon 128x128 WooCommerce Cart Abandonment Recovery
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

admin/assets/css/admin-cart-abandonment.css CHANGED
@@ -171,22 +171,20 @@
171
 
172
  .wcf-ca-user-order{
173
  border-radius: 3px;
174
- padding: 20px 25px;
175
  overflow: hidden;
176
  height: auto;
177
  width: 100%;
178
- min-height: 100%;
179
- max-height: 100%;
180
  }
181
 
182
  /* Column Classes */
183
 
184
  /* Section classes */
185
 
186
- .wcf-ca-column:first-of-type{
187
  margin-right: 13px;
188
  }
189
- .wcf-ca-column:second-of-type{
190
  margin-left: 13px;
191
  }
192
 
@@ -338,4 +336,63 @@
338
  display: none;
339
  z-index: 10000;
340
  }
341
- /* Newly Added for the modification of the User Order detail window UI */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
 
172
  .wcf-ca-user-order{
173
  border-radius: 3px;
174
+ padding: 25px 25px 30px 25px;
175
  overflow: hidden;
176
  height: auto;
177
  width: 100%;
 
 
178
  }
179
 
180
  /* Column Classes */
181
 
182
  /* Section classes */
183
 
184
+ .wcf-ca-margin-right{
185
  margin-right: 13px;
186
  }
187
+ .wcf-ca-margin-left{
188
  margin-left: 13px;
189
  }
190
 
336
  display: none;
337
  z-index: 10000;
338
  }
339
+ /* Newly Added for the modification of the User Order detail window UI */
340
+
341
+
342
+
343
+ .wcf-ca-tags {
344
+ list-style: none;
345
+ margin: 0;
346
+ overflow: hidden;
347
+ padding: 0;
348
+ }
349
+
350
+ .wcf-ca-tags li {
351
+ float: left;
352
+ }
353
+
354
+ .wcf-ca-tag {
355
+ background-color: #f16334;
356
+ border-radius: 3px 0 0 3px;
357
+ color: #fff;
358
+ display: inline-block;
359
+ height: 26px;
360
+ line-height: 26px;
361
+ padding: 0 20px 0 23px;
362
+ position: relative;
363
+ margin: 0 5px 0px 0;
364
+ text-decoration: none;
365
+ -webkit-transition: color 0.2s;
366
+ }
367
+
368
+ .wcf-ca-tag::before {
369
+ background: #fff;
370
+ border-radius: 10px;
371
+ box-shadow: inset 0 1px rgba(0, 0, 0, 0.25);
372
+ content: '';
373
+ height: 6px;
374
+ left: 10px;
375
+ position: absolute;
376
+ width: 6px;
377
+ top: 10px;
378
+ }
379
+
380
+ .wcf-ca-tag::after {
381
+ background: #fff;
382
+ border-bottom: 13px solid transparent;
383
+ border-left: 10px solid #f16334;;
384
+ border-top: 13px solid transparent;
385
+ content: '';
386
+ position: absolute;
387
+ right: 0;
388
+ top: 0;
389
+ }
390
+
391
+ .wcf-ca-tag:hover {
392
+ background-color: #f16334;
393
+ color: white;
394
+ }
395
+
396
+ .wcf-ca-tag:hover::after {
397
+ border-left-color: #f16334;
398
+ }
changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  Version 1.1.0 - Thursday, 30th May 2019
2
  - Added a view for admin to check email status specific to the particular abandoned user.
3
 
1
+ Version 1.1.1 - Thursday, 06th June 2019
2
+ - New: Added feature to reschedule emails for Admin.
3
+ - Fix: Coupon expiry time issue.
4
+ - Fix: Email issue for a user who has an already purchased order.
5
+ - Fix: Translatable strings updated.
6
+
7
  Version 1.1.0 - Thursday, 30th May 2019
8
  - Added a view for admin to check email status specific to the particular abandoned user.
9
 
classes/class-cartflows-ca-loader.php CHANGED
@@ -77,7 +77,7 @@ if ( ! class_exists( 'CARTFLOWS_CA_Loader' ) ) {
77
  define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
78
  define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
79
  define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
80
- define( 'CARTFLOWS_CA_VER', '1.1.0' );
81
  define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
82
 
83
  define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
77
  define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
78
  define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
79
  define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
80
+ define( 'CARTFLOWS_CA_VER', '1.1.1' );
81
  define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
82
 
83
  define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
languages/cartflows-ca.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the WooCommerce Cart Abandonment Recovery package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Cart Abandonment Recovery 1.1.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
- "POT-Creation-Date: 2019-05-30 05:42:46+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -160,13 +160,14 @@ msgid "Delete"
160
  msgstr ""
161
 
162
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:70
 
163
  msgid "Unsubscribe"
164
  msgstr ""
165
 
166
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:188
167
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1510
168
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1572
169
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:112
170
  msgid "Name"
171
  msgstr ""
172
 
@@ -175,8 +176,7 @@ msgid "Email"
175
  msgstr ""
176
 
177
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:190
178
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1530
179
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1594
180
  msgid "Cart Total"
181
  msgstr ""
182
 
@@ -205,74 +205,80 @@ msgid "You have successfully unsubscribed from our email list."
205
  msgstr ""
206
 
207
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:197
 
208
  msgid "Unsubscribed"
209
  msgstr ""
210
 
211
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:345
212
  msgid "No Thanks"
213
  msgstr ""
214
 
215
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:739
 
 
 
 
216
  msgid "CartFlows says: This order was abandoned & subsequently recovered."
217
  msgstr ""
218
 
219
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:851
220
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:852
221
  msgid "Cart Abandonment"
222
  msgstr ""
223
 
224
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:885
225
  msgid "Items deleted: %d"
226
  msgstr ""
227
 
228
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:902
229
  msgid "User unsubscribed successfully!"
230
  msgstr ""
231
 
232
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1097
233
  msgid "Report"
234
  msgstr ""
235
 
236
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1113
237
  msgid "Emails"
238
  msgstr ""
239
 
240
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1129
241
  msgid "Settings"
242
  msgstr ""
243
 
244
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1509
245
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1571
 
 
 
 
246
  msgid "Item"
247
  msgstr ""
248
 
249
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1511
250
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1573
251
  msgid "Quantity"
252
  msgstr ""
253
 
254
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1512
255
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1574
256
  msgid "Price"
257
  msgstr ""
258
 
259
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1513
260
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1575
261
  msgid "Line Subtotal"
262
  msgstr ""
263
 
264
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1517
265
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1581
266
  msgid "Discount"
267
  msgstr ""
268
 
269
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1521
270
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1585
271
  msgid "Other"
272
  msgstr ""
273
 
274
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1526
275
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1590
276
  msgid "Shipping"
277
  msgstr ""
278
 
@@ -364,79 +370,79 @@ msgstr ""
364
  msgid " Restore Default Templates"
365
  msgstr ""
366
 
367
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:36
368
  msgid "Email Details:"
369
  msgstr ""
370
 
371
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:38
372
  msgid " No Email Scheduled."
373
  msgstr ""
374
 
375
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:74
376
  msgid "The email has unsubscribed and won't be sent further."
377
  msgstr ""
378
 
379
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:77
380
  msgid "The email has been sent."
381
  msgstr ""
382
 
383
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:80
384
  msgid "Email is in the queue and will be sent at the scheduled time."
385
  msgstr ""
386
 
387
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:108
388
  msgid "User Address Details:"
389
  msgstr ""
390
 
391
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:111
392
  msgid "Billing Address"
393
  msgstr ""
394
 
395
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:115
396
  msgid "Email address"
397
  msgstr ""
398
 
399
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:120
400
  msgid "Phone"
401
  msgstr ""
402
 
403
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:125
404
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:145
405
  msgid "Address 1:"
406
  msgstr ""
407
 
408
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:128
409
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:148
410
  msgid "Address 2:"
411
  msgstr ""
412
 
413
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:131
414
  msgid "Country, City:"
415
  msgstr ""
416
 
417
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:134
418
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:154
419
  msgid "State:"
420
  msgstr ""
421
 
422
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:138
423
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:160
424
  msgid "Postcode:"
425
  msgstr ""
426
 
427
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:143
428
  msgid "Shipping Address"
429
  msgstr ""
430
 
431
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:151
432
  msgid "City:"
433
  msgstr ""
434
 
435
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:157
436
  msgid "Country:"
437
  msgstr ""
438
 
439
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:173
440
  msgid "User Order Details:"
441
  msgstr ""
442
 
2
  # This file is distributed under the same license as the WooCommerce Cart Abandonment Recovery package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Cart Abandonment Recovery 1.1.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
+ "POT-Creation-Date: 2019-06-06 12:34:52+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
160
  msgstr ""
161
 
162
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:70
163
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1408
164
  msgid "Unsubscribe"
165
  msgstr ""
166
 
167
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:188
168
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1505
169
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1549
170
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:156
171
  msgid "Name"
172
  msgstr ""
173
 
176
  msgstr ""
177
 
178
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:190
179
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1571
 
180
  msgid "Cart Total"
181
  msgstr ""
182
 
205
  msgstr ""
206
 
207
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:197
208
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:147
209
  msgid "Unsubscribed"
210
  msgstr ""
211
 
212
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:347
213
  msgid "No Thanks"
214
  msgstr ""
215
 
216
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:348
217
+ msgid "You won't receive further emails from us, thank you!"
218
+ msgstr ""
219
+
220
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:742
221
  msgid "CartFlows says: This order was abandoned & subsequently recovered."
222
  msgstr ""
223
 
224
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:853
225
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:854
226
  msgid "Cart Abandonment"
227
  msgstr ""
228
 
229
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:887
230
  msgid "Items deleted: %d"
231
  msgstr ""
232
 
233
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:904
234
  msgid "User unsubscribed successfully!"
235
  msgstr ""
236
 
237
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1099
238
  msgid "Report"
239
  msgstr ""
240
 
241
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1115
242
  msgid "Emails"
243
  msgstr ""
244
 
245
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1131
246
  msgid "Settings"
247
  msgstr ""
248
 
249
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1378
250
+ msgid "there"
251
+ msgstr ""
252
+
253
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1504
254
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1548
255
  msgid "Item"
256
  msgstr ""
257
 
258
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1506
259
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1550
260
  msgid "Quantity"
261
  msgstr ""
262
 
263
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1507
264
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1551
265
  msgid "Price"
266
  msgstr ""
267
 
268
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1508
269
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1552
270
  msgid "Line Subtotal"
271
  msgstr ""
272
 
273
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1558
 
274
  msgid "Discount"
275
  msgstr ""
276
 
277
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1562
 
278
  msgid "Other"
279
  msgstr ""
280
 
281
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1567
 
282
  msgid "Shipping"
283
  msgstr ""
284
 
370
  msgid " Restore Default Templates"
371
  msgstr ""
372
 
373
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:38
374
  msgid "Email Details:"
375
  msgstr ""
376
 
377
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:70
378
  msgid " No Email Scheduled."
379
  msgstr ""
380
 
381
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:106
382
  msgid "The email has unsubscribed and won't be sent further."
383
  msgstr ""
384
 
385
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:109
386
  msgid "The email has been sent."
387
  msgstr ""
388
 
389
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:112
390
  msgid "Email is in the queue and will be sent at the scheduled time."
391
  msgstr ""
392
 
393
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:143
394
  msgid "User Address Details:"
395
  msgstr ""
396
 
397
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:155
398
  msgid "Billing Address"
399
  msgstr ""
400
 
401
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:159
402
  msgid "Email address"
403
  msgstr ""
404
 
405
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:164
406
  msgid "Phone"
407
  msgstr ""
408
 
409
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:169
410
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:189
411
  msgid "Address 1:"
412
  msgstr ""
413
 
414
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:172
415
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:192
416
  msgid "Address 2:"
417
  msgstr ""
418
 
419
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:175
420
  msgid "Country, City:"
421
  msgstr ""
422
 
423
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:178
424
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:198
425
  msgid "State:"
426
  msgstr ""
427
 
428
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:182
429
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:204
430
  msgid "Postcode:"
431
  msgstr ""
432
 
433
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:187
434
  msgid "Shipping Address"
435
  msgstr ""
436
 
437
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:195
438
  msgid "City:"
439
  msgstr ""
440
 
441
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:201
442
  msgid "Country:"
443
  msgstr ""
444
 
445
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:217
446
  msgid "User Order Details:"
447
  msgstr ""
448
 
modules/cart-abandonment/assets/js/cart-abandonment-tracking.js CHANGED
@@ -44,7 +44,7 @@
44
  function (response) {
45
 
46
  if(response.success) {
47
- $("#wcf_cf_gdpr_message_block").empty().append("<span style='font-size: xx-small'>You won't receive further emails from us, thank you!</span>").delay(5000).fadeOut();
48
  }
49
 
50
  }
44
  function (response) {
45
 
46
  if(response.success) {
47
+ $("#wcf_cf_gdpr_message_block").empty().append("<span style='font-size: xx-small'>" + CartFlowsProCAVars._gdpr_after_no_thanks_msg + "</span>").delay(5000).fadeOut();
48
  }
49
 
50
  }
modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php CHANGED
@@ -71,7 +71,7 @@ class Cartflows_Ca_Cart_Abandonment {
71
  if ( WCF_CA_PAGE_NAME === $page ) {
72
  // Adding filter to add new button to add custom fields.
73
  add_filter( 'mce_buttons', array( $this, 'wcf_filter_mce_button' ) );
74
- add_filter( 'mce_external_plugins', array( $this, 'wcf_filter_mce_plugin' ) );
75
  }
76
 
77
  add_filter( 'cron_schedules', array( $this, 'cartflows_ca_update_order_status_action' ) );
@@ -223,6 +223,7 @@ class Cartflows_Ca_Cart_Abandonment {
223
  array_push( $buttons, 'cartflows_ac' );
224
  return $buttons;
225
  }
 
226
  /**
227
  * Initialise all the constants
228
  */
@@ -242,6 +243,7 @@ class Cartflows_Ca_Cart_Abandonment {
242
  define( 'WCF_ACTION_REPORTS', 'reports' );
243
 
244
  define( 'WCF_SUB_ACTION_REPORTS_VIEW', 'view' );
 
245
 
246
  define( 'WCF_DEFAULT_CUT_OFF_TIME', 15 );
247
  define( 'WCF_DEFAULT_COUPON_AMOUNT', 10 );
@@ -336,14 +338,15 @@ class Cartflows_Ca_Cart_Abandonment {
336
  );
337
 
338
  $vars = array(
339
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
340
- '_nonce' => wp_create_nonce( 'cartflows_save_cart_abandonment_data' ),
341
- '_gdpr_nonce' => wp_create_nonce( 'cartflows_skip_cart_tracking_gdpr' ),
342
- '_post_id' => get_the_ID(),
343
- '_show_gdpr_message' => ( wcf_ca()->utils->is_gdpr_enabled() && ! isset( $_COOKIE['wcf_ca_skip_track_data'] ) ),
344
- '_gdpr_message' => get_option( 'wcf_ca_gdpr_message' ),
345
- '_gdpr_nothanks_msg' => __( 'No Thanks', 'cartflows-ca' ),
346
- 'enable_ca_tracking' => true,
 
347
  );
348
 
349
  wp_localize_script( 'cartflows-cart-abandonment-tracking', 'CartFlowsProCAVars', $vars );
@@ -839,7 +842,6 @@ class Cartflows_Ca_Cart_Abandonment {
839
  }
840
 
841
 
842
-
843
  /**
844
  * Add submenu to admin menu.
845
  *
@@ -1373,7 +1375,7 @@ class Cartflows_Ca_Cart_Abandonment {
1373
  $from_email_preview = get_option( 'wcf_ca_reply_email' );
1374
 
1375
  $user_first_name = ucfirst( $other_fields['wcf_first_name'] );
1376
- $user_first_name = $user_first_name ? $user_first_name : 'there';
1377
  $user_last_name = ucfirst( $other_fields['wcf_last_name'] );
1378
  $user_full_name = trim( $user_first_name . ' ' . $user_last_name );
1379
 
@@ -1403,7 +1405,7 @@ class Cartflows_Ca_Cart_Abandonment {
1403
 
1404
  $current_time_stamp = $email_data->time;
1405
  $body_email_preview = str_replace( '{{cart.abandoned_date}}', $current_time_stamp, $body_email_preview );
1406
- $unsubscribe_element = '<a target="_blank" style="color: lightgray" href="' . $checkout_url . '&unsubscribe=true' . '"> Unsubscribe </a>';
1407
  $body_email_preview = str_replace( '{{cart.unsubscribe}}', $unsubscribe_element, $body_email_preview );
1408
  $body_email_preview = str_replace( '{{cart.checkout_url}}', $checkout_url, $body_email_preview );
1409
  $host = parse_url( get_site_url() );
@@ -1484,17 +1486,10 @@ class Cartflows_Ca_Cart_Abandonment {
1484
  $cart_items = unserialize( $cart_contents );
1485
  $currency_symbol = get_woocommerce_currency_symbol();
1486
  $tr = '';
1487
- $total = 0;
1488
- $discount = 0;
1489
- $tax = 0;
1490
  $style = 'style="color: #636363; border: 1px solid #e5e5e5; "';
1491
 
1492
  foreach ( $cart_items as $cart_item ) {
1493
 
1494
- $discount = number_format_i18n( $discount + ( $cart_item['line_subtotal'] - $cart_item['line_total'] ), 2 );
1495
- $total = number_format_i18n( $total + $cart_item['line_subtotal'], 2 );
1496
- $tax = number_format_i18n( $tax + $cart_item['line_tax'], 2 );
1497
-
1498
  $tr = $tr . '<tr style="color: #636363; border: 1px solid #e5e5e5;" align="center">
1499
  <td ' . $style . '><img class="demo_img" width="42" height="42" src=" ' . esc_url( get_the_post_thumbnail_url( $cart_item['product_id'] ) ) . ' "/></td>
1500
  <td ' . $style . '>' . $cart_item['data']->get_title() . '</td>
@@ -1511,25 +1506,7 @@ class Cartflows_Ca_Cart_Abandonment {
1511
  <th ' . $style . '>' . __( 'Quantity', 'cartflows-ca' ) . '</th>
1512
  <th ' . $style . '>' . __( 'Price', 'cartflows-ca' ) . '</th>
1513
  <th ' . $style . '>' . __( 'Line Subtotal', 'cartflows-ca' ) . '</th>
1514
- </tr> ' . $tr . '
1515
-
1516
- <tr align="center">
1517
- <td colspan="4" ' . $style . '>' . __( 'Discount', 'cartflows-ca' ) . '</td>
1518
- <td ' . $style . '>' . $currency_symbol . ( $discount ) . '</td>
1519
- </tr>
1520
- <tr align="center">
1521
- <td colspan="4" ' . $style . '>' . __( 'Other', 'cartflows-ca' ) . '</td>
1522
- <td ' . $style . '>' . $currency_symbol . ( $tax ) . '</td>
1523
- </tr>
1524
-
1525
- <tr align="center">
1526
- <td colspan="4" ' . $style . '>' . __( 'Shipping', 'cartflows-ca' ) . '</td>
1527
- <td ' . $style . '>' . $currency_symbol . number_format_i18n( $discount + ( $cart_total - $total ) - $tax, 2 ) . '</td>
1528
- </tr>
1529
- <tr align="center">
1530
- <td colspan="4" ' . $style . '>' . __( 'Cart Total', 'cartflows-ca' ) . '</td>
1531
- <td ' . $style . '>' . $currency_symbol . $cart_total . '</td>
1532
- </tr>
1533
  </table>';
1534
 
1535
  }
@@ -1602,99 +1579,76 @@ class Cartflows_Ca_Cart_Abandonment {
1602
  * Copied WC function for date parameter addition.
1603
  *
1604
  * @param string $customer_email customer email.
1605
- * @param int $user_id user id.
1606
  * @param int $product_id product id.
1607
  * @param int $days days.
1608
  * @return array|bool|mixed|void
1609
  */
1610
- function wcf_ca_wc_customer_bought_product( $customer_email, $user_id, $product_id, $days = 365 ) {
1611
  global $wpdb;
1612
 
1613
- $result = apply_filters( 'woocommerce_pre_customer_bought_product', null, $customer_email, $user_id, $product_id );
1614
-
1615
- if ( null !== $result ) {
1616
- return $result;
1617
- }
1618
-
1619
- $transient_name = 'wc_customer_bought_product_' . md5( $customer_email . $user_id );
1620
- $transient_version = WC_Cache_Helper::get_transient_version( 'orders' );
1621
- $transient_value = get_transient( $transient_name );
1622
-
1623
- if ( isset( $transient_value['value'], $transient_value['version'] ) && $transient_value['version'] === $transient_version ) {
1624
- $result = $transient_value['value'];
1625
- } else {
1626
- $customer_data = array( $user_id );
1627
-
1628
- if ( $user_id ) {
1629
- $user = get_user_by( 'id', $user_id );
1630
-
1631
- if ( isset( $user->user_email ) ) {
1632
- $customer_data[] = $user->user_email;
1633
- }
1634
- }
1635
-
1636
- if ( is_email( $customer_email ) ) {
1637
- $customer_data[] = $customer_email;
1638
- }
1639
-
1640
- $customer_data = array_map( 'esc_sql', array_filter( array_unique( $customer_data ) ) );
1641
- $statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() );
1642
 
1643
- if ( count( $customer_data ) === 0 ) {
1644
- return false;
1645
- }
1646
- // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
1647
- $result = $wpdb->get_col(
1648
- "
1649
- SELECT im.meta_value FROM {$wpdb->posts} AS p
1650
- INNER JOIN {$wpdb->postmeta} AS pm ON p.ID = pm.post_id
1651
- INNER JOIN {$wpdb->prefix}woocommerce_order_items AS i ON p.ID = i.order_id
1652
- INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS im ON i.order_item_id = im.order_item_id
1653
- WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
1654
- AND pm.meta_key IN ( '_billing_email', '_customer_user' )
1655
- AND im.meta_key IN ( '_product_id', '_variation_id' )
1656
- AND im.meta_value != 0
1657
- AND pm.meta_value IN ( '" . implode( "','", $customer_data ) . "'
1658
- AND p.post_date > '" . date( 'Y-m-d', strtotime( '-' . $days . ' days' ) ) . "' )
1659
- "
1660
- );
1661
- // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
1662
- $result = array_map( 'absint', $result );
1663
 
1664
- $transient_value = array(
1665
- 'version' => $transient_version,
1666
- 'value' => $result,
1667
- );
1668
 
1669
- set_transient( $transient_name, $transient_value, DAY_IN_SECONDS * 30 );
1670
- }
1671
- return in_array( absint( $product_id ), $result, true );
1672
  }
 
1673
  /**
1674
  * Schedule events for the abadoned carts to send emails.
1675
  *
1676
  * @param integer $session_id user session id.
 
1677
  */
1678
- function schedule_emails( $session_id ) {
1679
 
1680
  $checkout_details = $this->get_checkout_details( $session_id );
1681
 
1682
- $user_exist = get_user_by( 'email', $checkout_details->email );
1683
- // Don't schedule emails if products are already purchased.
1684
- if ( $user_exist ) {
1685
- $purchasing_products = unserialize( $checkout_details->cart_contents );
1686
- $already_purchased = true;
1687
- foreach ( $purchasing_products as $purchasing_product ) {
1688
- if ( isset( $purchasing_product['product_id'] ) ) {
1689
- $has_already_purchased = $this->wcf_ca_wc_customer_bought_product( $user_exist->user_email, $user_exist->ID, $purchasing_product['product_id'], 30 );
1690
- if ( ! $has_already_purchased ) {
1691
- $already_purchased = false;
1692
- break;
 
 
 
 
 
 
 
 
 
 
 
1693
  }
1694
  }
1695
- }
1696
- if ( $already_purchased ) {
1697
- return;
1698
  }
1699
  }
1700
 
@@ -1707,8 +1661,12 @@ class Cartflows_Ca_Cart_Abandonment {
1707
 
1708
  foreach ( $templates as $template ) {
1709
 
 
 
 
 
1710
  $timestamp_str = '+' . $template->frequency . ' ' . $template->frequency_unit . 'S';
1711
- $scheduled_time = date( WCF_CA_DATETIME_FORMAT, strtotime( $checkout_details->time . $timestamp_str ) );
1712
  $discount_type = $email_tmpl->get_email_template_meta_by_key( $template->id, 'discount_type' );
1713
  $discount_type = isset( $discount_type->meta_value ) ? $discount_type->meta_value : '';
1714
  $amount = $email_tmpl->get_email_template_meta_by_key( $template->id, 'coupon_amount' );
@@ -1719,7 +1677,7 @@ class Cartflows_Ca_Cart_Abandonment {
1719
  $coupon_expiry_date = isset( $coupon_expiry_date->meta_value ) ? $coupon_expiry_date->meta_value : '';
1720
  $coupon_expiry_unit = isset( $coupon_expiry_unit->meta_value ) ? $coupon_expiry_unit->meta_value : 'hours';
1721
 
1722
- $coupon_expiry_date = $coupon_expiry_date ? strtotime( $scheduled_time, strtotime( '+' . $coupon_expiry_date . ' ' . $coupon_expiry_unit ) ) : '';
1723
 
1724
  $override_global_coupon = $email_tmpl->get_email_template_meta_by_key( $template->id, 'override_global_coupon' );
1725
 
71
  if ( WCF_CA_PAGE_NAME === $page ) {
72
  // Adding filter to add new button to add custom fields.
73
  add_filter( 'mce_buttons', array( $this, 'wcf_filter_mce_button' ) );
74
+ add_filter( 'mce_external_plugins', array( $this, 'wcf_filter_mce_plugin' ), 9 );
75
  }
76
 
77
  add_filter( 'cron_schedules', array( $this, 'cartflows_ca_update_order_status_action' ) );
223
  array_push( $buttons, 'cartflows_ac' );
224
  return $buttons;
225
  }
226
+
227
  /**
228
  * Initialise all the constants
229
  */
243
  define( 'WCF_ACTION_REPORTS', 'reports' );
244
 
245
  define( 'WCF_SUB_ACTION_REPORTS_VIEW', 'view' );
246
+ define( 'WCF_SUB_ACTION_REPORTS_RESCHEDULE', 'reschedule' );
247
 
248
  define( 'WCF_DEFAULT_CUT_OFF_TIME', 15 );
249
  define( 'WCF_DEFAULT_COUPON_AMOUNT', 10 );
338
  );
339
 
340
  $vars = array(
341
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
342
+ '_nonce' => wp_create_nonce( 'cartflows_save_cart_abandonment_data' ),
343
+ '_gdpr_nonce' => wp_create_nonce( 'cartflows_skip_cart_tracking_gdpr' ),
344
+ '_post_id' => get_the_ID(),
345
+ '_show_gdpr_message' => ( wcf_ca()->utils->is_gdpr_enabled() && ! isset( $_COOKIE['wcf_ca_skip_track_data'] ) ),
346
+ '_gdpr_message' => get_option( 'wcf_ca_gdpr_message' ),
347
+ '_gdpr_nothanks_msg' => __( 'No Thanks', 'cartflows-ca' ),
348
+ '_gdpr_after_no_thanks_msg' => __( 'You won\'t receive further emails from us, thank you!', 'cartflows-ca' ),
349
+ 'enable_ca_tracking' => true,
350
  );
351
 
352
  wp_localize_script( 'cartflows-cart-abandonment-tracking', 'CartFlowsProCAVars', $vars );
842
  }
843
 
844
 
 
845
  /**
846
  * Add submenu to admin menu.
847
  *
1375
  $from_email_preview = get_option( 'wcf_ca_reply_email' );
1376
 
1377
  $user_first_name = ucfirst( $other_fields['wcf_first_name'] );
1378
+ $user_first_name = $user_first_name ? $user_first_name : __( 'there', 'cartflows-ca' );
1379
  $user_last_name = ucfirst( $other_fields['wcf_last_name'] );
1380
  $user_full_name = trim( $user_first_name . ' ' . $user_last_name );
1381
 
1405
 
1406
  $current_time_stamp = $email_data->time;
1407
  $body_email_preview = str_replace( '{{cart.abandoned_date}}', $current_time_stamp, $body_email_preview );
1408
+ $unsubscribe_element = '<a target="_blank" style="color: lightgray" href="' . $checkout_url . '&unsubscribe=true' . '">' . __( 'Unsubscribe', 'cartflows-ca' ) . '</a>';
1409
  $body_email_preview = str_replace( '{{cart.unsubscribe}}', $unsubscribe_element, $body_email_preview );
1410
  $body_email_preview = str_replace( '{{cart.checkout_url}}', $checkout_url, $body_email_preview );
1411
  $host = parse_url( get_site_url() );
1486
  $cart_items = unserialize( $cart_contents );
1487
  $currency_symbol = get_woocommerce_currency_symbol();
1488
  $tr = '';
 
 
 
1489
  $style = 'style="color: #636363; border: 1px solid #e5e5e5; "';
1490
 
1491
  foreach ( $cart_items as $cart_item ) {
1492
 
 
 
 
 
1493
  $tr = $tr . '<tr style="color: #636363; border: 1px solid #e5e5e5;" align="center">
1494
  <td ' . $style . '><img class="demo_img" width="42" height="42" src=" ' . esc_url( get_the_post_thumbnail_url( $cart_item['product_id'] ) ) . ' "/></td>
1495
  <td ' . $style . '>' . $cart_item['data']->get_title() . '</td>
1506
  <th ' . $style . '>' . __( 'Quantity', 'cartflows-ca' ) . '</th>
1507
  <th ' . $style . '>' . __( 'Price', 'cartflows-ca' ) . '</th>
1508
  <th ' . $style . '>' . __( 'Line Subtotal', 'cartflows-ca' ) . '</th>
1509
+ </tr> ' . $tr . '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1510
  </table>';
1511
 
1512
  }
1579
  * Copied WC function for date parameter addition.
1580
  *
1581
  * @param string $customer_email customer email.
 
1582
  * @param int $product_id product id.
1583
  * @param int $days days.
1584
  * @return array|bool|mixed|void
1585
  */
1586
+ function wcf_ca_wc_customer_bought_product( $customer_email, $product_id, $days = 365 ) {
1587
  global $wpdb;
1588
 
1589
+ $statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() );
1590
+ // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
1591
+ $result = $wpdb->get_var(
1592
+ $wpdb->prepare(
1593
+ "SELECT COUNT(p.ID) FROM {$wpdb->prefix}posts AS p
1594
+ INNER JOIN {$wpdb->prefix}postmeta AS pm ON p.ID = pm.post_id
1595
+ INNER JOIN {$wpdb->prefix}woocommerce_order_items AS woi ON p.ID = woi.order_id
1596
+ INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS woim ON woi.order_item_id = woim.order_item_id
1597
+ WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
1598
+ AND pm.meta_key = '_billing_email'
1599
+ AND pm.meta_value = %s
1600
+ AND woim.meta_key IN ( '_product_id', '_variation_id' )
1601
+ AND woim.meta_value = %s
1602
+ AND p.post_date > '" . date( 'Y-m-d', strtotime( '-' . $days . ' days' ) ) . "'
1603
+ ",
1604
+ $customer_email,
1605
+ $product_id
1606
+ )
1607
+ );
 
 
 
 
 
 
 
 
 
 
1608
 
1609
+ // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1610
 
1611
+ return intval( $result ) > 0 ? true : false;
 
 
 
1612
 
 
 
 
1613
  }
1614
+
1615
  /**
1616
  * Schedule events for the abadoned carts to send emails.
1617
  *
1618
  * @param integer $session_id user session id.
1619
+ * @param boolean $force_reschedule force reschedule.
1620
  */
1621
+ function schedule_emails( $session_id, $force_reschedule = false ) {
1622
 
1623
  $checkout_details = $this->get_checkout_details( $session_id );
1624
 
1625
+ if ( ( $checkout_details->unsubscribed ) || ( WCF_CART_COMPLETED_ORDER === $checkout_details->order_status ) ) {
1626
+ return;
1627
+ }
1628
+ $scheduled_time_from = current_time( WCF_CA_DATETIME_FORMAT );
1629
+ $scheduled_emails = $this->fetch_scheduled_emails( $session_id );
1630
+ $scheduled_templates = array_column( $scheduled_emails, 'template_id' );
1631
+
1632
+ // Skip if forcfully rescheduled.
1633
+ if ( ! $force_reschedule ) {
1634
+ $scheduled_time_from = $checkout_details->time;
1635
+ $user_exist = get_user_by( 'email', $checkout_details->email );
1636
+ // Don't schedule emails if products are already purchased.
1637
+ if ( $user_exist ) {
1638
+ $purchasing_products = unserialize( $checkout_details->cart_contents );
1639
+ $already_purchased = true;
1640
+ foreach ( $purchasing_products as $purchasing_product ) {
1641
+ if ( isset( $purchasing_product['product_id'] ) ) {
1642
+ $has_already_purchased = $this->wcf_ca_wc_customer_bought_product( $user_exist->user_email, $purchasing_product['product_id'], 30 );
1643
+ if ( ! $has_already_purchased ) {
1644
+ $already_purchased = false;
1645
+ break;
1646
+ }
1647
  }
1648
  }
1649
+ if ( $already_purchased ) {
1650
+ return;
1651
+ }
1652
  }
1653
  }
1654
 
1661
 
1662
  foreach ( $templates as $template ) {
1663
 
1664
+ if ( false !== array_search( $template->id, $scheduled_templates, true ) ) {
1665
+ continue;
1666
+ }
1667
+
1668
  $timestamp_str = '+' . $template->frequency . ' ' . $template->frequency_unit . 'S';
1669
+ $scheduled_time = date( WCF_CA_DATETIME_FORMAT, strtotime( $scheduled_time_from . $timestamp_str ) );
1670
  $discount_type = $email_tmpl->get_email_template_meta_by_key( $template->id, 'discount_type' );
1671
  $discount_type = isset( $discount_type->meta_value ) ? $discount_type->meta_value : '';
1672
  $amount = $email_tmpl->get_email_template_meta_by_key( $template->id, 'coupon_amount' );
1677
  $coupon_expiry_date = isset( $coupon_expiry_date->meta_value ) ? $coupon_expiry_date->meta_value : '';
1678
  $coupon_expiry_unit = isset( $coupon_expiry_unit->meta_value ) ? $coupon_expiry_unit->meta_value : 'hours';
1679
 
1680
+ $coupon_expiry_date = $coupon_expiry_date ? strtotime( $scheduled_time . ' +' . $coupon_expiry_date . ' ' . $coupon_expiry_unit ) : '';
1681
 
1682
  $override_global_coupon = $email_tmpl->get_email_template_meta_by_key( $template->id, 'override_global_coupon' );
1683
 
modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php CHANGED
@@ -30,10 +30,42 @@
30
 
31
  <!-- First panel Start -->
32
  <div class="wcf-ca-panel">
33
- <div class="wcf-ca-column wcf-ca-column-two">
34
  <div class="wcf-ca-email-data">
35
 
36
- <h2> <?php _e( 'Email Details:', 'cartflows-ca' ); ?> </h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  <?php if ( empty( $scheduled_emails ) ) : ?>
38
  <div style="text-align: center;"><strong> <?php _e( ' No Email Scheduled.', 'cartflows-ca' ); ?></strong>
39
  </div>
@@ -103,9 +135,21 @@
103
  </div>
104
  </div>
105
 
106
- <div class="wcf-ca-column wcf-ca-column-two">
107
  <div class="wcf-ca-user-detail ">
108
- <h2> <?php _e( 'User Address Details:', 'cartflows-ca' ); ?> </h2>
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  <div class="wcf-ca-user-address wcf-pull-left">
111
  <h3> <?php _e( 'Billing Address', 'cartflows-ca' ); ?> </h3>
30
 
31
  <!-- First panel Start -->
32
  <div class="wcf-ca-panel">
33
+ <div class="wcf-ca-column wcf-ca-column-two wcf-ca-margin-right">
34
  <div class="wcf-ca-email-data">
35
 
36
+ <div class="wcf-ca-report-btn" style="padding: 0px">
37
+ <div class="wcf-ca-left-report-field-group">
38
+ <h2> <?php _e( 'Email Details:', 'cartflows-ca' ); ?> </h2>
39
+ </div>
40
+ <div class="wcf-ca-right-report-field-group">
41
+
42
+ <?php if ( WCF_CART_ABANDONED_ORDER === $details->order_status && ! $details->unsubscribed ) : ?>
43
+ <?php add_thickbox(); ?>
44
+ <div id="wcf-ca-confirm-email-reschedule" style="display:none;">
45
+ <div style="text-align:center;">
46
+ <p>
47
+ All new activated emails will be reschedule for this abandoned order. <br/>New emails will
48
+ be sent to user according to schedule time.
49
+ </p>
50
+ <p>
51
+ <strong>Are your sure?</strong>
52
+ </p>
53
+ <p>
54
+ <button onclick="window.location.search += '&sub_action=<?php echo WCF_SUB_ACTION_REPORTS_RESCHEDULE; ?>';"
55
+ class="button button-secondary"> Reschedule
56
+ </button>
57
+ <button type="button"
58
+ onclick='document.getElementById("TB_closeWindowButton").click()'
59
+ class="button button-secondary"> Close
60
+ </button>
61
+ </p>
62
+ </div>
63
+ </div>
64
+ <a name="Do you really want to reschedule emails?" href="#TB_inline?&width=500&height=200&inlineId=wcf-ca-confirm-email-reschedule" class="thickbox button button-secondary"> Reschedule Emails </a>
65
+ <?php endif; ?>
66
+ </div>
67
+ </div>
68
+
69
  <?php if ( empty( $scheduled_emails ) ) : ?>
70
  <div style="text-align: center;"><strong> <?php _e( ' No Email Scheduled.', 'cartflows-ca' ); ?></strong>
71
  </div>
135
  </div>
136
  </div>
137
 
138
+ <div class="wcf-ca-column wcf-ca-column-two wcf-ca-margin-left">
139
  <div class="wcf-ca-user-detail ">
140
+
141
+ <div class="wcf-ca-report-btn" style="padding: 0px">
142
+ <div class="wcf-ca-left-report-field-group">
143
+ <h2> <?php _e( 'User Address Details:', 'cartflows-ca' ); ?> </h2>
144
+ </div>
145
+ <div class="wcf-ca-right-report-field-group">
146
+ <?php if ( $details->unsubscribed ) : ?>
147
+ <span class="wcf-ca-tag"> <?php _e( 'Unsubscribed', 'cartflows-ca' ); ?> </span>
148
+ <?php endif; ?>
149
+
150
+ <span class="wcf-ca-tag"> <?php echo ucfirst( $details->order_status ); ?> </span>
151
+ </div>
152
+ </div>
153
 
154
  <div class="wcf-ca-user-address wcf-pull-left">
155
  <h3> <?php _e( 'Billing Address', 'cartflows-ca' ); ?> </h3>
modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-tabs.php CHANGED
@@ -39,6 +39,25 @@
39
 
40
  case WCF_SUB_ACTION_REPORTS_VIEW:
41
  $this->wcf_display_report_details();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  break;
43
  default:
44
  $this->wcf_display_reports();
39
 
40
  case WCF_SUB_ACTION_REPORTS_VIEW:
41
  $this->wcf_display_report_details();
42
+ break;
43
+ case WCF_SUB_ACTION_REPORTS_RESCHEDULE:
44
+ $ca_obj = Cartflows_Ca_Cart_Abandonment::get_instance();
45
+
46
+ $session_id = filter_input( INPUT_GET, 'session_id', FILTER_SANITIZE_STRING );
47
+ if ( $session_id ) {
48
+ $ca_obj->schedule_emails( $session_id, true );
49
+ }
50
+
51
+ $param = array(
52
+ 'page' => WCF_CA_PAGE_NAME,
53
+ 'action' => WCF_ACTION_REPORTS,
54
+ 'sub_action' => WCF_SUB_ACTION_REPORTS_VIEW,
55
+ 'session_id' => $session_id,
56
+ );
57
+ $redirect_url = add_query_arg( $param, admin_url( '/admin.php' ) );
58
+
59
+ wp_safe_redirect( $redirect_url );
60
+
61
  break;
62
  default:
63
  $this->wcf_display_reports();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BrainstormForce
4
  Tags: woocommerce, cart abandonment, cart recovery
5
  Requires at least: 4.4
6
  Tested up to: 5.2
7
- Stable tag: 1.1.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -30,6 +30,12 @@ Yes, of course. We have built it in a way that it will work with CartFlows as we
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
 
33
  = Version 1.1.0 - Thursday, 30th May 2019 =
34
  * Added a view for admin to check email status specific to the particular abandoned user.
35
 
4
  Tags: woocommerce, cart abandonment, cart recovery
5
  Requires at least: 4.4
6
  Tested up to: 5.2
7
+ Stable tag: 1.1.1
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
30
 
31
  == Changelog ==
32
 
33
+ = Version 1.1.1 - Thursday, 06th June 2019 =
34
+ * New: Added feature to reschedule emails for Admin.
35
+ * Fix: Coupon expiry time issue.
36
+ * Fix: Email issue for a user who has an already purchased order.
37
+ * Fix: Translatable strings updated.
38
+
39
  = Version 1.1.0 - Thursday, 30th May 2019 =
40
  * Added a view for admin to check email status specific to the particular abandoned user.
41
 
woo-cart-abandonment-recovery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Cart Abandonment Recovery
4
  * Plugin URI: https://cartflows.com/
5
  * Description: Recover your lost revenue. Capture email address of users on the checkout page and send follow up emails if they don't complete the purchase.
6
- * Version: 1.1.0
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: cartflows-ca
3
  * Plugin Name: WooCommerce Cart Abandonment Recovery
4
  * Plugin URI: https://cartflows.com/
5
  * Description: Recover your lost revenue. Capture email address of users on the checkout page and send follow up emails if they don't complete the purchase.
6
+ * Version: 1.1.1
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: cartflows-ca