WooCommerce Cart Abandonment Recovery - Version 1.1.9

Version Description

Download this release

Release Info

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

Code changes from version 1.1.8 to 1.1.9

admin/assets/css/admin-cart-abandonment-rtl.css CHANGED
@@ -395,4 +395,8 @@
395
 
396
  .wcf-ca-tag:hover::after {
397
  border-right-color: #f16334;
 
 
 
 
398
  }
395
 
396
  .wcf-ca-tag:hover::after {
397
  border-right-color: #f16334;
398
+ }
399
+
400
+ .wcf-sub-heading {
401
+ font-weight: 400;
402
  }
changelog.txt CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  Version 1.1.8 - Tuesday, 3rd September 2019
2
  - New: Option added to auto-apply coupon on the checkout.
3
  - New: Option added to apply coupon individually.
1
+ Version 1.1.9 - Thursday, 19th September 2019
2
+ - New: Option added to ignore users from cart abandonment process.
3
+ - New: Filter added to customize the styling of email template table.
4
+ - Improvement: Added compatibility with Razorpay plugin.
5
+ - Fix: Email template markup was breaking after save.
6
+ - Fix: Failed orders were getting marked as completed.
7
+ - Fix: Empty order was getting tracked and email sending for it.
8
+ - Fix: Email settings options were swapping value of from and reply-to.
9
+
10
  Version 1.1.8 - Tuesday, 3rd September 2019
11
  - New: Option added to auto-apply coupon on the checkout.
12
  - New: Option added to apply coupon individually.
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.8' );
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.9' );
81
  define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
82
 
83
  define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
classes/class-cartflows-ca-settings.php CHANGED
@@ -27,6 +27,7 @@ class Cartflows_Ca_Settings {
27
  add_filter( 'plugin_action_links_' . CARTFLOWS_CA_BASE, array( $this, 'add_action_links' ), 999 );
28
  }
