WooCommerce Cart Abandonment Recovery - Version 1.2.1

Version Description

Download this release

Release Info

Developer rohitrpatil
Plugin Icon 128x128 WooCommerce Cart Abandonment Recovery
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

admin/assets/css/admin-cart-abandonment-rtl.css CHANGED
@@ -400,3 +400,14 @@
400
  font-weight: 400;
401
  }
402
 
 
 
 
 
 
 
 
 
 
 
 
400
  font-weight: 400;
401
  }
402
 
403
+ .wcf-ca-spinner{
404
+ float:unset;
405
+ }
406
+
407
+ .wcf-ca-response-msg{
408
+ vertical-align: sub;
409
+ line-height: 28px;
410
+ margin-right: 10px;
411
+ font-weight: bold;
412
+ }
413
+
admin/assets/css/admin-cart-abandonment.css CHANGED
@@ -400,3 +400,14 @@
400
  font-weight: 400;
401
  }
402
 
 
 
 
 
 
 
 
 
 
 
 
400
  font-weight: 400;
401
  }
402
 
403
+ .wcf-ca-spinner{
404
+ float:unset;
405
+ }
406
+
407
+ .wcf-ca-response-msg{
408
+ vertical-align: sub;
409
+ line-height: 28px;
410
+ margin-left: 10px;
411
+ font-weight: bold;
412
+ }
413
+
admin/assets/js/admin-email-templates.js CHANGED
@@ -92,6 +92,8 @@
92
 
93
  $(document).on('click', '#wcf_preview_email', EmailTemplatesAdmin.send_test_email);
94
  $(document).on('click', '.wcf-ca-switch.wcf-toggle-template-status', EmailTemplatesAdmin.toggle_activate_template);
 
 
95
  $(document).on('click', '.wcar-switch-grid', EmailTemplatesAdmin.toggle_activate_template_on_grid);
96
  var coupon_child_fields = "#wcf_email_discount_type, #wcf_email_discount_amount, #wcf_email_coupon_expiry_date, #wcf_free_shipping_coupon, #wcf_auto_coupon_apply, #wcf_individual_use_only";
97
  $(coupon_child_fields).closest('tr').toggle($("#wcf_override_global_coupon").is(":checked"));
@@ -155,8 +157,35 @@
155
  $(".wcf-ca-error-msg").delay(2000).fadeOut();
156
  },
157
 
158
- toggle_activate_template_on_grid: function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
 
 
160
  var $switch, state, new_state;
161
  $switch = $(this);
162
  state = $switch.attr('wcf-ca-template-switch');
92
 
93
  $(document).on('click', '#wcf_preview_email', EmailTemplatesAdmin.send_test_email);
94
  $(document).on('click', '.wcf-ca-switch.wcf-toggle-template-status', EmailTemplatesAdmin.toggle_activate_template);
95
+ $(document).on('click', '#wcf_ca_delete_coupons', EmailTemplatesAdmin.delete_coupons);
96
+
97
  $(document).on('click', '.wcar-switch-grid', EmailTemplatesAdmin.toggle_activate_template_on_grid);
98
  var coupon_child_fields = "#wcf_email_discount_type, #wcf_email_discount_amount, #wcf_email_coupon_expiry_date, #wcf_free_shipping_coupon, #wcf_auto_coupon_apply, #wcf_individual_use_only";
99
  $(coupon_child_fields).closest('tr').toggle($("#wcf_override_global_coupon").is(":checked"));
157
  $(".wcf-ca-error-msg").delay(2000).fadeOut();
158
  },
159
 
160
+ delete_coupons: function () {
161
+ var msg = wcf_ca_delete_coupons._confirm_msg;
162
+ var show_msg = confirm(msg);
163
+ if (show_msg == true) {
164
+ var nonce = wcf_ca_delete_coupons._delete_coupon_nonce
165
+ var data = {
166
+ action: 'wcf_ca_delete_garbage_coupons',
167
+ security: nonce
168
+ };
169
+ $('.wcf-ca-spinner').show();
170
+
171
+ $('.wcf-ca-spinner').addClass("is-active");
172
+ $("#wcf_ca_delete_coupons").css('cursor', 'wait').attr("disabled", true);
173
+ $.post(
174
+ ajaxurl, data, function (response) {
175
+ $(".wcf-ca-response-msg").empty().fadeIn();;
176
+ if (response.success) {
177
+ $('.wcf-ca-spinner').hide();
178
+ $(".wcf-ca-response-msg").css('color','green').html(response.data).delay(5000).fadeOut();
179
+ }
180
+
181
+ $("#wcf_ca_delete_coupons").css('cursor', '').attr("disabled", false);
182
+ }
183
+ );
184
+ }
185
+ },
186
+
187
 
