Version Description
Download this release
Release Info
Developer | cartflowswp |
Plugin | WooCommerce Cart Abandonment Recovery |
Version | 1.2.12 |
Comparing to | |
See all releases |
Code changes from version 1.2.11 to 1.2.12
- admin/assets/js/admin-email-templates.js +451 -286
- admin/assets/js/admin-mce.js +99 -108
- assets/images/hoodie.jpg +0 -0
- assets/images/image-placeholder.png +0 -0
- assets/images/polo.jpg +0 -0
- changelog.txt +6 -0
- classes/class-cartflows-ca-loader.php +2 -1
- languages/woo-cart-abandonment-recovery.pot +52 -52
- modules/cart-abandonment/assets/js/cart-abandonment-tracking.js +197 -167
- modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php +5 -7
- modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php +24 -9
- modules/cart-abandonment/class-cartflows-ca-email-templates-table.php +3 -1
- readme.txt +8 -2
- woo-cart-abandonment-recovery.php +2 -2
admin/assets/js/admin-email-templates.js
CHANGED
@@ -1,303 +1,468 @@
|
|
1 |
-
(function ($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
ZapierSettings = {
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
239 |
if ( ! zapier_webhook_url.length ) {
|
240 |
-
$(
|
|
|
|
|
|
|
|
|
|
|
241 |
return;
|
242 |
}
|
243 |
|
244 |
-
$(
|
245 |
-
|
|
|
|
|
246 |
var now = new Date();
|
247 |
-
var datetime =
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
var sample_data = {
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
|
|
260 |
};
|
261 |
-
$.ajax({
|
262 |
url: zapier_webhook_url,
|
263 |
type: 'POST',
|
264 |
data: sample_data,
|
265 |
-
success: function(data) {
|
266 |
-
if (data.status ==
|
267 |
-
$(
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
} else {
|
269 |
-
$(
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
},
|
273 |
-
error: function() {
|
274 |
-
$(
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
} else {
|
278 |
-
$(
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
},
|
281 |
-
}
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
})(jQuery);
|
1 |
+
( function ( $ ) {
|
2 |
+
CartAbandonmentSettings = {
|
3 |
+
init: function () {
|
4 |
+
$( '#wcf_ca_custom_filter_from' )
|
5 |
+
.datepicker( {
|
6 |
+
dateFormat: 'yy-mm-dd',
|
7 |
+
maxDate: '0',
|
8 |
+
onClose: function ( selectedDate ) {
|
9 |
+
jQuery( '#wcf_ca_custom_filter_to' ).datepicker(
|
10 |
+
'option',
|
11 |
+
'minDate',
|
12 |
+
selectedDate
|
13 |
+
);
|
14 |
+
},
|
15 |
+
} )
|
16 |
+
.attr( 'readonly', 'readonly' )
|
17 |
+
.css( 'background', 'white' );
|
18 |
+
|
19 |
+
$( '#wcf_ca_custom_filter_to' )
|
20 |
+
.datepicker( {
|
21 |
+
dateFormat: 'yy-mm-dd',
|
22 |
+
maxDate: '0',
|
23 |
+
onClose: function ( selectedDate ) {
|
24 |
+
jQuery( '#wcf_ca_custom_filter_from' ).datepicker(
|
25 |
+
'option',
|
26 |
+
'maxDate',
|
27 |
+
selectedDate
|
28 |
+
);
|
29 |
+
},
|
30 |
+
} )
|
31 |
+
.attr( 'readonly', 'readonly' )
|
32 |
+
.css( 'background', 'white' );
|
33 |
+
|
34 |
+
$( '#wcf_ca_custom_filter' ).on( 'click', function () {
|
35 |
+
var from = $( '#wcf_ca_custom_filter_from' ).val().trim();
|
36 |
+
var to = $( '#wcf_ca_custom_filter_to' ).val().trim();
|
37 |
+
var url = window.location.search;
|
38 |
+
url =
|
39 |
+
url +
|
40 |
+
'&from_date=' +
|
41 |
+
from +
|
42 |
+
'&to_date=' +
|
43 |
+
to +
|
44 |
+
'&filter=custom';
|
45 |
+
window.location.href = url;
|
46 |
+
} );
|
47 |
+
|
48 |
+
$( '#wcf_search_id_submit' ).on( 'click', function () {
|
49 |
+
var search = $( '#wcf_search_id_search_input' ).val().trim();
|
50 |
+
window.location.href =
|
51 |
+
window.location.search + '&search_term=' + search;
|
52 |
+
} );
|
53 |
+
|
54 |
+
// Hide initially.
|
55 |
+
$(
|
56 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry, #wcf_ca_zapier_cart_abandoned_webhook, #wcf_ca_coupon_code_status, #wcf_ca_gdpr_message'
|
57 |
+
)
|
58 |
+
.closest( 'tr' )
|
59 |
+
.hide();
|
60 |
+
|
61 |
+
if ( $( '#wcf_ca_gdpr_status:checked' ).length ) {
|
62 |
+
$( '#wcf_ca_gdpr_message' ).closest( 'tr' ).show();
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( $( '#wcf_ca_zapier_tracking_status:checked' ).length ) {
|
66 |
+
$(
|
67 |
+
'#wcf_ca_zapier_cart_abandoned_webhook, #wcf_ca_coupon_code_status'
|
68 |
+
)
|
69 |
+
.closest( 'tr' )
|
70 |
+
.show();
|
71 |
+
}
|
72 |
+
|
73 |
+
if (
|
74 |
+
$( '#wcf_ca_coupon_code_status:checked' ).length &&
|
75 |
+
$( '#wcf_ca_zapier_tracking_status:checked' ).length
|
76 |
+
) {
|
77 |
+
$(
|
78 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry'
|
79 |
+
)
|
80 |
+
.closest( 'tr' )
|
81 |
+
.show();
|
82 |
+
}
|
83 |
+
|
84 |
+
$( '#wcf_ca_coupon_code_status' ).on( 'click', function () {
|
85 |
+
if ( ! $( '#wcf_ca_coupon_code_status:checked' ).length ) {
|
86 |
+
$(
|
87 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry'
|
88 |
+
)
|
89 |
+
.closest( 'tr' )
|
90 |
+
.fadeOut();
|
91 |
+
} else {
|
92 |
+
$(
|
93 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry'
|
94 |
+
)
|
95 |
+
.closest( 'tr' )
|
96 |
+
.fadeIn();
|
97 |
+
}
|
98 |
+
} );
|
99 |
+
|
100 |
+
$( '#wcf_ca_gdpr_status' ).on( 'click', function () {
|
101 |
+
if ( ! $( '#wcf_ca_gdpr_status:checked' ).length ) {
|
102 |
+
$( '#wcf_ca_gdpr_message' ).closest( 'tr' ).fadeOut();
|
103 |
+
} else {
|
104 |
+
$( '#wcf_ca_gdpr_message' ).closest( 'tr' ).fadeIn();
|
105 |
+
}
|
106 |
+
} );
|
107 |
+
|
108 |
+
$( '#wcf_ca_zapier_tracking_status' ).on( 'click', function () {
|
109 |
+
if ( ! $( '#wcf_ca_zapier_tracking_status:checked' ).length ) {
|
110 |
+
$(
|
111 |
+
'#wcf_ca_zapier_cart_abandoned_webhook, #wcf_ca_coupon_code_status'
|
112 |
+
)
|
113 |
+
.closest( 'tr' )
|
114 |
+
.fadeOut();
|
115 |
+
} else {
|
116 |
+
$(
|
117 |
+
'#wcf_ca_zapier_cart_abandoned_webhook, #wcf_ca_coupon_code_status'
|
118 |
+
)
|
119 |
+
.closest( 'tr' )
|
120 |
+
.fadeIn();
|
121 |
+
}
|
122 |
+
|
123 |
+
if (
|
124 |
+
$( '#wcf_ca_coupon_code_status:checked' ).length &&
|
125 |
+
$( '#wcf_ca_zapier_tracking_status:checked' ).length
|
126 |
+
) {
|
127 |
+
$(
|
128 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry'
|
129 |
+
)
|
130 |
+
.closest( 'tr' )
|
131 |
+
.fadeIn();
|
132 |
+
} else {
|
133 |
+
$(
|
134 |
+
'#wcf_ca_discount_type, #wcf_ca_coupon_amount, #wcf_ca_coupon_expiry'
|
135 |
+
)
|
136 |
+
.closest( 'tr' )
|
137 |
+
.fadeOut();
|
138 |
+
}
|
139 |
+
} );
|
140 |
+
},
|
141 |
+
};
|
142 |
+
|
143 |
+
EmailTemplatesAdmin = {
|
144 |
+
init: function () {
|
145 |
+
$( document ).on(
|
146 |
+
'click',
|
147 |
+
'#wcf_preview_email',
|
148 |
+
EmailTemplatesAdmin.send_test_email
|
149 |
+
);
|
150 |
+
$( document ).on(
|
151 |
+
'click',
|
152 |
+
'.wcf-ca-switch.wcf-toggle-template-status',
|
153 |
+
EmailTemplatesAdmin.toggle_activate_template
|
154 |
+
);
|
155 |
+
$( document ).on(
|
156 |
+
'click',
|
157 |
+
'#wcf_ca_delete_coupons',
|
158 |
+
EmailTemplatesAdmin.delete_coupons
|
159 |
+
);
|
160 |
+
$( document ).on(
|
161 |
+
'click',
|
162 |
+
'#wcf_ca_export_orders',
|
163 |
+
EmailTemplatesAdmin.export_orders
|
164 |
+
);
|
165 |
+
$( document ).on(
|
166 |
+
'click',
|
167 |
+
'.wcar-switch-grid',
|
168 |
+
EmailTemplatesAdmin.toggle_activate_template_on_grid
|
169 |
+
);
|
170 |
+
var coupon_child_fields =
|
171 |
+
'#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';
|
172 |
+
$( coupon_child_fields )
|
173 |
+
.closest( 'tr' )
|
174 |
+
.toggle( $( '#wcf_override_global_coupon' ).is( ':checked' ) );
|
175 |
+
$( document ).on(
|
176 |
+
'click',
|
177 |
+
'#wcf_override_global_coupon',
|
178 |
+
function () {
|
179 |
+
$( coupon_child_fields )
|
180 |
+
.closest( 'tr' )
|
181 |
+
.fadeToggle(
|
182 |
+
$( '#wcf_override_global_coupon' ).is( ':checked' )
|
183 |
+
);
|
184 |
+
}
|
185 |
+
);
|
186 |
+
},
|
187 |
+
|
188 |
+
send_test_email: function () {
|
189 |
+
var email_body = '';
|
190 |
+
if (
|
191 |
+
jQuery( '#wp-wcf_email_body-wrap' ).hasClass( 'tmce-active' )
|
192 |
+
) {
|
193 |
+
email_body = tinyMCE.get( 'wcf_email_body' ).getContent();
|
194 |
+
} else {
|
195 |
+
email_body = jQuery( '#wcf_email_body' ).val();
|
196 |
+
}
|
197 |
+
|
198 |
+
var email_subject = $( '#wcf_email_subject' ).val();
|
199 |
+
var email_send_to = $( '#wcf_send_test_email' ).val();
|
200 |
+
var wp_nonce = $( '#_wpnonce' ).val();
|
201 |
+
|
202 |
+
$( this ).next( 'div.error' ).remove();
|
203 |
+
|
204 |
+
if ( ! $.trim( email_body ) ) {
|
205 |
+
$( this ).after(
|
206 |
+
'<div class="error-message wcf-ca-error-msg"> Email body is required! </div>'
|
207 |
+
);
|
208 |
+
} else if ( ! $.trim( email_subject ) ) {
|
209 |
+
$( this ).after(
|
210 |
+
'<div class="error-message wcf-ca-error-msg"> Email subject is required! </div>'
|
211 |
+
);
|
212 |
+
} else if ( ! $.trim( email_send_to ) ) {
|
213 |
+
$( this ).after(
|
214 |
+
'<div class="error-message wcf-ca-error-msg"> You must add your email id! </div>'
|
215 |
+
);
|
216 |
+
} else {
|
217 |
+
var data = {
|
218 |
+
email_subject: email_subject,
|
219 |
+
email_body: email_body,
|
220 |
+
email_send_to: email_send_to,
|
221 |
+
action: 'wcf_ca_preview_email_send',
|
222 |
+
security: wp_nonce,
|
223 |
+
};
|
224 |
+
$( '#wcf_preview_email' )
|
225 |
+
.css( 'cursor', 'wait' )
|
226 |
+
.attr( 'disabled', true );
|
227 |
+
|
228 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
229 |
+
$.post( ajaxurl, data, function ( response ) {
|
230 |
+
$( '#mail_response_msg' ).empty().fadeIn();
|
231 |
+
|
232 |
+
if ( response.success ) {
|
233 |
+
var htmlString =
|
234 |
+
'<strong> Email has been sent successfully! </strong>';
|
235 |
+
$( '#mail_response_msg' )
|
236 |
+
.css( 'color', 'green' )
|
237 |
+
.html( htmlString )
|
238 |
+
.delay( 3000 )
|
239 |
+
.fadeOut();
|
240 |
+
} else {
|
241 |
+
var htmlString =
|
242 |
+
'<strong> Email sending failed! Please check your SMTP settings! </a></strong>';
|
243 |
+
$( '#mail_response_msg' )
|
244 |
+
.css( 'color', 'red' )
|
245 |
+
.html( htmlString )
|
246 |
+
.delay( 3000 )
|
247 |
+
.fadeOut();
|
248 |
+
}
|
249 |
+
$( '#wcf_preview_email' )
|
250 |
+
.css( 'cursor', '' )
|
251 |
+
.attr( 'disabled', false );
|
252 |
+
} );
|
253 |
+
}
|
254 |
+
|
255 |
+
$( '.wcf-ca-error-msg' ).delay( 2000 ).fadeOut();
|
256 |
+
},
|
257 |
+
|
258 |
+
delete_coupons: function () {
|
259 |
+
if ( confirm( wcf_ca_localized_vars._confirm_msg ) ) {
|
260 |
+
var data = {
|
261 |
+
action: 'wcf_ca_delete_garbage_coupons',
|
262 |
+
security: wcf_ca_localized_vars._delete_coupon_nonce,
|
263 |
+
};
|
264 |
+
$( '.wcf-ca-spinner' ).show();
|
265 |
+
|
266 |
+
$( '.wcf-ca-spinner' ).addClass( 'is-active' );
|
267 |
+
$( '#wcf_ca_delete_coupons' )
|
268 |
+
.css( 'cursor', 'wait' )
|
269 |
+
.attr( 'disabled', true );
|
270 |
+
$.post( ajaxurl, data, function ( response ) {
|
271 |
+
$( '.wcf-ca-response-msg' ).empty().fadeIn();
|
272 |
+
if ( response.success ) {
|
273 |
+
$( '.wcf-ca-spinner' ).hide();
|
274 |
+
$( '.wcf-ca-response-msg' )
|
275 |
+
.css( 'color', 'green' )
|
276 |
+
.html( response.data )
|
277 |
+
.delay( 5000 )
|
278 |
+
.fadeOut();
|
279 |
+
}
|
280 |
+
|
281 |
+
$( '#wcf_ca_delete_coupons' )
|
282 |
+
.css( 'cursor', '' )
|
283 |
+
.attr( 'disabled', false );
|
284 |
+
} );
|
285 |
+
}
|
286 |
+
},
|
287 |
+
export_orders: function () {
|
288 |
+
if ( confirm( wcf_ca_localized_vars._confirm_msg_export ) ) {
|
289 |
+
window.location.href =
|
290 |
+
window.location.search + '&export_data=true';
|
291 |
+
}
|
292 |
+
},
|
293 |
+
toggle_activate_template_on_grid: function () {
|
294 |
+
var $switch, state, new_state;
|
295 |
+
$switch = $( this );
|
296 |
+
state = $switch.attr( 'wcf-ca-template-switch' );
|
297 |
+
var css = state === 'on' ? 'green' : 'red';
|
298 |
+
|
299 |
+
$.post(
|
300 |
+
ajaxurl,
|
301 |
+
{
|
302 |
+
action: 'activate_email_templates',
|
303 |
+
id: $( this ).attr( 'id' ),
|
304 |
+
state: state,
|
305 |
+
security: wcf_ca_details.email_toggle_button_nonce,
|
306 |
+
},
|
307 |
+
function ( response ) {
|
308 |
+
$( '#wcf_activate_email_template' ).val(
|
309 |
+
new_state == 'on' ? 1 : 0
|
310 |
+
);
|
311 |
+
|
312 |
+
$( '.wcar_tmpl_response_msg' ).remove();
|
313 |
+
|
314 |
+
$(
|
315 |
+
"<span class='wcar_tmpl_response_msg'> " +
|
316 |
+
response.data +
|
317 |
+
' </span>'
|
318 |
+
)
|
319 |
+
.insertAfter( $switch )
|
320 |
+
.delay( 2000 )
|
321 |
+
.fadeOut()
|
322 |
+
.css( 'color', css );
|
323 |
+
}
|
324 |
+
);
|
325 |
+
},
|
326 |
+
|
327 |
+
toggle_activate_template: function () {
|
328 |
+
var $switch, state, new_state;
|
329 |
+
$switch = $( this );
|
330 |
+
state = $switch.attr( 'wcf-ca-template-switch' );
|
331 |
+
new_state = state === 'on' ? 'off' : 'on';
|
332 |
+
$( '#wcf_activate_email_template' ).val(
|
333 |
+
new_state == 'on' ? 1 : 0
|
334 |
+
);
|
335 |
+
$switch.attr( 'wcf-ca-template-switch', new_state );
|
336 |
+
},
|
337 |
+
};
|
338 |
+
|
339 |
ZapierSettings = {
|
340 |
+
init: function () {
|
341 |
+
$( document ).on(
|
342 |
+
'click',
|
343 |
+
'#wcf_ca_trigger_web_hook_abandoned_btn',
|
344 |
+
{ order_status: 'abandoned' },
|
345 |
+
ZapierSettings.zapier_trigger_sample
|
346 |
+
);
|
347 |
+
},
|
348 |
+
zapier_trigger_sample: function ( event ) {
|
349 |
+
var zapier_webhook_url = $(
|
350 |
+
'#wcf_ca_zapier_cart_' + event.data.order_status + '_webhook'
|
351 |
+
)
|
352 |
+
.val()
|
353 |
+
.trim();
|
354 |
+
|
355 |
if ( ! zapier_webhook_url.length ) {
|
356 |
+
$( '#wcf_ca_' + event.data.order_status + '_btn_message' )
|
357 |
+
.text( 'Webhook URL is required.' )
|
358 |
+
.fadeIn()
|
359 |
+
.css( 'color', '#dc3232' )
|
360 |
+
.delay( 2000 )
|
361 |
+
.fadeOut();
|
362 |
return;
|
363 |
}
|
364 |
|
365 |
+
$( '#wcf_ca_' + event.data.order_status + '_btn_message' )
|
366 |
+
.text( 'Triggering...' )
|
367 |
+
.fadeIn();
|
368 |
+
|
369 |
var now = new Date();
|
370 |
+
var datetime =
|
371 |
+
now.getFullYear() +
|
372 |
+
'/' +
|
373 |
+
( now.getMonth() + 1 ) +
|
374 |
+
'/' +
|
375 |
+
now.getDate();
|
376 |
+
datetime +=
|
377 |
+
' ' +
|
378 |
+
now.getHours() +
|
379 |
+
':' +
|
380 |
+
now.getMinutes() +
|
381 |
+
':' +
|
382 |
+
now.getSeconds();
|
383 |
+
if ( $.trim( zapier_webhook_url ) !== '' ) {
|
384 |
var sample_data = {
|
385 |
+
first_name: wcf_ca_details.name,
|
386 |
+
last_name: wcf_ca_details.surname,
|
387 |
+
email: wcf_ca_details.email,
|
388 |
+
order_status: event.data.order_status,
|
389 |
+
checkout_url:
|
390 |
+
window.location.origin +
|
391 |
+
'/checkout/?wcf_ac_token=something',
|
392 |
+
coupon_code: 'abcgefgh',
|
393 |
+
product_names: 'Product1, Product2 & Product3',
|
394 |
+
cart_total: wcf_ca_details.woo_currency_symbol + '20',
|
395 |
+
product_table:
|
396 |
+
'<table align= left; cellpadding="10" cellspacing="0" style="float: none; border: 1px solid #e5e5e5;"> <tr align="center"> <th style="color: #636363; border: 1px solid #e5e5e5;">Item</th> <th style="color: #636363; border: 1px solid #e5e5e5;">Name</th> <th style="color: #636363; border: 1px solid #e5e5e5;">Quantity</th> <th style="color: #636363; border: 1px solid #e5e5e5;">Price</th> <th style="color: #636363; border: 1px solid #e5e5e5;">Line Subtotal</th> </tr> <tr style=color: #636363; border: 1px solid #e5e5e5; align="center"> <td style="color: #636363; border: 1px solid #e5e5e5;"><img class="demo_img" style="height: 42px; width: 42px;" src="http://localhost/wp-local/wp-content/uploads/2019/11/wGdyS_Zgz1A.jpg"></td> <td style="color: #636363; border: 1px solid #e5e5e5;">Product1</td> <td style="color: #636363; border: 1px solid #e5e5e5;"> 1 </td> <td style="color: #636363; border: 1px solid #e5e5e5;">£85.00</td> <td style="color: #636363; border: 1px solid #e5e5e5;" >£85.00</td> </tr> </table>',
|
397 |
};
|
398 |
+
$.ajax( {
|
399 |
url: zapier_webhook_url,
|
400 |
type: 'POST',
|
401 |
data: sample_data,
|
402 |
+
success: function ( data ) {
|
403 |
+
if ( data.status == 'success' ) {
|
404 |
+
$(
|
405 |
+
'#wcf_ca_' +
|
406 |
+
event.data.order_status +
|
407 |
+
'_btn_message'
|
408 |
+
)
|
409 |
+
.text( 'Trigger Success!' )
|
410 |
+
.css( 'color', '#46b450' );
|
411 |
} else {
|
412 |
+
$(
|
413 |
+
'#wcf_ca_' +
|
414 |
+
event.data.order_status +
|
415 |
+
'_btn_message'
|
416 |
+
)
|
417 |
+
.text( 'Trigger Failed!' )
|
418 |
+
.css( 'color', '#dc3232' );
|
419 |
}
|
420 |
+
$(
|
421 |
+
'#wcf_ca_' +
|
422 |
+
event.data.order_status +
|
423 |
+
'_btn_message'
|
424 |
+
)
|
425 |
+
.fadeIn()
|
426 |
+
.delay( 2000 )
|
427 |
+
.fadeOut();
|
428 |
},
|
429 |
+
error: function () {
|
430 |
+
$(
|
431 |
+
'#wcf_ca_' +
|
432 |
+
event.data.order_status +
|
433 |
+
'_btn_message'
|
434 |
+
)
|
435 |
+
.text( 'Trigger Failed!' )
|
436 |
+
.css( 'color', '#dc3232' );
|
437 |
+
},
|
438 |
+
} );
|
439 |
} else {
|
440 |
+
$( 'wcf_ca' + event.data.order_status + '_btn_message' )
|
441 |
+
.text( 'Please verify webhook URL.' )
|
442 |
+
.fadeIn()
|
443 |
+
.delay( 2000 )
|
444 |
+
.fadeOut();
|
445 |
}
|
446 |
},
|
447 |
+
};
|
448 |
+
|
449 |
+
ToolTipHover = {
|
450 |
+
init: function () {
|
451 |
+
$( '.wcf-ca-report-table-row .wcf-ca-icon-row' ).on(
|
452 |
+
'hover',
|
453 |
+
function () {
|
454 |
+
$( this )
|
455 |
+
.find( '.wcf-ca-tooltip-text' )
|
456 |
+
.toggleClass( 'display_tool_tip' );
|
457 |
+
}
|
458 |
+
);
|
459 |
+
},
|
460 |
+
};
|
461 |
+
|
462 |
+
$( function () {
|
463 |
+
EmailTemplatesAdmin.init();
|
464 |
+
CartAbandonmentSettings.init();
|
465 |
+
ZapierSettings.init();
|
466 |
+
ToolTipHover.init();
|
467 |
+
} );
|
468 |
+
} )( jQuery );
|
|
admin/assets/js/admin-mce.js
CHANGED
@@ -1,108 +1,99 @@
|
|
1 |
-
(function ($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
}
|
101 |
-
);
|
102 |
-
}
|
103 |
-
);
|
104 |
-
}
|
105 |
-
);
|
106 |
-
|
107 |
-
})(jQuery);
|
108 |
-
|
1 |
+
( function ( $ ) {
|
2 |
+
$( document ).ready( function () {
|
3 |
+
tinymce.PluginManager.add( 'cartflows_ac', function ( editor, url ) {
|
4 |
+
editor.addButton( 'cartflows_ac', {
|
5 |
+
type: 'menubutton',
|
6 |
+
text: 'WCAR Fields',
|
7 |
+
icon: false,
|
8 |
+
menu: [
|
9 |
+
{
|
10 |
+
text: wcf_ca_details.admin_firstname,
|
11 |
+
value: '{{admin.firstname}}',
|
12 |
+
onclick: function () {
|
13 |
+
editor.insertContent( this.value() );
|
14 |
+
},
|
15 |
+
},
|
16 |
+
{
|
17 |
+
text: wcf_ca_details.admin_company,
|
18 |
+
value: '{{admin.company}}',
|
19 |
+
onclick: function () {
|
20 |
+
editor.insertContent( this.value() );
|
21 |
+
},
|
22 |
+
},
|
23 |
+
{
|
24 |
+
text: wcf_ca_details.abandoned_product_details_table,
|
25 |
+
value: '{{cart.product.table}}',
|
26 |
+
onclick: function () {
|
27 |
+
editor.insertContent( this.value() );
|
28 |
+
},
|
29 |
+
},
|
30 |
+
{
|
31 |
+
text: wcf_ca_details.abandoned_product_names,
|
32 |
+
value: '{{cart.product.names}}',
|
33 |
+
onclick: function () {
|
34 |
+
editor.insertContent( this.value() );
|
35 |
+
},
|
36 |
+
},
|
37 |
+
{
|
38 |
+
text: wcf_ca_details.cart_checkout_url,
|
39 |
+
value: '{{cart.checkout_url}}',
|
40 |
+
onclick: function () {
|
41 |
+
editor.insertContent( this.value() );
|
42 |
+
},
|
43 |
+
},
|
44 |
+
{
|
45 |
+
text: wcf_ca_details.coupon_code,
|
46 |
+
value: '{{cart.coupon_code}}',
|
47 |
+
onclick: function () {
|
48 |
+
editor.insertContent( this.value() );
|
49 |
+
},
|
50 |
+
},
|
51 |
+
{
|
52 |
+
text: wcf_ca_details.customer_firstname,
|
53 |
+
value: '{{customer.firstname}}',
|
54 |
+
onclick: function () {
|
55 |
+
editor.insertContent( this.value() );
|
56 |
+
},
|
57 |
+
},
|
58 |
+
{
|
59 |
+
text: wcf_ca_details.customer_lastname,
|
60 |
+
value: '{{customer.lastname}}',
|
61 |
+
onclick: function () {
|
62 |
+
editor.insertContent( this.value() );
|
63 |
+
},
|
64 |
+
},
|
65 |
+
{
|
66 |
+
text: wcf_ca_details.customer_full_name,
|
67 |
+
value: '{{customer.fullname}}',
|
68 |
+
onclick: function () {
|
69 |
+
editor.insertContent( this.value() );
|
70 |
+
},
|
71 |
+
},
|
72 |
+
{
|
73 |
+
text: wcf_ca_details.cart_abandonment_date,
|
74 |
+
value: '{{cart.abandoned_date}}',
|
75 |
+
onclick: function () {
|
76 |
+
editor.insertContent( this.value() );
|
77 |
+
},
|
78 |
+
},
|
79 |
+
{
|
80 |
+
text: wcf_ca_details.site_url,
|
81 |
+
value: '{{site.url}}',
|
82 |
+
onclick: function () {
|
83 |
+
editor.insertContent( this.value() );
|
84 |
+
},
|
85 |
+
},
|
86 |
+
{
|
87 |
+
text: wcf_ca_details.unsubscribe_link,
|
88 |
+
value: '{{cart.unsubscribe}}',
|
89 |
+
onclick: function () {
|
90 |
+
editor.insertContent( this.value() );
|
91 |
+
},
|
92 |
+
},
|
93 |
+
].sort( function ( a, b ) {
|
94 |
+
return a.text.localeCompare( b.text );
|
95 |
+
} ),
|
96 |
+
} );
|
97 |
+
} );
|
98 |
+
} );
|
99 |
+
} )( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/images/hoodie.jpg
DELETED
Binary file
|
assets/images/image-placeholder.png
ADDED
Binary file
|
assets/images/polo.jpg
DELETED
Binary file
|
changelog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
Version 1.2.11 - Monday, 08th March 2021
|
2 |
- Improvement: WordPress 5.7 compatibility.
|
3 |
- Improvement: Removed jQuery3 deprecated function notices.
|
1 |
+
Version 1.2.12 - Thursday, 29th April 2021
|
2 |
+
- Improvement: Added the placeholder image for the product image.
|
3 |
+
- Fix: PHP error while notifying recovery to admin.
|
4 |
+
- Fix: Products Custom attributes not showing in product column.
|
5 |
+
- Fix: Orders list was not sorting.
|
6 |
+
|
7 |
Version 1.2.11 - Monday, 08th March 2021
|
8 |
- Improvement: WordPress 5.7 compatibility.
|
9 |
- Improvement: Removed jQuery3 deprecated function notices.
|
classes/class-cartflows-ca-loader.php
CHANGED
@@ -82,7 +82,8 @@ if ( ! class_exists( 'CARTFLOWS_CA_Loader' ) ) {
|
|
82 |
define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
|
83 |
define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
|
84 |
define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
|
85 |
-
define( 'CARTFLOWS_CA_VER', '1.2.
|
|
|
86 |
define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
|
87 |
|
88 |
define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
|
82 |
define( 'CARTFLOWS_CA_BASE', plugin_basename( CARTFLOWS_CA_FILE ) );
|
83 |
define( 'CARTFLOWS_CA_DIR', plugin_dir_path( CARTFLOWS_CA_FILE ) );
|
84 |
define( 'CARTFLOWS_CA_URL', plugins_url( '/', CARTFLOWS_CA_FILE ) );
|
85 |
+
define( 'CARTFLOWS_CA_VER', '1.2.12' );
|
86 |
+
|
87 |
define( 'CARTFLOWS_CA_SLUG', 'cartflows_ca' );
|
88 |
|
89 |
define( 'CARTFLOWS_CA_CART_ABANDONMENT_TABLE', 'cartflows_ca_cart_abandonment' );
|
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.
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
|
8 |
-
"POT-Creation-Date: 2021-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -25,18 +25,18 @@ msgstr ""
|
|
25 |
"X-Textdomain-Support: yes\n"
|
26 |
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
27 |
|
28 |
-
#: classes/class-cartflows-ca-loader.php:
|
29 |
#. translators: %s: html tags
|
30 |
msgid ""
|
31 |
"The %1$sWooCommerce Cart Abandonment Recovery%2$s plugin requires "
|
32 |
"%1$sWooCommerce%2$s plugin installed & activated."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: classes/class-cartflows-ca-loader.php:
|
36 |
msgid "Activate WooCommerce"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: classes/class-cartflows-ca-loader.php:
|
40 |
msgid "Install WooCommerce"
|
41 |
msgstr ""
|
42 |
|
@@ -259,158 +259,158 @@ msgstr ""
|
|
259 |
|
260 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:90
|
261 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:142
|
262 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
263 |
msgid "Unsubscribe"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:
|
267 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
268 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
269 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:176
|
270 |
msgid "Name"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:
|
274 |
msgid "Email"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:
|
278 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
279 |
msgid "Cart Total"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:
|
283 |
msgid "Order Status"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:
|
287 |
msgid "Time"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
291 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
292 |
msgid "This order was abandoned & subsequently recovered."
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
296 |
msgid "Mail has been sent successfully!"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
300 |
msgid "Mail sending failed!"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
304 |
msgid "Every Fifteen Minutes"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
308 |
msgid "You have successfully unsubscribed from our email list."
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
312 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:167
|
313 |
msgid "Unsubscribed"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
317 |
msgid ""
|
318 |
"This checkout page is generated by WooCommerce Cart Abandonment Recovery "
|
319 |
"plugin from test mail."
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
323 |
msgid "No Thanks"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
327 |
msgid "You won't receive further emails from us, thank you!"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1200
|
331 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1201
|
|
|
332 |
msgid "Cart Abandonment"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
336 |
msgid "Items deleted: %d"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
340 |
msgid "User(s) unsubscribed successfully!"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
344 |
msgid ""
|
345 |
"Do you really want to delete the used and expired coupons created by Cart "
|
346 |
"Abandonment Plugin?"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
350 |
msgid "Do you really want to export orders?"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
354 |
msgid "No such order is found."
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
358 |
msgid "View Report"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
362 |
msgid "Report"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
366 |
msgid "Follow-Up Emails"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
370 |
msgid "Settings"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
374 |
msgid "there"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
378 |
msgid "Cart Total ( Cart Total + Shipping + Tax )"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
382 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
383 |
msgid "Item"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
387 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
388 |
msgid "Quantity"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
392 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
393 |
msgid "Price"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
397 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
398 |
msgid "Line Subtotal"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
402 |
msgid "Discount"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
406 |
msgid "Other"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
410 |
msgid "Shipping"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:
|
414 |
#. translators: %1$s: Coupons Deleted, %2$s: Deleted coupons count'.
|
415 |
msgid "%1$s: %2$d"
|
416 |
msgstr ""
|
@@ -423,20 +423,20 @@ msgstr ""
|
|
423 |
msgid "Clone"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:
|
427 |
msgid "Template Name"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:
|
431 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:86
|
432 |
msgid "Email Subject"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:
|
436 |
msgid "Trigger After"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:
|
440 |
msgid "Activate Template"
|
441 |
msgstr ""
|
442 |
|
2 |
# This file is distributed under the same license as the WooCommerce Cart Abandonment Recovery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Cart Abandonment Recovery 1.2.12\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/woo-cart-abandonment-recovery\n"
|
8 |
+
"POT-Creation-Date: 2021-04-28 12:40:14+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
25 |
"X-Textdomain-Support: yes\n"
|
26 |
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
27 |
|
28 |
+
#: classes/class-cartflows-ca-loader.php:143
|
29 |
#. translators: %s: html tags
|
30 |
msgid ""
|
31 |
"The %1$sWooCommerce Cart Abandonment Recovery%2$s plugin requires "
|
32 |
"%1$sWooCommerce%2$s plugin installed & activated."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: classes/class-cartflows-ca-loader.php:152
|
36 |
msgid "Activate WooCommerce"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: classes/class-cartflows-ca-loader.php:160
|
40 |
msgid "Install WooCommerce"
|
41 |
msgstr ""
|
42 |
|
259 |
|
260 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:90
|
261 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:142
|
262 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1800
|
263 |
msgid "Unsubscribe"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:236
|
267 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1951
|
268 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2010
|
269 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:176
|
270 |
msgid "Name"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:237
|
274 |
msgid "Email"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:238
|
278 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2032
|
279 |
msgid "Cart Total"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:239
|
283 |
msgid "Order Status"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php:240
|
287 |
msgid "Time"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:211
|
291 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1043
|
292 |
msgid "This order was abandoned & subsequently recovered."
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:236
|
296 |
msgid "Mail has been sent successfully!"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:238
|
300 |
msgid "Mail sending failed!"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:277
|
304 |
msgid "Every Fifteen Minutes"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:351
|
308 |
msgid "You have successfully unsubscribed from our email list."
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:351
|
312 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:167
|
313 |
msgid "Unsubscribed"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:502
|
317 |
msgid ""
|
318 |
"This checkout page is generated by WooCommerce Cart Abandonment Recovery "
|
319 |
"plugin from test mail."
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:544
|
323 |
msgid "No Thanks"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:545
|
327 |
msgid "You won't receive further emails from us, thank you!"
|
328 |
msgstr ""
|
329 |
|
|
|
330 |
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1201
|
331 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1202
|
332 |
msgid "Cart Abandonment"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1227
|
336 |
msgid "Items deleted: %d"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1244
|
340 |
msgid "User(s) unsubscribed successfully!"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1305
|
344 |
msgid ""
|
345 |
"Do you really want to delete the used and expired coupons created by Cart "
|
346 |
"Abandonment Plugin?"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1306
|
350 |
msgid "Do you really want to export orders?"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1310
|
354 |
msgid "No such order is found."
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1329
|
358 |
msgid "View Report"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1467
|
362 |
msgid "Report"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1483
|
366 |
msgid "Follow-Up Emails"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1499
|
370 |
msgid "Settings"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1761
|
374 |
msgid "there"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1943
|
378 |
msgid "Cart Total ( Cart Total + Shipping + Tax )"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1950
|
382 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2009
|
383 |
msgid "Item"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1952
|
387 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2011
|
388 |
msgid "Quantity"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1953
|
392 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2012
|
393 |
msgid "Price"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:1954
|
397 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2013
|
398 |
msgid "Line Subtotal"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2019
|
402 |
msgid "Discount"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2023
|
406 |
msgid "Other"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2028
|
410 |
msgid "Shipping"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php:2180
|
414 |
#. translators: %1$s: Coupons Deleted, %2$s: Deleted coupons count'.
|
415 |
msgid "%1$s: %2$d"
|
416 |
msgstr ""
|
423 |
msgid "Clone"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:189
|
427 |
msgid "Template Name"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:190
|
431 |
#: modules/cart-abandonment/includes/admin/cartflows-ca-single-report-details.php:86
|
432 |
msgid "Email Subject"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:191
|
436 |
msgid "Trigger After"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: modules/cart-abandonment/class-cartflows-ca-email-templates-table.php:192
|
440 |
msgid "Activate Template"
|
441 |
msgstr ""
|
442 |
|
modules/cart-abandonment/assets/js/cart-abandonment-tracking.js
CHANGED
@@ -1,167 +1,197 @@
|
|
1 |
-
(function ($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function ( $ ) {
|
2 |
+
var timer;
|
3 |
+
var wcf_cart_abandonment = {
|
4 |
+
init: function () {
|
5 |
+
if (
|
6 |
+
CartFlowsProCAVars._show_gdpr_message &&
|
7 |
+
! $( '#wcf_cf_gdpr_message_block' ).length
|
8 |
+
) {
|
9 |
+
$( '#billing_email' ).after(
|
10 |
+
"<span id='wcf_cf_gdpr_message_block'> <span style='font-size: xx-small'> " +
|
11 |
+
CartFlowsProCAVars._gdpr_message +
|
12 |
+
" <a style='cursor: pointer' id='wcf_ca_gdpr_no_thanks'> " +
|
13 |
+
CartFlowsProCAVars._gdpr_nothanks_msg +
|
14 |
+
' </a></span></span>'
|
15 |
+
);
|
16 |
+
}
|
17 |
+
|
18 |
+
$( document ).on(
|
19 |
+
'keyup keypress change',
|
20 |
+
'#billing_email, #billing_phone, input.input-text, textarea.input-text, select',
|
21 |
+
this._getCheckoutData
|
22 |
+
);
|
23 |
+
|
24 |
+
$( '#wcf_ca_gdpr_no_thanks' ).on( 'click', function () {
|
25 |
+
wcf_cart_abandonment._set_cookie();
|
26 |
+
} );
|
27 |
+
|
28 |
+
$( document.body ).on( 'updated_checkout', function () {
|
29 |
+
wcf_cart_abandonment._getCheckoutData();
|
30 |
+
} );
|
31 |
+
|
32 |
+
$( function ( e ) {
|
33 |
+
setTimeout( function () {
|
34 |
+
wcf_cart_abandonment._getCheckoutData();
|
35 |
+
}, 800 );
|
36 |
+
} );
|
37 |
+
},
|
38 |
+
|
39 |
+
_set_cookie: function () {
|
40 |
+
var data = {
|
41 |
+
wcf_ca_skip_track_data: true,
|
42 |
+
action: 'cartflows_skip_cart_tracking_gdpr',
|
43 |
+
security: CartFlowsProCAVars._gdpr_nonce,
|
44 |
+
};
|
45 |
+
|
46 |
+
jQuery.post(
|
47 |
+
CartFlowsProCAVars.ajaxurl,
|
48 |
+
data,
|
49 |
+
function ( response ) {
|
50 |
+
if ( response.success ) {
|
51 |
+
$( '#wcf_cf_gdpr_message_block' )
|
52 |
+
.empty()
|
53 |
+
.append(
|
54 |
+
"<span style='font-size: xx-small'>" +
|
55 |
+
CartFlowsProCAVars._gdpr_after_no_thanks_msg +
|
56 |
+
'</span>'
|
57 |
+
)
|
58 |
+
.delay( 5000 )
|
59 |
+
.fadeOut();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
);
|
63 |
+
},
|
64 |
+
|
65 |
+
_validate_email: function ( value ) {
|
66 |
+
var valid = true;
|
67 |
+
if ( value.indexOf( '@' ) == -1 ) {
|
68 |
+
valid = false;
|
69 |
+
} else {
|
70 |
+
var parts = value.split( '@' );
|
71 |
+
var domain = parts[ 1 ];
|
72 |
+
if ( domain.indexOf( '.' ) == -1 ) {
|
73 |
+
valid = false;
|
74 |
+
} else {
|
75 |
+
var domainParts = domain.split( '.' );
|
76 |
+
var ext = domainParts[ 1 ];
|
77 |
+
if ( ext.length > 14 || ext.length < 2 ) {
|
78 |
+
valid = false;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
return valid;
|
83 |
+
},
|
84 |
+
|
85 |
+
_getCheckoutData: function () {
|
86 |
+
var wcf_phone = jQuery( '#billing_phone' ).val();
|
87 |
+
var wcf_email = jQuery( '#billing_email' ).val();
|
88 |
+
|
89 |
+
if ( typeof wcf_email === 'undefined' ) {
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
var atposition = wcf_email.indexOf( '@' );
|
94 |
+
var dotposition = wcf_email.lastIndexOf( '.' );
|
95 |
+
|
96 |
+
if ( typeof wcf_phone === 'undefined' || wcf_phone === null ) {
|
97 |
+
//If phone number field does not exist on the Checkout form
|
98 |
+
wcf_phone = '';
|
99 |
+
}
|
100 |
+
|
101 |
+
clearTimeout( timer );
|
102 |
+
|
103 |
+
if (
|
104 |
+
! (
|
105 |
+
atposition < 1 ||
|
106 |
+
dotposition < atposition + 2 ||
|
107 |
+
dotposition + 2 >= wcf_email.length
|
108 |
+
) ||
|
109 |
+
wcf_phone.length >= 1
|
110 |
+
) {
|
111 |
+
//Checking if the email field is valid or phone number is longer than 1 digit
|
112 |
+
//If Email or Phone valid
|
113 |
+
var wcf_name = jQuery( '#billing_first_name' ).val();
|
114 |
+
var wcf_surname = jQuery( '#billing_last_name' ).val();
|
115 |
+
var wcf_phone = jQuery( '#billing_phone' ).val();
|
116 |
+
var wcf_country = jQuery( '#billing_country' ).val();
|
117 |
+
var wcf_city = jQuery( '#billing_city' ).val();
|
118 |
+
|
119 |
+
//Other fields used for "Remember user input" function
|
120 |
+
var wcf_billing_company = jQuery( '#billing_company' ).val();
|
121 |
+
var wcf_billing_address_1 = jQuery(
|
122 |
+
'#billing_address_1'
|
123 |
+
).val();
|
124 |
+
var wcf_billing_address_2 = jQuery(
|
125 |
+
'#billing_address_2'
|
126 |
+
).val();
|
127 |
+
var wcf_billing_state = jQuery( '#billing_state' ).val();
|
128 |
+
var wcf_billing_postcode = jQuery( '#billing_postcode' ).val();
|
129 |
+
var wcf_shipping_first_name = jQuery(
|
130 |
+
'#shipping_first_name'
|
131 |
+
).val();
|
132 |
+
var wcf_shipping_last_name = jQuery(
|
133 |
+
'#shipping_last_name'
|
134 |
+
).val();
|
135 |
+
var wcf_shipping_company = jQuery( '#shipping_company' ).val();
|
136 |
+
var wcf_shipping_country = jQuery( '#shipping_country' ).val();
|
137 |
+
var wcf_shipping_address_1 = jQuery(
|
138 |
+
'#shipping_address_1'
|
139 |
+
).val();
|
140 |
+
var wcf_shipping_address_2 = jQuery(
|
141 |
+
'#shipping_address_2'
|
142 |
+
).val();
|
143 |
+
var wcf_shipping_city = jQuery( '#shipping_city' ).val();
|
144 |
+
var wcf_shipping_state = jQuery( '#shipping_state' ).val();
|
145 |
+
var wcf_shipping_postcode = jQuery(
|
146 |
+
'#shipping_postcode'
|
147 |
+
).val();
|
148 |
+
var wcf_order_comments = jQuery( '#order_comments' ).val();
|
149 |
+
|
150 |
+
var data = {
|
151 |
+
action: 'cartflows_save_cart_abandonment_data',
|
152 |
+
wcf_email: wcf_email,
|
153 |
+
wcf_name: wcf_name,
|
154 |
+
wcf_surname: wcf_surname,
|
155 |
+
wcf_phone: wcf_phone,
|
156 |
+
wcf_country: wcf_country,
|
157 |
+
wcf_city: wcf_city,
|
158 |
+
wcf_billing_company: wcf_billing_company,
|
159 |
+
wcf_billing_address_1: wcf_billing_address_1,
|
160 |
+
wcf_billing_address_2: wcf_billing_address_2,
|
161 |
+
wcf_billing_state: wcf_billing_state,
|
162 |
+
wcf_billing_postcode: wcf_billing_postcode,
|
163 |
+
wcf_shipping_first_name: wcf_shipping_first_name,
|
164 |
+
wcf_shipping_last_name: wcf_shipping_last_name,
|
165 |
+
wcf_shipping_company: wcf_shipping_company,
|
166 |
+
wcf_shipping_country: wcf_shipping_country,
|
167 |
+
wcf_shipping_address_1: wcf_shipping_address_1,
|
168 |
+
wcf_shipping_address_2: wcf_shipping_address_2,
|
169 |
+
wcf_shipping_city: wcf_shipping_city,
|
170 |
+
wcf_shipping_state: wcf_shipping_state,
|
171 |
+
wcf_shipping_postcode: wcf_shipping_postcode,
|
172 |
+
wcf_order_comments: wcf_order_comments,
|
173 |
+
security: CartFlowsProCAVars._nonce,
|
174 |
+
wcf_post_id: CartFlowsProCAVars._post_id,
|
175 |
+
};
|
176 |
+
|
177 |
+
timer = setTimeout( function () {
|
178 |
+
if (
|
179 |
+
wcf_cart_abandonment._validate_email( data.wcf_email )
|
180 |
+
) {
|
181 |
+
jQuery.post(
|
182 |
+
CartFlowsProCAVars.ajaxurl,
|
183 |
+
data, //Ajaxurl coming from localized script and contains the link to wp-admin/admin-ajax.php file that handles AJAX requests on Wordpress
|
184 |
+
function ( response ) {
|
185 |
+
// success response
|
186 |
+
}
|
187 |
+
);
|
188 |
+
}
|
189 |
+
}, 500 );
|
190 |
+
} else {
|
191 |
+
//console.log("Not a valid e-mail or phone address");
|
192 |
+
}
|
193 |
+
},
|
194 |
+
};
|
195 |
+
|
196 |
+
wcf_cart_abandonment.init();
|
197 |
+
} )( jQuery );
|
modules/cart-abandonment/class-cartflows-ca-cart-abandonment-table.php
CHANGED
@@ -180,18 +180,18 @@ class Cartflows_Ca_Cart_Abandonment_Table extends WP_List_Table {
|
|
180 |
$order = filter_input( INPUT_GET, 'order', FILTER_SANITIZE_STRING );
|
181 |
$search_term = filter_input( INPUT_GET, 'search_term', FILTER_SANITIZE_STRING );
|
182 |
|
|
|
|
|
183 |
$paged = $paged ? max( 0, $paged - 1 ) : 0;
|
184 |
$orderby = ( $orderby && in_array( $orderby, array_keys( $this->get_sortable_columns() ), true ) ) ? $orderby : 'id';
|
185 |
$order = ( $order && in_array( $order, array( 'asc', 'desc' ), true ) ) ? $order : 'desc';
|
186 |
|
187 |
$this->items = $wpdb->get_results(
|
188 |
-
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_table_name} WHERE `order_status` = %s AND DATE(`time`) >= %s AND DATE(`time`) <= %s AND `email` LIKE '%%%s%%' ORDER BY
|
189 |
$cart_type,
|
190 |
$from_date,
|
191 |
$to_date,
|
192 |
$wpdb->esc_like( $search_term ),
|
193 |
-
$orderby,
|
194 |
-
$order,
|
195 |
$per_page,
|
196 |
$paged * $per_page
|
197 |
),
|
@@ -213,13 +213,11 @@ class Cartflows_Ca_Cart_Abandonment_Table extends WP_List_Table {
|
|
213 |
if ( $export_data ) {
|
214 |
|
215 |
$this->items = $wpdb->get_results(
|
216 |
-
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_table_name} WHERE `order_status` = %s AND DATE(`time`) >= %s AND DATE(`time`) <= %s AND `email` LIKE '%%%s%%' ORDER BY
|
217 |
$cart_type,
|
218 |
$from_date,
|
219 |
$to_date,
|
220 |
-
$wpdb->esc_like( $search_term )
|
221 |
-
$orderby,
|
222 |
-
$order
|
223 |
),
|
224 |
ARRAY_A
|
225 |
);
|
180 |
$order = filter_input( INPUT_GET, 'order', FILTER_SANITIZE_STRING );
|
181 |
$search_term = filter_input( INPUT_GET, 'search_term', FILTER_SANITIZE_STRING );
|
182 |
|
183 |
+
$orderby = strtolower( str_replace( ' ', '_', $orderby ) );
|
184 |
+
|
185 |
$paged = $paged ? max( 0, $paged - 1 ) : 0;
|
186 |
$orderby = ( $orderby && in_array( $orderby, array_keys( $this->get_sortable_columns() ), true ) ) ? $orderby : 'id';
|
187 |
$order = ( $order && in_array( $order, array( 'asc', 'desc' ), true ) ) ? $order : 'desc';
|
188 |
|
189 |
$this->items = $wpdb->get_results(
|
190 |
+
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_table_name} WHERE `order_status` = %s AND DATE(`time`) >= %s AND DATE(`time`) <= %s AND `email` LIKE '%%%s%%' ORDER BY {$orderby} {$order} LIMIT %d OFFSET %d", //phpcs:ignore
|
191 |
$cart_type,
|
192 |
$from_date,
|
193 |
$to_date,
|
194 |
$wpdb->esc_like( $search_term ),
|
|
|
|
|
195 |
$per_page,
|
196 |
$paged * $per_page
|
197 |
),
|
213 |
if ( $export_data ) {
|
214 |
|
215 |
$this->items = $wpdb->get_results(
|
216 |
+
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_table_name} WHERE `order_status` = %s AND DATE(`time`) >= %s AND DATE(`time`) <= %s AND `email` LIKE '%%%s%%' ORDER BY {$orderby} {$order}", //phpcs:ignore
|
217 |
$cart_type,
|
218 |
$from_date,
|
219 |
$to_date,
|
220 |
+
$wpdb->esc_like( $search_term )
|
|
|
|
|
221 |
),
|
222 |
ARRAY_A
|
223 |
);
|
modules/cart-abandonment/class-cartflows-ca-cart-abandonment.php
CHANGED
@@ -133,11 +133,12 @@ class Cartflows_Ca_Cart_Abandonment {
|
|
133 |
wc_get_template(
|
134 |
'emails/admin-new-order.php',
|
135 |
array(
|
136 |
-
'order'
|
137 |
-
'email_heading'
|
138 |
-
'sent_to_admin'
|
139 |
-
'plain_text'
|
140 |
-
'email'
|
|
|
141 |
)
|
142 |
);
|
143 |
|
@@ -1916,9 +1917,16 @@ class Cartflows_Ca_Cart_Abandonment {
|
|
1916 |
$id = 0 !== $cart_item['variation_id'] ? $cart_item['variation_id'] : $cart_item['product_id'];
|
1917 |
$image_url = get_the_post_thumbnail_url( $id );
|
1918 |
$image_url = ! empty( $image_url ) ? $image_url : get_the_post_thumbnail_url( $cart_item['product_id'] );
|
1919 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1920 |
<td style="' . $style . '"><img class="demo_img" style="' . $product_image_style . '" src="' . esc_url( $image_url ) . '"></td>
|
1921 |
-
<td style="' . $style . '">' .
|
1922 |
<td style="' . $style . '"> ' . $cart_item['quantity'] . ' </td>
|
1923 |
<td style="' . $style . '">' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
1924 |
<td style="' . $style . '" >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
@@ -1978,9 +1986,16 @@ class Cartflows_Ca_Cart_Abandonment {
|
|
1978 |
$tax = number_format_i18n( $tax + $cart_item['line_tax'], 2 );
|
1979 |
$image_url = get_the_post_thumbnail_url( $id );
|
1980 |
$image_url = ! empty( $image_url ) ? $image_url : get_the_post_thumbnail_url( $cart_item['product_id'] );
|
1981 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1982 |
<td ><img class="demo_img" width="42" height="42" src=" ' . esc_url( $image_url ) . ' "/></td>
|
1983 |
-
<td >' .
|
1984 |
<td > ' . $cart_item['quantity'] . ' </td>
|
1985 |
<td >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
1986 |
<td >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
133 |
wc_get_template(
|
134 |
'emails/admin-new-order.php',
|
135 |
array(
|
136 |
+
'order' => $order,
|
137 |
+
'email_heading' => $email_heading,
|
138 |
+
'sent_to_admin' => false,
|
139 |
+
'plain_text' => false,
|
140 |
+
'email' => true,
|
141 |
+
'additional_content' => '',
|
142 |
)
|
143 |
);
|
144 |
|
1917 |
$id = 0 !== $cart_item['variation_id'] ? $cart_item['variation_id'] : $cart_item['product_id'];
|
1918 |
$image_url = get_the_post_thumbnail_url( $id );
|
1919 |
$image_url = ! empty( $image_url ) ? $image_url : get_the_post_thumbnail_url( $cart_item['product_id'] );
|
1920 |
+
|
1921 |
+
$product = wc_get_product( $id );
|
1922 |
+
$product_name = $product ? $product->get_formatted_name() : '';
|
1923 |
+
|
1924 |
+
if ( empty( $image_url ) ) {
|
1925 |
+
$image_url = CARTFLOWS_CA_URL . '/assets/images/image-placeholder.png';
|
1926 |
+
}
|
1927 |
+
$tr = $tr . '<tr style=' . $style . ' align="center">
|
1928 |
<td style="' . $style . '"><img class="demo_img" style="' . $product_image_style . '" src="' . esc_url( $image_url ) . '"></td>
|
1929 |
+
<td style="' . $style . '">' . $product_name . '</td>
|
1930 |
<td style="' . $style . '"> ' . $cart_item['quantity'] . ' </td>
|
1931 |
<td style="' . $style . '">' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
1932 |
<td style="' . $style . '" >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
1986 |
$tax = number_format_i18n( $tax + $cart_item['line_tax'], 2 );
|
1987 |
$image_url = get_the_post_thumbnail_url( $id );
|
1988 |
$image_url = ! empty( $image_url ) ? $image_url : get_the_post_thumbnail_url( $cart_item['product_id'] );
|
1989 |
+
|
1990 |
+
$product = wc_get_product( $id );
|
1991 |
+
$product_name = $product ? $product->get_formatted_name() : '';
|
1992 |
+
|
1993 |
+
if ( empty( $image_url ) ) {
|
1994 |
+
$image_url = CARTFLOWS_CA_URL . '/assets/images/image-placeholder.png';
|
1995 |
+
}
|
1996 |
+
$tr = $tr . '<tr align="center">
|
1997 |
<td ><img class="demo_img" width="42" height="42" src=" ' . esc_url( $image_url ) . ' "/></td>
|
1998 |
+
<td >' . $product_name . '</td>
|
1999 |
<td > ' . $cart_item['quantity'] . ' </td>
|
2000 |
<td >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
2001 |
<td >' . $currency_symbol . number_format_i18n( $cart_item['line_total'], 2 ) . '</td>
|
modules/cart-abandonment/class-cartflows-ca-email-templates-table.php
CHANGED
@@ -158,6 +158,8 @@ class Cartflows_Ca_Email_Templates_Table extends WP_List_Table {
|
|
158 |
$orderby = filter_input( INPUT_GET, 'orderby', FILTER_SANITIZE_STRING );
|
159 |
$order = filter_input( INPUT_GET, 'order', FILTER_SANITIZE_STRING );
|
160 |
|
|
|
|
|
161 |
$paged = $paged ? max( 0, $paged - 1 ) : 0;
|
162 |
$orderby = ( $orderby && in_array( $orderby, array_keys( $this->get_sortable_columns() ), true ) ) ? $orderby : 'id';
|
163 |
$order = ( $order && in_array( $order, array( 'asc', 'desc' ), true ) ) ? $order : 'desc';
|
@@ -171,7 +173,7 @@ class Cartflows_Ca_Email_Templates_Table extends WP_List_Table {
|
|
171 |
)
|
172 |
);
|
173 |
$this->items = $wpdb->get_results(
|
174 |
-
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_template_table_name} ORDER BY $orderby $order LIMIT %d OFFSET %d", $per_page, $paged * $per_page ), // phpcs:ignore
|
175 |
ARRAY_A
|
176 |
);
|
177 |
}
|
158 |
$orderby = filter_input( INPUT_GET, 'orderby', FILTER_SANITIZE_STRING );
|
159 |
$order = filter_input( INPUT_GET, 'order', FILTER_SANITIZE_STRING );
|
160 |
|
161 |
+
$orderby = strtolower( str_replace( ' ', '_', $orderby ) );
|
162 |
+
|
163 |
$paged = $paged ? max( 0, $paged - 1 ) : 0;
|
164 |
$orderby = ( $orderby && in_array( $orderby, array_keys( $this->get_sortable_columns() ), true ) ) ? $orderby : 'id';
|
165 |
$order = ( $order && in_array( $order, array( 'asc', 'desc' ), true ) ) ? $order : 'desc';
|
173 |
)
|
174 |
);
|
175 |
$this->items = $wpdb->get_results(
|
176 |
+
$wpdb->prepare( "SELECT * FROM {$cart_abandonment_template_table_name} ORDER BY {$orderby} {$order} LIMIT %d OFFSET %d", $per_page, $paged * $per_page ), // phpcs:ignore
|
177 |
ARRAY_A
|
178 |
);
|
179 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: sujaypawar, wpcrafter
|
3 |
Tags: woocommerce, cart abandonment, cart recovery
|
4 |
Requires at least: 5.4
|
5 |
-
Tested up to: 5.7
|
6 |
-
Stable tag: 1.2.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -128,6 +128,12 @@ Here are few thoughts behind making it available for free:
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
= Version 1.2.11 - Monday, 08th March 2021 =
|
132 |
* Improvement: WordPress 5.7 compatibility.
|
133 |
* Improvement: Removed jQuery3 deprecated function notices.
|
2 |
Contributors: sujaypawar, wpcrafter
|
3 |
Tags: woocommerce, cart abandonment, cart recovery
|
4 |
Requires at least: 5.4
|
5 |
+
Tested up to: 5.7.1
|
6 |
+
Stable tag: 1.2.12
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= Version 1.2.12 - Thursday, 29th April 2021 =
|
132 |
+
* Improvement: Added the placeholder image for the product image.
|
133 |
+
* Fix: PHP error while notifying recovery to admin.
|
134 |
+
* Fix: Products Custom attributes not showing in product column.
|
135 |
+
* Fix: Orders list was not sorting.
|
136 |
+
|
137 |
= Version 1.2.11 - Monday, 08th March 2021 =
|
138 |
* Improvement: WordPress 5.7 compatibility.
|
139 |
* Improvement: Removed jQuery3 deprecated function notices.
|
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.
|
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: 5.
|
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.12
|
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: 5.2.2
|
12 |
*
|
13 |
* @package Woocommerce-Cart-Abandonment-Recovery
|
14 |
*/
|