29
 
 
30
  /**
31
  * Adding action links for plugin list page.
32
  *
@@ -69,6 +70,20 @@ class Cartflows_Ca_Settings {
69
  'wcf_ca_status'
70
  );
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  // End: Settings for cart abandonment.
73
  // Start: Settings for email templates.
74
  add_settings_section(
@@ -451,6 +466,44 @@ class Cartflows_Ca_Settings {
451
  echo $html;
452
  }
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  /**
455
  * Callback for cart abandonment status.
456
  *
27
  add_filter( 'plugin_action_links_' . CARTFLOWS_CA_BASE, array( $this, 'add_action_links' ), 999 );
28
  }
29
 
30
+
31
  /**
32
  * Adding action links for plugin list page.
33
  *
70
  'wcf_ca_status'
71
  );
72
 
73
+ add_settings_field(
74
+ 'wcf_ca_ignore_users',
75
+ __( 'Disable Tracking For', 'woo-cart-abandonment-recovery' ),
76
+ array( $this, 'wcf_ca_ignore_users_callback' ),
77
+ WCF_CA_PAGE_NAME,
78
+ WCF_CA_GENERAL_SETTINGS_SECTION,
79
+ array( '<br><span class="description"><strong>Note:</strong>' . __( ' It will ignore selected users from abandonment process when they logged in, and hence they can not receive mail for cart abandoned by themselves.', 'woo-cart-abandonment-recovery' ) . '</span>' )
80
+ );
81
+
82
+ register_setting(
83
+ WCF_CA_SETTINGS_OPTION_GROUP,
84
+ 'wcf_ca_ignore_users'
85
+ );
86
+
87
  // End: Settings for cart abandonment.
88
  // Start: Settings for email templates.
89
  add_settings_section(
466
  echo $html;
467
  }
468
 
469
+ /**
470
+ * Callback for ignore users from tracking cart.
471
+ *
472
+ * @param array $args args.
473
+ * @since 1.1.5
474
+ */
475
+ function wcf_ca_ignore_users_callback( $args ) {
476
+
477
+ $wcf_ca_ignore_users = get_option( 'wcf_ca_ignore_users' );
478
+ $html = '';
479
+ $roles_obj = new WP_Roles();
480
+ $roles_names_array = $roles_obj->get_names();
481
+ $roles_names_array = array_diff( $roles_names_array, ( is_array( 'Customer' ) ? $value : array( 'Customer' ) ) );
482
+ ?>
483
+ <p class="wcf_ca_ignore_users" name="wcf_ca_ignore_users" multiple="multiple">
484
+ <?php
485
+ foreach ( $roles_names_array as $role_name ) {
486
+ ?>
487
+ <input type="checkbox" name="wcf_ca_ignore_users[]"
488
+ <?php
489
+ if ( ! empty( $wcf_ca_ignore_users ) ) {
490
+ foreach ( $wcf_ca_ignore_users as $user ) {
491
+ checked( $user, $role_name );
492
+ }
493
+ }
494
+ ?>
495
+ value="<?php echo esc_attr( $role_name ); ?>">
496
+ <?php
497
+ echo $role_name;
498
+ echo '<br> ';
499
+ }
500
+ ?>
501
+ </p>
502
+ <?php
503
+ $html .= '<span for="wcf_ca_ignore_users"> ' . $args[0] . '</span>';
504
+ echo $html;
505
+ }
506
+
507
  /**
508
  * Callback for cart abandonment status.
509
  *
languages/woo-cart-abandonment-recovery.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.8\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
- "POT-Creation-Date: 2019-09-03 07:19:54+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -40,111 +40,121 @@ msgstr ""
40
  msgid "Install WooCommerce"
41
  msgstr ""
42
 
43
- #: classes/class-cartflows-ca-settings.php:53
44
  msgid "Cart Abandonment Settings"
45
  msgstr ""
46
 
47
- #: classes/class-cartflows-ca-settings.php:60
48
  msgid "Enable Tracking"
49
  msgstr ""
50
 
51
- #: classes/class-cartflows-ca-settings.php:64
52
  msgid ""
53
  "Start capturing abandoned carts. <br/><br/> <span "
54
  "class=\"description\"><strong>Note:</strong> Cart will be considered "
55
  "abandoned if order is not completed in <strong>15 minutes</strong>.</span>"
56
  msgstr ""
57
 
58
- #: classes/class-cartflows-ca-settings.php:76
 
 
 
 
 
 
 
 
 
 
59
  msgid "Email Settings"
60
  msgstr ""
61
 
62
- #: classes/class-cartflows-ca-settings.php:83
63
  msgid "\"From\" Name"
64
  msgstr ""
65
 
66
- #: classes/class-cartflows-ca-settings.php:92
67
  msgid "\"From\" Address"
68
  msgstr ""
69
 
70
- #: classes/class-cartflows-ca-settings.php:101
71
  msgid "\"Reply To\" Address"
72
  msgstr ""
73
 
74
- #: classes/class-cartflows-ca-settings.php:128
75
  msgid "Enable Webhook"
76
  msgstr ""
77
 
78
- #: classes/class-cartflows-ca-settings.php:132
79
  msgid ""
80
  "Allows you to trigger webhook automatically upon cart abandonment and "
81
  "recovery."
82
  msgstr ""
83
 
84
- #: classes/class-cartflows-ca-settings.php:137
85
  msgid "Webhook URL"
86
  msgstr ""
87
 
88
- #: classes/class-cartflows-ca-settings.php:156
89
  msgid "Coupon Code Settings"
90
  msgstr ""
91
 
92
- #: classes/class-cartflows-ca-settings.php:163
93
  msgid "Create Coupon Code"
94
  msgstr ""
95
 
96
- #: classes/class-cartflows-ca-settings.php:167
97
  msgid ""
98
  "Auto-create the special coupon for the abandoned cart to send over the "
99
  "emails."
100
  msgstr ""
101
 
102
- #: classes/class-cartflows-ca-settings.php:172
103
  #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:491
104
  msgid "Discount Type"
105
  msgstr ""
106
 
107
- #: classes/class-cartflows-ca-settings.php:181
108
  #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:523
109
  msgid "Coupon Amount"
110
  msgstr ""
111
 
112
- #: classes/class-cartflows-ca-settings.php:190
113
  msgid "Coupon Expires After"
114
  msgstr ""
115
 
116
- #: classes/class-cartflows-ca-settings.php:225
117
  msgid "Webhook Settings"
118
  msgstr ""
119
 
120
- #: classes/class-cartflows-ca-settings.php:234
121
  msgid "GDPR Settings"
122
  msgstr ""
123
 
124
- #: classes/class-cartflows-ca-settings.php:241
125
  msgid "Enable GDPR Integration"
126
  msgstr ""
127
 
128
- #: classes/class-cartflows-ca-settings.php:245
129
  msgid ""
130
  "Ask confirmation from the user before tracking data. <br/><br/> <span "
131
  "class=\"description\"><strong>Note:</strong> By checking this, it will show "
132
  "up confirmation text below the email id on checkout page.</span>"
133
  msgstr ""
134
 
135
- #: classes/class-cartflows-ca-settings.php:250
136
  msgid "GDPR Message"
137
  msgstr ""
138
 
139
- #: classes/class-cartflows-ca-settings.php:421
140
  msgid "Coupon code should be numeric and has to be greater than or equals to 1."
141
  msgstr ""
142
 
143
- #: classes/class-cartflows-ca-settings.php:531
144
  msgid "Invalid email \"From\" address field"
145
  msgstr ""
146
 
147
- #: classes/class-cartflows-ca-settings.php:549
148
  msgid "Invalid email \"Reply\" address field"
149
  msgstr ""
150
 
@@ -160,13 +170,13 @@ msgid "Delete"
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:1502
164
  msgid "Unsubscribe"
165
  msgstr ""
166
 
167
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:184
168
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1632
169
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1687
170
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:168
171
  msgid "Name"
172
  msgstr ""
@@ -176,7 +186,7 @@ msgid "Email"
176
  msgstr ""
177
 
178
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:186
179
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1709
180
  msgid "Cart Total"
181
  msgstr ""
182
 
@@ -189,101 +199,101 @@ msgid "Time"
189
  msgstr ""
190
 
191
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:119
192
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:825
193
  msgid "This order was abandoned & subsequently recovered."
194
  msgstr ""
195
 
196
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:136
197
  msgid "Mail has been sent successfully!"
198
  msgstr ""
199
 
200
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:138
201
  msgid "Mail sending failed!"
202
  msgstr ""
203
 
204
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:178
205
  msgid "Every Fifteen Minutes"
206
  msgstr ""
207
 
208
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:242
209
  msgid "You have successfully unsubscribed from our email list."
210
  msgstr ""
211
 
212
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:242
213
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:159
214
  msgid "Unsubscribed"
215
  msgstr ""
216
 
217
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:402
218
  msgid "No Thanks"
219
  msgstr ""
220
 
221
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:403
222
  msgid "You won't receive further emails from us, thank you!"
223
  msgstr ""
224
 
225
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:937
226
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:938
227
  msgid "Cart Abandonment"
228
  msgstr ""
229
 
230
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:971
231
  msgid "Items deleted: %d"
232
  msgstr ""
233
 
234
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:988
235
  msgid "User unsubscribed successfully!"
236
  msgstr ""
237
 
238
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1183
239
  msgid "Report"
240
  msgstr ""
241
 
242
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1199
243
  msgid "Follow-Up Emails"
244
  msgstr ""
245
 
246
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1215
247
  msgid "Settings"
248
  msgstr ""
249
 
250
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1464
251
  msgid "there"
252
  msgstr ""
253
 
254
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1624
255
  msgid "Cart Total ( Cart Total + Shipping + Tax )"
256
  msgstr ""
257
 
258
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1631
259
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1686
260
  msgid "Item"
261
  msgstr ""
262
 
263
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1633
264
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1688
265
  msgid "Quantity"
266
  msgstr ""
267
 
268
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1634
269
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1689
270
  msgid "Price"
271
  msgstr ""
272
 
273
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1635
274
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1690
275
  msgid "Line Subtotal"
276
  msgstr ""
277
 
278
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1696
279
  msgid "Discount"
280
  msgstr ""
281
 
282
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1700
283
  msgid "Other"
284
  msgstr ""
285
 
286
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1705
287
  msgid "Shipping"
288
  msgstr ""
289
 
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.9\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
+ "POT-Creation-Date: 2019-09-19 09:54:21+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
40
  msgid "Install WooCommerce"
41
  msgstr ""
42
 
43
+ #: classes/class-cartflows-ca-settings.php:54
44
  msgid "Cart Abandonment Settings"
45
  msgstr ""
46
 
47
+ #: classes/class-cartflows-ca-settings.php:61
48
  msgid "Enable Tracking"
49
  msgstr ""
50
 
51
+ #: classes/class-cartflows-ca-settings.php:65
52
  msgid ""
53
  "Start capturing abandoned carts. <br/><br/> <span "
54
  "class=\"description\"><strong>Note:</strong> Cart will be considered "
55
  "abandoned if order is not completed in <strong>15 minutes</strong>.</span>"
56
  msgstr ""
57
 
58
+ #: classes/class-cartflows-ca-settings.php:75
59
+ msgid "Disable Tracking For"
60
+ msgstr ""
61
+
62
+ #: classes/class-cartflows-ca-settings.php:79
63
+ msgid ""
64
+ " It will ignore selected users from abandonment process when they logged "
65
+ "in, and hence they can not receive mail for cart abandoned by themselves."
66
+ msgstr ""
67
+
68
+ #: classes/class-cartflows-ca-settings.php:91
69
  msgid "Email Settings"
70
  msgstr ""
71
 
72
+ #: classes/class-cartflows-ca-settings.php:98
73
  msgid "\"From\" Name"
74
  msgstr ""
75
 
76
+ #: classes/class-cartflows-ca-settings.php:107
77
  msgid "\"From\" Address"
78
  msgstr ""
79
 
80
+ #: classes/class-cartflows-ca-settings.php:116
81
  msgid "\"Reply To\" Address"
82
  msgstr ""
83
 
84
+ #: classes/class-cartflows-ca-settings.php:143
85
  msgid "Enable Webhook"
86
  msgstr ""
87
 
88
+ #: classes/class-cartflows-ca-settings.php:147
89
  msgid ""
90
  "Allows you to trigger webhook automatically upon cart abandonment and "
91
  "recovery."
92
  msgstr ""
93
 
94
+ #: classes/class-cartflows-ca-settings.php:152
95
  msgid "Webhook URL"
96
  msgstr ""
97
 
98
+ #: classes/class-cartflows-ca-settings.php:171
99
  msgid "Coupon Code Settings"
100
  msgstr ""
101
 
102
+ #: classes/class-cartflows-ca-settings.php:178
103
  msgid "Create Coupon Code"
104
  msgstr ""
105
 
106
+ #: classes/class-cartflows-ca-settings.php:182
107
  msgid ""
108
  "Auto-create the special coupon for the abandoned cart to send over the "
109
  "emails."
110
  msgstr ""
111
 
112
+ #: classes/class-cartflows-ca-settings.php:187
113
  #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:491
114
  msgid "Discount Type"
115
  msgstr ""
116
 
117
+ #: classes/class-cartflows-ca-settings.php:196
118
  #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:523
119
  msgid "Coupon Amount"
120
  msgstr ""
121
 
122
+ #: classes/class-cartflows-ca-settings.php:205
123
  msgid "Coupon Expires After"
124
  msgstr ""
125
 
126
+ #: classes/class-cartflows-ca-settings.php:240
127
  msgid "Webhook Settings"
128
  msgstr ""
129
 
130
+ #: classes/class-cartflows-ca-settings.php:249
131
  msgid "GDPR Settings"
132
  msgstr ""
133
 
134
+ #: classes/class-cartflows-ca-settings.php:256
135
  msgid "Enable GDPR Integration"
136
  msgstr ""
137
 
138
+ #: classes/class-cartflows-ca-settings.php:260
139
  msgid ""
140
  "Ask confirmation from the user before tracking data. <br/><br/> <span "
141
  "class=\"description\"><strong>Note:</strong> By checking this, it will show "
142
  "up confirmation text below the email id on checkout page.</span>"
143
  msgstr ""
144
 
145
+ #: classes/class-cartflows-ca-settings.php:265
146
  msgid "GDPR Message"
147
  msgstr ""
148
 
149
+ #: classes/class-cartflows-ca-settings.php:436
150
  msgid "Coupon code should be numeric and has to be greater than or equals to 1."
151
  msgstr ""
152
 
153
+ #: classes/class-cartflows-ca-settings.php:584
154
  msgid "Invalid email \"From\" address field"
155
  msgstr ""
156
 
157
+ #: classes/class-cartflows-ca-settings.php:602
158
  msgid "Invalid email \"Reply\" address field"
159
  msgstr ""
160
 
170
  msgstr ""
171
 
172
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:70
173
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1554
174
  msgid "Unsubscribe"
175
  msgstr ""
176
 
177
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:184
178
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1696
179
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1751
180
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:168
181
  msgid "Name"
182
  msgstr ""
186
  msgstr ""
187
 
188
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:186
189
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1773
190
  msgid "Cart Total"
191
  msgstr ""
192
 
199
  msgstr ""
200
 
201
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:119
202
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:859
203
  msgid "This order was abandoned & subsequently recovered."
204
  msgstr ""
205
 
206
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:141
207
  msgid "Mail has been sent successfully!"
208
  msgstr ""
209
 
210
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:143
211
  msgid "Mail sending failed!"
212
  msgstr ""
213
 
214
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:183
215
  msgid "Every Fifteen Minutes"
216
  msgstr ""
217
 
218
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:247
219
  msgid "You have successfully unsubscribed from our email list."
220
  msgstr ""
221
 
222
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:247
223
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:159
224
  msgid "Unsubscribed"
225
  msgstr ""
226
 
227
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:421
228
  msgid "No Thanks"
229
  msgstr ""
230
 
231
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:422
232
  msgid "You won't receive further emails from us, thank you!"
233
  msgstr ""
234
 
235
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:987
236
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:988
237
  msgid "Cart Abandonment"
238
  msgstr ""
239
 
240
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1021
241
  msgid "Items deleted: %d"
242
  msgstr ""
243
 
244
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1038
245
  msgid "User unsubscribed successfully!"
246
  msgstr ""
247
 
248
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1233
249
  msgid "Report"
250
  msgstr ""
251
 
252
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1249
253
  msgid "Follow-Up Emails"
254
  msgstr ""
255
 
256
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1265
257
  msgid "Settings"
258
  msgstr ""
259
 
260
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1516
261
  msgid "there"
262
  msgstr ""
263
 
264
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1688
265
  msgid "Cart Total ( Cart Total + Shipping + Tax )"
266
  msgstr ""
267
 
268
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1695
269
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1750
270
  msgid "Item"
271
  msgstr ""
272
 
273
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1697
274
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1752
275
  msgid "Quantity"
276
  msgstr ""
277
 
278
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1698
279
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1753
280
  msgid "Price"
281
  msgstr ""
282
 
283
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1699
284
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1754
285
  msgid "Line Subtotal"
286
  msgstr ""
287
 
288
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1760
289
  msgid "Discount"
290
  msgstr ""
291
 
292
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1764
293
  msgid "Other"
294
  msgstr ""
295
 
296
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1769
297
  msgid "Shipping"
298
  msgstr ""
299
 
modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php CHANGED
@@ -95,14 +95,14 @@ class Cartflows_Ca_Cart_Abandonment {
95
  */