188
+ toggle_activate_template_on_grid: function () {
189
  var $switch, state, new_state;
190
  $switch = $(this);
191
  state = $switch.attr('wcf-ca-template-switch');
admin/assets/js/admin-mce.js CHANGED
@@ -1,5 +1,4 @@
1
  (function ($) {
2
-
3
  $(document).ready(
4
  function () {
5
  tinymce.PluginManager.add(
@@ -12,84 +11,84 @@
12
  icon: false,
13
  menu: [
14
  {
15
- text: 'Admin Firstname',
16
  value: '{{admin.firstname}}',
17
  onclick: function () {
18
  editor.insertContent(this.value());
19
  }
20
  },
21
  {
22
- text: 'Admin Company',
23
  value: '{{admin.company}}',
24
  onclick: function () {
25
  editor.insertContent(this.value());
26
  }
27
  },
28
  {
29
- text: 'Abandoned Product Details Table',
30
  value: '{{cart.product.table}}',
31
  onclick: function () {
32
  editor.insertContent(this.value());
33
  }
34
  },
35
  {
36
- text: 'Abandoned Product Names',
37
  value: '{{cart.product.names}}',
38
  onclick: function () {
39
  editor.insertContent(this.value());
40
  }
41
  },
42
  {
43
- text: 'Cart Checkout URL',
44
  value: '{{cart.checkout_url}}',
45
  onclick: function () {
46
  editor.insertContent(this.value());
47
  }
48
  },
49
  {
50
- text: 'Coupon Code',
51
  value: '{{cart.coupon_code}}',
52
  onclick: function () {
53
  editor.insertContent(this.value());
54
  }
55
  },
56
  {
57
- text: 'Customer First Name',
58
  value: '{{customer.firstname}}',
59
  onclick: function () {
60
  editor.insertContent(this.value());
61
  }
62
  },
63
  {
64
- text: 'Customer Last Name',
65
  value: '{{customer.lastname}}',
66
  onclick: function () {
67
  editor.insertContent(this.value());
68
  }
69
  },
70
  {
71
- text: 'Customer Full Name',
72
  value: '{{customer.fullname}}',
73
  onclick: function () {
74
  editor.insertContent(this.value());
75
  }
76
  },
77
  {
78
- text: 'Cart Abandonment Date',
79
  value: '{{cart.abandoned_date}}',
80
  onclick: function () {
81
  editor.insertContent(this.value());
82
  }
83
  },
84
  {
85
- text: 'Site URL',
86
  value: '{{site.url}}',
87
  onclick: function () {
88
  editor.insertContent(this.value());
89
  }
90
  },
91
  {
92
- text: 'Unsubscribe Link',
93
  value: '{{cart.unsubscribe}}',
94
  onclick: function () {
95
  editor.insertContent(this.value());
1
  (function ($) {
 
2
  $(document).ready(
3
  function () {
4
  tinymce.PluginManager.add(
11
  icon: false,
12
  menu: [
13
  {
14
+ text: wcf_ca_details.admin_firstname,
15
  value: '{{admin.firstname}}',
16
  onclick: function () {
17
  editor.insertContent(this.value());
18
  }
19
  },
20
  {
21
+ text: wcf_ca_details.admin_company,
22
  value: '{{admin.company}}',
23
  onclick: function () {
24
  editor.insertContent(this.value());
25
  }
26
  },
27
  {
28
+ text: wcf_ca_details.abandoned_product_details_table,
29
  value: '{{cart.product.table}}',
30
  onclick: function () {
31
  editor.insertContent(this.value());
32
  }
33
  },
34
  {
35
+ text: wcf_ca_details.abandoned_product_names,
36
  value: '{{cart.product.names}}',
37
  onclick: function () {
38
  editor.insertContent(this.value());
39
  }
40
  },
41
  {
42
+ text: wcf_ca_details.cart_checkout_url,
43
  value: '{{cart.checkout_url}}',
44
  onclick: function () {
45
  editor.insertContent(this.value());
46
  }
47
  },
48
  {
49
+ text: wcf_ca_details.coupon_code,
50
  value: '{{cart.coupon_code}}',
51
  onclick: function () {
52
  editor.insertContent(this.value());
53
  }
54
  },
55
  {
56
+ text: wcf_ca_details.customer_firstname,
57
  value: '{{customer.firstname}}',
58
  onclick: function () {
59
  editor.insertContent(this.value());
60
  }
61
  },
62
  {
63
+ text: wcf_ca_details.customer_lastname,
64
  value: '{{customer.lastname}}',
65
  onclick: function () {
66
  editor.insertContent(this.value());
67
  }
68
  },
69
  {
70
+ text: wcf_ca_details.customer_full_name,
71
  value: '{{customer.fullname}}',
72
  onclick: function () {
73
  editor.insertContent(this.value());
74
  }
75
  },
76
  {
77
+ text: wcf_ca_details.cart_abandonment_date,
78
  value: '{{cart.abandoned_date}}',
79
  onclick: function () {
80
  editor.insertContent(this.value());
81
  }
82
  },
83
  {
84
+ text: wcf_ca_details.site_url,
85
  value: '{{site.url}}',
86
  onclick: function () {
87
  editor.insertContent(this.value());
88
  }
89
  },
90
  {
91
+ text: wcf_ca_details.unsubscribe_link,
92
  value: '{{cart.unsubscribe}}',
93
  onclick: function () {
94
  editor.insertContent(this.value());
changelog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  Version 1.2.0 - Monday, 14th October 2019
2
  - New: Added support for PPOM products.
3
  - Improvement: Added email activate toggle button on grid.
1
+ Version 1.2.1 - Tuesday, 5th November 2019
2
+ - New: Added delete option for used & expired coupons which will be created now onwards.
3
+ - Fix: Sometimes order status remains "abandoned" for initially failed orders.
4
+ - Fix: Strings updated for translation.
5
+
6
  Version 1.2.0 - Monday, 14th October 2019
7
  - New: Added support for PPOM products.
8
  - Improvement: Added email activate toggle button on grid.
classes/class-cartflows-ca-loader.php CHANGED
@@ -78,7 +78,7 @@ if ( ! class_exists( 'CARTFLOWS_CA_Loader' ) ) {
78
  define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
79
  define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
80
  define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
81
- define( 'CARTFLOWS_CA_VER', '1.2.0' );
82
  define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
83
 
84
  define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
78
  define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
79
  define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
80
  define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
81
+ define( 'CARTFLOWS_CA_VER', '1.2.1' );
82
  define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
83
 
84
  define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
classes/class-cartflows-ca-settings.php CHANGED
@@ -84,7 +84,45 @@ class Cartflows_Ca_Settings {
84
  'wcf_ca_ignore_users'
85
  );
86
 
87
- // End: Settings for cart abandonment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  // Start: Settings for email templates.
89
  add_settings_section(
90
  WCF_CA_EMAIL_SETTINGS_SECTION,
@@ -99,7 +137,7 @@ class Cartflows_Ca_Settings {
99
  array( $this, 'wcf_ca_from_name_callback' ),
100
  WCF_CA_PAGE_NAME,
101
  WCF_CA_EMAIL_SETTINGS_SECTION,
102
- array( 'Name will appear in email sent.', 'woo-cart-abandonment-recovery' )
103
  );
104
 
105
  add_settings_field(
@@ -108,7 +146,7 @@ class Cartflows_Ca_Settings {
108
  array( $this, 'wcf_ca_from_email_callback' ),
109
  WCF_CA_PAGE_NAME,
110
  WCF_CA_EMAIL_SETTINGS_SECTION,
111
- array( 'Email which send from.', 'woo-cart-abandonment-recovery' )
112
  );
113
 
114
  add_settings_field(
@@ -117,7 +155,7 @@ class Cartflows_Ca_Settings {
117
  array( $this, 'wcf_ca_reply_email_callback' ),
118
  WCF_CA_PAGE_NAME,
119
  WCF_CA_EMAIL_SETTINGS_SECTION,
120
- array( 'When a user clicks reply, which email address should that reply be sent to?', 'woo-cart-abandonment-recovery' )
121
  );
122
 
123
  register_setting(
@@ -206,7 +244,7 @@ class Cartflows_Ca_Settings {
206
  array( $this, 'wcf_ca_coupon_expiry_callback' ),
207
  WCF_CA_PAGE_NAME,
208
  WCF_CA_ZAPIER_SETTINGS_SECTION,
209
- array( '<br/><br/> <span class="description"><strong>Note: </strong> Enter zero (0) to restrict coupon from expiring.</span>', 'woo-cart-abandonment-recovery' )
210
  );
211
 
212
  register_setting(
@@ -364,8 +402,8 @@ class Cartflows_Ca_Settings {
364
 
365
  $coupon_expiry_unit = get_option( 'wcf_ca_coupon_expiry_unit' );
366
  $items = array(
367
- 'hours' => 'Hour(s)',
368
- 'days' => 'Day(s)',
369
  );
370
  echo "<select id='wcf_ca_coupon_expiry_unit' name='wcf_ca_coupon_expiry_unit'>";
371
  foreach ( $items as $key => $item ) {
@@ -504,6 +542,39 @@ class Cartflows_Ca_Settings {
504
  echo $html;
505
  }
506
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  /**
508
  * Callback for cart abandonment status.
509
  *
84
  'wcf_ca_ignore_users'
85
  );
86
 
87
+ // End: General Settings for cart abandonment.
88
+ // Start: Delete coupons settings for cart abandonment.
89
+
90
+ add_settings_section(
91
+ WCF_CA_COUPONS_SETTINGS_SECTION,
92
+ __( 'Coupons Settings', 'woo-cart-abandonment-recovery' ),
93
+ array( $this, 'wcf_cart_abandonment_options_callback' ),
94
+ WCF_CA_PAGE_NAME
95
+ );
96
+
97
+ add_settings_field(
98
+ 'wcf_ca_auto_delete_coupons',
99
+ __( 'Delete Coupons Automatically', 'woo-cart-abandonment-recovery' ),
100
+ array( $this, 'wcf_ca_auto_delete_coupons_callback' ),
101
+ WCF_CA_PAGE_NAME,
102
+ WCF_CA_COUPONS_SETTINGS_SECTION,
103
+ array( __( 'Delete coupons automatically on weekly basis.<br><span class="description"><br/><strong>Note:</strong> This option will set a weekly cron to delete all <strong>expired</strong> and <strong>used</strong> coupons automatically in the background.</p>', 'woo-cart-abandonment-recovery' ) )
104
+ );
105
+
106
+ register_setting(
107
+ WCF_CA_SETTINGS_OPTION_GROUP,
108
+ 'wcf_ca_auto_delete_coupons'
109
+ );
110
+
111
+ add_settings_field(
112
+ 'wcf_ca_delete_coupons',
113
+ __( 'Delete Coupons Manually', 'woo-cart-abandonment-recovery' ),
114
+ array( $this, 'wcf_ca_delete_coupons_callback' ),
115
+ WCF_CA_PAGE_NAME,
116
+ WCF_CA_COUPONS_SETTINGS_SECTION,
117
+ array( '<br><span class="description"> ' . __( '<br><strong>Note:</strong> This will delete all <strong>expired</strong> and <strong>used</strong> coupons that were created by Woo Cart Abandonment Recovery.</p>', 'woo-cart-abandonment-recovery' ) )
118
+ );
119
+
120
+ register_setting(
121
+ WCF_CA_SETTINGS_OPTION_GROUP,
122
+ 'wcf_ca_delete_coupons'
123
+ );
124
+
125
+ // End: Delete coupons settings for cart abandonment.
126
  // Start: Settings for email templates.
127
  add_settings_section(
128
  WCF_CA_EMAIL_SETTINGS_SECTION,
137
  array( $this, 'wcf_ca_from_name_callback' ),
138
  WCF_CA_PAGE_NAME,
139
  WCF_CA_EMAIL_SETTINGS_SECTION,
140
+ array( __( 'Name will appear in email sent.', 'woo-cart-abandonment-recovery' ) )
141
  );
142
 
143
  add_settings_field(
146
  array( $this, 'wcf_ca_from_email_callback' ),
147
  WCF_CA_PAGE_NAME,
148
  WCF_CA_EMAIL_SETTINGS_SECTION,
149
+ array( __( 'Email which send from.', 'woo-cart-abandonment-recovery' ) )
150
  );
151
 
152
  add_settings_field(
155
  array( $this, 'wcf_ca_reply_email_callback' ),
156
  WCF_CA_PAGE_NAME,
157
  WCF_CA_EMAIL_SETTINGS_SECTION,
158
+ array( __( 'When a user clicks reply, which email address should that reply be sent to?', 'woo-cart-abandonment-recovery' ) )
159
  );
160
 
161
  register_setting(
244
  array( $this, 'wcf_ca_coupon_expiry_callback' ),
245
  WCF_CA_PAGE_NAME,
246
  WCF_CA_ZAPIER_SETTINGS_SECTION,
247
+ array( __( '<br/><br/> <span class="description"><strong>Note: </strong>. Enter zero (0) to restrict coupon from expiring.</span>', 'woo-cart-abandonment-recovery' ) )
248
  );
249
 
250
  register_setting(
402
 
403
  $coupon_expiry_unit = get_option( 'wcf_ca_coupon_expiry_unit' );
404
  $items = array(
405
+ 'hours' => __( 'Hour(s)', 'woo-cart-abandonment-recovery' ),
406
+ 'days' => __( 'Day(s)', 'woo-cart-abandonment-recovery' ),
407
  );
408
  echo "<select id='wcf_ca_coupon_expiry_unit' name='wcf_ca_coupon_expiry_unit'>";
409
  foreach ( $items as $key => $item ) {
542
  echo $html;
543
  }
544
 
545
+ /**
546
+ * Delete coupons.
547
+ *
548
+ * @param array $args args.
549
+ */
550
+ function wcf_ca_auto_delete_coupons_callback( $args ) {
551
+ $wcf_ca_auto_delete_coupons = get_option( 'wcf_ca_auto_delete_coupons' );
552
+ $html = '';
553
+ printf(
554
+ '<input type="checkbox" id="wcf_ca_auto_delete_coupons" name="wcf_ca_auto_delete_coupons" value="on"
555
+ ' . checked( 'on', $wcf_ca_auto_delete_coupons, false ) . ' />'
556
+ );
557
+ $html .= '<span for="wcf_ca_auto_delete_coupons"> ' . $args[0] . '</span>';
558
+ echo $html;
559
+ }
560
+
561
+ /**
562
+ * Delete coupons.
563
+ *
564
+ * @param array $args args.
565
+ */
566
+ function wcf_ca_delete_coupons_callback( $args ) {
567
+ ?>
568
+
569
+ <input type="button" class="button-secondary" id="wcf_ca_delete_coupons" value="<?php esc_html_e( 'Delete', 'woo-cart-abandonment-recovery' ); ?>" >
570
+ <span class="spinner wcf-ca-spinner"></span>
571
+ <span class="wcf-ca-response-msg"></span>
572
+ <?php
573
+ $html = '';
574
+ $html .= '<span for="wcf_ca_delete_coupons"> ' . $args[0] . '</span>';
575
+ echo $html;
576
+ }
577
+
578
  /**
579
  * Callback for cart abandonment status.
580
  *
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.2.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
- "POT-Creation-Date: 2019-10-14 11:17:30+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -65,103 +65,149 @@ msgid ""
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:519
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:551
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
 
161
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:65
162
- msgid "View"
163
  msgstr ""
164
 
 
165
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:66
166
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:118
167
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:84
@@ -169,15 +215,27 @@ msgstr ""
169
  msgid "Delete"
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:1582
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:1724
179
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1779
180
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:168
181
  msgid "Name"
182
  msgstr ""
183
 
@@ -186,7 +244,7 @@ msgid "Email"
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:1801
190
  msgid "Cart Total"
191
  msgstr ""
192
 
@@ -198,111 +256,122 @@ msgstr ""
198
  msgid "Time"
199
  msgstr ""
200
 
201
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:121
202
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:886
203
  msgid "This order was abandoned & subsequently recovered."
204
  msgstr ""
205
 
206
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:144
207
  msgid "Mail has been sent successfully!"
208
  msgstr ""
209
 
210
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:146
211
  msgid "Mail sending failed!"
212
  msgstr ""
213
 
214
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:186
215
  msgid "Every Fifteen Minutes"
216
  msgstr ""
217
 
218
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:250
219
  msgid "You have successfully unsubscribed from our email list."
220
  msgstr ""
221
 
222
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:250
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:402
228
  msgid ""
229
  "This checkout page is generated by WooCommerce Cart Abandonment Recovery "
230
  "plugin from test mail."
231
  msgstr ""
232
 
233
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:444
234
  msgid "No Thanks"
235
  msgstr ""
236
 
237
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:445
238
  msgid "You won't receive further emails from us, thank you!"
239
  msgstr ""
240
 
241
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1014
242
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1015
243
  msgid "Cart Abandonment"
244
  msgstr ""
245
 
246
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1048
247
  msgid "Items deleted: %d"
248
  msgstr ""
249
 
250
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1065
251
  msgid "User unsubscribed successfully!"
252
  msgstr ""
253
 
254
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1260
 
 
 
 
 
 
255
  msgid "Report"
256
  msgstr ""
257
 
258
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1276
259
  msgid "Follow-Up Emails"
260
  msgstr ""
261
 
262
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1292
263
  msgid "Settings"
264
  msgstr ""
265
 
266
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1543
267
  msgid "there"
268
  msgstr ""
269
 
270
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1716
271
  msgid "Cart Total ( Cart Total + Shipping + Tax )"
272
  msgstr ""
273
 
274
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1723
275
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1778
276
  msgid "Item"
277
  msgstr ""
278
 
279
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1725
280
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1780
281
  msgid "Quantity"
282
  msgstr ""
283
 
284
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1726
285
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1781
286
  msgid "Price"
287
  msgstr ""
288
 
289
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1727
290
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1782
291
  msgid "Line Subtotal"
292
  msgstr ""
293
 
294
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1788
295
  msgid "Discount"
296
  msgstr ""
297
 
298
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1792
299
  msgid "Other"
300
  msgstr ""
301
 
302
- #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1797
303
  msgid "Shipping"
304
  msgstr ""
305
 
 
 
 
 
 
306
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:72
307
  msgid "Edit"
308
  msgstr ""
@@ -316,6 +385,7 @@ msgid "Template Name"
316
  msgstr ""
317
 
318
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:183
 
319
  msgid "Email Subject"
320
  msgstr ""
321
 
@@ -327,206 +397,334 @@ msgstr ""
327
  msgid "Activate Template"
328
  msgstr ""
329
 
330
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  msgid "Something went wrong"
332
  msgstr ""
333
 
334
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:153
335
  msgid "Activated"
336
  msgstr ""
337
 
338
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:156
339
  msgid "Deactivated"
340
  msgstr ""
341
 
342
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:214
343
  msgid "The Email Template has been successfully added."
344
  msgstr ""
345
 
346
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:224
347
  msgid "The Email Template has been cloned successfully."
348
  msgstr ""
349
 
350
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:234
351
  msgid "The Email Template has been successfully deleted."
352
  msgstr ""
353
 
354
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:243
355
  msgid "The Email Template has been successfully updated."
356
  msgstr ""
357
 
358
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:253
359
  msgid "Default Email Templates has been restored successfully."
360
  msgstr ""
361
 
362
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:420
363
  msgid "Activate Template now?"
364
  msgstr ""
365
 
366
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:440
367
  msgid "Template Name:"
368
  msgstr ""
369
 
370
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:455
371
  msgid "Email Subject:"
372
  msgstr ""
373
 
374
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:470
375
  msgid "Email Body:"
376
  msgstr ""
377
 
378
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:499
379
  msgid "Create Coupon"
380
  msgstr ""
381
 
382
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:512
383
  msgid "Allows you to send new coupon only for this template."
384
  msgstr ""
385
 
386
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:569
387
  msgid "Coupon expiry date"
388
  msgstr ""
389
 
390
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:599
391
  msgid "Enter zero (0) to restrict coupon from expiring"
392
  msgstr ""
393
 
394
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:605
395
  msgid "Free Shipping"
396
  msgstr ""
397
 
398
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:618
399
  msgid ""
400
  "Allows you to grant free shipping. A free shipping method must be enabled "
401
  "in your shipping zone and be set to require \"a valid free shipping "
402
  "coupon\". "
403
  msgstr ""
404
 
405
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:625
406
  msgid "Individual use only"
407
  msgstr ""
408
 
409
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:639
410
  msgid ""
411
  "Check this box if the coupon cannot be used in conjunction with other "
412
  "coupons."
413
  msgstr ""
414
 
415
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:646
416
  msgid "Auto Apply Coupon"
417
  msgstr ""
418
 
419
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:660
420
  msgid " Automatically add the coupon to the cart at the checkout."
421
  msgstr ""
422
 
423
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:666
424
  msgid "Send This Email"
425
  msgstr ""
426
 
427
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:699
 
 
 
 
428
  msgid "after cart is abandoned."
429
  msgstr ""
430
 
431
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:709
432
  msgid "Send Test Email To:"
433
  msgstr ""
434
 
435
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:1034
 
 
 
 
 
 
 
 
 
 
 
 
436
  msgid "Create New Template"
437
  msgstr ""
438
 
439
- #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:1037
440
  msgid " Restore Default Templates"
441
  msgstr ""
442
 
 
 
 
 
443
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:38
444
  msgid "Email Details:"
445
  msgstr ""
446
 
447
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  msgid " No Email Scheduled."
449
  msgstr ""
450
 
451
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  msgid "The email has been unsubscribed and won't be sent further."
453
  msgstr ""
454
 
455
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:113
456
  msgid "Email is in the queue and will be sent at the scheduled time."
457
  msgstr ""
458
 
459
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:118
460
  msgid "The email has been sent."
461
  msgstr ""
462
 
463
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:122
464
  msgid ""
465
  "The email has been unscheduled due to the complete order and won't be sent "
466
  "further."
467
  msgstr ""
468
 
469
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:155
470
  msgid "User Address Details:"
471
  msgstr ""
472
 
473
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:167
474
  msgid "Billing Address"
475
  msgstr ""
476
 
477
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:171
478
  msgid "Email address"
479
  msgstr ""
480
 
481
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:176
482
  msgid "Phone"
483
  msgstr ""
484
 
485
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:181
486
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:201
487
  msgid "Address 1:"
488
  msgstr ""
489
 
490
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:184
491
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:204
492
  msgid "Address 2:"
493
  msgstr ""
494
 
495
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:187
496
  msgid "Country, City:"
497
  msgstr ""
498
 
499
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:190
500
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:210
501
  msgid "State:"
502
  msgstr ""
503
 
504
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:194
505
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:216
506
  msgid "Postcode:"
507
  msgstr ""
508
 
509
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:199
510
  msgid "Shipping Address"
511
  msgstr ""
512
 
513
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:207
514
  msgid "City:"
515
  msgstr ""
516
 
517
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:213
518
  msgid "Country:"
519
  msgstr ""
520
 
521
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:224
522
  msgid "Checkout Link"
523
  msgstr ""
524
 
525
- #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:239
526
  msgid "User Order Details:"
527
  msgstr ""
528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:46
 
530
  msgid "Recoverable Orders"
531
  msgstr ""
532
 
@@ -535,6 +733,7 @@ msgid "Total Recoverable Orders."
535
  msgstr ""
536
 
537
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:55
 
538
  msgid "Recovered Orders"
539
  msgstr ""
540
 
@@ -543,6 +742,7 @@ msgid "Total Recovered Orders."
543
  msgstr ""
544
 
545
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:62
 
546
  msgid "Lost Orders"
547
  msgstr ""
548
 
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.2.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
8
+ "POT-Creation-Date: 2019-11-05 10:40:08+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
65
  "in, and hence they can not receive mail for cart abandoned by themselves."
66
  msgstr ""
67
 
68
+ #: classes/class-cartflows-ca-settings.php:92
69
+ msgid "Coupons Settings"
70
+ msgstr ""
71
+
72
+ #: classes/class-cartflows-ca-settings.php:99
73
+ msgid "Delete Coupons Automatically"
74
+ msgstr ""
75
+
76
+ #: classes/class-cartflows-ca-settings.php:103
77
+ msgid ""
78
+ "Delete coupons automatically on weekly basis.<br><span "
79
+ "class=\"description\"><br/><strong>Note:</strong> This option will set a "
80
+ "weekly cron to delete all <strong>expired</strong> and "
81
+ "<strong>used</strong> coupons automatically in the background.</p>"
82
+ msgstr ""
83
+
84
+ #: classes/class-cartflows-ca-settings.php:113
85
+ msgid "Delete Coupons Manually"
86
+ msgstr ""
87
+
88
+ #: classes/class-cartflows-ca-settings.php:117
89
+ msgid ""
90
+ "<br><strong>Note:</strong> This will delete all <strong>expired</strong> "
91
+ "and <strong>used</strong> coupons that were created by Woo Cart Abandonment "
92
+ "Recovery.</p>"
93
+ msgstr ""
94
+
95
+ #: classes/class-cartflows-ca-settings.php:129
96
  msgid "Email Settings"
97
  msgstr ""
98
 
99
+ #: classes/class-cartflows-ca-settings.php:136
100
  msgid "\"From\" Name"
101
  msgstr ""
102
 
103
+ #: classes/class-cartflows-ca-settings.php:140
104
+ msgid "Name will appear in email sent."
105
+ msgstr ""
106
+
107
+ #: classes/class-cartflows-ca-settings.php:145
108
  msgid "\"From\" Address"
109
  msgstr ""
110
 
111
+ #: classes/class-cartflows-ca-settings.php:149
112
+ msgid "Email which send from."
113
+ msgstr ""
114
+
115
+ #: classes/class-cartflows-ca-settings.php:154
116
  msgid "\"Reply To\" Address"
117
  msgstr ""
118
 
119
+ #: classes/class-cartflows-ca-settings.php:158
120
+ msgid "When a user clicks reply, which email address should that reply be sent to?"
121
+ msgstr ""
122
+
123
+ #: classes/class-cartflows-ca-settings.php:181
124
  msgid "Enable Webhook"
125
  msgstr ""
126
 
127
+ #: classes/class-cartflows-ca-settings.php:185
128
  msgid ""
129
  "Allows you to trigger webhook automatically upon cart abandonment and "
130
  "recovery."
131
  msgstr ""
132
 
133
+ #: classes/class-cartflows-ca-settings.php:190
134
  msgid "Webhook URL"
135
  msgstr ""
136
 
137
+ #: classes/class-cartflows-ca-settings.php:209
138
  msgid "Coupon Code Settings"
139
  msgstr ""
140
 
141
+ #: classes/class-cartflows-ca-settings.php:216
142
  msgid "Create Coupon Code"
143
  msgstr ""
144
 
145
+ #: classes/class-cartflows-ca-settings.php:220
146
  msgid ""
147
  "Auto-create the special coupon for the abandoned cart to send over the "
148
  "emails."
149
  msgstr ""
150
 
151
+ #: classes/class-cartflows-ca-settings.php:225
152
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:532
153
  msgid "Discount Type"
154
  msgstr ""
155
 
156
+ #: classes/class-cartflows-ca-settings.php:234
157
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:564
158
  msgid "Coupon Amount"
159
  msgstr ""
160
 
161
+ #: classes/class-cartflows-ca-settings.php:243
162
  msgid "Coupon Expires After"
163
  msgstr ""
164
 
165
+ #: classes/class-cartflows-ca-settings.php:247
166
+ msgid ""
167
+ "<br/><br/> <span class=\"description\"><strong>Note: </strong>. Enter zero "
168
+ "(0) to restrict coupon from expiring.</span>"
169
+ msgstr ""
170
+
171
+ #: classes/class-cartflows-ca-settings.php:278
172
  msgid "Webhook Settings"
173
  msgstr ""
174
 
175
+ #: classes/class-cartflows-ca-settings.php:287
176
  msgid "GDPR Settings"
177
  msgstr ""
178
 
179
+ #: classes/class-cartflows-ca-settings.php:294
180
  msgid "Enable GDPR Integration"
181
  msgstr ""
182
 
183
+ #: classes/class-cartflows-ca-settings.php:298
184
  msgid ""
185
  "Ask confirmation from the user before tracking data. <br/><br/> <span "
186
  "class=\"description\"><strong>Note:</strong> By checking this, it will show "
187
  "up confirmation text below the email id on checkout page.</span>"
188
  msgstr ""
189
 
190
+ #: classes/class-cartflows-ca-settings.php:303
191
  msgid "GDPR Message"
192
  msgstr ""
193
 
194
+ #: classes/class-cartflows-ca-settings.php:405
195
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:602
196
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:698
197
+ msgid "Hour(s)"
198
  msgstr ""
199
 
200
+ #: classes/class-cartflows-ca-settings.php:406
201
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:603
202
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:699
203
+ msgid "Day(s)"
 
 
204
  msgstr ""
205
 
206
+ #: classes/class-cartflows-ca-settings.php:474
207
+ msgid "Coupon code should be numeric and has to be greater than or equals to 1."
208
  msgstr ""
209
 
210
+ #: classes/class-cartflows-ca-settings.php:569
211
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:66
212
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:118
213
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:84
215
  msgid "Delete"
216
  msgstr ""
217
 
218
+ #: classes/class-cartflows-ca-settings.php:655
219
+ msgid "Invalid email \"From\" address field"
220
+ msgstr ""
221
+
222
+ #: classes/class-cartflows-ca-settings.php:673
223
+ msgid "Invalid email \"Reply\" address field"
224
+ msgstr ""
225
+
226
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:65
227
+ msgid "View"
228
+ msgstr ""
229
+
230
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:70
231
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1673
232
  msgid "Unsubscribe"
233
  msgstr ""
234
 
235
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:184
236
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1815
237
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1870
238
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:173
239
  msgid "Name"
240
  msgstr ""
241
 
244
  msgstr ""
245
 
246
  #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:186
247
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1892
248
  msgid "Cart Total"
249
  msgstr ""
250
 
256
  msgid "Time"
257
  msgstr ""
258
 
259
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:128
260
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:932
261
  msgid "This order was abandoned & subsequently recovered."
262
  msgstr ""
263
 
264
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:149
265
  msgid "Mail has been sent successfully!"
266
  msgstr ""
267
 
268
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:151
269
  msgid "Mail sending failed!"
270
  msgstr ""
271
 
272
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:191
273
  msgid "Every Fifteen Minutes"
274
  msgstr ""
275
 
276
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:257
277
  msgid "You have successfully unsubscribed from our email list."
278
  msgstr ""
279
 
280
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:257
281
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:164
282
  msgid "Unsubscribed"
283
  msgstr ""
284
 
285
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:412
286
  msgid ""
287
  "This checkout page is generated by WooCommerce Cart Abandonment Recovery "
288
  "plugin from test mail."
289
  msgstr ""
290
 
291
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:454
292
  msgid "No Thanks"
293
  msgstr ""
294
 
295
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:455
296
  msgid "You won't receive further emails from us, thank you!"
297
  msgstr ""
298
 
299
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1087
300
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1088
301
  msgid "Cart Abandonment"
302
  msgstr ""
303
 
304
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1121
305
  msgid "Items deleted: %d"
306
  msgstr ""
307
 
308
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1138
309
  msgid "User unsubscribed successfully!"
310
  msgstr ""
311
 
312
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1190
313
+ msgid ""
314
+ "Do you really want to delete the used and expired coupons created by Cart "
315
+ "Abandonment Plugin?"
316
+ msgstr ""
317
+
318
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1348
319
  msgid "Report"
320
  msgstr ""
321
 
322
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1364
323
  msgid "Follow-Up Emails"
324
  msgstr ""
325
 
326
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1380
327
  msgid "Settings"
328
  msgstr ""
329
 
330
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1634
331
  msgid "there"
332
  msgstr ""
333
 
334
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1807
335
  msgid "Cart Total ( Cart Total + Shipping + Tax )"
336
  msgstr ""
337
 
338
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1814
339
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1869
340
  msgid "Item"
341
  msgstr ""
342
 
343
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1816
344
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1871
345
  msgid "Quantity"
346
  msgstr ""
347
 
348
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1817
349
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1872
350
  msgid "Price"
351
  msgstr ""
352
 
353
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1818
354
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1873
355
  msgid "Line Subtotal"
356
  msgstr ""
357
 
358
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1879
359
  msgid "Discount"
360
  msgstr ""
361
 
362
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1883
363
  msgid "Other"
364
  msgstr ""
365
 
366
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1888
367
  msgid "Shipping"
368
  msgstr ""
369
 
370
+ #: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2036
371
+ #. translators: %1$s: Coupons Deleted, %2$s: Deleted coupons count'.
372
+ msgid "%1$s: %2$d"
373
+ msgstr ""
374
+
375
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:72
376
  msgid "Edit"
377
  msgstr ""
385
  msgstr ""
386
 
387
  #: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:183
388
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:83
389
  msgid "Email Subject"
390
  msgstr ""
391
 
397
  msgid "Activate Template"
398
  msgstr ""
399
 
400
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:127
401
+ msgid "Admin Firstname"
402
+ msgstr ""
403
+
404
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:128
405
+ msgid "Admin Company"
406
+ msgstr ""
407
+
408
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:129
409
+ msgid "Abandoned Product Details Table"
410
+ msgstr ""
411
+
412
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:130
413
+ msgid "Abandoned Product Names"
414
+ msgstr ""
415
+
416
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:131
417
+ msgid "Cart Checkout URL"
418
+ msgstr ""
419
+
420
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:132
421
+ msgid "Coupon Code"
422
+ msgstr ""
423
+
424
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:133
425
+ msgid "Customer First Name"
426
+ msgstr ""
427
+
428
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:134
429
+ msgid "Customer Last Name"
430
+ msgstr ""
431
+
432
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:135
433
+ msgid "Customer Full Name"
434
+ msgstr ""
435
+
436
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:136
437
+ msgid "Cart Abandonment Date"
438
+ msgstr ""
439
+
440
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:137
441
+ msgid "Site URL"
442
+ msgstr ""
443
+
444
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:138
445
+ msgid "Unsubscribe Link"
446
+ msgstr ""
447
+
448
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:158
449
  msgid "Something went wrong"
450
  msgstr ""
451
 
452
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:165
453
  msgid "Activated"
454
  msgstr ""
455
 
456
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:168
457
  msgid "Deactivated"
458
  msgstr ""
459
 
460
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:227
461
  msgid "The Email Template has been successfully added."
462
  msgstr ""
463
 
464
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:237
465
  msgid "The Email Template has been cloned successfully."
466
  msgstr ""
467
 
468
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:247
469
  msgid "The Email Template has been successfully deleted."
470
  msgstr ""
471
 
472
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:256
473
  msgid "The Email Template has been successfully updated."
474
  msgstr ""
475
 
476
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:266
477
  msgid "Default Email Templates has been restored successfully."
478
  msgstr ""
479
 
480
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:433
481
  msgid "Activate Template now?"
482
  msgstr ""
483
 
484
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:453
485
  msgid "Template Name:"
486
  msgstr ""
487
 
488
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:468
489
  msgid "Email Subject:"
490
  msgstr ""
491
 
492
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:483
493
  msgid "Email Body:"
494
  msgstr ""
495
 
496
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:512
497
  msgid "Create Coupon"
498
  msgstr ""
499
 
500
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:525
501
  msgid "Allows you to send new coupon only for this template."
502
  msgstr ""
503
 
504
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:582
505
  msgid "Coupon expiry date"
506
  msgstr ""
507
 
508
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:612
509
  msgid "Enter zero (0) to restrict coupon from expiring"
510
  msgstr ""
511
 
512
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:618
513
  msgid "Free Shipping"
514
  msgstr ""
515
 
516
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:631
517
  msgid ""
518
  "Allows you to grant free shipping. A free shipping method must be enabled "
519
  "in your shipping zone and be set to require \"a valid free shipping "
520
  "coupon\". "
521
  msgstr ""
522
 
523
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:638
524
  msgid "Individual use only"
525
  msgstr ""
526
 
527
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:652
528
  msgid ""
529
  "Check this box if the coupon cannot be used in conjunction with other "
530
  "coupons."
531
  msgstr ""
532
 
533
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:659
534
  msgid "Auto Apply Coupon"
535
  msgstr ""
536
 
537
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:673
538
  msgid " Automatically add the coupon to the cart at the checkout."
539
  msgstr ""
540
 
541
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:679
542
  msgid "Send This Email"
543
  msgstr ""
544
 
545
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:697
546
+ msgid "Minute(s)"
547
+ msgstr ""
548
+
549
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:712
550
  msgid "after cart is abandoned."
551
  msgstr ""
552
 
553
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:722
554
  msgid "Send Test Email To:"
555
  msgstr ""
556
 
557
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:726
558
+ msgid "Send a test email"
559
+ msgstr ""
560
+
561
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:739
562
+ msgid "Save Changes"
563
+ msgstr ""
564
+
565
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:741
566
+ msgid "Update Changes"
567
+ msgstr ""
568
+
569
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:1047
570
  msgid "Create New Template"
571
  msgstr ""
572
 
573
+ #: modules/cart-abandonment/class-cartflows-ca-email-templates.php:1050
574
  msgid " Restore Default Templates"
575
  msgstr ""
576
 
577
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:27
578
+ msgid "Back to Reports"
579
+ msgstr ""
580
+
581
  #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:38
582
  msgid "Email Details:"
583
  msgstr ""
584
 
585
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:48
586
+ msgid ""
587
+ "All new activated emails will be reschedule for this abandoned order. "
588
+ "<br/>New emails will\n"
589
+ "\t\t\t\t\t\t\t\t\t\t\tbe sent to user according to schedule time."
590
+ msgstr ""
591
+
592
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:56
593
+ msgid "Are your sure?"
594
+ msgstr ""
595
+
596
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:60
597
+ msgid "Reschedule"
598
+ msgstr ""
599
+
600
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:64
601
+ msgid "Close"
602
+ msgstr ""
603
+
604
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:69
605
+ msgid "Reschedule Emails"
606
+ msgstr ""
607
+
608
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:75
609
  msgid " No Email Scheduled."
610
  msgstr ""
611
 
612
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:82
613
+ msgid "Scheduled Template"
614
+ msgstr ""
615
+
616
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:84
617
+ msgid "Email Coupon"
618
+ msgstr ""
619
+
620
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:85
621
+ msgid "Email Sent"
622
+ msgstr ""
623
+
624
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:86
625
+ msgid "Scheduled At"
626
+ msgstr ""
627
+
628
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:115
629
  msgid "The email has been unsubscribed and won't be sent further."
630
  msgstr ""
631
 
632
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:118
633
  msgid "Email is in the queue and will be sent at the scheduled time."
634
  msgstr ""
635
 
636
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:123
637
  msgid "The email has been sent."
638
  msgstr ""
639
 
640
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:127
641
  msgid ""
642
  "The email has been unscheduled due to the complete order and won't be sent "
643
  "further."
644
  msgstr ""
645
 
646
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:160
647
  msgid "User Address Details:"
648
  msgstr ""
649
 
650
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:172
651
  msgid "Billing Address"
652
  msgstr ""
653
 
654
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:176
655
  msgid "Email address"
656
  msgstr ""
657
 
658
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:181
659
  msgid "Phone"
660
  msgstr ""
661
 
662
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:186
663
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:206
664
  msgid "Address 1:"
665
  msgstr ""
666
 
667
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:189
668
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:209
669
  msgid "Address 2:"
670
  msgstr ""
671
 
672
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:192
673
  msgid "Country, City:"
674
  msgstr ""
675
 
676
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:195
677
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:215
678
  msgid "State:"
679
  msgstr ""
680
 
681
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:199
682
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:221
683
  msgid "Postcode:"
684
  msgstr ""
685
 
686
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:204
687
  msgid "Shipping Address"
688
  msgstr ""
689
 
690
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:212
691
  msgid "City:"
692
  msgstr ""
693
 
694
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:218
695
  msgid "Country:"
696
  msgstr ""
697
 
698
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:229
699
  msgid "Checkout Link"
700
  msgstr ""
701
 
702
+ #: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:244
703
  msgid "User Order Details:"
704
  msgstr ""
705
 
706
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:14
707
+ msgid "Today"
708
+ msgstr ""
709
+
710
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:18
711
+ msgid "Yesterday"
712
+ msgstr ""
713
+
714
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:22
715
+ msgid "Last Week"
716
+ msgstr ""
717
+
718
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:26
719
+ msgid "Last Month"
720
+ msgstr ""
721
+
722
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:35
723
+ msgid "Custom Filter"
724
+ msgstr ""
725
+
726
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:46
727
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:108
728
  msgid "Recoverable Orders"
729
  msgstr ""
730
 
733
  msgstr ""
734
 
735
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:55
736
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:111
737
  msgid "Recovered Orders"
738
  msgstr ""
739
 
742
  msgstr ""
743
 
744
  #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:62
745
+ #: modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php:114
746
  msgid "Lost Orders"
747
  msgstr ""
748
 
modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php CHANGED
@@ -66,6 +66,9 @@ class Cartflows_Ca_Cart_Abandonment {
66
 
67
  add_action( 'wp_ajax_wcf_ca_preview_email_send', array( $this, 'send_preview_email' ) );
68
 
 
 
 
69
  $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );
70
  if ( WCF_CA_PAGE_NAME === $page ) {
71
  // Adding filter to add new button to add custom fields.
@@ -99,6 +102,10 @@ class Cartflows_Ca_Cart_Abandonment {
99
 
100
  $acceptable_order_statuses = array( 'completed', 'processing', 'failed' );
101
 
 
 
 
 
102
  if ( $order_id && in_array( $new_order_status, $acceptable_order_statuses, true ) ) {
103
 
104
  $order = wc_get_order( $order_id );
@@ -116,16 +123,14 @@ class Cartflows_Ca_Cart_Abandonment {
116
  }
117
 
118
  if ( ( WCF_CART_ABANDONED_ORDER === $capture_status || WCF_CART_LOST_ORDER === $capture_status ) ) {
119
- $wpdb->update( $cart_abandonment_table, array( 'order_status' => WCF_CART_COMPLETED_ORDER ), array( 'session_id' => sanitize_key( $captured_data->session_id ) ) );
120
  $this->trigger_zapier_webhook( $captured_data->session_id, WCF_CART_COMPLETED_ORDER );
121
  $note = __( 'This order was abandoned & subsequently recovered.', 'woo-cart-abandonment-recovery' );
122
  $order->add_order_note( $note );
123
  $order->save();
124
- }
125
-
126
- if ( WCF_CART_COMPLETED_ORDER === $capture_status ) {
127
- // Revert the complete order status to abandoned when payment failed.
128
- $wpdb->update( $cart_abandonment_table, array( 'order_status' => WCF_CART_ABANDONED_ORDER ), array( 'session_id' => sanitize_key( $captured_data->session_id ) ) );
129
  }
130
  }
131
  }
@@ -215,15 +220,17 @@ class Cartflows_Ca_Cart_Abandonment {
215
  $new_coupon_id = wp_insert_post( $coupon );
216
 
217
  update_post_meta( $new_coupon_id, 'discount_type', $discount_type );
218
- update_post_meta( $new_coupon_id, 'description', 'This coupon is for abandoned cart email templates.' );
219
  update_post_meta( $new_coupon_id, 'coupon_amount', $amount );
220
  update_post_meta( $new_coupon_id, 'individual_use', $individual_use );
221
  update_post_meta( $new_coupon_id, 'product_ids', '' );
222
  update_post_meta( $new_coupon_id, 'exclude_product_ids', '' );
223
  update_post_meta( $new_coupon_id, 'usage_limit', '1' );
 
224
  update_post_meta( $new_coupon_id, 'date_expires', $expiry );
225
  update_post_meta( $new_coupon_id, 'apply_before_tax', 'yes' );
226
  update_post_meta( $new_coupon_id, 'free_shipping', $free_shipping );
 
227
 
228
  return $coupon_code;
229
  }
@@ -303,6 +310,9 @@ class Cartflows_Ca_Cart_Abandonment {
303
  define( 'WCF_DEFAULT_COUPON_AMOUNT', 10 );
304
 
305
  define( 'WCF_CA_DATETIME_FORMAT', 'Y-m-d H:i:s' );
 
 
 
306
  }
307
 
308
 
@@ -468,6 +478,52 @@ class Cartflows_Ca_Cart_Abandonment {
468
  return $is_valid;
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  /**
472
  * Execute Zapier webhook for further action inside Zapier.
473
  *
@@ -548,6 +604,15 @@ class Cartflows_Ca_Cart_Abandonment {
548
  );
549
  // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
550
 
 
 
 
 
 
 
 
 
 
551
  }
552
 
553
  /**
@@ -859,26 +924,7 @@ class Cartflows_Ca_Cart_Abandonment {
859
  } else {
860
  if ( $checkout_details && ( WCF_CART_ABANDONED_ORDER === $checkout_details->order_status || WCF_CART_LOST_ORDER === $checkout_details->order_status ) ) {
861
 
862
- // Skip Future email sending..
863
- $wpdb->update(
864
- $email_history_table,
865
- array( 'email_sent' => -1 ),
866
- array(
867
- 'ca_session_id' => $session_id,
868
- 'email_sent' => 0,
869
- )
870
- );
871
-
872
- // Update order status.
873
- $wpdb->update(
874
- $cart_abandonment_table,
875
- array(
876
- 'order_status' => WCF_CART_COMPLETED_ORDER,
877
- ),
878
- array(
879
- 'session_id' => $session_id,
880
- )
881
- );
882
 
883
  $this->trigger_zapier_webhook( $session_id, WCF_CART_COMPLETED_ORDER );
884
 
@@ -901,15 +947,7 @@ class Cartflows_Ca_Cart_Abandonment {
901
  $existing_cart_products = array_keys( (array) $existing_cart_contents );
902
  $order_cart_products = array_keys( (array) $order_cart_contents );
903
  if ( $this->check_if_similar_cart( $existing_cart_products, $order_cart_products ) ) {
904
- $wpdb->update(
905
- $cart_abandonment_table,
906
- array(
907
- 'order_status' => WCF_CART_COMPLETED_ORDER,
908
- ),
909
- array(
910
- 'session_id' => $order_data->session_id,
911
- )
912
- );
913
  }
914
  }
915
  }
@@ -917,10 +955,45 @@ class Cartflows_Ca_Cart_Abandonment {
917
  }
918
  }
919
  }
920
- WC()->session->__unset( 'wcf_session_id' );
 
 
921
  }
922
  }
923
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924
 
925
  /**
926
  * Compare cart if similar products.
@@ -1104,6 +1177,21 @@ class Cartflows_Ca_Cart_Abandonment {
1104
  // Styles.
1105
  wp_enqueue_style( 'cartflows-cart-abandonment-admin', CARTFLOWS_CA_URL . 'admin/assets/css/admin-cart-abandonment.css', array(), CARTFLOWS_CA_VER );
1106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1107
  }
1108
 
1109
 
@@ -1444,7 +1532,6 @@ class Cartflows_Ca_Cart_Abandonment {
1444
  )
1445
  );
1446
  // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
1447
-
1448
  foreach ( $emails_send_to as $email_send_to ) {
1449
  $email_result = $this->send_email_templates( $email_send_to );
1450
  if ( $email_result ) {
@@ -1533,6 +1620,10 @@ class Cartflows_Ca_Cart_Abandonment {
1533
 
1534
  if ( filter_var( $email_data->email, FILTER_VALIDATE_EMAIL ) ) {
1535
 
 
 
 
 
1536
  $other_fields = unserialize( $email_data->other_fields );
1537
 
1538
  $from_email_name = get_option( 'wcf_ca_from_name' );
@@ -1805,43 +1896,6 @@ class Cartflows_Ca_Cart_Abandonment {
1805
  </table>';
1806
  }
1807
 
1808
- /**
1809
- * Copied WC function for date parameter addition.
1810
- *
1811
- * @param string $customer_email customer email.
1812
- * @param int $product_id product id.
1813
- * @param int $days days.
1814
- * @return array|bool|mixed|void
1815
- */
1816
- function wcf_ca_wc_customer_bought_product( $customer_email, $product_id, $days = 365 ) {
1817
- global $wpdb;
1818
-
1819
- $statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() );
1820
- // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
1821
- $result = $wpdb->get_var(
1822
- $wpdb->prepare(
1823
- "SELECT COUNT(p.ID) FROM {$wpdb->prefix}posts AS p
1824
- INNER JOIN {$wpdb->prefix}postmeta AS pm ON p.ID = pm.post_id
1825
- INNER JOIN {$wpdb->prefix}woocommerce_order_items AS woi ON p.ID = woi.order_id
1826
- INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS woim ON woi.order_item_id = woim.order_item_id
1827
- WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
1828
- AND pm.meta_key = '_billing_email'
1829
- AND pm.meta_value = %s
1830
- AND woim.meta_key IN ( '_product_id', '_variation_id' )
1831
- AND woim.meta_value = %s
1832
- AND p.post_date > '" . date( 'Y-m-d', strtotime( '-' . $days . ' days' ) ) . "'
1833
- ",
1834
- $customer_email,
1835
- $product_id
1836
- )
1837
- );
1838
-
1839
- // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
1840
-
1841
- return intval( $result ) > 0 ? true : false;
1842
-
1843
- }
1844
-
1845
  /**
1846
  * Schedule events for the abadoned carts to send emails.
1847
  *
@@ -1858,29 +1912,7 @@ class Cartflows_Ca_Cart_Abandonment {
1858
  $scheduled_time_from = current_time( WCF_CA_DATETIME_FORMAT );
1859
  $scheduled_emails = $this->fetch_scheduled_emails( $session_id );
1860
  $scheduled_templates = array_column( $scheduled_emails, 'template_id' );
1861
-
1862
- // Skip if forcfully rescheduled.
1863
- if ( ! $force_reschedule ) {
1864
- $scheduled_time_from = $checkout_details->time;
1865
- $user_exist = get_user_by( 'email', $checkout_details->email );
1866
- // Don't schedule emails if products are already purchased.
1867
- if ( $user_exist ) {
1868
- $purchasing_products = unserialize( $checkout_details->cart_contents );
1869
- $already_purchased = true;
1870
- foreach ( $purchasing_products as $purchasing_product ) {
1871
- if ( isset( $purchasing_product['product_id'] ) ) {
1872
- $has_already_purchased = $this->wcf_ca_wc_customer_bought_product( $user_exist->user_email, $purchasing_product['product_id'], 30 );
1873
- if ( ! $has_already_purchased ) {
1874
- $already_purchased = false;
1875
- break;
1876
- }
1877
- }
1878
- }
1879
- if ( $already_purchased ) {
1880
- return;
1881
- }
1882
- }
1883
- }
1884
 
1885
  $email_tmpl = Cartflows_Ca_Email_Templates::get_instance();
1886
  $templates = $email_tmpl->fetch_all_active_templates();
@@ -1971,6 +2003,74 @@ class Cartflows_Ca_Cart_Abandonment {
1971
  $wpdb->delete( $cart_abandonment_table, $where );
1972
  }
1973
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1974
  }
1975
 
1976
  Cartflows_Ca_Cart_Abandonment::get_instance();
66
 
67
  add_action( 'wp_ajax_wcf_ca_preview_email_send', array( $this, 'send_preview_email' ) );
68
 
69
+ // Delete coupons.
70
+ add_action( 'wp_ajax_wcf_ca_delete_garbage_coupons', array( $this, 'delete_used_and_expired_coupons' ) );
71
+
72
  $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );
73
  if ( WCF_CA_PAGE_NAME === $page ) {
74
  // Adding filter to add new button to add custom fields.
102
 
103
  $acceptable_order_statuses = array( 'completed', 'processing', 'failed' );
104
 
105
+ if ( ( WCF_CART_FAILED_ORDER === $new_order_status ) ) {
106
+ return;
107
+ }
108
+
109
  if ( $order_id && in_array( $new_order_status, $acceptable_order_statuses, true ) ) {
110
 
111
  $order = wc_get_order( $order_id );
123
  }
124
 
125
  if ( ( WCF_CART_ABANDONED_ORDER === $capture_status || WCF_CART_LOST_ORDER === $capture_status ) ) {
126
+ $this->skip_future_emails_when_order_is_completed( sanitize_key( $captured_data->session_id ) );
127
  $this->trigger_zapier_webhook( $captured_data->session_id, WCF_CART_COMPLETED_ORDER );
128
  $note = __( 'This order was abandoned & subsequently recovered.', 'woo-cart-abandonment-recovery' );
129
  $order->add_order_note( $note );
130
  $order->save();
131
+ if ( WC()->session ) {
132
+ WC()->session->__unset( 'wcf_session_id' );
133
+ }
 
 
134
  }
135
  }
136
  }
220
  $new_coupon_id = wp_insert_post( $coupon );
221
 
222
  update_post_meta( $new_coupon_id, 'discount_type', $discount_type );
223
+ update_post_meta( $new_coupon_id, 'description', WCF_CA_COUPON_DESCRIPTION );
224
  update_post_meta( $new_coupon_id, 'coupon_amount', $amount );
225
  update_post_meta( $new_coupon_id, 'individual_use', $individual_use );
226
  update_post_meta( $new_coupon_id, 'product_ids', '' );
227
  update_post_meta( $new_coupon_id, 'exclude_product_ids', '' );
228
  update_post_meta( $new_coupon_id, 'usage_limit', '1' );
229
+ update_post_meta( $new_coupon_id, 'usage_count', '0' );
230
  update_post_meta( $new_coupon_id, 'date_expires', $expiry );
231
  update_post_meta( $new_coupon_id, 'apply_before_tax', 'yes' );
232
  update_post_meta( $new_coupon_id, 'free_shipping', $free_shipping );
233
+ update_post_meta( $new_coupon_id, 'coupon_generated_by', WCF_CA_COUPON_GENERATED_BY );
234
 
235
  return $coupon_code;
236
  }
310
  define( 'WCF_DEFAULT_COUPON_AMOUNT', 10 );
311
 
312
  define( 'WCF_CA_DATETIME_FORMAT', 'Y-m-d H:i:s' );
313
+
314
+ define( 'WCF_CA_COUPON_DESCRIPTION', 'This coupon is for abandoned cart email templates.' );
315
+ define( 'WCF_CA_COUPON_GENERATED_BY', 'woo-cart-abandonment-recovery' );
316
  }
317
 
318
 
478
  return $is_valid;
479
  }
480
 
481
+ /**
482
+ * Check before emails actually send to user.
483
+ *
484
+ * @param array $email_data email_data.
485
+ * @param array $current_cart_data cart data.
486
+ * @return bool
487
+ */
488
+ function check_if_already_purchased_by_email_product_ids( $email_data, $current_cart_data ) {
489
+
490
+ global $wpdb;
491
+ $current_cart_data = unserialize( $current_cart_data );
492
+ $current_products = array_values( wp_list_pluck( $current_cart_data, 'product_id' ) );
493
+ $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
494
+ $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
495
+
496
+ $orders = wc_get_orders(
497
+ array(
498
+ 'billing_email' => $email_data->email,
499
+ 'status' => [ 'processing', 'completed' ],
500
+ 'date_after' => date(
501
+ 'Y-m-d h:i:s',
502
+ strtotime( '-30 days' )
503
+ ),
504
+ )
505
+ );
506
+ $need_to_send_email = true;
507
+
508
+ foreach ( $orders as $order ) {
509
+ $order = wc_get_order( $order->get_id() );
510
+ $items = $order->get_items();
511
+
512
+ foreach ( $order->get_items() as $item_id => $item_data ) {
513
+
514
+ $product_id = $item_data->get_product()->get_id();
515
+
516
+ if ( in_array( $product_id, $current_products, true ) ) {
517
+
518
+ $this->skip_future_emails_when_order_is_completed( $email_data->session_id, true );
519
+ $need_to_send_email = false;
520
+ break;
521
+ }
522
+ }
523
+ }
524
+ return $need_to_send_email;
525
+ }
526
+
527
  /**
528
  * Execute Zapier webhook for further action inside Zapier.
529
  *
604
  );
605
  // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
606
 
607
+ /**
608
+ * Delete garbage coupons.
609
+ */
610
+ $wcf_ca_auto_delete_coupons = get_option( 'wcf_ca_auto_delete_coupons' );
611
+
612
+ if ( isset( $wcf_ca_auto_delete_coupons ) && 'on' === $wcf_ca_auto_delete_coupons ) {
613
+ $this->delete_used_and_expired_coupons();
614
+ }
615
+
616
  }
617
 
618
  /**
924
  } else {
925
  if ( $checkout_details && ( WCF_CART_ABANDONED_ORDER === $checkout_details->order_status || WCF_CART_LOST_ORDER === $checkout_details->order_status ) ) {
926
 
927
+ $this->skip_future_emails_when_order_is_completed( $session_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
928
 
929
  $this->trigger_zapier_webhook( $session_id, WCF_CART_COMPLETED_ORDER );
930
 
947
  $existing_cart_products = array_keys( (array) $existing_cart_contents );
948
  $order_cart_products = array_keys( (array) $order_cart_contents );
949
  if ( $this->check_if_similar_cart( $existing_cart_products, $order_cart_products ) ) {
950
+ $this->skip_future_emails_when_order_is_completed( $order_data->session_id );
 
 
 
 
 
 
 
 
951
  }
952
  }
953
  }
955
  }
956
  }
957
  }
958
+ if ( WC()->session ) {
959
+ WC()->session->__unset( 'wcf_session_id' );
960
+ }
961
  }
962
  }
963
 
964
+ /**
965
+ * Unschedule future emails for completed orders.
966
+ *
967
+ * @param string $session_id session id.
968
+ * @param bool $skip_complete skip update query.
969
+ */
970
+ function skip_future_emails_when_order_is_completed( $session_id, $skip_complete = false ) {
971
+
972
+ global $wpdb;
973
+ $email_history_table = $wpdb->prefix . CARTFLOWS_CA_EMAIL_HISTORY_TABLE;
974
+ $cart_abandonment_table = $wpdb->prefix . CARTFLOWS_CA_CART_ABANDONMENT_TABLE;
975
+
976
+ if ( ! $skip_complete ) {
977
+ $wpdb->update(
978
+ $cart_abandonment_table,
979
+ array(
980
+ 'order_status' => WCF_CART_COMPLETED_ORDER,
981
+ ),
982
+ array(
983
+ 'session_id' => sanitize_key( $session_id ),
984
+ )
985
+ );
986
+ }
987
+
988
+ $wpdb->update(
989
+ $email_history_table,
990
+ array( 'email_sent' => -1 ),
991
+ array(
992
+ 'ca_session_id' => $session_id,
993
+ 'email_sent' => 0,
994
+ )
995
+ );
996
+ }
997
 
998
  /**
999
  * Compare cart if similar products.
1177
  // Styles.
1178
  wp_enqueue_style( 'cartflows-cart-abandonment-admin', CARTFLOWS_CA_URL . 'admin/assets/css/admin-cart-abandonment.css', array(), CARTFLOWS_CA_VER );
1179
 
1180
+ wp_enqueue_script(
1181
+ 'cartflows-ca-email-tmpl-settings',
1182
+ CARTFLOWS_CA_URL . 'admin/assets/js/admin-email-templates.js',
1183
+ array( 'jquery' ),
1184
+ CARTFLOWS_CA_VER
1185
+ );
1186
+
1187
+ $vars = array(
1188
+ 'url' => 'admin-ajax.php',
1189
+ '_delete_coupon_nonce' => wp_create_nonce( 'wcf_ca_delete_garbage_coupons' ),
1190
+ '_confirm_msg' => __( 'Do you really want to delete the used and expired coupons created by Cart Abandonment Plugin?', 'woo-cart-abandonment-recovery' ),
1191
+
1192
+ );
1193
+ wp_localize_script( 'cartflows-ca-email-tmpl-settings', 'wcf_ca_delete_coupons', $vars );
1194
+
1195
  }
1196
 
1197
 
1532
  )
1533
  );
1534
  // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
 
1535
  foreach ( $emails_send_to as $email_send_to ) {
1536
  $email_result = $this->send_email_templates( $email_send_to );
1537
  if ( $email_result ) {
1620
 
1621
  if ( filter_var( $email_data->email, FILTER_VALIDATE_EMAIL ) ) {
1622
 
1623
+ if ( ! $this->check_if_already_purchased_by_email_product_ids( $email_data, $email_data->cart_contents ) ) {
1624
+ return false;
1625
+ }
1626
+
1627
  $other_fields = unserialize( $email_data->other_fields );
1628
 
1629
  $from_email_name = get_option( 'wcf_ca_from_name' );
1896
  </table>';
1897
  }
1898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1899
  /**
1900
  * Schedule events for the abadoned carts to send emails.
1901
  *
1912
  $scheduled_time_from = current_time( WCF_CA_DATETIME_FORMAT );
1913
  $scheduled_emails = $this->fetch_scheduled_emails( $session_id );
1914
  $scheduled_templates = array_column( $scheduled_emails, 'template_id' );
1915
+ $scheduled_time_from = $checkout_details->time;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1916
 
1917
  $email_tmpl = Cartflows_Ca_Email_Templates::get_instance();
1918
  $templates = $email_tmpl->fetch_all_active_templates();
2003
  $wpdb->delete( $cart_abandonment_table, $where );
2004
  }
2005
 
2006
+
2007
+ /**
2008
+ * Check if transient is set for delete garbage coupons.
2009
+ */
2010
+ function delete_used_and_expired_coupons() {
2011
+ $is_ajax_request = wp_doing_ajax();
2012
+ $is_transient_set = false;
2013
+ global $wpdb;
2014
+ if ( $is_ajax_request ) {
2015
+ check_ajax_referer( 'wcf_ca_delete_garbage_coupons', 'security' );
2016
+ } else {
2017
+ $is_transient_set = get_transient( 'woocommerce_ca_delete_garbage_coupons' );
2018
+ }
2019
+
2020
+ if ( false === $is_transient_set || $is_ajax_request ) {
2021
+ $coupons = $this->delete_garbage_coupons();
2022
+ $coupon_count = count( $coupons );
2023
+
2024
+ if ( $coupon_count ) {
2025
+ $coupons_post_ids = implode( ',', wp_list_pluck( $coupons, 'ID' ) );
2026
+ $wpdb->query( "DELETE FROM {$wpdb->postmeta} WHERE post_id IN(" . $coupons_post_ids . ')' );//phpcs:ignore
2027
+ $wpdb->query( "DELETE FROM {$wpdb->posts} WHERE ID IN(" . $coupons_post_ids . ')' );//phpcs:ignore
2028
+ }
2029
+
2030
+ if ( ! $is_ajax_request ) {
2031
+ set_transient( 'woocommerce_ca_delete_garbage_coupons', $coupons, WEEK_IN_SECONDS );
2032
+ return;
2033
+ }
2034
+
2035
+ // translators: %1$s: Coupons Deleted, %2$s: Deleted coupons count'.
2036
+ wp_send_json_success( sprintf( __( '%1$s: %2$d', 'woo-cart-abandonment-recovery' ), 'Coupons Deleted', $coupon_count ) );
2037
+
2038
+ }
2039
+ }
2040
+
2041
+
2042
+ /**
2043
+ * Set transient and delete garbage coupons.
2044
+ */
2045
+ function delete_garbage_coupons() {
2046
+
2047
+ global $wpdb;
2048
+ $coupon_generated_by = WCF_CA_COUPON_GENERATED_BY;
2049
+ $timestamp = time();
2050
+ $post_type = 'shop_coupon';
2051
+ $coupons = $wpdb->get_results(
2052
+ $wpdb->prepare(
2053
+ "SELECT ID, coupon_code, usage_limit, total_usaged, expiry_date FROM (
2054
+ SELECT p.ID,
2055
+ p.post_title AS coupon_code,
2056
+ Max(CASE WHEN pm.meta_key = 'date_expires' AND p.`ID` = pm.`post_id` THEN pm.meta_value END) AS expiry_date,
2057
+ Max(CASE WHEN pm.meta_key = 'usage_limit' AND p.`ID` = pm.`post_id` THEN pm.meta_value END) AS usage_limit,
2058
+ Max(CASE WHEN pm.meta_key = 'usage_count' AND p.`ID` = pm.`post_id` THEN pm.meta_value END) AS total_usaged,
2059
+ Max(CASE WHEN pm.meta_key = 'coupon_generated_by' AND p.`ID` = pm.`post_id` THEN pm.meta_value END) AS coupon_generated_by
2060
+ FROM wp_posts AS p
2061
+ INNER JOIN wp_postmeta AS pm ON p.ID = pm.post_id
2062
+ WHERE p.`post_type` = %s
2063
+
2064
+ GROUP BY p.ID
2065
+ ) AS final_res WHERE coupon_generated_by IS NOT NULL AND coupon_generated_by = %s AND ( ( usage_limit = total_usaged ) OR ( expiry_date <= %d AND expiry_date != '') )",
2066
+ $post_type,
2067
+ $coupon_generated_by,
2068
+ $timestamp
2069
+ )
2070
+ );
2071
+ return $coupons;
2072
+ }
2073
+
2074
  }
2075
 
2076
  Cartflows_Ca_Cart_Abandonment::get_instance();
modules/cart-abandonment/class-cartflows-ca-email-templates.php CHANGED
@@ -105,25 +105,37 @@ class Cartflows_Ca_Email_Templates {
105
 
106
  $current_user = wp_get_current_user();
107
  $vars = array(
108
- 'email' => $current_user->user_email,
109
- 'name' => $current_user->user_firstname,
110
- 'surname' => $current_user->user_lastname,
111
- 'phone' => get_user_meta( $current_user->ID, 'billing_phone', true ),
112
- 'billing_company' => get_user_meta( $current_user->ID, 'billing_company', true ),
113
- 'billing_address_1' => get_user_meta( $current_user->ID, 'billing_address_1', true ),
114
- 'billing_address_2' => get_user_meta( $current_user->ID, 'billing_address_2', true ),
115
- 'billing_state' => get_user_meta( $current_user->ID, 'billing_state', true ),
116
- 'billing_postcode' => get_user_meta( $current_user->ID, 'billing_postcode', true ),
117
- 'shipping_first_name' => $current_user->user_firstname,
118
- 'shipping_last_name' => $current_user->user_lastname,
119
- 'shipping_company' => get_user_meta( $current_user->ID, 'shipping_company', true ),
120
- 'shipping_address_1' => get_user_meta( $current_user->ID, 'shipping_address_1', true ),
121
- 'shipping_address_2' => get_user_meta( $current_user->ID, 'shipping_address_2', true ),
122
- 'shipping_city' => get_user_meta( $current_user->ID, 'shipping_city', true ),
123
- 'shipping_state' => get_user_meta( $current_user->ID, 'shipping_state', true ),
124
- 'shipping_postcode' => get_user_meta( $current_user->ID, 'shipping_postcode', true ),
125
- 'woo_currency_symbol' => get_woocommerce_currency_symbol(),
126
- 'email_toggle_button_nonce' => wp_create_nonce( 'activate_email_templates' ),
 
 
 
 
 
 
 
 
 
 
 
 
127
  );
128
  wp_localize_script( 'cartflows-ca-email-tmpl-settings', 'wcf_ca_details', $vars );
129
 
@@ -168,6 +180,7 @@ class Cartflows_Ca_Email_Templates {
168
  define( 'WCF_CA_PAGE_NAME', 'woo-cart-abandonment-recovery' );
169
 
170
  define( 'WCF_CA_GENERAL_SETTINGS_SECTION', 'cartflows_cart_abandonment_settings_section' );
 
171
  define( 'WCF_CA_EMAIL_SETTINGS_SECTION', 'cartflows_email_template_settings_section' );
172
  define( 'WCF_CA_COUPON_CODE_SECTION', 'cartflows_coupon_code_settings_section' );
173
  define( 'WCF_CA_ZAPIER_SETTINGS_SECTION', 'cartflows_zapier_settings_section' );
@@ -586,8 +599,8 @@ class Cartflows_Ca_Email_Templates {
586
  }
587
  print'<input type="number" class="wcf-ca-trigger-input wcf-ca-coupon-inputs" id="wcf_email_coupon_expiry_date" name="wcf_email_coupon_expiry_date" value="' . intval( $wcf_email_coupon_expiry_date ) . '" autocomplete="off" />';
588
  $items = array(
589
- 'hours' => 'Hour(s)',
590
- 'days' => 'Day(s)',
591
  );
592
  echo "<select id='wcf_coupon_expiry_unit' name='wcf_coupon_expiry_unit'>";
593
  foreach ( $items as $key => $item ) {
@@ -681,9 +694,9 @@ class Cartflows_Ca_Email_Templates {
681
  $frequency_unit = $results->frequency_unit;
682
  }
683
  $days_or_hours = array(
684
- 'MINUTE' => 'Minute(s)',
685
- 'HOUR' => 'Hour(s)',
686
- 'DAY' => 'Day(s)',
687
  );
688
  foreach ( $days_or_hours as $k => $v ) {
689
  printf(
@@ -710,7 +723,7 @@ class Cartflows_Ca_Email_Templates {
710
  </th>
711
  <td>
712
  <input class="wcf-ca-trigger-input" type="text" id="wcf_send_test_email" name="send_test_email" value="<?php echo $current_user->user_email; ?>" class="wcf-ca-trigger-input">
713
- <input class="button" type="button" value="Send a test email" id="wcf_preview_email"/> <br/>
714
 
715
  <label id="mail_response_msg"> </label>
716
  </td>
@@ -723,9 +736,9 @@ class Cartflows_Ca_Email_Templates {
723
  <?php wp_nonce_field( WCF_EMAIL_TEMPLATES_NONCE, '_wpnonce' ); ?>
724
  <p class="submit">
725
  <?php
726
- $button_value = 'Save Changes';
727
  if ( WCF_SUB_ACTION_EDIT_EMAIL_TEMPLATES === $sub_action ) {
728
- $button_value = 'Update Changes';
729
  }
730
  ?>
731
  <input type="submit" name="Submit" class="button-primary" value="<?php echo $button_value; ?>"/>
105
 
106
  $current_user = wp_get_current_user();
107
  $vars = array(
108
+ 'email' => $current_user->user_email,
109
+ 'name' => $current_user->user_firstname,
110
+ 'surname' => $current_user->user_lastname,
111
+ 'phone' => get_user_meta( $current_user->ID, 'billing_phone', true ),
112
+ 'billing_company' => get_user_meta( $current_user->ID, 'billing_company', true ),
113
+ 'billing_address_1' => get_user_meta( $current_user->ID, 'billing_address_1', true ),
114
+ 'billing_address_2' => get_user_meta( $current_user->ID, 'billing_address_2', true ),
115
+ 'billing_state' => get_user_meta( $current_user->ID, 'billing_state', true ),
116
+ 'billing_postcode' => get_user_meta( $current_user->ID, 'billing_postcode', true ),
117
+ 'shipping_first_name' => $current_user->user_firstname,
118
+ 'shipping_last_name' => $current_user->user_lastname,
119
+ 'shipping_company' => get_user_meta( $current_user->ID, 'shipping_company', true ),
120
+ 'shipping_address_1' => get_user_meta( $current_user->ID, 'shipping_address_1', true ),
121
+ 'shipping_address_2' => get_user_meta( $current_user->ID, 'shipping_address_2', true ),
122
+ 'shipping_city' => get_user_meta( $current_user->ID, 'shipping_city', true ),
123
+ 'shipping_state' => get_user_meta( $current_user->ID, 'shipping_state', true ),
124
+ 'shipping_postcode' => get_user_meta( $current_user->ID, 'shipping_postcode', true ),
125
+ 'woo_currency_symbol' => get_woocommerce_currency_symbol(),
126
+ 'email_toggle_button_nonce' => wp_create_nonce( 'activate_email_templates' ),
127
+ 'admin_firstname' => __( 'Admin Firstname', 'woo-cart-abandonment-recovery' ),
128
+ 'admin_company' => __( 'Admin Company', 'woo-cart-abandonment-recovery' ),
129
+ 'abandoned_product_details_table' => __( 'Abandoned Product Details Table', 'woo-cart-abandonment-recovery' ),
130
+ 'abandoned_product_names' => __( 'Abandoned Product Names', 'woo-cart-abandonment-recovery' ),
131
+ 'cart_checkout_url' => __( 'Cart Checkout URL', 'woo-cart-abandonment-recovery' ),
132
+ 'coupon_code' => __( 'Coupon Code', 'woo-cart-abandonment-recovery' ),
133
+ 'customer_firstname' => __( 'Customer First Name', 'woo-cart-abandonment-recovery' ),
134
+ 'customer_lastname' => __( 'Customer Last Name', 'woo-cart-abandonment-recovery' ),
135
+ 'customer_full_name' => __( 'Customer Full Name', 'woo-cart-abandonment-recovery' ),
136
+ 'cart_abandonment_date' => __( 'Cart Abandonment Date', 'woo-cart-abandonment-recovery' ),
137
+ 'site_url' => __( 'Site URL', 'woo-cart-abandonment-recovery' ),
138
+ 'unsubscribe_link' => __( 'Unsubscribe Link', 'woo-cart-abandonment-recovery' ),
139
  );
140
  wp_localize_script( 'cartflows-ca-email-tmpl-settings', 'wcf_ca_details', $vars );
141
 
180
  define( 'WCF_CA_PAGE_NAME', 'woo-cart-abandonment-recovery' );
181
 
182
  define( 'WCF_CA_GENERAL_SETTINGS_SECTION', 'cartflows_cart_abandonment_settings_section' );
183
+ define( 'WCF_CA_COUPONS_SETTINGS_SECTION', 'cartflows_cart_abandonment_coupons_settings_section' );
184
  define( 'WCF_CA_EMAIL_SETTINGS_SECTION', 'cartflows_email_template_settings_section' );
185
  define( 'WCF_CA_COUPON_CODE_SECTION', 'cartflows_coupon_code_settings_section' );
186
  define( 'WCF_CA_ZAPIER_SETTINGS_SECTION', 'cartflows_zapier_settings_section' );
599
  }
600
  print'<input type="number" class="wcf-ca-trigger-input wcf-ca-coupon-inputs" id="wcf_email_coupon_expiry_date" name="wcf_email_coupon_expiry_date" value="' . intval( $wcf_email_coupon_expiry_date ) . '" autocomplete="off" />';
601
  $items = array(
602
+ 'hours' => __( 'Hour(s)', 'woo-cart-abandonment-recovery' ),
603
+ 'days' => __( 'Day(s)', 'woo-cart-abandonment-recovery' ),
604
  );
605
  echo "<select id='wcf_coupon_expiry_unit' name='wcf_coupon_expiry_unit'>";
606
  foreach ( $items as $key => $item ) {
694
  $frequency_unit = $results->frequency_unit;
695
  }
696
  $days_or_hours = array(
697
+ 'MINUTE' => __( 'Minute(s)', 'woo-cart-abandonment-recovery' ),
698
+ 'HOUR' => __( 'Hour(s)', 'woo-cart-abandonment-recovery' ),
699
+ 'DAY' => __( 'Day(s)', 'woo-cart-abandonment-recovery' ),
700
  );
701
  foreach ( $days_or_hours as $k => $v ) {
702
  printf(
723
  </th>
724
  <td>
725
  <input class="wcf-ca-trigger-input" type="text" id="wcf_send_test_email" name="send_test_email" value="<?php echo $current_user->user_email; ?>" class="wcf-ca-trigger-input">
726
+ <input class="button" type="button" value=" <?php _e( 'Send a test email', 'woo-cart-abandonment-recovery' ); ?>" id="wcf_preview_email"/> <br/>
727
 
728
  <label id="mail_response_msg"> </label>
729
  </td>
736
  <?php wp_nonce_field( WCF_EMAIL_TEMPLATES_NONCE, '_wpnonce' ); ?>
737
  <p class="submit">
738
  <?php
739
+ $button_value = __( 'Save Changes', 'woo-cart-abandonment-recovery' );
740
  if ( WCF_SUB_ACTION_EDIT_EMAIL_TEMPLATES === $sub_action ) {
741
+ $button_value = __( 'Update Changes', 'woo-cart-abandonment-recovery' );
742
  }
743
  ?>
744
  <input type="submit" name="Submit" class="button-primary" value="<?php echo $button_value; ?>"/>
modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php CHANGED
@@ -24,7 +24,7 @@
24
  }
25
  ?>
26
  <a href="<?php echo $back_link; ?>" class="button button-secondary back-button"><span
27
- class="dashicons dashicons-arrow-left"></span> Back to Reports </a>
28
  </div>
29
  </div>
30
 
@@ -44,24 +44,29 @@
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>
@@ -74,11 +79,11 @@
74
  <thead>
75
  <tr>
76
 
77
- <th class="wcf-ca-report-table-row"> Scheduled Template</th>
78
- <th class="wcf-ca-report-table-row"> Email Subject</th>
79
- <th class="wcf-ca-report-table-row"> Email Coupon</th>
80
- <th class="wcf-ca-report-table-row"> Email Sent</th>
81
- <th class="wcf-ca-report-table-row"><span class="dashicons dashicons-clock"></span> Scheduled At
82
  </th>
83
 
84
  </tr>
24
  }
25
  ?>
26
  <a href="<?php echo $back_link; ?>" class="button button-secondary back-button"><span
27
+ class="dashicons dashicons-arrow-left"></span> <?php _e( 'Back to Reports', 'woo-cart-abandonment-recovery' ); ?> </a>
28
  </div>
29
  </div>
30
 
44
  <div id="wcf-ca-confirm-email-reschedule" style="display:none;">
45
  <div style="text-align:center;">
46
  <p>
47
+ <?php
48
+ _e(
49
+ 'All new activated emails will be reschedule for this abandoned order. <br/>New emails will
50
+ be sent to user according to schedule time.',
51
+ 'woo-cart-abandonment-recovery'
52
+ );
53
+ ?>
54
  </p>
55
  <p>
56
+ <strong><?php _e( 'Are your sure?', 'woo-cart-abandonment-recovery' ); ?></strong>
57
  </p>
58
  <p>
59
  <button onclick="window.location.search += '&sub_action=<?php echo WCF_SUB_ACTION_REPORTS_RESCHEDULE; ?>';"
60
+ class="button button-secondary"> <?php _e( 'Reschedule', 'woo-cart-abandonment-recovery' ); ?>
61
  </button>
62
  <button type="button"
63
  onclick='document.getElementById("TB_closeWindowButton").click()'
64
+ class="button button-secondary"> <?php _e( 'Close', 'woo-cart-abandonment-recovery' ); ?>
65
  </button>
66
  </p>
67
  </div>
68
  </div>
69
+ <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"> <?php _e( 'Reschedule Emails', 'woo-cart-abandonment-recovery' ); ?> </a>
70
  <?php endif; ?>
71
  </div>
72
  </div>
79
  <thead>
80
  <tr>
81
 
82
+ <th class="wcf-ca-report-table-row"> <?php _e( 'Scheduled Template', 'woo-cart-abandonment-recovery' ); ?></th>
83
+ <th class="wcf-ca-report-table-row"> <?php _e( 'Email Subject', 'woo-cart-abandonment-recovery' ); ?></th>
84
+ <th class="wcf-ca-report-table-row"> <?php _e( 'Email Coupon', 'woo-cart-abandonment-recovery' ); ?></th>
85
+ <th class="wcf-ca-report-table-row"> <?php _e( 'Email Sent', 'woo-cart-abandonment-recovery' ); ?></th>
86
+ <th class="wcf-ca-report-table-row"><span class="dashicons dashicons-clock"></span> <?php _e( 'Scheduled At', 'woo-cart-abandonment-recovery' ); ?>
87
  </th>
88
 
89
  </tr>
modules/cart-abandonment/includes/admin/cartflows-cart-abandonment-reports.php CHANGED
@@ -11,19 +11,19 @@
11
 
12
  <div class="wcf-ca-left-report-field-group">
13
  <button onclick="window.location.search += '&filter=today';"
14
- class="button <?php echo 'today' === $filter ? 'button-primary' : 'button-secondary'; ?>"> Today
15
  </button>
16
 
17
  <button onclick="window.location.search += '&filter=yesterday';"
18
- class="button <?php echo 'yesterday' === $filter ? 'button-primary' : 'button-secondary'; ?>"> Yesterday
19
  </button>
20
 
21
  <button onclick="window.location.search += '&filter=last_week';"
22
- class="button <?php echo 'last_week' === $filter ? 'button-primary' : 'button-secondary'; ?>"> Last Week
23
  </button>
24
 
25
  <button onclick="window.location.search += '&filter=last_month';"
26
- class="button <?php echo 'last_month' === $filter ? 'button-primary' : 'button-secondary'; ?> "> Last Month
27
  </button>
28
  </div>
29
 
@@ -32,7 +32,7 @@
32
  <input class="wcf-ca-filter-input" type="text" id="wcf_ca_custom_filter_from" placeholder="YYYY-MM-DD" value="<?php echo $from_date; ?>"/>
33
  <input class="wcf-ca-filter-input" type="text" id="wcf_ca_custom_filter_to" placeholder="YYYY-MM-DD" value="<?php echo $to_date; ?>" />
34
  <button id="wcf_ca_custom_filter"
35
- class="button <?php echo 'custom' === $filter ? 'button-primary' : 'button-secondary'; ?> "> Custom Filter
36
  </button>
37
 
38
  </div>
@@ -105,13 +105,13 @@
105
  <div class="wcf-ca-report-btn">
106
  <div class="wcf-ca-left-report-field-group">
107
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_ABANDONED_ORDER; ?>';"
108
- class="button <?php echo WCF_CART_ABANDONED_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?> "> Recoverable Orders
109
  </button>
110
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_COMPLETED_ORDER; ?>';"
111
- class="button <?php echo WCF_CART_COMPLETED_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?>"> Recovered Orders
112
  </button>
113
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_LOST_ORDER; ?>';"
114
- class="button <?php echo WCF_CART_LOST_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?>"> Lost Orders
115
  </button>
116
  </div>
117
  </div>
11
 
12
  <div class="wcf-ca-left-report-field-group">
13
  <button onclick="window.location.search += '&filter=today';"
14
+ class="button <?php echo 'today' === $filter ? 'button-primary' : 'button-secondary'; ?>"> <?php _e( 'Today', 'woo-cart-abandonment-recovery' ); ?>
15
  </button>
16
 
17
  <button onclick="window.location.search += '&filter=yesterday';"
18
+ class="button <?php echo 'yesterday' === $filter ? 'button-primary' : 'button-secondary'; ?>"> <?php _e( 'Yesterday', 'woo-cart-abandonment-recovery' ); ?>
19
  </button>
20
 
21
  <button onclick="window.location.search += '&filter=last_week';"
22
+ class="button <?php echo 'last_week' === $filter ? 'button-primary' : 'button-secondary'; ?>"> <?php _e( 'Last Week', 'woo-cart-abandonment-recovery' ); ?>
23
  </button>
24
 
25
  <button onclick="window.location.search += '&filter=last_month';"
26
+ class="button <?php echo 'last_month' === $filter ? 'button-primary' : 'button-secondary'; ?> "> <?php _e( 'Last Month', 'woo-cart-abandonment-recovery' ); ?>
27
  </button>
28
  </div>
29
 
32
  <input class="wcf-ca-filter-input" type="text" id="wcf_ca_custom_filter_from" placeholder="YYYY-MM-DD" value="<?php echo $from_date; ?>"/>
33
  <input class="wcf-ca-filter-input" type="text" id="wcf_ca_custom_filter_to" placeholder="YYYY-MM-DD" value="<?php echo $to_date; ?>" />
34
  <button id="wcf_ca_custom_filter"
35
+ class="button <?php echo 'custom' === $filter ? 'button-primary' : 'button-secondary'; ?> "> <?php _e( 'Custom Filter', 'woo-cart-abandonment-recovery' ); ?>
36
  </button>
37
 
38
  </div>
105
  <div class="wcf-ca-report-btn">
106
  <div class="wcf-ca-left-report-field-group">
107
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_ABANDONED_ORDER; ?>';"
108
+ class="button <?php echo WCF_CART_ABANDONED_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?> "> <?php _e( 'Recoverable Orders', 'woo-cart-abandonment-recovery' ); ?>
109
  </button>
110
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_COMPLETED_ORDER; ?>';"
111
+ class="button <?php echo WCF_CART_COMPLETED_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?>"><?php _e( 'Recovered Orders', 'woo-cart-abandonment-recovery' ); ?>
112
  </button>
113
  <button onclick="window.location.search += '&filter_table=<?php echo WCF_CART_LOST_ORDER; ?>';"
114
+ class="button <?php echo WCF_CART_LOST_ORDER === $filter_table ? 'button-primary' : 'button-secondary'; ?>"><?php _e( 'Lost Orders', 'woo-cart-abandonment-recovery' ); ?>
115
  </button>
116
  </div>
117
  </div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce, wpcrafter
3
  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.3
7
- Stable tag: 1.2.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -128,7 +128,12 @@ 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.2.0 - Monday, 14th October 2019 =
 
 
 
 
 
132
  * New: Added support for PPOM products.
133
  * Improvement: Added email activate toggle button on grid.
134
  * Improvement: Added notice on the checkout page for test emails.
@@ -191,4 +196,4 @@ Here are few thoughts behind making it available for free:
191
  = Version 1.0.0 - Monday, 27th May 2019 =
192
  * Initial Release
193
 
194
- == Upgrade Notice ==
3
  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.2.1
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.2.1 - Tuesday, 5th November 2019 =
132
+ * New: Added delete option for used & expired coupons which will be created now onwards.
133
+ * Fix: Sometimes order status remains "abandoned" for initially failed orders.
134
+ * Fix: Strings updated for translation.
135
+
136
+ = Version 1.2.0 - Monday, 14th October 2019 =
137
  * New: Added support for PPOM products.
138
  * Improvement: Added email activate toggle button on grid.
139
  * Improvement: Added notice on the checkout page for test emails.
196
  = Version 1.0.0 - Monday, 27th May 2019 =
197
  * Initial Release
198
 
199
+ == Upgrade Notice ==
woo-cart-abandonment-recovery.php CHANGED
@@ -3,12 +3,12 @@
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.2.0
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: woo-cart-abandonment-recovery
10
  * WC requires at least: 3.0
11
- * WC tested up to: 3.7.1
12
  *
13
  * @package Woocommerce-Cart-Abandonment-Recovery
14
  */
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.2.1
7
  * Author: CartFlows Inc
8
  * Author URI: https://cartflows.com/
9
  * Text Domain: woo-cart-abandonment-recovery
10
  * WC requires at least: 3.0
11
+ * WC tested up to: 3.6.3
12
  *
13
  * @package Woocommerce-Cart-Abandonment-Recovery
14
  */