96
  public function wcf_ca_update_order_status( $order_id, $old_order_status, $new_order_status ) {
97
 
98
- $acceptable_order_statuses = array( 'completed', 'processing' );
99
 
100
  if ( $order_id && in_array( $new_order_status, $acceptable_order_statuses, true ) ) {
101
 
102
  $order = wc_get_order( $order_id );
103
 
104
  $order_email = $order->get_billing_email();
105
- $captured_data = $this->get_captured_data_by_email( $order_email );
106
 
107
  if ( $captured_data && is_object( $captured_data ) ) {
108
  $capture_status = $captured_data->order_status;
@@ -120,6 +120,11 @@ class Cartflows_Ca_Cart_Abandonment {
120
  $order->add_order_note( $note );
121
  $order->save();
122
  }
 
 
 
 
 
123
  }
124
  }
125
 
@@ -279,6 +284,7 @@ class Cartflows_Ca_Cart_Abandonment {
279
  define( 'WCF_CART_COMPLETED_ORDER', 'completed' );
280
  define( 'WCF_CART_LOST_ORDER', 'lost' );
281
  define( 'WCF_CART_NORMAL_ORDER', 'normal' );
 
282
  define( 'CARTFLOWS_ZAPIER_ACTION_AFTER_TIME', 1800 );
283
 
284
  define( 'WCF_ACTION_ABANDONED_CARTS', 'abandoned_carts' );
@@ -383,6 +389,19 @@ class Cartflows_Ca_Cart_Abandonment {
383
  */
384
  function cart_abandonment_tracking_script() {
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  global $post;
387
  wp_enqueue_script(
388
  'cartflows-cart-abandonment-tracking',
@@ -438,6 +457,11 @@ class Cartflows_Ca_Cart_Abandonment {
438
  $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
439
  $minutes = wcf_ca()->utils->get_cart_abandonment_tracking_cut_off_time();
440
 
 
 
 
 
 
441
  $wp_current_datetime = current_time( WCF_CA_DATETIME_FORMAT );
442
  $abandoned_ids = $wpdb->get_results(
443
  $wpdb->prepare('SELECT `session_id` FROM `' . $cart_abandonment_table . '` WHERE `order_status` = %s AND ADDDATE( `time`, INTERVAL %d MINUTE) <= %s', WCF_CART_NORMAL_ORDER, $minutes, $wp_current_datetime ), ARRAY_A // phpcs:ignore
@@ -500,6 +524,7 @@ class Cartflows_Ca_Cart_Abandonment {
500
  )
501
  );
502
  // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
 
503
  }
504
 
505
  /**
@@ -781,6 +806,15 @@ class Cartflows_Ca_Cart_Abandonment {
781
  * @since 1.0.0
782
  */
783
  function delete_cart_abandonment_data( $order_id ) {
 
 
 
 
 
 
 
 
 
784
  global $wpdb;
785
  $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
786
  $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
@@ -791,16 +825,6 @@ class Cartflows_Ca_Cart_Abandonment {
791
  if ( isset( $session_id ) ) {
792
  $checkout_details = $this->get_checkout_details( $session_id );
793
 
794
- // Skip Future email sending..
795
- $wpdb->update(
796
- $email_history_table,
797
- array( 'email_sent' => -1 ),
798
- array(
799
- 'ca_session_id' => $session_id,
800
- 'email_sent' => 0,
801
- )
802
- );
803
-
804
  $has_mail_sent = count( $this->fetch_scheduled_emails( $session_id, true ) );
805
 
806
  if ( ! $has_mail_sent ) {
@@ -808,6 +832,16 @@ class Cartflows_Ca_Cart_Abandonment {
808
  } else {
809
  if ( $checkout_details && ( WCF_CART_ABANDONED_ORDER === $checkout_details->order_status || WCF_CART_LOST_ORDER === $checkout_details->order_status ) ) {
810
 
 
 
 
 
 
 
 
 
 
 
811
  // Update order status.
812
  $wpdb->update(
813
  $cart_abandonment_table,
@@ -826,7 +860,7 @@ class Cartflows_Ca_Cart_Abandonment {
826
  $order->add_order_note( $note );
827
  $order->save();
828
 
829
- } else {
830
  // Normal checkout.
831
 
832
  $billing_email = filter_input( INPUT_POST, 'billing_email', FILTER_SANITIZE_EMAIL );
@@ -926,6 +960,22 @@ class Cartflows_Ca_Cart_Abandonment {
926
  }
927
 
928
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
929
  /**
930
  * Add submenu to admin menu.
931
  *
@@ -1388,14 +1438,16 @@ class Cartflows_Ca_Cart_Abandonment {
1388
  */
1389
  public function create_dummy_session_for_preview_email() {
1390
 
1391
- $email_data = new stdClass();
1392
- $current_user = wp_get_current_user();
1393
- $user_data = array(
1394
  'wcf_first_name' => $current_user->user_firstname,
1395
  'wcf_last_name' => $current_user->user_lastname,
1396
  );
1397
- $email_data->checkout_id = wc_get_page_id( 'checkout' );
1398
- $email_data->session_id = 'dummy-session-id';
 
 
1399
 
1400
  $email_send_to = filter_input( INPUT_POST, 'email_send_to', FILTER_SANITIZE_EMAIL );
1401
  $email_data->email = $email_send_to ? $email_send_to : $current_user->user_email;
@@ -1457,8 +1509,8 @@ class Cartflows_Ca_Cart_Abandonment {
1457
  $other_fields = unserialize( $email_data->other_fields );
1458
 
1459
  $from_email_name = get_option( 'wcf_ca_from_name' );
1460
- $reply_name_preview = get_option( 'wcf_ca_from_email' );
1461
- $from_email_preview = get_option( 'wcf_ca_reply_email' );
1462
 
1463
  $user_first_name = ucfirst( $other_fields['wcf_first_name'] );
1464
  $user_first_name = $user_first_name ? $user_first_name : __( 'there', 'woo-cart-abandonment-recovery' );
@@ -1490,7 +1542,7 @@ class Cartflows_Ca_Cart_Abandonment {
1490
 
1491
  $token_data = array(
1492
  'wcf_session_id' => $email_data->session_id,
1493
- 'wcf_coupon_code' => $auto_apply_coupon->meta_value ? $coupon_code : null,
1494
  );
1495
 
1496
  $checkout_url = $this->get_checkout_url( $email_data->checkout_id, $token_data );
@@ -1528,6 +1580,7 @@ class Cartflows_Ca_Cart_Abandonment {
1528
  $var = $this->get_email_product_block( $email_data->cart_contents, $email_data->cart_total );
1529
 
1530
  $body_email_preview = str_replace( '{{cart.product.table}}', $var, $body_email_preview );
 
1531
  $mail_result = wp_mail( $email_data->email, $subject_email_preview, stripslashes( $body_email_preview ), $headers );
1532
  if ( $mail_result ) {
1533
  return true;
@@ -1596,7 +1649,18 @@ class Cartflows_Ca_Cart_Abandonment {
1596
 
1597
  $currency_symbol = get_woocommerce_currency_symbol();
1598
  $tr = '';
1599
- $style = 'style="color: #636363; border: 1px solid #e5e5e5; "';
 
 
 
 
 
 
 
 
 
 
 
1600
 
1601
  foreach ( $cart_items as $cart_item ) {
1602
 
@@ -1606,12 +1670,12 @@ class Cartflows_Ca_Cart_Abandonment {
1606
  continue;
1607
  }
1608
 
1609
- $tr = $tr . '<tr style="color: #636363; border: 1px solid #e5e5e5;" align="center">
1610
- <td ' . $style . '><img class="demo_img" width="42" height="42" src="' . esc_url( get_the_post_thumbnail_url( $product->get_id() ) ) . '"></td>
1611
- <td ' . $style . '>' . $product->get_title() . '</td>
1612
- <td ' . $style . '> ' . $cart_item['quantity'] . ' </td>
1613
- <td ' . $style . '>' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
1614
- <td ' . $style . ' >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
1615
  </tr> ';
1616
  }
1617
 
@@ -1620,19 +1684,19 @@ class Cartflows_Ca_Cart_Abandonment {
1620
  */
1621
  $enable_cart_total = apply_filters( 'woo_ca_recovery_enable_cart_total', false );
1622
  if ( $enable_cart_total ) {
1623
- $tr = $tr . '<tr ' . $style . ' align="center">
1624
- <td colspan="4" ' . $style . '> ' . __( 'Cart Total ( Cart Total + Shipping + Tax )', 'woo-cart-abandonment-recovery' ) . ' </td>
1625
- <td ' . $style . ' >' . $currency_symbol . number_format_i18n( $cart_total, 2 ) . '</td>
1626
  </tr> ';
1627
  }
1628
 
1629
  return '<table align="left" cellpadding="10" cellspacing="0" style="float: none; border: 1px solid #e5e5e5;">
1630
  <tr align="center">
1631
- <th ' . $style . '>' . __( 'Item', 'woo-cart-abandonment-recovery' ) . '</th>
1632
- <th ' . $style . '>' . __( 'Name', 'woo-cart-abandonment-recovery' ) . '</th>
1633
- <th ' . $style . '>' . __( 'Quantity', 'woo-cart-abandonment-recovery' ) . '</th>
1634
- <th ' . $style . '>' . __( 'Price', 'woo-cart-abandonment-recovery' ) . '</th>
1635
- <th ' . $style . '>' . __( 'Line Subtotal', 'woo-cart-abandonment-recovery' ) . '</th>
1636
  </tr> ' . $tr . '
1637
  </table>';
1638
 
@@ -1864,6 +1928,25 @@ class Cartflows_Ca_Cart_Abandonment {
1864
  return $result;
1865
  }
1866
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1867
  }
1868
 
1869
  Cartflows_Ca_Cart_Abandonment::get_instance();
95
  */
96
  public function wcf_ca_update_order_status( $order_id, $old_order_status, $new_order_status ) {
97
 
98
+ $acceptable_order_statuses = array( 'completed', 'processing', 'failed' );
99
 
100
  if ( $order_id && in_array( $new_order_status, $acceptable_order_statuses, true ) ) {
101
 
102
  $order = wc_get_order( $order_id );
103
 
104
  $order_email = $order->get_billing_email();
105
+ $captured_data = ( WCF_CART_FAILED_ORDER === $new_order_status ) ? $this->get_tracked_data_without_status( $order_email ) : $this->get_captured_data_by_email( $order_email );
106
 
107
  if ( $captured_data && is_object( $captured_data ) ) {
108
  $capture_status = $captured_data->order_status;
120
  $order->add_order_note( $note );
121
  $order->save();
122
  }
123
+
124
+ if ( WCF_CART_COMPLETED_ORDER === $capture_status ) {
125
+ // Revert the complete order status to abandoned when payment failed.
126
+ $wpdb->update( $cart_abandonment_table, array( 'order_status' => WCF_CART_ABANDONED_ORDER ), array( 'session_id' => sanitize_key( $captured_data->session_id ) ) );
127
+ }
128
  }
129
  }
130
 
284
  define( 'WCF_CART_COMPLETED_ORDER', 'completed' );
285
  define( 'WCF_CART_LOST_ORDER', 'lost' );
286
  define( 'WCF_CART_NORMAL_ORDER', 'normal' );
287
+ define( 'WCF_CART_FAILED_ORDER', 'failed' );
288
  define( 'CARTFLOWS_ZAPIER_ACTION_AFTER_TIME', 1800 );
289
 
290
  define( 'WCF_ACTION_ABANDONED_CARTS', 'abandoned_carts' );
389
  */
390
  function cart_abandonment_tracking_script() {
391
 
392
+ $wcf_ca_ignore_users = get_option( 'wcf_ca_ignore_users' );
393
+ $current_user = wp_get_current_user();
394
+ $roles = $current_user->roles;
395
+ $role = array_shift( $roles );
396
+ if ( ! empty( $wcf_ca_ignore_users ) ) {
397
+ foreach ( $wcf_ca_ignore_users as $user ) {
398
+ $user = lcfirst( $user );
399
+ if ( $role === $user ) {
400
+ return;
401
+ }
402
+ }
403
+ }
404
+
405
  global $post;
406
  wp_enqueue_script(
407
  'cartflows-cart-abandonment-tracking',
457
  $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
458
  $minutes = wcf_ca()->utils->get_cart_abandonment_tracking_cut_off_time();
459
 
460
+ /**
461
+ * Delete abandoned cart orders if empty.
462
+ */
463
+ $this->delete_empty_abandoned_order();
464
+
465
  $wp_current_datetime = current_time( WCF_CA_DATETIME_FORMAT );
466
  $abandoned_ids = $wpdb->get_results(
467
  $wpdb->prepare('SELECT `session_id` FROM `' . $cart_abandonment_table . '` WHERE `order_status` = %s AND ADDDATE( `time`, INTERVAL %d MINUTE) <= %s', WCF_CART_NORMAL_ORDER, $minutes, $wp_current_datetime ), ARRAY_A // phpcs:ignore
524
  )
525
  );
526
  // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
527
+
528
  }
529
 
530
  /**
806
  * @since 1.0.0
807
  */
808
  function delete_cart_abandonment_data( $order_id ) {
809
+
810
+ $acceptable_order_statuses = array( 'completed', 'processing' );
811
+ $order = wc_get_order( $order_id );
812
+ $order_status = $order->get_status();
813
+ if ( ! in_array( $order_status, $acceptable_order_statuses, true ) ) {
814
+ // Proceed if order status in completed or processing.
815
+ return;
816
+ }
817
+
818
  global $wpdb;
819
  $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
820
  $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
825
  if ( isset( $session_id ) ) {
826
  $checkout_details = $this->get_checkout_details( $session_id );
827
 
 
 
 
 
 
 
 
 
 
 
828
  $has_mail_sent = count( $this->fetch_scheduled_emails( $session_id, true ) );
829
 
830
  if ( ! $has_mail_sent ) {
832
  } else {
833
  if ( $checkout_details && ( WCF_CART_ABANDONED_ORDER === $checkout_details->order_status || WCF_CART_LOST_ORDER === $checkout_details->order_status ) ) {
834
 
835
+ // Skip Future email sending..
836
+ $wpdb->update(
837
+ $email_history_table,
838
+ array( 'email_sent' => -1 ),
839
+ array(
840
+ 'ca_session_id' => $session_id,
841
+ 'email_sent' => 0,
842
+ )
843
+ );
844
+
845
  // Update order status.
846
  $wpdb->update(
847
  $cart_abandonment_table,
860
  $order->add_order_note( $note );
861
  $order->save();
862
 
863
+ } elseif ( WCF_CART_COMPLETED_ORDER !== $checkout_details->order_status ) {
864
  // Normal checkout.
865
 
866
  $billing_email = filter_input( INPUT_POST, 'billing_email', FILTER_SANITIZE_EMAIL );
960
  }
961
 
962
 
963
+ /**
964
+ * Get the checkout details for the user.
965
+ *
966
+ * @param string $value value.
967
+ * @since 1.0.0
968
+ */
969
+ function get_tracked_data_without_status( $value ) {
970
+ global $wpdb;
971
+ $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
972
+ $result = $wpdb->get_row(
973
+ $wpdb->prepare(
974
+ 'SELECT * FROM `' . $cart_abandonment_table . '` WHERE email = %s LIMIT 1', $value ) // phpcs:ignore
975
+ );
976
+ return $result;
977
+ }
978
+
979
  /**
980
  * Add submenu to admin menu.
981
  *
1438
  */
1439
  public function create_dummy_session_for_preview_email() {
1440
 
1441
+ $email_data = new stdClass();
1442
+ $current_user = wp_get_current_user();
1443
+ $user_data = array(
1444
  'wcf_first_name' => $current_user->user_firstname,
1445
  'wcf_last_name' => $current_user->user_lastname,
1446
  );
1447
+ $email_data->email_template_id = null;
1448
+ $email_data->checkout_id = wc_get_page_id( 'checkout' );
1449
+ $email_data->session_id = 'dummy-session-id';
1450
+ $email_data->email_template_id = null;
1451
 
1452
  $email_send_to = filter_input( INPUT_POST, 'email_send_to', FILTER_SANITIZE_EMAIL );
1453
  $email_data->email = $email_send_to ? $email_send_to : $current_user->user_email;
1509
  $other_fields = unserialize( $email_data->other_fields );
1510
 
1511
  $from_email_name = get_option( 'wcf_ca_from_name' );
1512
+ $reply_name_preview = get_option( 'wcf_ca_reply_email' );
1513
+ $from_email_preview = get_option( 'wcf_ca_from_email' );
1514
 
1515
  $user_first_name = ucfirst( $other_fields['wcf_first_name'] );
1516
  $user_first_name = $user_first_name ? $user_first_name : __( 'there', 'woo-cart-abandonment-recovery' );
1542
 
1543
  $token_data = array(
1544
  'wcf_session_id' => $email_data->session_id,
1545
+ 'wcf_coupon_code' => isset( $auto_apply_coupon ) && $auto_apply_coupon->meta_value ? $coupon_code : null,
1546
  );
1547
 
1548
  $checkout_url = $this->get_checkout_url( $email_data->checkout_id, $token_data );
1580
  $var = $this->get_email_product_block( $email_data->cart_contents, $email_data->cart_total );
1581
 
1582
  $body_email_preview = str_replace( '{{cart.product.table}}', $var, $body_email_preview );
1583
+ $body_email_preview = wpautop( $body_email_preview );
1584
  $mail_result = wp_mail( $email_data->email, $subject_email_preview, stripslashes( $body_email_preview ), $headers );
1585
  if ( $mail_result ) {
1586
  return true;
1649
 
1650
  $currency_symbol = get_woocommerce_currency_symbol();
1651
  $tr = '';
1652
+ $style = array(
1653
+ 'product_image' => array(
1654
+ 'style' => 'height: 42px; width: 42px;',
1655
+ ),
1656
+ 'table' => array(
1657
+ 'style' => 'color: #636363; border: 1px solid #e5e5e5;',
1658
+ ),
1659
+ );
1660
+
1661
+ $style = apply_filters( 'woo_ca_email_template_table_style', $style );
1662
+ $product_image_style = isset( $style['product_image']['style'] ) ? $style['product_image']['style'] : '';
1663
+ $style = isset( $style['table']['style'] ) ? $style['table']['style'] : '';
1664
 
1665
  foreach ( $cart_items as $cart_item ) {
1666
 
1670
  continue;
1671
  }
1672
 
1673
+ $tr = $tr . '<tr style=' . $style . ' align="center">
1674
+ <td style="' . $style . '"><img class="demo_img" style="' . $product_image_style . '" src="' . esc_url( get_the_post_thumbnail_url( $product->get_id() ) ) . '"></td>
1675
+ <td style="' . $style . '">' . $product->get_title() . '</td>
1676
+ <td style="' . $style . '"> ' . $cart_item['quantity'] . ' </td>
1677
+ <td style="' . $style . '">' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
1678
+ <td style="' . $style . '" >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
1679
  </tr> ';
1680
  }
1681
 
1684
  */
1685
  $enable_cart_total = apply_filters( 'woo_ca_recovery_enable_cart_total', false );
1686
  if ( $enable_cart_total ) {
1687
+ $tr = $tr . '<tr style="' . $style . '" align="center">
1688
+ <td colspan="4" style="' . $style . '"> ' . __( 'Cart Total ( Cart Total + Shipping + Tax )', 'woo-cart-abandonment-recovery' ) . ' </td>
1689
+ <td style="' . $style . '" >' . $currency_symbol . number_format_i18n( $cart_total, 2 ) . '</td>
1690
  </tr> ';
1691
  }
1692
 
1693
  return '<table align="left" cellpadding="10" cellspacing="0" style="float: none; border: 1px solid #e5e5e5;">
1694
  <tr align="center">
1695
+ <th style="' . $style . '">' . __( 'Item', 'woo-cart-abandonment-recovery' ) . '</th>
1696
+ <th style="' . $style . '">' . __( 'Name', 'woo-cart-abandonment-recovery' ) . '</th>
1697
+ <th style="' . $style . '">' . __( 'Quantity', 'woo-cart-abandonment-recovery' ) . '</th>
1698
+ <th style="' . $style . '">' . __( 'Price', 'woo-cart-abandonment-recovery' ) . '</th>
1699
+ <th style="' . $style . '">' . __( 'Line Subtotal', 'woo-cart-abandonment-recovery' ) . '</th>
1700
  </tr> ' . $tr . '
1701
  </table>';
1702
 
1928
  return $result;
1929
  }
1930
 
1931
+
1932
+
1933
+
1934
+
1935
+ /**
1936
+ * Delete orders from cart abandonment table whose cart total is zero and order status is abandoned.
1937
+ */
1938
+ function delete_empty_abandoned_order() {
1939
+ global $wpdb;
1940
+
1941
+ $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
1942
+
1943
+ $where = array(
1944
+ 'cart_contents' => 'a:0:{}',
1945
+ );
1946
+
1947
+ $wpdb->delete( $cart_abandonment_table, $where );
1948
+ }
1949
+
1950
  }
1951
 
1952
  Cartflows_Ca_Cart_Abandonment::get_instance();
modules/cart-abandonment/class-cartflows-ca-email-templates.php CHANGED
@@ -796,7 +796,7 @@ class Cartflows_Ca_Email_Templates {
796
  array(
797
  'template_name' => $sanitized_post['wcf_template_name'],
798
  'email_subject' => $sanitized_post['wcf_email_subject'],
799
- 'email_body' => wpautop( $sanitized_post['wcf_email_body'] ),
800
  'frequency' => $sanitized_post['wcf_email_frequency'],
801
  'frequency_unit' => $sanitized_post['wcf_email_frequency_unit'],
802
  'is_activated' => $sanitized_post['wcf_activate_email_template'],
@@ -845,7 +845,7 @@ class Cartflows_Ca_Email_Templates {
845
  array(
846
  'template_name' => $sanitized_post['wcf_template_name'],
847
  'email_subject' => $sanitized_post['wcf_email_subject'],
848
- 'email_body' => wpautop( $sanitized_post['wcf_email_body'] ),
849
  'frequency' => $sanitized_post['wcf_email_frequency'],
850
  'frequency_unit' => $sanitized_post['wcf_email_frequency_unit'],
851
  'is_activated' => $sanitized_post['wcf_activate_email_template'],
796
  array(
797
  'template_name' => $sanitized_post['wcf_template_name'],
798
  'email_subject' => $sanitized_post['wcf_email_subject'],
799
+ 'email_body' => $sanitized_post['wcf_email_body'],
800
  'frequency' => $sanitized_post['wcf_email_frequency'],
801
  'frequency_unit' => $sanitized_post['wcf_email_frequency_unit'],
802
  'is_activated' => $sanitized_post['wcf_activate_email_template'],
845
  array(
846
  'template_name' => $sanitized_post['wcf_template_name'],
847
  'email_subject' => $sanitized_post['wcf_email_subject'],
848
+ 'email_body' => $sanitized_post['wcf_email_body'],
849
  'frequency' => $sanitized_post['wcf_email_frequency'],
850
  'frequency_unit' => $sanitized_post['wcf_email_frequency_unit'],
851
  'is_activated' => $sanitized_post['wcf_activate_email_template'],
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.8
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -128,6 +128,15 @@ Here are few thoughts behind making it available for free:
128
  4. General settings for Email, Webhook (Coupon Code), GDPR
129
 
130
  == Changelog ==
 
 
 
 
 
 
 
 
 
131
  = Version 1.1.8 - Tuesday, 3rd September 2019 =
132
  * New: Option added to auto-apply coupon on the checkout.
133
  * New: Option added to apply coupon individually.
4
  Tags: woocommerce, cart abandonment, cart recovery
5
  Requires at least: 4.4
6
  Tested up to: 5.2
7
+ Stable tag: 1.1.9
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
128
  4. General settings for Email, Webhook (Coupon Code), GDPR
129
 
130
  == Changelog ==
131
+ = Version 1.1.9 - Thursday, 19th September 2019 =
132
+ * New: Option added to ignore users from cart abandonment process.
133
+ * New: Filter added to customize the styling of email template table.
134
+ * Improvement: Added compatibility with Razorpay plugin.
135
+ * Fix: Email template markup was breaking after save.
136
+ * Fix: Failed orders were getting marked as completed.
137
+ * Fix: Empty order was getting tracked and email sending for it.
138
+ * Fix: Email settings options were swapping value of from and reply-to.
139
+
140
  = Version 1.1.8 - Tuesday, 3rd September 2019 =
141
  * New: Option added to auto-apply coupon on the checkout.
142
  * New: Option added to apply coupon individually.
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.8
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: woo-cart-abandonment-recovery
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.9
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: woo-cart-abandonment-recovery