Version Description
(26.08.2020) = * Fix - When the plugin contained thousands of records, the Abandoned Orders page failed to load. * Fix - The send email action schedule raised some warnings. * Fix - Error displayed in Settings->Facebook Messenger.
Download this release
Release Info
Developer | Dhruvin |
Plugin | Abandoned Cart Lite for WooCommerce |
Version | 5.8.1 |
Comparing to | |
See all releases |
Code changes from version 5.7.2 to 5.8.1
- assets/css/view.abandoned.orders.style.css +68 -68
- assets/images/Thumbs.db +0 -0
- assets/js/abandoncart_plugin_button.js +75 -75
- assets/js/jquery.tipTip.minified.js +20 -20
- class-wcal-update.php +0 -62
- cron/wcal_send_email.php +723 -705
- i18n/languages/woocommerce-abandoned-cart.pot +762 -541
- includes/admin/class-wcal-abandoned-cart-details.php +22 -14
- includes/admin/wcap_add_cart_popup_modal.php +772 -772
- includes/admin/wcap_pro_settings_callbacks.php +5 -5
- includes/class-wcal-delete-handler.php +100 -26
- includes/classes/class-wcal-abandoned-orders-table.php +654 -429
- includes/component/deactivate-survey-popup/class-ts-deactivation.php +230 -230
- includes/component/deactivate-survey-popup/template/ts-deactivate-modal.php +387 -387
- includes/wcal_all_component.php +4 -4
- readme.txt +1088 -1068
- woocommerce-ac.php +159 -24
assets/css/view.abandoned.orders.style.css
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
/**
|
2 |
-
* Decrease the width of the Id column.
|
3 |
-
*
|
4 |
-
*/
|
5 |
-
table.wp-list-table .column-id {
|
6 |
-
width:5%;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Decrease the width of the email column.
|
11 |
-
*/
|
12 |
-
table.wp-list-table .column-email {
|
13 |
-
width:15%;
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Decrease the width of the abandoned order date column.
|
18 |
-
*/
|
19 |
-
table.wp-list-table .column-date {
|
20 |
-
width:20%;
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Decrease the width of the abandoned order total column.
|
25 |
-
*/
|
26 |
-
table.wp-list-table .column-order_total {
|
27 |
-
width:20%;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* This is for the new cart and checkout button in tinymce.
|
32 |
-
*/
|
33 |
-
#woocommerce_ac_email_body_abandoncart_email_variables_css{
|
34 |
-
|
35 |
-
width : 60px !important;
|
36 |
-
}
|
37 |
-
span.mce_abandoncart_email_variables_css {
|
38 |
-
width : 60px !important;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Decrease the width of the sr column in templates tab.
|
43 |
-
*/
|
44 |
-
table.wp-list-table .column-sr {
|
45 |
-
width:4% !important;
|
46 |
-
}
|
47 |
-
|
48 |
-
i.mce-i-abandoncart_email_variables {
|
49 |
-
background-image: url(../images/ac_editor_icon.png) ;
|
50 |
-
width: 30px;
|
51 |
-
height: 30px;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Resize product image to fit within td.
|
56 |
-
*/
|
57 |
-
table.wp-list-table td img {
|
58 |
-
max-width: 100%;
|
59 |
-
height: auto;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Add left/right margin to h3 titles.
|
64 |
-
*/
|
65 |
-
h3.details-title {
|
66 |
-
margin-left: 12px;
|
67 |
-
margin-right: 12px;
|
68 |
-
}
|
1 |
+
/**
|
2 |
+
* Decrease the width of the Id column.
|
3 |
+
*
|
4 |
+
*/
|
5 |
+
table.wp-list-table .column-id {
|
6 |
+
width:5%;
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Decrease the width of the email column.
|
11 |
+
*/
|
12 |
+
table.wp-list-table .column-email {
|
13 |
+
width:15%;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Decrease the width of the abandoned order date column.
|
18 |
+
*/
|
19 |
+
table.wp-list-table .column-date {
|
20 |
+
width:20%;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Decrease the width of the abandoned order total column.
|
25 |
+
*/
|
26 |
+
table.wp-list-table .column-order_total {
|
27 |
+
width:20%;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* This is for the new cart and checkout button in tinymce.
|
32 |
+
*/
|
33 |
+
#woocommerce_ac_email_body_abandoncart_email_variables_css{
|
34 |
+
|
35 |
+
width : 60px !important;
|
36 |
+
}
|
37 |
+
span.mce_abandoncart_email_variables_css {
|
38 |
+
width : 60px !important;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Decrease the width of the sr column in templates tab.
|
43 |
+
*/
|
44 |
+
table.wp-list-table .column-sr {
|
45 |
+
width:4% !important;
|
46 |
+
}
|
47 |
+
|
48 |
+
i.mce-i-abandoncart_email_variables {
|
49 |
+
background-image: url(../images/ac_editor_icon.png) ;
|
50 |
+
width: 30px;
|
51 |
+
height: 30px;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Resize product image to fit within td.
|
56 |
+
*/
|
57 |
+
table.wp-list-table td img {
|
58 |
+
max-width: 100%;
|
59 |
+
height: auto;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Add left/right margin to h3 titles.
|
64 |
+
*/
|
65 |
+
h3.details-title {
|
66 |
+
margin-left: 12px;
|
67 |
+
margin-right: 12px;
|
68 |
+
}
|
assets/images/Thumbs.db
ADDED
Binary file
|
assets/js/abandoncart_plugin_button.js
CHANGED
@@ -1,76 +1,76 @@
|
|
1 |
-
/**
|
2 |
-
* This function will add the new button in the tinymce editor.
|
3 |
-
* It will add all the mergecode of the plugin.
|
4 |
-
* @function wcal_filter_mce_plugin
|
5 |
-
*/
|
6 |
-
(function() {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* This function will add the new button in the tinymce editor.
|
10 |
-
* It will add all the mergecode of the plugin.
|
11 |
-
* @return array buttons
|
12 |
-
* @since: 2.6
|
13 |
-
*/
|
14 |
-
tinymce.PluginManager.add('abandoncart', function(editor, url) {
|
15 |
-
|
16 |
-
editor.addButton('abandoncart', {
|
17 |
-
type: 'menubutton',
|
18 |
-
text: false,
|
19 |
-
icon: "abandoncart_email_variables",
|
20 |
-
menu: [
|
21 |
-
{
|
22 |
-
text: 'Customer First Name',
|
23 |
-
value: '{{customer.firstname}}',
|
24 |
-
onclick: function() {
|
25 |
-
editor.insertContent(this.value());
|
26 |
-
}
|
27 |
-
},
|
28 |
-
{
|
29 |
-
text: 'Customer Last Name',
|
30 |
-
value: '{{customer.lastname}}',
|
31 |
-
onclick: function() {
|
32 |
-
editor.insertContent(this.value());
|
33 |
-
}
|
34 |
-
},
|
35 |
-
{
|
36 |
-
text: 'Customer Full Name',
|
37 |
-
value: '{{customer.fullname}}',
|
38 |
-
onclick: function() {
|
39 |
-
editor.insertContent(this.value());
|
40 |
-
}
|
41 |
-
},
|
42 |
-
{
|
43 |
-
text: 'Product Information/Cart Content',
|
44 |
-
value: '{{products.cart}}',
|
45 |
-
onclick: function() {
|
46 |
-
editor.insertContent(this.value());
|
47 |
-
}
|
48 |
-
},
|
49 |
-
{
|
50 |
-
text: 'Cart Link',
|
51 |
-
value: '{{cart.link}}',
|
52 |
-
onclick: function() {
|
53 |
-
editor.insertContent(this.value());
|
54 |
-
}
|
55 |
-
},
|
56 |
-
{
|
57 |
-
text: 'Date when Cart was abandoned',
|
58 |
-
value: '{{cart.abandoned_date}}',
|
59 |
-
onclick: function() {
|
60 |
-
editor.insertContent(this.value());
|
61 |
-
}
|
62 |
-
},
|
63 |
-
{
|
64 |
-
text: 'Unsubscribe Link',
|
65 |
-
value: '{{cart.unsubscribe}}',
|
66 |
-
onclick: function() {
|
67 |
-
editor.insertContent(this.value());
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
]
|
72 |
-
});
|
73 |
-
|
74 |
-
});
|
75 |
-
|
76 |
})();
|
1 |
+
/**
|
2 |
+
* This function will add the new button in the tinymce editor.
|
3 |
+
* It will add all the mergecode of the plugin.
|
4 |
+
* @function wcal_filter_mce_plugin
|
5 |
+
*/
|
6 |
+
(function() {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* This function will add the new button in the tinymce editor.
|
10 |
+
* It will add all the mergecode of the plugin.
|
11 |
+
* @return array buttons
|
12 |
+
* @since: 2.6
|
13 |
+
*/
|
14 |
+
tinymce.PluginManager.add('abandoncart', function(editor, url) {
|
15 |
+
|
16 |
+
editor.addButton('abandoncart', {
|
17 |
+
type: 'menubutton',
|
18 |
+
text: false,
|
19 |
+
icon: "abandoncart_email_variables",
|
20 |
+
menu: [
|
21 |
+
{
|
22 |
+
text: 'Customer First Name',
|
23 |
+
value: '{{customer.firstname}}',
|
24 |
+
onclick: function() {
|
25 |
+
editor.insertContent(this.value());
|
26 |
+
}
|
27 |
+
},
|
28 |
+
{
|
29 |
+
text: 'Customer Last Name',
|
30 |
+
value: '{{customer.lastname}}',
|
31 |
+
onclick: function() {
|
32 |
+
editor.insertContent(this.value());
|
33 |
+
}
|
34 |
+
},
|
35 |
+
{
|
36 |
+
text: 'Customer Full Name',
|
37 |
+
value: '{{customer.fullname}}',
|
38 |
+
onclick: function() {
|
39 |
+
editor.insertContent(this.value());
|
40 |
+
}
|
41 |
+
},
|
42 |
+
{
|
43 |
+
text: 'Product Information/Cart Content',
|
44 |
+
value: '{{products.cart}}',
|
45 |
+
onclick: function() {
|
46 |
+
editor.insertContent(this.value());
|
47 |
+
}
|
48 |
+
},
|
49 |
+
{
|
50 |
+
text: 'Cart Link',
|
51 |
+
value: '{{cart.link}}',
|
52 |
+
onclick: function() {
|
53 |
+
editor.insertContent(this.value());
|
54 |
+
}
|
55 |
+
},
|
56 |
+
{
|
57 |
+
text: 'Date when Cart was abandoned',
|
58 |
+
value: '{{cart.abandoned_date}}',
|
59 |
+
onclick: function() {
|
60 |
+
editor.insertContent(this.value());
|
61 |
+
}
|
62 |
+
},
|
63 |
+
{
|
64 |
+
text: 'Unsubscribe Link',
|
65 |
+
value: '{{cart.unsubscribe}}',
|
66 |
+
onclick: function() {
|
67 |
+
editor.insertContent(this.value());
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
]
|
72 |
+
});
|
73 |
+
|
74 |
+
});
|
75 |
+
|
76 |
})();
|
assets/js/jquery.tipTip.minified.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
/*
|
2 |
-
* TipTip
|
3 |
-
* Copyright 2010 Drew Wilson
|
4 |
-
* www.drewwilson.com
|
5 |
-
* code.drewwilson.com/entry/tiptip-jquery-plugin
|
6 |
-
*
|
7 |
-
* Version 1.3 - Updated: Mar. 23, 2010
|
8 |
-
*
|
9 |
-
* This Plug-In will create a custom tooltip to replace the default
|
10 |
-
* browser tooltip. It is extremely lightweight and very smart in
|
11 |
-
* that it detects the edges of the browser window and will make sure
|
12 |
-
* the tooltip stays within the current window size. As a result the
|
13 |
-
* tooltip will adjust itself to be displayed above, below, to the left
|
14 |
-
* or to the right depending on what is necessary to stay within the
|
15 |
-
* browser window. It is completely customizable as well via CSS.
|
16 |
-
*
|
17 |
-
* This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
|
18 |
-
* http://www.opensource.org/licenses/mit-license.php
|
19 |
-
* http://www.gnu.org/licenses/gpl.html
|
20 |
-
*/
|
21 |
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
|
1 |
+
/*
|
2 |
+
* TipTip
|
3 |
+
* Copyright 2010 Drew Wilson
|
4 |
+
* www.drewwilson.com
|
5 |
+
* code.drewwilson.com/entry/tiptip-jquery-plugin
|
6 |
+
*
|
7 |
+
* Version 1.3 - Updated: Mar. 23, 2010
|
8 |
+
*
|
9 |
+
* This Plug-In will create a custom tooltip to replace the default
|
10 |
+
* browser tooltip. It is extremely lightweight and very smart in
|
11 |
+
* that it detects the edges of the browser window and will make sure
|
12 |
+
* the tooltip stays within the current window size. As a result the
|
13 |
+
* tooltip will adjust itself to be displayed above, below, to the left
|
14 |
+
* or to the right depending on what is necessary to stay within the
|
15 |
+
* browser window. It is completely customizable as well via CSS.
|
16 |
+
*
|
17 |
+
* This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
|
18 |
+
* http://www.opensource.org/licenses/mit-license.php
|
19 |
+
* http://www.gnu.org/licenses/gpl.html
|
20 |
+
*/
|
21 |
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
|
class-wcal-update.php
CHANGED
@@ -117,27 +117,6 @@ if ( ! class_exists( 'Wcal_Update' ) ) {
|
|
117 |
self::wcal_individual_settings( $blog_id );
|
118 |
self::wcal_cleanup( $db_prefix, $blog_id );
|
119 |
|
120 |
-
if ( 0 === $blog_id ) {
|
121 |
-
|
122 |
-
if ( 'yes' !== get_option( 'ac_lite_remove_abandoned_data' ) ) {
|
123 |
-
$wpdb->query( 'DELETE FROM `' . $db_prefix . 'ac_abandoned_cart_history_lite` WHERE abandoned_cart_time > 1555372800' ); //phpcs:ignore
|
124 |
-
update_option( 'ac_lite_remove_abandoned_data', 'yes' );
|
125 |
-
}
|
126 |
-
|
127 |
-
if ( ! get_option( 'wcal_enable_cart_emails' ) ) {
|
128 |
-
add_option( 'wcal_enable_cart_emails', 'on' );
|
129 |
-
}
|
130 |
-
} else {
|
131 |
-
if ( 'yes' !== get_blog_option( $blog_id, 'ac_lite_remove_abandoned_data' ) ) {
|
132 |
-
$wpdb->query( 'DELETE FROM `' . $db_prefix . 'ac_abandoned_cart_history_lite` WHERE abandoned_cart_time > 1555372800' ); //phpcs:ignore
|
133 |
-
update_blog_option( $blog_id, 'ac_lite_remove_abandoned_data', 'yes' );
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( ! get_blog_option( $blog_id, 'wcal_enable_cart_emails' ) ) {
|
137 |
-
add_blog_option( $blog_id, 'wcal_enable_cart_emails', 'on' );
|
138 |
-
}
|
139 |
-
}
|
140 |
-
|
141 |
}
|
142 |
|
143 |
/**
|
@@ -317,54 +296,13 @@ if ( ! class_exists( 'Wcal_Update' ) ) {
|
|
317 |
$wpdb->delete( $db_prefix . 'ac_abandoned_cart_history_lite', array( 'abandoned_cart_info' => '{"cart":[]}' ) ); //phpcs:ignore
|
318 |
update_option( 'ac_lite_delete_redundant_queries', 'yes' );
|
319 |
}
|
320 |
-
|
321 |
-
$ac_lite_cleanup = get_option( 'ac_lite_user_cleanup' );
|
322 |
} else {
|
323 |
|
324 |
if ( 'yes' !== get_blog_option( $blog_id, 'ac_lite_delete_redundant_queries', '' ) ) {
|
325 |
$wpdb->delete( $db_prefix . 'ac_abandoned_cart_history_lite', array( 'abandoned_cart_info' => '{"cart":[]}' ) ); //phpcs:ignore
|
326 |
update_blog_option( $blog_id, 'ac_lite_delete_redundant_queries', 'yes' );
|
327 |
}
|
328 |
-
$ac_lite_cleanup = get_blog_option( $blog_id, 'ac_lite_user_cleanup' );
|
329 |
-
}
|
330 |
-
|
331 |
-
if ( 'yes' !== $ac_lite_cleanup ) {
|
332 |
-
$wpdb->query(
|
333 |
-
"UPDATE `" . $db_prefix . "ac_guest_abandoned_cart_history_lite` SET
|
334 |
-
billing_first_name = IF (billing_first_name LIKE '%<%', '', billing_first_name),
|
335 |
-
billing_last_name = IF (billing_last_name LIKE '%<%', '', billing_last_name),
|
336 |
-
billing_company_name = IF (billing_company_name LIKE '%<%', '', billing_company_name),
|
337 |
-
billing_address_1 = IF (billing_address_1 LIKE '%<%', '', billing_address_1),
|
338 |
-
billing_address_2 = IF (billing_address_2 LIKE '%<%', '', billing_address_2),
|
339 |
-
billing_city = IF (billing_city LIKE '%<%', '', billing_city),
|
340 |
-
billing_county = IF (billing_county LIKE '%<%', '', billing_county),
|
341 |
-
billing_zipcode = IF (billing_zipcode LIKE '%<%', '', billing_zipcode),
|
342 |
-
email_id = IF (email_id LIKE '%<%', '', email_id),
|
343 |
-
phone = IF (phone LIKE '%<%', '', phone),
|
344 |
-
ship_to_billing = IF (ship_to_billing LIKE '%<%', '', ship_to_billing),
|
345 |
-
order_notes = IF (order_notes LIKE '%<%', '', order_notes),
|
346 |
-
shipping_first_name = IF (shipping_first_name LIKE '%<%', '', shipping_first_name),
|
347 |
-
shipping_last_name = IF (shipping_last_name LIKE '%<%', '', shipping_last_name),
|
348 |
-
shipping_company_name = IF (shipping_company_name LIKE '%<%', '', shipping_company_name),
|
349 |
-
shipping_address_1 = IF (shipping_address_1 LIKE '%<%', '', shipping_address_1),
|
350 |
-
shipping_address_2 = IF (shipping_address_2 LIKE '%<%', '', shipping_address_2),
|
351 |
-
shipping_city = IF (shipping_city LIKE '%<%', '', shipping_city),
|
352 |
-
shipping_county = IF (shipping_county LIKE '%<%', '', shipping_county)"
|
353 |
-
);
|
354 |
-
|
355 |
-
$email = 'woouser401a@mailinator.com';
|
356 |
-
$exists = email_exists( $email );
|
357 |
-
if ( $exists ) {
|
358 |
-
wp_delete_user( esc_html( $exists ) );
|
359 |
-
}
|
360 |
-
|
361 |
-
if ( 0 === $blog_id ) {
|
362 |
-
update_option( 'ac_lite_user_cleanup', 'yes' );
|
363 |
-
} else {
|
364 |
-
update_blog_option( $blog_id, 'ac_lite_user_cleanup', 'yes' );
|
365 |
-
}
|
366 |
}
|
367 |
-
|
368 |
}
|
369 |
}
|
370 |
}
|
117 |
self::wcal_individual_settings( $blog_id );
|
118 |
self::wcal_cleanup( $db_prefix, $blog_id );
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
|
122 |
/**
|
296 |
$wpdb->delete( $db_prefix . 'ac_abandoned_cart_history_lite', array( 'abandoned_cart_info' => '{"cart":[]}' ) ); //phpcs:ignore
|
297 |
update_option( 'ac_lite_delete_redundant_queries', 'yes' );
|
298 |
}
|
|
|
|
|
299 |
} else {
|
300 |
|
301 |
if ( 'yes' !== get_blog_option( $blog_id, 'ac_lite_delete_redundant_queries', '' ) ) {
|
302 |
$wpdb->delete( $db_prefix . 'ac_abandoned_cart_history_lite', array( 'abandoned_cart_info' => '{"cart":[]}' ) ); //phpcs:ignore
|
303 |
update_blog_option( $blog_id, 'ac_lite_delete_redundant_queries', 'yes' );
|
304 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
|
|
306 |
}
|
307 |
}
|
308 |
}
|
cron/wcal_send_email.php
CHANGED
@@ -9,749 +9,767 @@
|
|
9 |
|
10 |
static $wp_load; // Since this will be called twice, hold onto it.
|
11 |
if ( ! isset( $wp_load ) ) {
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
}
|
29 |
-
$wcal_root = dirname( dirname(__FILE__) ); // go two level up for directory from this file.
|
30 |
require_once $wp_load;
|
31 |
-
require_once $wcal_root.'/includes/classes/class-wcal-aes.php';
|
32 |
-
require_once $wcal_root.'/includes/classes/class-wcal-aes-counter.php';
|
33 |
-
|
34 |
-
|
35 |
-
if ( !class_exists( 'woocommerce_abandon_cart_cron' ) ) {
|
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 |
WHERE wpet.is_active = '1' ORDER BY `day_or_hour` DESC, `frequency` ASC ";
|
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 |
-
WHERE id = %d
|
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 |
-
LEFT JOIN `
|
157 |
ON wpm.post_id = wpost.ID
|
158 |
WHERE wpm.meta_key = 'wcal_recover_order_placed' AND
|
159 |
wpm.meta_value = %s AND wpm.post_id = wpost.ID AND
|
160 |
wpost.post_type = 'shop_order'
|
161 |
ORDER BY wpm.post_id DESC LIMIT 1";
|
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 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
$query_id = "SELECT * FROM `".$wpdb->prefix."ac_sent_history_lite`
|
243 |
WHERE template_id = %s AND abandoned_order_id = %s
|
244 |
ORDER BY id DESC
|
245 |
-
LIMIT 1
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
|
|
|
|
|
|
|
|
280 |
<tr>
|
281 |
-
<th>'.__(
|
282 |
-
<th>'.__(
|
283 |
-
<th>'.
|
284 |
-
<th>'.
|
285 |
-
<th>'.
|
286 |
</tr>';
|
287 |
-
|
288 |
-
|
289 |
-
<
|
290 |
<tr>
|
291 |
-
<th>'.__(
|
292 |
-
<th>'.__(
|
293 |
-
<th>'.
|
294 |
-
<th>'.
|
295 |
-
<th>'.
|
296 |
</tr>';
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
<td> '
|
366 |
-
<td> '
|
|
|
|
|
|
|
367 |
</tr>';
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
|
|
|
|
382 |
<td> </td>
|
383 |
<td> </td>
|
384 |
<td> </td>
|
385 |
-
<td>'.
|
386 |
-
<td> '
|
387 |
</tr>';
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
|
|
|
|
494 |
WHERE cart_ignored = %s AND unsubscribe_link = %s AND abandoned_cart_time < $cart_time
|
495 |
$wcal_add_template_condition
|
496 |
ORDER BY `id` ASC ";
|
497 |
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
|
|
|
|
546 |
WHERE wpm.meta_key = '_billing_email' AND wpm.meta_value = %s AND wpm.post_id = wpost.ID AND wpost.post_type = 'shop_order' Order BY wpm.post_id DESC LIMIT 1";
|
547 |
|
548 |
-
|
549 |
|
550 |
-
|
551 |
-
|
552 |
|
553 |
-
|
554 |
-
|
555 |
|
556 |
-
|
557 |
-
|
558 |
|
559 |
-
|
560 |
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
|
567 |
-
|
568 |
|
569 |
-
|
570 |
-
|
571 |
|
572 |
-
|
573 |
|
574 |
-
|
575 |
|
576 |
-
|
577 |
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
|
|
|
|
|
|
|
|
|
|
743 |
WHERE template_id = %s AND wpcs.abandoned_order_id = %d ORDER BY 'id' DESC LIMIT 1 ";
|
744 |
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
}
|
756 |
$woocommerce_abandon_cart_cron = new woocommerce_abandon_cart_cron();
|
757 |
-
|
9 |
|
10 |
static $wp_load; // Since this will be called twice, hold onto it.
|
11 |
if ( ! isset( $wp_load ) ) {
|
12 |
+
$wp_load = false;
|
13 |
+
$dir = __FILE__;
|
14 |
+
while ( '/' != ( $dir = dirname( $dir ) ) ) {
|
15 |
+
/**
|
16 |
+
* Comment this "If" condition for generating the developer documentations.
|
17 |
+
*/
|
18 |
+
if ( file_exists( $wp_load = "{$dir}/wp-load.php" ) ) {
|
19 |
+
break;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
/*
|
23 |
+
* In case wp-content folder is seperated from WP core folders (like Bedrock setup from Roots.io) the above while loop will not find wp-load correctly, so we must use ABSPATH
|
24 |
+
*/
|
25 |
+
if ( ! file_exists( $wp_load ) ) {
|
26 |
+
$wp_load = trailingslashit( ABSPATH ) . 'wp-load.php';
|
27 |
+
}
|
28 |
}
|
29 |
+
$wcal_root = dirname( dirname( __FILE__ ) ); // go two level up for directory from this file.
|
30 |
require_once $wp_load;
|
31 |
+
require_once $wcal_root . '/includes/classes/class-wcal-aes.php';
|
32 |
+
require_once $wcal_root . '/includes/classes/class-wcal-aes-counter.php';
|
33 |
+
|
34 |
+
|
35 |
+
if ( ! class_exists( 'woocommerce_abandon_cart_cron' ) ) {
|
36 |
+
|
37 |
+
/**
|
38 |
+
* It will send the automatic reminder emails to the customers
|
39 |
+
*
|
40 |
+
* @since 1.3
|
41 |
+
*/
|
42 |
+
class woocommerce_abandon_cart_cron {
|
43 |
+
|
44 |
+
/**
|
45 |
+
* It will send the reminder emails to the cutomers.
|
46 |
+
* It will also replace the merge code to its original data.
|
47 |
+
* it will also check if guest id is valid, and check if the order is placed before sending the reminder email.
|
48 |
+
*
|
49 |
+
* @globals mixed $wpdb
|
50 |
+
* @globals mixed $woocommerce
|
51 |
+
* @since 1.3
|
52 |
+
*/
|
53 |
+
function wcal_send_email_notification() {
|
54 |
+
global $wpdb, $woocommerce;
|
55 |
+
|
56 |
+
if ( 'on' == get_option( 'wcal_enable_cart_emails' ) ) {
|
57 |
+
// Grab the cart abandoned cut-off time from database.
|
58 |
+
$cart_settings = get_option( 'ac_lite_cart_abandoned_time' );
|
59 |
+
|
60 |
+
if ( $cart_settings == '' ) {
|
61 |
+
$cart_settings = 10;
|
62 |
+
}
|
63 |
+
|
64 |
+
$cart_abandon_cut_off_time = $cart_settings * 60;
|
65 |
+
// Fetch all active templates present in the system
|
66 |
+
$query = 'SELECT wpet . * FROM `' . $wpdb->prefix . "ac_email_templates_lite` AS wpet
|
67 |
WHERE wpet.is_active = '1' ORDER BY `day_or_hour` DESC, `frequency` ASC ";
|
68 |
+
$results = $wpdb->get_results( $query );
|
69 |
+
$hour_seconds = 3600; // 60 * 60
|
70 |
+
$day_seconds = 86400; // 24 * 60 * 60
|
71 |
+
foreach ( $results as $key => $value ) {
|
72 |
+
if ( $value->day_or_hour == 'Days' ) {
|
73 |
+
$time_to_send_template_after = intval( $value->frequency ) * $day_seconds;
|
74 |
+
} elseif ( $value->day_or_hour == 'Hours' ) {
|
75 |
+
$time_to_send_template_after = intval( $value->frequency ) * $hour_seconds;
|
76 |
+
}
|
77 |
+
|
78 |
+
$carts = $this->wcal_get_carts( $time_to_send_template_after, $cart_abandon_cut_off_time, $value->id );
|
79 |
+
$email_frequency = $value->frequency;
|
80 |
+
$email_body_template = $value->body;
|
81 |
+
$template_email_subject = stripslashes( $value->subject );
|
82 |
+
$template_email_subject = convert_smilies( $template_email_subject );
|
83 |
+
$wcal_from_name = get_option( 'wcal_from_name' );
|
84 |
+
$wcal_from_email = get_option( 'wcal_from_email' );
|
85 |
+
$wcal_reply_email = get_option( 'wcal_reply_email' );
|
86 |
+
if ( class_exists( 'WP_Better_Emails' ) ) {
|
87 |
+
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
88 |
+
$headers .= 'Content-Type: text/plain' . "\r\n";
|
89 |
+
$headers .= 'Reply-To: ' . $wcal_reply_email . ' ' . "\r\n";
|
90 |
+
} else {
|
91 |
+
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
92 |
+
$headers .= 'Content-Type: text/html' . "\r\n";
|
93 |
+
$headers .= 'Reply-To: ' . $wcal_reply_email . ' ' . "\r\n";
|
94 |
+
}
|
95 |
+
$template_id = $value->id;
|
96 |
+
$is_wc_template = $value->is_wc_template;
|
97 |
+
$wc_template_header_text = $value->wc_email_header != '' ? $value->wc_email_header : __( 'Abandoned cart reminder', 'woocommerce-abandoned-cart' );
|
98 |
+
$wc_template_header = stripslashes( $wc_template_header_text );
|
99 |
+
if ( '' != $email_body_template ) {
|
100 |
+
foreach ( $carts as $key => $value ) {
|
101 |
+
|
102 |
+
$wcal_is_guest_id_correct = $this->wcal_get_is_guest_valid( $value->user_id, $value->user_type );
|
103 |
+
if ( true === $wcal_is_guest_id_correct ) {
|
104 |
+
|
105 |
+
if ( $value->user_type == 'GUEST' && $value->user_id != '0' ) {
|
106 |
+
$value->user_login = '';
|
107 |
+
$query_guest = 'SELECT billing_first_name, billing_last_name, email_id FROM `' . $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite`
|
108 |
+
WHERE id = %d';
|
109 |
+
$results_guest = $wpdb->get_results( $wpdb->prepare( $query_guest, $value->user_id ) );
|
110 |
+
if ( count( $results_guest ) > 0 && isset( $results_guest[0]->email_id ) && '' !== $results_guest[0]->email_id ) {
|
111 |
+
$value->user_email = $results_guest[0]->email_id;
|
112 |
+
} else {
|
113 |
+
continue;
|
114 |
+
}
|
115 |
+
} else {
|
116 |
+
if ( isset( $value->user_id ) ) {
|
117 |
+
$user_id = $value->user_id;
|
118 |
+
}
|
119 |
+
$key = 'billing_email';
|
120 |
+
$single = true;
|
121 |
+
$user_biiling_email = get_user_meta( $user_id, $key, $single );
|
122 |
+
if ( isset( $user_biiling_email ) && $user_biiling_email != '' ) {
|
123 |
+
$value->user_email = $user_biiling_email;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
if ( isset( $value->abandoned_cart_info ) ) {
|
127 |
+
$cart_info_db_field = json_decode( $value->abandoned_cart_info );
|
128 |
+
}
|
129 |
+
$cart = new stdClass();
|
130 |
+
if ( ! empty( $cart_info_db_field->cart ) ) {
|
131 |
+
$cart = $cart_info_db_field->cart;
|
132 |
+
}
|
133 |
+
if ( count( get_object_vars( $cart ) ) > 0 && isset( $value->user_id ) && '0' != $value->user_id && isset( $value->id ) ) {
|
134 |
+
$cart_update_time = $value->abandoned_cart_time;
|
135 |
+
$new_user = $this->wcal_check_sent_history( $value->user_id, $cart_update_time, $template_id, $value->id );
|
136 |
+
if ( $new_user == true ) {
|
137 |
+
|
138 |
+
/**
|
139 |
+
* When there are 3 templates and for cart id 1 all template time has been reached. BUt all templates
|
140 |
+
* are deactivated.
|
141 |
+
* If we activate all 3 template then at a 1 time all 3 email templates send to the users.
|
142 |
+
* So below function check that after first email is sent time and then from that time it will send the
|
143 |
+
* 2nd template time. ( It will not consider the cart abadoned time in this case. )
|
144 |
+
*/
|
145 |
+
|
146 |
+
$wcal_check_cart_needed_for_multiple_template = $this->wcal_remove_cart_for_mutiple_templates( $value->id, $time_to_send_template_after, $template_id );
|
147 |
+
|
148 |
+
/**
|
149 |
+
* When we click on the place order button, we check if the order is placed after the
|
150 |
+
* cut off time. And if yes then if the status of the order is pending or falied then
|
151 |
+
* we keep it as the abandonoed and we need to send reminder emails. So in below function
|
152 |
+
* we first check if any order is placed with todays date then we do not send the
|
153 |
+
* reminder email. But what if placed order status is pending or falied? So this
|
154 |
+
* condition will not call that function andthe reminder email will be sent.
|
155 |
+
*/
|
156 |
+
|
157 |
+
$wcal_check_if_cart_is_present_in_post_meta = 'SELECT wpm.post_id, wpost.post_date, wpost.post_status FROM `' . $wpdb->prefix . 'postmeta` AS wpm
|
158 |
+
LEFT JOIN `' . $wpdb->prefix . "posts` AS wpost
|
159 |
ON wpm.post_id = wpost.ID
|
160 |
WHERE wpm.meta_key = 'wcal_recover_order_placed' AND
|
161 |
wpm.meta_value = %s AND wpm.post_id = wpost.ID AND
|
162 |
wpost.post_type = 'shop_order'
|
163 |
ORDER BY wpm.post_id DESC LIMIT 1";
|
164 |
|
165 |
+
$results_wcal_check_if_cart_is_present_in_post_meta = $wpdb->get_results( $wpdb->prepare( $wcal_check_if_cart_is_present_in_post_meta, $value->id ) );
|
166 |
+
|
167 |
+
$wcap_check_cart_staus_need_to_update = false;
|
168 |
+
|
169 |
+
if ( empty( $results_wcal_check_if_cart_is_present_in_post_meta ) ||
|
170 |
+
( isset( $results_wcal_check_if_cart_is_present_in_post_meta[0] ) &&
|
171 |
+
$results_wcal_check_if_cart_is_present_in_post_meta[0]->post_status != 'wc-failed' &&
|
172 |
+
$results_wcal_check_if_cart_is_present_in_post_meta [0]->post_status != 'wc-pending' ) ) {
|
173 |
+
|
174 |
+
$wcap_check_cart_staus_need_to_update = self::wcal_update_abandoned_cart_status_for_placed_orders( $time_to_send_template_after, $cart_update_time, $value->user_id, $value->user_type, $value->id, $value->user_email );
|
175 |
+
}
|
176 |
+
|
177 |
+
if ( false == $wcal_check_cart_needed_for_multiple_template &&
|
178 |
+
false == $wcap_check_cart_staus_need_to_update ) {
|
179 |
+
|
180 |
+
$cart_info_db = $value->abandoned_cart_info;
|
181 |
+
$email_subject = $template_email_subject;
|
182 |
+
$email_body = $email_body_template;
|
183 |
+
$wcal_check_cart_total = $this->wcal_check_cart_total( $cart );
|
184 |
+
if ( true == $wcal_check_cart_total ) {
|
185 |
+
if ( $value->user_type == 'GUEST' ) {
|
186 |
+
if ( isset( $results_guest[0]->billing_first_name ) ) {
|
187 |
+
$email_body = str_ireplace( '{{customer.firstname}}', $results_guest[0]->billing_first_name, $email_body );
|
188 |
+
$email_subject = str_ireplace( '{{customer.firstname}}', $results_guest[0]->billing_first_name, $email_subject );
|
189 |
+
}
|
190 |
+
if ( isset( $results_guest[0]->billing_last_name ) ) {
|
191 |
+
$email_body = str_ireplace( '{{customer.lastname}}', $results_guest[0]->billing_last_name, $email_body );
|
192 |
+
}
|
193 |
+
if ( isset( $results_guest[0]->billing_first_name ) && isset( $results_guest[0]->billing_last_name ) ) {
|
194 |
+
$email_body = str_ireplace( '{{customer.fullname}}', $results_guest[0]->billing_first_name . ' ' . $results_guest[0]->billing_last_name, $email_body );
|
195 |
+
} elseif ( isset( $results_guest[0]->billing_first_name ) ) {
|
196 |
+
$email_body = str_ireplace( '{{customer.fullname}}', $results_guest[0]->billing_first_name, $email_body );
|
197 |
+
} elseif ( isset( $results_guest[0]->billing_last_name ) ) {
|
198 |
+
$email_body = str_ireplace( '{{customer.fullname}}', $results_guest[0]->billing_last_name, $email_body );
|
199 |
+
}
|
200 |
+
} else {
|
201 |
+
$user_first_name = '';
|
202 |
+
$user_first_name_temp = get_user_meta( $value->user_id, 'billing_first_name', true );
|
203 |
+
if ( isset( $user_first_name_temp ) && '' == $user_first_name_temp ) {
|
204 |
+
$user_data = get_userdata( $user_id );
|
205 |
+
if ( isset( $user_data->first_name ) ) {
|
206 |
+
$user_first_name = $user_data->first_name;
|
207 |
+
} else {
|
208 |
+
$user_first_name = '';
|
209 |
+
}
|
210 |
+
} else {
|
211 |
+
$user_first_name = $user_first_name_temp;
|
212 |
+
}
|
213 |
+
$email_body = str_ireplace( '{{customer.firstname}}', $user_first_name, $email_body );
|
214 |
+
$email_subject = str_ireplace( '{{customer.firstname}}', $user_first_name, $email_subject );
|
215 |
+
$user_last_name = '';
|
216 |
+
$user_last_name_temp = get_user_meta( $value->user_id, 'billing_last_name', true );
|
217 |
+
if ( isset( $user_last_name_temp ) && '' == $user_last_name_temp ) {
|
218 |
+
$user_data = get_userdata( $user_id );
|
219 |
+
if ( isset( $user_data->last_name ) ) {
|
220 |
+
$user_last_name = $user_data->last_name;
|
221 |
+
} else {
|
222 |
+
$user_last_name = '';
|
223 |
+
}
|
224 |
+
} else {
|
225 |
+
$user_last_name = $user_last_name_temp;
|
226 |
+
}
|
227 |
+
$email_body = str_ireplace( '{{customer.lastname}}', $user_last_name, $email_body );
|
228 |
+
$email_body = str_ireplace( '{{customer.fullname}}', $user_first_name . ' ' . $user_last_name, $email_body );
|
229 |
+
}
|
230 |
+
$order_date = '';
|
231 |
+
if ( $cart_update_time != '' && $cart_update_time != 0 ) {
|
232 |
+
$date_format = date_i18n( get_option( 'date_format' ), $cart_update_time );
|
233 |
+
$time_format = date_i18n( get_option( 'time_format' ), $cart_update_time );
|
234 |
+
$order_date = $date_format . ' ' . $time_format;
|
235 |
+
}
|
236 |
+
$email_body = str_ireplace( '{{cart.abandoned_date}}', $order_date, $email_body );
|
237 |
+
$query_sent = 'INSERT INTO `' . $wpdb->prefix . "ac_sent_history_lite` ( template_id, abandoned_order_id, sent_time, sent_email_id )
|
238 |
+
VALUES ( %s, %s, '" . current_time( 'mysql' ) . "', %s )";
|
239 |
+
|
240 |
+
$wpdb->query( $wpdb->prepare( $query_sent, $template_id, $value->id, $value->user_email ) );
|
241 |
+
|
242 |
+
$query_id = 'SELECT * FROM `' . $wpdb->prefix . 'ac_sent_history_lite`
|
|
|
|
|
243 |
WHERE template_id = %s AND abandoned_order_id = %s
|
244 |
ORDER BY id DESC
|
245 |
+
LIMIT 1 ';
|
246 |
+
$results_sent = $wpdb->get_results( $wpdb->prepare( $query_id, $template_id, $value->id ) );
|
247 |
+
if ( count( $results_sent ) > 0 ) {
|
248 |
+
$email_sent_id = $results_sent[0]->id;
|
249 |
+
} else {
|
250 |
+
$email_sent_id = '';
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( '' != $email_sent_id ) {
|
254 |
+
|
255 |
+
if ( $woocommerce->version < '2.3' ) {
|
256 |
+
$cart_page_link = $woocommerce->cart->get_cart_url();
|
257 |
+
} else {
|
258 |
+
$cart_page_id = wc_get_page_id( 'cart' );
|
259 |
+
$cart_page_link = $cart_page_id ? get_permalink( $cart_page_id ) : '';
|
260 |
+
}
|
261 |
+
|
262 |
+
$encoding_cart = $email_sent_id . '&url=' . $cart_page_link;
|
263 |
+
$validate_cart = $this->wcal_encrypt_validate( $encoding_cart );
|
264 |
+
$cart_link_track = get_option( 'siteurl' ) . '/?wcal_action=track_links&validate=' . $validate_cart;
|
265 |
+
$email_body = str_ireplace( '{{cart.link}}', $cart_link_track, $email_body );
|
266 |
+
|
267 |
+
$validate_unsubscribe = $this->wcal_encrypt_validate( $email_sent_id );
|
268 |
+
if ( count( $results_sent ) > 0 && isset( $results_sent[0]->sent_email_id ) ) {
|
269 |
+
$email_sent_id_address = $results_sent[0]->sent_email_id;
|
270 |
+
}
|
271 |
+
$encrypt_email_sent_id_address = hash( 'sha256', $email_sent_id_address );
|
272 |
+
$plugins_url = get_option( 'siteurl' ) . '/?wcal_track_unsubscribe=wcal_unsubscribe&validate=' . $validate_unsubscribe . '&track_email_id=' . $encrypt_email_sent_id_address;
|
273 |
+
$unsubscribe_link_track = $plugins_url;
|
274 |
+
$email_body = str_ireplace( '{{cart.unsubscribe}}', $unsubscribe_link_track, $email_body );
|
275 |
+
$var = '';
|
276 |
+
if ( preg_match( '{{products.cart}}', $email_body, $matched ) ) {
|
277 |
+
$qty_header = __( 'Quantity', 'woocommerce-abandoned-cart' );
|
278 |
+
$price_header = __( 'Price', 'woocommerce-abandoned-cart' );
|
279 |
+
$line_subtotal_header = __( 'Line Subtotal', 'woocommerce-abandoned-cart' );
|
280 |
+
|
281 |
+
if ( class_exists( 'WP_Better_Emails' ) ) {
|
282 |
+
$var = '<table width = 100% style="margin-right: auto; margin-left:auto;">
|
283 |
+
<tr> <td colspan="5"> <h3>' . __( 'Your Shopping Cart', 'woocommerce-abandoned-cart' ) . '</h3> </td></tr>
|
284 |
<tr>
|
285 |
+
<th>' . __( 'Item', 'woocommerce-abandoned-cart' ) . '</th>
|
286 |
+
<th>' . __( 'Name', 'woocommerce-abandoned-cart' ) . '</th>
|
287 |
+
<th>' . apply_filters( 'wcal_reminder_email_qty_header', $qty_header ) . '</th>
|
288 |
+
<th>' . apply_filters( 'wcal_reminder_email_price_header', $price_header ) . '</th>
|
289 |
+
<th>' . apply_filters( 'wcal_reminder_email_line_subtotal_header', $line_subtotal_header ) . '</th>
|
290 |
</tr>';
|
291 |
+
} else {
|
292 |
+
$var = '<table border="0" cellpadding="10" cellspacing="0" class="templateDataTable" style="margin-right: auto; margin-left:auto;">
|
293 |
+
<tr> <td colspan="5"> <h3>' . __( 'Your Shopping Cart', 'woocommerce-abandoned-cart' ) . '</h3> </td></tr>
|
294 |
<tr>
|
295 |
+
<th>' . __( 'Item', 'woocommerce-abandoned-cart' ) . '</th>
|
296 |
+
<th>' . __( 'Name', 'woocommerce-abandoned-cart' ) . '</th>
|
297 |
+
<th>' . apply_filters( 'wcal_reminder_email_qty_header', $qty_header ) . '</th>
|
298 |
+
<th>' . apply_filters( 'wcal_reminder_email_price_header', $price_header ) . '</th>
|
299 |
+
<th>' . apply_filters( 'wcal_reminder_email_line_subtotal_header', $line_subtotal_header ) . '</th>
|
300 |
</tr>';
|
301 |
+
}
|
302 |
+
$cart_details = $cart_info_db_field->cart;
|
303 |
+
$cart_total = $item_subtotal = $item_total = 0;
|
304 |
+
$sub_line_prod_name = '';
|
305 |
+
foreach ( $cart_details as $k => $v ) {
|
306 |
+
$quantity_total = $v->quantity;
|
307 |
+
$product_id = $v->product_id;
|
308 |
+
$product = wc_get_product( $product_id );
|
309 |
+
if ( $product ) {
|
310 |
+
$prod_name = get_post( $product_id );
|
311 |
+
$product_link_track = get_permalink( $product_id );
|
312 |
+
$product_name = $prod_name->post_title;
|
313 |
+
if ( $sub_line_prod_name == '' ) {
|
314 |
+
$sub_line_prod_name = $product_name;
|
315 |
+
}
|
316 |
+
// Item subtotal is calculated as product total including taxes
|
317 |
+
if ( $v->line_tax != 0 && $v->line_tax > 0 ) {
|
318 |
+
$item_subtotal = $item_subtotal + $v->line_total + $v->line_tax;
|
319 |
+
} else {
|
320 |
+
$item_subtotal = $item_subtotal + $v->line_total;
|
321 |
+
}
|
322 |
+
// Line total
|
323 |
+
$item_total = $item_subtotal;
|
324 |
+
$item_subtotal = $item_subtotal / $quantity_total;
|
325 |
+
$item_total_display = wc_price( $item_total );
|
326 |
+
$item_subtotal = wc_price( $item_subtotal );
|
327 |
+
// $product = wc_get_product( $product_id );
|
328 |
+
$prod_image = $product->get_image();
|
329 |
+
$image_url = wp_get_attachment_url( get_post_thumbnail_id( $product_id ) );
|
330 |
+
if ( strpos( $image_url, '/' ) === 0 ) {
|
331 |
+
$image_url = get_option( 'siteurl' ) . $image_url;
|
332 |
+
}
|
333 |
+
if ( isset( $v->variation_id ) && '' != $v->variation_id ) {
|
334 |
+
$variation_id = $v->variation_id;
|
335 |
+
$variation = wc_get_product( $variation_id );
|
336 |
+
$name = false !== $variation ? $variation->get_formatted_name() : '';
|
337 |
+
$explode_all = '' !== $name ? explode( '–', $name ) : array();
|
338 |
+
if ( version_compare( $woocommerce->version, '3.0.0', '>=' ) ) {
|
339 |
+
$wcap_sku = '';
|
340 |
+
if ( false !== $variation ) {
|
341 |
+
$wcap_sku = 'SKU: ' . $variation->get_sku() . '<br>';
|
342 |
+
}
|
343 |
+
$wcap_get_formatted_variation = false !== $variation ? wc_get_formatted_variation( $variation, true ) : '';
|
344 |
+
|
345 |
+
$add_product_name = $product_name . ' - ' . $wcap_sku . $wcap_get_formatted_variation;
|
346 |
+
|
347 |
+
$pro_name_variation = (array) $add_product_name;
|
348 |
+
} else {
|
349 |
+
$pro_name_variation = count( $explode_all ) > 0 ? array_slice( $explode_all, 1, -1 ) : array();
|
350 |
+
}
|
351 |
+
$product_name_with_variable = '';
|
352 |
+
$explode_many_varaition = array();
|
353 |
+
if ( is_array( $pro_name_variation ) && count( $pro_name_variation ) > 0 ) {
|
354 |
+
foreach ( $pro_name_variation as $pro_name_variation_key => $pro_name_variation_value ) {
|
355 |
+
$explode_many_varaition = explode( ',', $pro_name_variation_value );
|
356 |
+
if ( ! empty( $explode_many_varaition ) ) {
|
357 |
+
foreach ( $explode_many_varaition as $explode_many_varaition_key => $explode_many_varaition_value ) {
|
358 |
+
$product_name_with_variable = $product_name_with_variable . html_entity_decode( $explode_many_varaition_value ) . '<br>';
|
359 |
+
}
|
360 |
+
} else {
|
361 |
+
$product_name_with_variable = $product_name_with_variable . html_entity_decode( $explode_many_varaition_value ) . '<br>';
|
362 |
+
}
|
363 |
+
}
|
364 |
+
}
|
365 |
+
$product_name = $product_name_with_variable;
|
366 |
+
}
|
367 |
+
$product_name = apply_filters( 'wcal_reminder_email_after_product_name', $product_name, $v );
|
368 |
+
$var .= '<tr align="center">
|
369 |
+
<td> <a href="' . $cart_link_track . '"> <img src="' . $image_url . '" alt="" height="42" width="42" /> </a></td>
|
370 |
+
<td> <a href="' . $cart_link_track . '">' . $product_name . '</a></td>
|
371 |
+
<td> ' . apply_filters( 'wcal_reminder_email_qty_value', $quantity_total ) . '</td>
|
372 |
+
<td> ' . apply_filters( 'wcal_reminder_email_price_value', $item_subtotal ) . '</td>
|
373 |
+
<td> ' . apply_filters( 'wcal_reminder_email_line_subtotal_value', $item_total_display ) . '</td>
|
374 |
</tr>';
|
375 |
+
$cart_total += $item_total;
|
376 |
+
$item_subtotal = $item_total = 0;
|
377 |
+
$p_exists = true;
|
378 |
+
} else {
|
379 |
+
$cart_total = 0;
|
380 |
+
$item_subtotal = $item_total = 0;
|
381 |
+
|
382 |
+
$p_exists = false;
|
383 |
+
}
|
384 |
+
}
|
385 |
+
|
386 |
+
if ( $p_exists ) {
|
387 |
+
$cart_total = wc_price( $cart_total );
|
388 |
+
$cart_total = apply_filters( 'wcal_reminder_email_cart_total', $cart_total );
|
389 |
+
$cart_total_title = __( 'Cart Total:', 'woocommerce-abandoned-cart' );
|
390 |
+
$var .= '<tr align="center">
|
391 |
<td> </td>
|
392 |
<td> </td>
|
393 |
<td> </td>
|
394 |
+
<td>' . apply_filters( 'wcal_reminder_email_cart_total_title', $cart_total_title ) . '</td>
|
395 |
+
<td> ' . $cart_total . '</td>
|
396 |
</tr>';
|
397 |
+
$var .= '</table>';
|
398 |
+
$email_body = str_ireplace( '{{products.cart}}', $var, $email_body );
|
399 |
+
$email_subject = str_ireplace( '{{product.name}}', $sub_line_prod_name, $email_subject );
|
400 |
+
} else {
|
401 |
+
$email_body = str_ireplace( '{{products.cart}}', __( 'Product no longer exists', 'woocommerce-abandoned-cart' ), $email_body );
|
402 |
+
$email_subject = str_ireplace( '{{product.name}}', $sub_line_prod_name, $email_subject );
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
$user_email = $value->user_email;
|
407 |
+
$email_body_final = stripslashes( $email_body );
|
408 |
+
$email_body_final = convert_smilies( $email_body_final );
|
409 |
+
if ( isset( $is_wc_template ) && '1' == $is_wc_template ) {
|
410 |
+
ob_start();
|
411 |
+
|
412 |
+
wc_get_template( 'emails/email-header.php', array( 'email_heading' => $wc_template_header ) );
|
413 |
+
$email_body_template_header = ob_get_clean();
|
414 |
+
|
415 |
+
ob_start();
|
416 |
+
|
417 |
+
wc_get_template( 'emails/email-footer.php' );
|
418 |
+
$email_body_template_footer = ob_get_clean();
|
419 |
+
|
420 |
+
$site_title = get_bloginfo( 'name' );
|
421 |
+
$email_body_template_footer = str_ireplace( '{site_title}', $site_title, $email_body_template_footer );
|
422 |
+
|
423 |
+
$final_email_body = $email_body_template_header . $email_body_final . $email_body_template_footer;
|
424 |
+
|
425 |
+
wc_mail( $user_email, $email_subject, $final_email_body, $headers );
|
426 |
+
|
427 |
+
} else {
|
428 |
+
wp_mail( $user_email, $email_subject, $email_body_final, $headers );
|
429 |
+
}
|
430 |
+
}
|
431 |
+
}
|
432 |
+
}
|
433 |
+
}
|
434 |
+
}
|
435 |
+
}
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
/**
|
443 |
+
* This function will check if the user type is Guest and the id is greater than 63000000
|
444 |
+
* Then conider that as a correct guest user, if is not then do not send the emails
|
445 |
+
*
|
446 |
+
* @param strinng | int $wcal_user_id User id
|
447 |
+
* @param strinng $wcal_user_type User Type
|
448 |
+
* @return boolean true | false
|
449 |
+
* @since 4.4
|
450 |
+
*/
|
451 |
+
public static function wcal_get_is_guest_valid( $wcal_user_id, $wcal_user_type ) {
|
452 |
+
|
453 |
+
if ( 'REGISTERED' == $wcal_user_type ) {
|
454 |
+
return true;
|
455 |
+
}
|
456 |
+
|
457 |
+
if ( 'GUEST' == $wcal_user_type && $wcal_user_id >= 63000000 ) {
|
458 |
+
return true;
|
459 |
+
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* It indicates that the user type is guest but the id for them is wrong.
|
463 |
+
*/
|
464 |
+
return false;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* It will check the cart total.
|
469 |
+
*
|
470 |
+
* @param array | object $cart Cart details
|
471 |
+
* @return boolean true | false
|
472 |
+
* @since 4.3
|
473 |
+
*/
|
474 |
+
function wcal_check_cart_total( $cart ) {
|
475 |
+
foreach ( $cart as $k => $v ) {
|
476 |
+
if ( $v->line_total != 0 && $v->line_total > 0 ) {
|
477 |
+
return true;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
return false;
|
481 |
+
}
|
482 |
+
/**
|
483 |
+
* Get all carts which have the creation time earlier than the one that is passed.
|
484 |
+
*
|
485 |
+
* @param string | timestamp $template_to_send_after_time Template time
|
486 |
+
* @param string | timestamp $cart_abandon_cut_off_time Cutoff time
|
487 |
+
* @globals mixed $wpdb
|
488 |
+
* @return array | object $results
|
489 |
+
* @since 1.3
|
490 |
+
*/
|
491 |
+
function wcal_get_carts( $template_to_send_after_time, $cart_abandon_cut_off_time, $template_id ) {
|
492 |
+
global $wpdb;
|
493 |
+
$cart_time = current_time( 'timestamp' ) - $template_to_send_after_time - $cart_abandon_cut_off_time;
|
494 |
+
|
495 |
+
$wcal_template_time = get_option( 'wcal_template_' . $template_id . '_time' );
|
496 |
+
$wcal_add_template_condition = '';
|
497 |
+
if ( $wcal_template_time > 0 ) {
|
498 |
+
$wcal_add_template_condition = ' AND abandoned_cart_time > ' . $wcal_template_time;
|
499 |
+
}
|
500 |
+
$cart_ignored = 0;
|
501 |
+
$unsubscribe = 0;
|
502 |
+
$query = 'SELECT wpac . * , wpu.user_login, wpu.user_email
|
503 |
+
FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac
|
504 |
+
LEFT JOIN ' . $wpdb->base_prefix . "users AS wpu ON wpac.user_id = wpu.id
|
505 |
WHERE cart_ignored = %s AND unsubscribe_link = %s AND abandoned_cart_time < $cart_time
|
506 |
$wcal_add_template_condition
|
507 |
ORDER BY `id` ASC ";
|
508 |
|
509 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $cart_ignored, $unsubscribe ) );
|
510 |
+
return $results;
|
511 |
+
exit;
|
512 |
+
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* It will update the abandoned cart staus if the order has been placed before sending the reminder emails.
|
516 |
+
*
|
517 |
+
* @param string | timestamp $time_to_send_template_after Template time
|
518 |
+
* @param string | timestamp $wcal_cart_time Abandoned time
|
519 |
+
* @param string | int $wcal_user_id User id
|
520 |
+
* @param string $wcal_user_type User type
|
521 |
+
* @param string | int $wcal_cart_id Abandoned cart id
|
522 |
+
* @param string $wcal_user_email User Email
|
523 |
+
* @globals mixed $wpdb
|
524 |
+
* @return boolean true | false
|
525 |
+
* @since 4.3
|
526 |
+
*/
|
527 |
+
public static function wcal_update_abandoned_cart_status_for_placed_orders( $time_to_send_template_after, $wcal_cart_time, $wcal_user_id, $wcal_user_type, $wcal_cart_id, $wcal_user_email ) {
|
528 |
+
global $wpdb;
|
529 |
+
|
530 |
+
if ( $wcal_user_id >= '63000000' && 'GUEST' == $wcal_user_type ) {
|
531 |
+
$updated_value = self::wcal_update_status_of_guest( $wcal_cart_id, $wcal_cart_time, $time_to_send_template_after, $wcal_user_email );
|
532 |
+
if ( 1 == $updated_value ) {
|
533 |
+
return true;
|
534 |
+
}
|
535 |
+
} elseif ( $wcal_user_id < '63000000' && 'REGISTERED' == $wcal_user_type ) {
|
536 |
+
$updated_value = self::wcal_update_status_of_loggedin( $wcal_cart_id, $wcal_cart_time, $time_to_send_template_after, $wcal_user_email );
|
537 |
+
if ( 1 == $updated_value ) {
|
538 |
+
return true;
|
539 |
+
}
|
540 |
+
}
|
541 |
+
return false;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* It will update the Guest users abandoned cart staus if the order has been placed before sending the reminder emails.
|
546 |
+
*
|
547 |
+
* @param string | int $cart_id Abandoned cart id
|
548 |
+
* @param string | timestamp $time_to_send_template_after Template time
|
549 |
+
* @param string | timestamp $abandoned_cart_time Abandoned time
|
550 |
+
* @param string $wcal_user_email_address User Email
|
551 |
+
* @globals mixed $wpdb
|
552 |
+
* @return int 0 | 1
|
553 |
+
* @since 4.3
|
554 |
+
*/
|
555 |
+
public static function wcal_update_status_of_guest( $cart_id, $abandoned_cart_time, $time_to_send_template_after, $wcal_user_email_address ) {
|
556 |
+
global $wpdb;
|
557 |
+
|
558 |
+
$query_email_id = 'SELECT wpm.post_id, wpost.post_date, wpost.post_status FROM `' . $wpdb->prefix . 'postmeta` AS wpm LEFT JOIN `' . $wpdb->prefix . "posts` AS wpost ON wpm.post_id = wpost.ID
|
559 |
WHERE wpm.meta_key = '_billing_email' AND wpm.meta_value = %s AND wpm.post_id = wpost.ID AND wpost.post_type = 'shop_order' Order BY wpm.post_id DESC LIMIT 1";
|
560 |
|
561 |
+
$results_query_email = $wpdb->get_results( $wpdb->prepare( $query_email_id, $wcal_user_email_address ) );
|
562 |
|
563 |
+
/* This will check that For abc@abc.com email address we have order for todays date in WC post table */
|
564 |
+
if ( count( $results_query_email ) > 0 ) {
|
565 |
|
566 |
+
$current_time = current_time( 'timestamp' );
|
567 |
+
$todays_date = date( 'Y-m-d', $current_time );
|
568 |
|
569 |
+
$order_date_with_time = $results_query_email[0]->post_date;
|
570 |
+
$order_date = substr( $order_date_with_time, 0, 10 );
|
571 |
|
572 |
+
if ( $order_date == $todays_date ) {
|
573 |
|
574 |
+
/**
|
575 |
+
* in some case the cart is recovered but it is not marked as the recovered. So here we check if any
|
576 |
+
* record is found for that cart id if yes then update the record respectively.
|
577 |
+
*/
|
578 |
+
$wcal_check_email_sent_to_cart = self::wcal_get_cart_sent_data( $cart_id );
|
579 |
|
580 |
+
if ( 0 != $wcal_check_email_sent_to_cart ) {
|
581 |
|
582 |
+
$wcal_query = 'SELECT `post_id` FROM `' . $wpdb->prefix . 'postmeta` WHERE meta_value = %s';
|
583 |
+
$wcal_results = $wpdb->get_results( $wpdb->prepare( $wcal_query, $cart_id ) );
|
584 |
|
585 |
+
if ( count( $wcal_results ) > 0 ) {
|
586 |
|
587 |
+
$order_id = $wcal_results[0]->post_id;
|
588 |
|
589 |
+
$order = wc_get_order( $order_id );
|
590 |
|
591 |
+
$query_order = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET recovered_cart= %s, cart_ignored = '1' WHERE id = %s";
|
592 |
+
$wpdb->query( $wpdb->prepare( $query_order, $order_id, $cart_id ) );
|
593 |
+
|
594 |
+
$order->add_order_note( __( 'This order was abandoned & subsequently recovered.', 'woocommerce-abandoned-cart' ) );
|
595 |
+
|
596 |
+
delete_post_meta( $order_id, 'wcal_recover_order_placed', $cart_id );
|
597 |
+
delete_post_meta( $order_id, 'wcal_recover_order_placed_sent_id', $wcal_check_email_sent_to_cart );
|
598 |
+
}
|
599 |
+
} else {
|
600 |
+
|
601 |
+
$query_ignored = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET cart_ignored = '1' WHERE id = %s";
|
602 |
+
$wpdb->query( $wpdb->prepare( $query_ignored, $cart_id ) );
|
603 |
+
}
|
604 |
+
return 1;
|
605 |
+
} elseif ( strtotime( $order_date_with_time ) > $abandoned_cart_time ) {
|
606 |
+
$query_ignored = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET cart_ignored = '1' WHERE id = %s ";
|
607 |
+
$wpdb->query( $wpdb->prepare( $query_ignored, $cart_id ) );
|
608 |
+
return 1;
|
609 |
+
} elseif ( 'wc-pending' == $results_query_email[0]->post_status || 'wc-failed' == $results_query_email[0]->post_status ) {
|
610 |
+
|
611 |
+
/**
|
612 |
+
* If the post status are pending or failed the send them for abandoned cart reminder emails.
|
613 |
+
*/
|
614 |
+
return 0;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
return 0;
|
618 |
+
}
|
619 |
+
|
620 |
+
/**
|
621 |
+
* It will update the Loggedin users abandoned cart staus if the order has been placed before sending the reminder emails.
|
622 |
+
*
|
623 |
+
* @param string | int $cart_id Abandoned cart id
|
624 |
+
* @param string | timestamp $time_to_send_template_after Template time
|
625 |
+
* @param string | timestamp $abandoned_cart_time Abandoned time
|
626 |
+
* @param string $user_billing_email User Email
|
627 |
+
* @globals mixed $wpdb
|
628 |
+
* @return int 0 | 1
|
629 |
+
* @since 4.3
|
630 |
+
*/
|
631 |
+
public static function wcal_update_status_of_loggedin( $cart_id, $abandoned_cart_time, $time_to_send_template_after, $user_billing_email ) {
|
632 |
+
global $wpdb;
|
633 |
+
|
634 |
+
$query_email_id = 'SELECT wpm.post_id, wpost.post_date, wpost.post_status FROM `' . $wpdb->prefix . 'postmeta` AS wpm LEFT JOIN `' . $wpdb->prefix . "posts` AS wpost ON wpm.post_id = wpost.ID WHERE wpm.meta_key = '_billing_email' AND wpm.meta_value = %s AND wpm.post_id = wpost.ID Order BY wpm.post_id DESC LIMIT 1";
|
635 |
+
|
636 |
+
$results_query_email = $wpdb->get_results( $wpdb->prepare( $query_email_id, $user_billing_email ) );
|
637 |
+
|
638 |
+
if ( count( $results_query_email ) > 0 ) {
|
639 |
+
$current_time = current_time( 'timestamp' );
|
640 |
+
$todays_date = date( 'Y-m-d', $current_time );
|
641 |
+
$order_date_time = $results_query_email[0]->post_date;
|
642 |
+
$order_date = substr( $order_date_time, 0, 10 );
|
643 |
+
|
644 |
+
if ( $order_date == $todays_date ) {
|
645 |
+
|
646 |
+
$wcal_check_email_sent_to_cart = self::wcal_get_cart_sent_data( $cart_id );
|
647 |
+
|
648 |
+
if ( 0 != $wcal_check_email_sent_to_cart ) {
|
649 |
+
|
650 |
+
$wcal_query = 'SELECT `post_id` FROM `' . $wpdb->prefix . 'postmeta` WHERE meta_value = %s';
|
651 |
+
$wcal_results = $wpdb->get_results( $wpdb->prepare( $wcal_query, $cart_id ) );
|
652 |
+
|
653 |
+
if ( count( $wcal_results ) > 0 ) {
|
654 |
+
|
655 |
+
$order_id = $wcal_results[0]->post_id;
|
656 |
+
|
657 |
+
$order = wc_get_order( $order_id );
|
658 |
+
|
659 |
+
$query_order = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET recovered_cart= '" . $order_id . "', cart_ignored = '1' WHERE id = '" . $cart_id . "' ";
|
660 |
+
$wpdb->query( $query_order );
|
661 |
+
|
662 |
+
$order->add_order_note( __( 'This order was abandoned & subsequently recovered.', 'woocommerce-abandoned-cart' ) );
|
663 |
+
|
664 |
+
delete_post_meta( $order_id, 'wcal_recover_order_placed', $cart_id );
|
665 |
+
delete_post_meta( $order_id, 'wcal_recover_order_placed_sent_id', $wcal_check_email_sent_to_cart );
|
666 |
+
}
|
667 |
+
} else {
|
668 |
+
|
669 |
+
$query_ignored = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET cart_ignored = '1' WHERE id ='" . $cart_id . "'";
|
670 |
+
$wpdb->query( $query_ignored );
|
671 |
+
}
|
672 |
+
return 1;
|
673 |
+
} elseif ( strtotime( $order_date_time ) >= $abandoned_cart_time ) {
|
674 |
+
$query_ignored = 'UPDATE `' . $wpdb->prefix . "ac_abandoned_cart_history_lite` SET cart_ignored = '1' WHERE id ='" . $cart_id . "'";
|
675 |
+
$wpdb->query( $query_ignored );
|
676 |
+
return 1; // We return here 1 so it indicate that the cart has been modifed so do not sent email and delete from the array.
|
677 |
+
} elseif ( 'wc-pending' == $results_query_email[0]->post_status || 'wc-failed' == $results_query_email[0]->post_status ) {
|
678 |
+
return 0; // if status of the order is pending or falied then return 0 so it will not delete that cart and send reminder email
|
679 |
+
}
|
680 |
+
}
|
681 |
+
return 0; // it means there are no record found to be update it.
|
682 |
+
}
|
683 |
+
|
684 |
+
/**
|
685 |
+
* It will check that for abandoned cart remider email has been sent.
|
686 |
+
*
|
687 |
+
* @param string | int $wcal_cart_id Abandoned cart id
|
688 |
+
* @return int $wcal_sent_id | 0 Email sent id
|
689 |
+
* @globals mixed $wpdb
|
690 |
+
* @since 4.3
|
691 |
+
*/
|
692 |
+
public static function wcal_get_cart_sent_data( $wcal_cart_id ) {
|
693 |
+
global $wpdb;
|
694 |
+
|
695 |
+
$wcal_query = 'SELECT id FROM `' . $wpdb->prefix . "ac_sent_history_lite` WHERE abandoned_order_id = %d ORDER BY 'id' DESC LIMIT 1 ";
|
696 |
+
$wcal_results = $wpdb->get_results( $wpdb->prepare( $wcal_query, $wcal_cart_id ) );
|
697 |
+
|
698 |
+
if ( count( $wcal_results ) > 0 ) {
|
699 |
+
$wcal_sent_id = $wcal_results[0]->id;
|
700 |
+
return $wcal_sent_id;
|
701 |
+
}
|
702 |
+
return 0;
|
703 |
+
}
|
704 |
+
|
705 |
+
/**
|
706 |
+
* If none of the email has been sent for some time then from the time where it send the first email template it will consider
|
707 |
+
* the time and further email will sent from first email sent time. So all template will not sent at the same time.
|
708 |
+
*
|
709 |
+
* @param string | int $wcal_cart_id Abandoned cart id
|
710 |
+
* @param string | timestamp $time_to_send_template_after Template time
|
711 |
+
* @param string | int $template_id Template id
|
712 |
+
* @return boolean true | false
|
713 |
+
* @globals mixed $wpdb
|
714 |
+
* @since 3.1
|
715 |
+
*/
|
716 |
+
public static function wcal_remove_cart_for_mutiple_templates( $wcal_cart_id, $time_to_send_template_after, $template_id ) {
|
717 |
+
global $wpdb;
|
718 |
+
|
719 |
+
$wcal_get_last_email_sent_time = 'SELECT * FROM `' . $wpdb->prefix . "ac_sent_history_lite` WHERE abandoned_order_id = $wcal_cart_id ORDER BY `sent_time` DESC LIMIT 1";
|
720 |
+
$wcal_get_last_email_sent_time_results_list = $wpdb->get_results( $wcal_get_last_email_sent_time );
|
721 |
+
|
722 |
+
if ( count( $wcal_get_last_email_sent_time_results_list ) > 0 ) {
|
723 |
+
$last_template_send_time = strtotime( $wcal_get_last_email_sent_time_results_list[0]->sent_time );
|
724 |
+
$second_template_send_time = $last_template_send_time + $time_to_send_template_after;
|
725 |
+
$current_time_test = current_time( 'timestamp' );
|
726 |
+
if ( $second_template_send_time > $current_time_test ) {
|
727 |
+
return true;
|
728 |
+
}
|
729 |
+
}
|
730 |
+
|
731 |
+
return false;
|
732 |
+
}
|
733 |
+
/**
|
734 |
+
* This function is used to encode the validate string.
|
735 |
+
*
|
736 |
+
* @param string $validate
|
737 |
+
* @return encoded data $validate_encoded
|
738 |
+
* @since 1.3
|
739 |
+
*/
|
740 |
+
function wcal_encrypt_validate( $validate ) {
|
741 |
+
$cryptKey = get_option( 'wcal_security_key' );
|
742 |
+
$validate_encoded = Wcal_Aes_Ctr::encrypt( $validate, $cryptKey, 256 );
|
743 |
+
return( $validate_encoded );
|
744 |
+
}
|
745 |
+
|
746 |
+
/**
|
747 |
+
* It will check if the reminder email has been sent to the abandoned cart.
|
748 |
+
*
|
749 |
+
* @param string | int $user_id User id
|
750 |
+
* @param string | timestamp $cart_update_time Abandoned cart time
|
751 |
+
* @param string | int $template_id Template id
|
752 |
+
* @param string | int $id Abandoned cart id
|
753 |
+
* @globals mixed $wpdb
|
754 |
+
* @return boolean true | false
|
755 |
+
* @since 1.3
|
756 |
+
*/
|
757 |
+
function wcal_check_sent_history( $user_id, $cart_update_time, $template_id, $id ) {
|
758 |
+
global $wpdb;
|
759 |
+
$query = 'SELECT wpcs . * , wpac . abandoned_cart_time , wpac . user_id FROM `' . $wpdb->prefix . 'ac_sent_history_lite` AS wpcs
|
760 |
+
LEFT JOIN ' . $wpdb->prefix . "ac_abandoned_cart_history_lite AS wpac ON wpcs.abandoned_order_id = wpac.id
|
761 |
WHERE template_id = %s AND wpcs.abandoned_order_id = %d ORDER BY 'id' DESC LIMIT 1 ";
|
762 |
|
763 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $template_id, $id ) );
|
764 |
+
if ( count( $results ) == 0 ) {
|
765 |
+
return true;
|
766 |
+
} elseif ( $results[0]->abandoned_cart_time < $cart_update_time ) {
|
767 |
+
return true;
|
768 |
+
} else {
|
769 |
+
return false;
|
770 |
+
}
|
771 |
+
}
|
772 |
+
}
|
773 |
}
|
774 |
$woocommerce_abandon_cart_cron = new woocommerce_abandon_cart_cron();
|
775 |
+
|
i18n/languages/woocommerce-abandoned-cart.pot
CHANGED
@@ -1,697 +1,664 @@
|
|
1 |
-
#
|
2 |
-
#
|
3 |
-
# This file is distributed under the same license as the PACKAGE package.
|
4 |
-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5 |
-
#
|
6 |
-
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
-
"Project-Id-Version:
|
10 |
-
"Report-Msgid-Bugs-To: \n"
|
11 |
-
"POT-Creation-Date: 2019-03-25 19:02+0530\n"
|
12 |
-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
-
"Language: \n"
|
16 |
"MIME-Version: 1.0\n"
|
17 |
"Content-Type: text/plain; charset=UTF-8\n"
|
18 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
msgid "
|
22 |
msgstr ""
|
23 |
|
24 |
-
|
25 |
-
msgid "
|
26 |
msgstr ""
|
27 |
|
28 |
-
|
29 |
-
msgid "
|
30 |
msgstr ""
|
31 |
|
32 |
-
|
33 |
-
msgid "
|
34 |
msgstr ""
|
35 |
|
36 |
-
|
37 |
-
msgid "
|
38 |
msgstr ""
|
39 |
|
40 |
-
#:
|
41 |
-
msgid "
|
42 |
msgstr ""
|
43 |
|
44 |
-
#:
|
45 |
-
|
|
|
|
|
|
|
46 |
msgstr ""
|
47 |
|
48 |
-
#:
|
49 |
-
|
|
|
|
|
50 |
msgstr ""
|
51 |
|
52 |
-
#:
|
53 |
-
|
|
|
|
|
|
|
54 |
msgstr ""
|
55 |
|
56 |
-
#:
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
60 |
msgstr ""
|
61 |
|
62 |
-
#:
|
63 |
-
|
|
|
|
|
|
|
|
|
64 |
msgstr ""
|
65 |
|
66 |
-
#:
|
67 |
-
|
|
|
|
|
|
|
|
|
68 |
msgstr ""
|
69 |
|
70 |
-
#:
|
71 |
-
|
|
|
|
|
72 |
msgstr ""
|
73 |
|
74 |
-
#:
|
75 |
-
msgid "
|
76 |
msgstr ""
|
77 |
|
78 |
-
#:
|
79 |
-
|
|
|
|
|
|
|
80 |
msgstr ""
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
"
|
85 |
-
"visit the checkout page or does not enter any details on the checkout page "
|
86 |
-
"like Name or Email. Tracking will begin as soon as a visitor adds a product "
|
87 |
-
"to their cart and visits the cart page."
|
88 |
msgstr ""
|
89 |
|
90 |
-
#:
|
91 |
-
|
|
|
92 |
msgstr ""
|
93 |
|
94 |
-
#:
|
95 |
-
msgid ""
|
96 |
-
"<br>In compliance with GDPR, add a message on the Checkout page to inform "
|
97 |
-
"Guest users of how their data is being used.<br><i>For example: Your email "
|
98 |
-
"address will help us support your shopping experience throughout the site. "
|
99 |
-
"Please check our Privacy Policy to see how we use your personal data.</i>"
|
100 |
msgstr ""
|
101 |
|
102 |
-
|
103 |
-
|
|
|
104 |
msgstr ""
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
"
|
109 |
-
"inform Registered users of how their data is being used.<br><i>For example: "
|
110 |
-
"Please check our Privacy Policy to see how we use your personal data.</i>"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#:
|
114 |
-
msgid "
|
115 |
msgstr ""
|
116 |
|
117 |
-
#:
|
118 |
-
|
|
|
119 |
msgstr ""
|
120 |
|
121 |
-
#:
|
122 |
-
|
|
|
123 |
msgstr ""
|
124 |
|
125 |
-
#:
|
126 |
-
|
|
|
|
|
127 |
msgstr ""
|
128 |
|
129 |
-
#:
|
130 |
-
|
131 |
-
"Abandoned
|
132 |
msgstr ""
|
133 |
|
134 |
-
#:
|
135 |
-
|
136 |
-
"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#:
|
140 |
-
|
|
|
141 |
msgstr ""
|
142 |
|
143 |
-
#:
|
144 |
-
msgid "
|
145 |
msgstr ""
|
146 |
|
147 |
-
#:
|
148 |
-
|
|
|
149 |
msgstr ""
|
150 |
|
151 |
-
#:
|
152 |
-
|
|
|
|
|
|
|
153 |
msgstr ""
|
154 |
|
155 |
-
#:
|
156 |
-
|
|
|
157 |
msgstr ""
|
158 |
|
159 |
-
#:
|
160 |
-
|
161 |
-
msgid "
|
162 |
msgstr ""
|
163 |
|
164 |
-
#:
|
165 |
-
|
166 |
-
msgid ""
|
167 |
-
"Please enter in monetary decimal (%s) format without thousand separators and "
|
168 |
-
"currency symbols."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#:
|
172 |
-
msgid "
|
173 |
msgstr ""
|
174 |
|
175 |
-
#:
|
176 |
-
msgid "
|
177 |
msgstr ""
|
178 |
|
179 |
-
#:
|
180 |
-
msgid "
|
181 |
msgstr ""
|
182 |
|
183 |
-
#:
|
184 |
-
|
|
|
185 |
msgstr ""
|
186 |
|
187 |
-
#:
|
188 |
-
msgid "
|
189 |
msgstr ""
|
190 |
|
191 |
-
#:
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#:
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
-
#:
|
200 |
-
|
|
|
201 |
msgstr ""
|
202 |
|
203 |
-
#:
|
204 |
-
|
205 |
-
"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#:
|
209 |
-
|
|
|
210 |
msgstr ""
|
211 |
|
212 |
-
#:
|
213 |
-
|
|
|
214 |
msgstr ""
|
215 |
|
216 |
-
#:
|
217 |
-
msgid ""
|
218 |
-
"The list below shows all Abandoned Carts which have remained in cart for a "
|
219 |
-
"time higher than the \"Cart abandoned cut-off time\" setting."
|
220 |
msgstr ""
|
221 |
|
222 |
-
|
223 |
-
|
|
|
224 |
msgstr ""
|
225 |
|
226 |
-
#:
|
227 |
-
|
228 |
-
|
|
|
229 |
msgstr ""
|
230 |
|
231 |
-
#:
|
232 |
-
|
233 |
-
msgid "Guest %s"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#:
|
237 |
-
msgid "
|
238 |
msgstr ""
|
239 |
|
240 |
-
#:
|
241 |
-
msgid ""
|
242 |
-
"Add email templates at different intervals to maximize the possibility of "
|
243 |
-
"recovering your abandoned carts."
|
244 |
msgstr ""
|
245 |
|
246 |
-
#:
|
247 |
-
msgid ""
|
248 |
-
"The Email Template has been successfully added. In order to start sending "
|
249 |
-
"this email to your customers, please activate it."
|
250 |
msgstr ""
|
251 |
|
252 |
-
#:
|
253 |
-
msgid ""
|
254 |
-
"There was a problem adding the email template. Please contact the plugin "
|
255 |
-
"author via <a href= \"https://wordpress.org/support/plugin/woocommerce-"
|
256 |
-
"abandoned-cart\">support forum</a>."
|
257 |
msgstr ""
|
258 |
|
259 |
-
#:
|
260 |
-
msgid "
|
261 |
msgstr ""
|
262 |
|
263 |
-
#:
|
264 |
-
msgid ""
|
265 |
-
"There was a problem updating the email template. Please contact the plugin "
|
266 |
-
"author via <a href= \"https://wordpress.org/support/plugin/woocommerce-"
|
267 |
-
"abandoned-cart\">support forum</a>."
|
268 |
msgstr ""
|
269 |
|
270 |
-
#:
|
271 |
-
msgid "
|
272 |
msgstr ""
|
273 |
|
274 |
-
#:
|
275 |
-
msgid ""
|
276 |
-
"The Report below shows how many Abandoned Carts we were able to recover for "
|
277 |
-
"you by sending automatic emails to encourage shoppers."
|
278 |
msgstr ""
|
279 |
|
280 |
-
#:
|
281 |
-
msgid "
|
282 |
msgstr ""
|
283 |
|
284 |
-
#:
|
285 |
-
msgid "
|
286 |
msgstr ""
|
287 |
|
288 |
-
#:
|
289 |
-
msgid "
|
290 |
msgstr ""
|
291 |
|
292 |
-
#:
|
293 |
-
|
294 |
-
msgid ""
|
295 |
-
"During the selected range <strong>%d</strong> carts totaling <strong>%s</"
|
296 |
-
"strong> were abandoned. We were able to recover <strong>%d</strong> of them, "
|
297 |
-
"which led to an extra <strong>%s</strong>"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#:
|
301 |
-
|
302 |
-
msgid "Abandoned Order #%s Details"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#:
|
306 |
-
|
307 |
-
msgid "Item"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#:
|
311 |
-
|
312 |
-
msgid "Name"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#:
|
316 |
-
|
317 |
-
msgid "Quantity"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#:
|
321 |
-
|
322 |
-
msgid "Line Subtotal"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#:
|
326 |
-
msgid "
|
327 |
msgstr ""
|
328 |
|
329 |
-
#:
|
330 |
-
msgid "
|
331 |
msgstr ""
|
332 |
|
333 |
-
#:
|
334 |
-
msgid "
|
335 |
msgstr ""
|
336 |
|
337 |
-
#:
|
338 |
-
msgid "
|
339 |
msgstr ""
|
340 |
|
341 |
-
#:
|
342 |
-
msgid "
|
343 |
msgstr ""
|
344 |
|
345 |
-
#:
|
346 |
-
msgid "
|
347 |
msgstr ""
|
348 |
|
349 |
-
#:
|
350 |
-
msgid "
|
351 |
msgstr ""
|
352 |
|
353 |
-
#:
|
354 |
-
msgid "
|
355 |
msgstr ""
|
356 |
|
357 |
-
#:
|
358 |
-
msgid "
|
359 |
msgstr ""
|
360 |
|
361 |
-
#:
|
362 |
-
msgid "
|
363 |
msgstr ""
|
364 |
|
365 |
-
#:
|
366 |
-
msgid "
|
367 |
msgstr ""
|
368 |
|
369 |
-
#:
|
370 |
-
msgid "
|
371 |
msgstr ""
|
372 |
|
373 |
-
#:
|
374 |
-
msgid "
|
375 |
msgstr ""
|
376 |
|
377 |
-
#:
|
378 |
-
msgid "
|
379 |
msgstr ""
|
380 |
|
381 |
-
#:
|
382 |
-
msgid "
|
383 |
msgstr ""
|
384 |
|
385 |
-
#:
|
386 |
-
msgid "
|
387 |
msgstr ""
|
388 |
|
389 |
-
#:
|
390 |
-
msgid ""
|
391 |
-
"Use WooCommerce default style template for abandoned cart reminder emails."
|
392 |
msgstr ""
|
393 |
|
394 |
-
#:
|
395 |
-
msgid "
|
396 |
msgstr ""
|
397 |
|
398 |
-
#:
|
399 |
-
msgid ""
|
400 |
-
"Enter the header which will appear in the abandoned WooCommerce email sent. "
|
401 |
-
"This is only applicable when only used when \"Use WooCommerce Template Style:"
|
402 |
-
"\" is checked."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#:
|
406 |
-
msgid "
|
407 |
msgstr ""
|
408 |
|
409 |
-
#:
|
410 |
-
msgid "
|
411 |
msgstr ""
|
412 |
|
413 |
-
#:
|
414 |
-
msgid "
|
415 |
msgstr ""
|
416 |
|
417 |
-
#:
|
418 |
-
msgid "
|
419 |
msgstr ""
|
420 |
|
421 |
-
#:
|
422 |
-
msgid ""
|
423 |
-
"If you love <strong>Abandoned Cart Lite for WooCommerce</strong>, then "
|
424 |
-
"please leave us a <a href=\"https://wordpress.org/support/plugin/woocommerce-"
|
425 |
-
"abandoned-cart/reviews/?rate=5#new-post\" target=\"_blank\" class=\"ac-"
|
426 |
-
"rating-link\" data-rated=\"Thanks :)\">★★★★★</a>\n"
|
427 |
-
" rating. Thank you in advance. :)"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#:
|
431 |
-
|
432 |
-
msgid "Your Shopping Cart"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#:
|
436 |
-
|
437 |
-
msgid "Price"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#:
|
441 |
-
msgid "
|
442 |
msgstr ""
|
443 |
|
444 |
-
#:
|
445 |
-
msgid "
|
446 |
msgstr ""
|
447 |
|
448 |
-
#:
|
449 |
-
|
450 |
-
msgid "Cart Total:"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#:
|
454 |
-
msgid "
|
455 |
msgstr ""
|
456 |
|
457 |
-
#:
|
458 |
-
|
459 |
-
#: includes/frontend/wcal_checkout_process.php:486
|
460 |
-
msgid "This order was abandoned & subsequently recovered."
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: includes/
|
464 |
-
msgid "
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: includes/
|
468 |
-
msgid "
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: includes/
|
472 |
-
|
473 |
-
msgid ""
|
474 |
-
"<div id=\"wcal_update\" class=\"updated woocommerce-message\" style="
|
475 |
-
"\"padding:15px;\"><span>We need to update your email template database for "
|
476 |
-
"some improvements. Please take a backup of your databases for your piece of "
|
477 |
-
"mind</span><span class=\"submit\"><a href=\"%s\" class=\"button-primary\" "
|
478 |
-
"style=\"float:right;\">Update</a></span></div>"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: includes/
|
482 |
-
msgid ""
|
483 |
-
"Now that you are all set with the Lite version, you can upgrade to Pro "
|
484 |
-
"version to take your abandoned cart recovery to the next level. You can "
|
485 |
-
"capture customer’s email address when they click Add to Cart, get access to "
|
486 |
-
"11 unique, fully responsive email templates, send text messages for recovery "
|
487 |
-
"& <strong><a target=\"_blank\" href= \""
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: includes/
|
491 |
-
|
492 |
-
msgid ""
|
493 |
-
"Boost your sales by recovering up to 60% of the abandoned carts with our "
|
494 |
-
"Abandoned Cart Pro for WooCommerce plugin. You can capture customer email "
|
495 |
-
"addresses right when they click the Add To Cart button. <strong><a target="
|
496 |
-
"\"_blank\" href= \""
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: includes/
|
500 |
-
msgid ""
|
501 |
-
"Don't loose your sales to abandoned carts. Use our Abandon Cart Pro plugin & "
|
502 |
-
"start recovering your lost sales in less then 60 seconds. <strong><a target="
|
503 |
-
"\"_blank\" href= \""
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: includes/
|
507 |
-
msgid ""
|
508 |
-
"Send Abandoned Cart reminders that actually convert. Take advantage of our "
|
509 |
-
"fully responsive email templates designed specially with an intent to "
|
510 |
-
"trigger conversion. <strong><a target=\"_blank\" href= \""
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/
|
514 |
-
msgid ""
|
515 |
-
"Increase your store sales by recovering your abandoned carts for just $119. "
|
516 |
-
"No profit sharing, no monthly fees. Our Abandoned Cart Pro plugin comes with "
|
517 |
-
"a 30 day money back guarantee as well. :) Use coupon code ACPRO20 & save $24!"
|
518 |
-
"<br>\n"
|
519 |
-
" <strong><a target=\"_blank\" href= \""
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: includes/
|
523 |
-
msgid ""
|
524 |
-
"Reduce cart abandonment rate by 57% with our Order Delivery Date Pro "
|
525 |
-
"WooCommerce plugin. You can Create Delivery Settings by Shipping Zones & "
|
526 |
-
"Shipping Classes. <br>Use discount code \"ORDPRO20\" and grab 20% discount "
|
527 |
-
"on the purchase of the plugin. The discount code is valid only for the first "
|
528 |
-
"20 customers. <strong><a target=\"_blank\" href= \""
|
529 |
msgstr ""
|
530 |
|
531 |
-
|
532 |
-
|
533 |
-
"
|
534 |
-
"using our Product Delivery Date pro for WooCommerce Plugin. <br> \n"
|
535 |
-
" <strong><a target=\"_blank\" href= \""
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/
|
539 |
-
|
540 |
-
msgid ""
|
541 |
-
" Allow your customers to book an appointment or rent an apartment with our "
|
542 |
-
"Booking and Appointment for WooCommerce plugin. You can also sell your "
|
543 |
-
"product as a resource or integrate with a few Vendor plugins. <br>Shop now & "
|
544 |
-
"Save 20% on the plugin with the code \"BKAP20\". Only for first 20 "
|
545 |
-
"customers. <strong><a target=\"_blank\" href= \""
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: includes/
|
549 |
-
msgid ""
|
550 |
-
" Allow your customers to pay deposits on products using our Deposits for "
|
551 |
-
"WooCommerce plugin. <br>\n"
|
552 |
-
" <strong><a target=\"_blank\" href= \""
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: includes/
|
556 |
-
|
557 |
-
msgid "Abandoned & Recovered Carts"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: includes/
|
561 |
-
msgid "
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: includes/
|
565 |
-
|
566 |
-
msgid "
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: includes/
|
570 |
-
|
571 |
-
msgid "Personal data within cart %s has been retained."
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: includes/
|
575 |
-
|
|
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: includes/
|
579 |
-
#: includes/
|
580 |
-
|
|
|
|
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: includes/
|
584 |
-
|
585 |
-
#: includes/classes/class-wcal-abandoned-orders-table.php:100
|
586 |
-
msgid "Abandoned Date"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: includes/
|
590 |
-
|
591 |
-
msgid "Abandoned Cart Status"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: includes/
|
595 |
-
|
596 |
-
msgid "Cart Total"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: includes/
|
600 |
-
|
601 |
-
msgid "Items Present"
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: includes/
|
605 |
-
msgid "
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: includes/
|
609 |
-
|
610 |
-
msgid "Billing Address"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: includes/
|
614 |
-
|
615 |
-
#: includes/classes/class-wcal-abandoned-orders-table.php:97
|
616 |
-
#: includes/classes/class-wcal-recover-orders-table.php:125
|
617 |
-
msgid "Email Address"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: includes/
|
621 |
-
|
622 |
-
msgid "Cart Recovered - Order #"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: includes/
|
626 |
-
|
627 |
-
msgid "Abandoned"
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: includes/
|
631 |
-
|
|
|
|
|
|
|
|
|
632 |
msgstr ""
|
633 |
|
634 |
-
|
635 |
-
|
|
|
636 |
msgstr ""
|
637 |
|
638 |
-
|
639 |
-
|
|
|
640 |
msgstr ""
|
641 |
|
642 |
-
|
643 |
-
|
|
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/classes/class-wcal-
|
647 |
-
|
|
|
648 |
msgstr ""
|
649 |
|
650 |
-
|
651 |
-
|
|
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: includes/classes/class-wcal-
|
655 |
-
|
656 |
-
msgid "Order Total"
|
657 |
msgstr ""
|
658 |
|
659 |
-
|
660 |
-
|
|
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: includes/classes/class-wcal-
|
664 |
-
msgid "
|
665 |
msgstr ""
|
666 |
|
667 |
-
|
668 |
-
#: includes/classes/class-wcal-
|
669 |
-
|
670 |
-
#: includes/classes/class-wcal-templates-table.php:330
|
671 |
-
msgid "Delete"
|
672 |
msgstr ""
|
673 |
|
674 |
-
|
675 |
-
|
|
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: includes/classes/class-wcal-
|
679 |
-
msgid "
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: includes/classes/class-wcal-
|
683 |
-
msgid "
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: includes/classes/class-wcal-
|
687 |
-
msgid "
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: includes/classes/class-wcal-
|
691 |
-
msgid "
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: includes/classes/class-wcal-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
msgid "product_ids"
|
696 |
msgstr ""
|
697 |
|
@@ -727,10 +694,6 @@ msgstr ""
|
|
727 |
msgid "Cart Recovered Date"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: includes/classes/class-wcal-recover-orders-table.php:161
|
731 |
-
msgid "View Details"
|
732 |
-
msgstr ""
|
733 |
-
|
734 |
#: includes/classes/class-wcal-templates-table.php:53
|
735 |
msgid "template_id"
|
736 |
msgstr ""
|
@@ -759,225 +722,483 @@ msgstr ""
|
|
759 |
msgid "Edit"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: includes/classes/class-wcal-templates-table.php:
|
763 |
-
msgid "
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/
|
767 |
-
msgid "
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: includes/component/
|
771 |
-
msgid "
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/component/
|
775 |
-
|
|
|
|
|
|
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/component/
|
779 |
-
msgid "
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/component/
|
783 |
-
msgid "
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: includes/component/
|
787 |
-
msgid "
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: includes/component/
|
791 |
-
msgid "
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: includes/component/
|
795 |
-
msgid "
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: includes/component/
|
799 |
-
msgid "The
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: includes/component/
|
803 |
-
|
|
|
|
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: includes/component/
|
807 |
-
msgid "
|
808 |
msgstr ""
|
809 |
|
810 |
-
#: includes/component/
|
811 |
-
msgid "
|
812 |
msgstr ""
|
813 |
|
814 |
-
#: includes/component/
|
815 |
-
msgid "
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: includes/component/
|
819 |
-
|
820 |
-
"the text of the 'other' reason for deactivating the plugin that is shown in "
|
821 |
-
"the modal box."
|
822 |
-
msgid "Other"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: includes/
|
826 |
-
|
827 |
-
msgid "Frequently Asked Questions for %s"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: includes/
|
831 |
-
msgid "
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: includes/
|
835 |
-
msgid "
|
836 |
msgstr ""
|
837 |
|
838 |
-
|
839 |
-
|
|
|
840 |
msgstr ""
|
841 |
|
842 |
-
|
843 |
-
|
|
|
844 |
msgstr ""
|
845 |
|
846 |
-
|
847 |
-
|
|
|
848 |
msgstr ""
|
849 |
|
850 |
-
|
851 |
-
|
|
|
852 |
msgstr ""
|
853 |
|
854 |
-
|
855 |
-
|
|
|
|
|
|
|
856 |
msgstr ""
|
857 |
|
858 |
-
|
859 |
-
|
860 |
-
msgid "
|
861 |
msgstr ""
|
862 |
|
863 |
-
|
864 |
-
|
|
|
|
|
|
|
865 |
msgstr ""
|
866 |
|
867 |
-
|
868 |
-
|
869 |
-
msgid "
|
870 |
msgstr ""
|
871 |
|
872 |
-
|
873 |
-
|
|
|
|
|
|
|
874 |
msgstr ""
|
875 |
|
876 |
-
#:
|
877 |
-
|
|
|
|
|
878 |
msgstr ""
|
879 |
|
880 |
-
#:
|
881 |
-
|
882 |
-
#: includes/component/welcome-page/templates/welcome/welcome-page.php:86
|
883 |
-
#: includes/component/welcome-page/templates/welcome/welcome-page.php:93
|
884 |
-
msgid "WooCommerce Abandoned Cart Lite"
|
885 |
msgstr ""
|
886 |
|
887 |
-
#:
|
888 |
-
msgid "
|
889 |
msgstr ""
|
890 |
|
891 |
-
#:
|
892 |
-
msgid ""
|
893 |
-
"To start sending out abandoned cart notification emails, simply activate the "
|
894 |
-
"email template from under WooCommerce -> Abandoned Carts -> Email Templates "
|
895 |
-
"page."
|
896 |
msgstr ""
|
897 |
|
898 |
-
#:
|
899 |
-
msgid "
|
900 |
msgstr ""
|
901 |
|
902 |
-
#:
|
903 |
-
msgid "
|
904 |
msgstr ""
|
905 |
|
906 |
-
#:
|
907 |
-
msgid ""
|
908 |
-
"The Abandoned Cart Pro plugin gives you features where you are able to "
|
909 |
-
"recover more sales compared to the Lite plugin. Here are some notable "
|
910 |
-
"features the Pro version provides."
|
911 |
msgstr ""
|
912 |
|
913 |
-
#:
|
914 |
-
msgid "
|
915 |
msgstr ""
|
916 |
|
917 |
-
#:
|
918 |
-
msgid ""
|
919 |
-
"The ability to capture the email address early in the order process is very "
|
920 |
-
"important to reduce cart abandonment by unknown users as well as to be able "
|
921 |
-
"to recover their carts if they abandon it. This ultimately leads to increase "
|
922 |
-
"in your store sales."
|
923 |
msgstr ""
|
924 |
|
925 |
-
#:
|
926 |
-
|
927 |
-
#: includes/component/welcome-page/templates/welcome/welcome-page.php:101
|
928 |
-
msgid "Learn More"
|
929 |
msgstr ""
|
930 |
|
931 |
-
#:
|
932 |
-
msgid "
|
933 |
msgstr ""
|
934 |
|
935 |
-
#:
|
936 |
-
msgid ""
|
937 |
-
"The provision for setting two separate cut-off times for different roles is "
|
938 |
-
"mainly because sometimes if the store admin wants the visitor carts to be "
|
939 |
-
"captured earlier than the registered user carts, then these different "
|
940 |
-
"settings can play an important role."
|
941 |
msgstr ""
|
942 |
|
943 |
-
#:
|
944 |
-
msgid "
|
945 |
msgstr ""
|
946 |
|
947 |
-
#:
|
948 |
-
msgid ""
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
"
|
953 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
954 |
msgstr ""
|
955 |
|
956 |
-
#:
|
957 |
-
msgid "
|
|
|
|
|
|
|
|
|
958 |
msgstr ""
|
959 |
|
960 |
-
#:
|
961 |
-
msgid "
|
962 |
msgstr ""
|
963 |
|
964 |
-
#:
|
965 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
msgstr ""
|
967 |
|
968 |
-
#:
|
969 |
-
msgid "
|
970 |
msgstr ""
|
971 |
|
972 |
-
#:
|
973 |
-
msgid "
|
974 |
msgstr ""
|
975 |
|
976 |
-
#:
|
977 |
-
|
|
|
978 |
msgstr ""
|
979 |
|
980 |
-
#:
|
981 |
-
#:
|
982 |
-
msgid "
|
983 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 Tyche Softwares
|
2 |
+
# This file is distributed under the same license as the Abandoned Cart Lite for WooCommerce plugin.
|
|
|
|
|
|
|
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Abandoned Cart Lite for WooCommerce 5.7.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-abandoned-cart\n"
|
|
|
|
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2020-06-18T06:05:39+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
+
"X-Domain: woocommerce-abandoned-cart\n"
|
16 |
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
msgid "Abandoned Cart Lite for WooCommerce"
|
19 |
msgstr ""
|
20 |
|
21 |
+
#. Plugin URI of the plugin
|
22 |
+
msgid "http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#. Description of the plugin
|
26 |
+
msgid "This plugin captures abandoned carts by logged-in users & emails them about it."
|
27 |
msgstr ""
|
28 |
|
29 |
+
#. Author of the plugin
|
30 |
+
msgid "Tyche Softwares"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#. Author URI of the plugin
|
34 |
+
msgid "http://www.tychesoftwares.com/"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: cron/wcal_send_email.php:95
|
38 |
+
msgid "Abandoned cart reminder"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: cron/wcal_send_email.php:277
|
42 |
+
#: woocommerce-ac.php:2628
|
43 |
+
#: woocommerce-ac.php:3347
|
44 |
+
#: woocommerce-ac.php:3382
|
45 |
+
msgid "Quantity"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: cron/wcal_send_email.php:278
|
49 |
+
#: woocommerce-ac.php:3348
|
50 |
+
#: woocommerce-ac.php:3383
|
51 |
+
msgid "Price"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: cron/wcal_send_email.php:279
|
55 |
+
#: woocommerce-ac.php:2629
|
56 |
+
#: woocommerce-ac.php:3349
|
57 |
+
#: woocommerce-ac.php:3384
|
58 |
+
msgid "Line Subtotal"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: cron/wcal_send_email.php:283
|
62 |
+
#: cron/wcal_send_email.php:293
|
63 |
+
#: woocommerce-ac.php:3343
|
64 |
+
#: woocommerce-ac.php:3377
|
65 |
+
msgid "Your Shopping Cart"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: cron/wcal_send_email.php:285
|
69 |
+
#: cron/wcal_send_email.php:295
|
70 |
+
#: woocommerce-ac.php:2626
|
71 |
+
#: woocommerce-ac.php:3345
|
72 |
+
#: woocommerce-ac.php:3380
|
73 |
+
msgid "Item"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: cron/wcal_send_email.php:286
|
77 |
+
#: cron/wcal_send_email.php:296
|
78 |
+
#: woocommerce-ac.php:2627
|
79 |
+
#: woocommerce-ac.php:3346
|
80 |
+
#: woocommerce-ac.php:3381
|
81 |
+
msgid "Name"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: cron/wcal_send_email.php:387
|
85 |
+
#: woocommerce-ac.php:3369
|
86 |
+
#: woocommerce-ac.php:3404
|
87 |
+
msgid "Cart Total:"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: cron/wcal_send_email.php:399
|
91 |
+
msgid "Product no longer exists"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: cron/wcal_send_email.php:587
|
95 |
+
#: cron/wcal_send_email.php:654
|
96 |
+
#: includes/frontend/wcal_checkout_process.php:198
|
97 |
+
#: includes/frontend/wcal_checkout_process.php:493
|
98 |
+
msgid "This order was abandoned & subsequently recovered."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#. translators: Cart ID.
|
102 |
+
#: includes/admin/class-wcal-abandoned-cart-details.php:437
|
103 |
+
msgid "Cart #%s"
|
|
|
|
|
|
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/admin/wcal_privacy_erase.php:41
|
107 |
+
#: includes/admin/wcal_privacy_export.php:41
|
108 |
+
msgid "Abandoned & Recovered Carts"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: includes/admin/wcal_privacy_erase.php:90
|
112 |
+
msgid "No personal data found for any abandoned carts."
|
|
|
|
|
|
|
|
|
113 |
msgstr ""
|
114 |
|
115 |
+
#. Translators: %s Abandoned Cart ID.
|
116 |
+
#: includes/admin/wcal_privacy_erase.php:123
|
117 |
+
msgid "Removed personal data from cart %s."
|
118 |
msgstr ""
|
119 |
|
120 |
+
#. Translators: %s Abandoned Cart ID.
|
121 |
+
#: includes/admin/wcal_privacy_erase.php:127
|
122 |
+
msgid "Personal data within cart %s has been retained."
|
|
|
|
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/admin/wcal_privacy_erase.php:204
|
126 |
+
msgid "ANONYMIZED"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/admin/wcal_privacy_export.php:123
|
130 |
+
#: woocommerce-ac.php:1100
|
131 |
+
msgid "Abandoned Carts"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/admin/wcal_privacy_export.php:167
|
135 |
+
#: includes/admin/wcal_privacy_export.php:179
|
136 |
+
msgid "Abandoned Cart ID"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: includes/admin/wcal_privacy_export.php:168
|
140 |
+
#: includes/admin/wcal_privacy_export.php:180
|
141 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:100
|
142 |
+
msgid "Abandoned Date"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: includes/admin/wcal_privacy_export.php:169
|
146 |
+
#: includes/admin/wcal_privacy_export.php:181
|
147 |
+
msgid "Abandoned Cart Status"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/admin/wcal_privacy_export.php:170
|
151 |
+
#: includes/admin/wcal_privacy_export.php:182
|
152 |
+
msgid "Cart Total"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: includes/admin/wcal_privacy_export.php:171
|
156 |
+
#: includes/admin/wcal_privacy_export.php:183
|
157 |
+
msgid "Items Present"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/admin/wcal_privacy_export.php:172
|
161 |
+
msgid "Session ID"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/admin/wcal_privacy_export.php:173
|
165 |
+
#: includes/admin/wcal_privacy_export.php:184
|
166 |
+
msgid "Billing Address"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/admin/wcal_privacy_export.php:174
|
170 |
+
#: includes/admin/wcal_privacy_export.php:185
|
171 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:97
|
172 |
+
#: includes/classes/class-wcal-recover-orders-table.php:125
|
173 |
+
msgid "Email Address"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/admin/wcal_privacy_export.php:215
|
177 |
+
#: includes/admin/wcal_privacy_export.php:218
|
178 |
+
msgid "Cart Recovered - Order #"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: includes/admin/wcal_privacy_export.php:215
|
182 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:374
|
183 |
+
msgid "Abandoned"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/admin/wcal_privacy_export.php:218
|
187 |
+
msgid "Abandoned but new cart created"
|
|
|
|
|
|
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/admin/wcal_privacy_export.php:221
|
191 |
+
msgid "Abandoned - Unpaid Order #"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:143
|
195 |
+
msgid "Enable Add to cart popup modal"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:200
|
199 |
+
msgid "Custom pages to display the pop-up modal on"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:216
|
203 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:259
|
204 |
+
msgid "Search for a Page…"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:267
|
208 |
+
msgid "Please add any custom pages (not created by WooCommerce) where you wish to display the Add to cart Pop-up Modal."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:279
|
212 |
+
msgid "<b>Note:</b> Please ensure that the Add to Cart button links on these pages are added with the correct classes and attributes to ensure the plugin can capture the cart data correctly. For further guidance, please check the documentation."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:387
|
216 |
+
msgid "Please enter your email address"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:440
|
220 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:721
|
221 |
+
msgid "To add this item to your cart, please enter your email address."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:493
|
225 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:733
|
226 |
+
msgid "Email address"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:534
|
230 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:741
|
231 |
+
msgid "Add to Cart"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:660
|
235 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:749
|
236 |
+
msgid "No Thanks"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: includes/admin/wcap_add_cart_popup_modal.php:719
|
240 |
+
msgid "Please enter your email address."
|
|
|
|
|
241 |
msgstr ""
|
242 |
|
243 |
+
#. translators: %s Purchase Link
|
244 |
+
#: includes/admin/wcap_pro_settings.php:66
|
245 |
+
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature."
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: includes/admin/wcap_pro_settings.php:95
|
249 |
+
#: includes/admin/wcap_pro_settings.php:395
|
250 |
+
#: woocommerce-ac.php:3125
|
251 |
+
msgid "Save Changes"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/admin/wcap_pro_settings.php:118
|
255 |
+
msgid "Cart abandoned cut-off time for guest users"
|
|
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/admin/wcap_pro_settings.php:126
|
259 |
+
msgid "For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed."
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/admin/wcap_pro_settings.php:136
|
263 |
+
msgid "Do not track carts of guest users"
|
|
|
|
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/admin/wcap_pro_settings.php:144
|
267 |
+
msgid "Abandoned carts of guest users will not be tracked."
|
|
|
|
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/admin/wcap_pro_settings.php:154
|
271 |
+
msgid "Do not track carts of logged-in users"
|
|
|
|
|
|
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: includes/admin/wcap_pro_settings.php:162
|
275 |
+
msgid "Abandoned carts of logged-in users will not be tracked."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: includes/admin/wcap_pro_settings.php:172
|
279 |
+
msgid "Capture Email address from URL"
|
|
|
|
|
|
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/admin/wcap_pro_settings.php:180
|
283 |
+
msgid "If your site URL contain the same key, then it will capture it as an email address of customer."
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: includes/admin/wcap_pro_settings.php:238
|
287 |
+
msgid "Product Image( H x W )"
|
|
|
|
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: includes/admin/wcap_pro_settings.php:246
|
291 |
+
msgid "This setting affects the dimension of the product image in the abandoned cart reminder email."
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: includes/admin/wcap_pro_settings.php:266
|
295 |
+
msgid "Setting for sending Emails & SMS using Action Scheduler"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: includes/admin/wcap_pro_settings.php:280
|
299 |
+
msgid "Send Abandoned cart emails automatically using Action Scheduler"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: includes/admin/wcap_pro_settings.php:288
|
303 |
+
msgid "Enabling this setting will send the abandoned cart reminder emails to the customer after the set time. If disabled, abandoned cart reminder emails will not be sent using the Action Scheduler. You will need to set cron job manually from cPanel. If you are unsure how to set the cron job, please <a href= mailto:support@tychesoftwares.com>contact us</a> for it."
|
|
|
|
|
|
|
|
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: includes/admin/wcap_pro_settings.php:298
|
307 |
+
msgid "Run automated Scheduler every X minutes"
|
|
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/admin/wcap_pro_settings.php:306
|
311 |
+
msgid "The duration in minutes after which an action should be automatically scheduled to send email, SMS & FB reminders to customers."
|
|
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/admin/wcap_pro_settings.php:316
|
315 |
+
msgid "Rules to exclude capturing abandoned carts"
|
|
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: includes/admin/wcap_pro_settings.php:330
|
319 |
+
msgid "Do not capture abandoned carts for these IP addresses"
|
|
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: includes/admin/wcap_pro_settings.php:338
|
323 |
+
msgid "The carts abandoned from these IP addresses will not be tracked by the plugin. Accepts wildcards, e.g <code>192.168.*</code> will block all IP addresses which starts from \"192.168\". <i>Separate IP addresses with commas.</i>"
|
|
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: includes/admin/wcap_pro_settings.php:348
|
327 |
+
msgid "Do not capture abandoned carts for these email addresses"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: includes/admin/wcap_pro_settings.php:356
|
331 |
+
msgid "The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: includes/admin/wcap_pro_settings.php:366
|
335 |
+
msgid "Do not capture abandoned carts for email addresses from these domains"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: includes/admin/wcap_pro_settings.php:374
|
339 |
+
msgid "The carts abandoned from email addresses with these domains will not be tracked by the plugin. <i>Separate email address domains with commas.</i>"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: includes/admin/wcap_pro_settings.php:403
|
343 |
+
msgid "Send Test SMS"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: includes/admin/wcap_pro_settings.php:411
|
347 |
+
msgid "Recipient"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: includes/admin/wcap_pro_settings.php:417
|
351 |
+
msgid "Must be a valid phone number in E.164 format."
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: includes/admin/wcap_pro_settings.php:425
|
355 |
+
msgid "Message"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: includes/admin/wcap_pro_settings.php:427
|
359 |
+
msgid "Hello World!"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: includes/admin/wcap_pro_settings.php:463
|
363 |
+
msgid "Twilio"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/admin/wcap_pro_settings.php:477
|
367 |
+
msgid "Enable SMS"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/admin/wcap_pro_settings.php:485
|
371 |
+
msgid "<i>Enable the ability to send reminder SMS for abandoned carts.</i>"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: includes/admin/wcap_pro_settings.php:495
|
375 |
+
msgid "From"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: includes/admin/wcap_pro_settings.php:503
|
379 |
+
msgid "<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: includes/admin/wcap_pro_settings.php:513
|
383 |
+
msgid "Account SID"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: includes/admin/wcap_pro_settings.php:531
|
387 |
+
msgid "Auth Token"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: includes/admin/wcap_pro_settings.php:591
|
391 |
+
msgid "Facebook Messenger Settings"
|
|
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/admin/wcap_pro_settings.php:605
|
395 |
+
msgid "Enable Facebook Messenger Reminders"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: includes/admin/wcap_pro_settings.php:613
|
399 |
+
msgid "<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>"
|
|
|
|
|
|
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: includes/admin/wcap_pro_settings.php:623
|
403 |
+
msgid "Facebook Messenger on Add to Cart Pop-up modal"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: includes/admin/wcap_pro_settings.php:631
|
407 |
+
msgid "<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: includes/admin/wcap_pro_settings.php:641
|
411 |
+
msgid "Icon size of user"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: includes/admin/wcap_pro_settings.php:651
|
415 |
+
msgid "<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: includes/admin/wcap_pro_settings.php:657
|
419 |
+
msgid "Small"
|
|
|
|
|
|
|
|
|
|
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/admin/wcap_pro_settings.php:659
|
423 |
+
msgid "Medium"
|
|
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: includes/admin/wcap_pro_settings.php:661
|
427 |
+
msgid "Large"
|
|
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: includes/admin/wcap_pro_settings.php:663
|
431 |
+
msgid "Standard"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: includes/admin/wcap_pro_settings.php:665
|
435 |
+
msgid "Extra Large"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: includes/admin/wcap_pro_settings.php:679
|
439 |
+
msgid "Consent text"
|
|
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: includes/admin/wcap_pro_settings.php:687
|
443 |
+
msgid "<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: includes/admin/wcap_pro_settings.php:697
|
447 |
+
msgid "Facebook Page ID"
|
|
|
|
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: includes/admin/wcap_pro_settings.php:705
|
451 |
+
msgid "<i>Facebook Page ID in numberic format. You can find your page ID from <a href='https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger#fbpageid' target='_blank'>here</a></i>"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: includes/admin/wcap_pro_settings.php:715
|
455 |
+
msgid "Messenger App ID"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: includes/admin/wcap_pro_settings.php:723
|
459 |
+
msgid "<i>Enter your Messenger App ID</i>"
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: includes/admin/wcap_pro_settings.php:733
|
463 |
+
msgid "Facebook Page Token"
|
|
|
|
|
|
|
|
|
|
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: includes/admin/wcap_pro_settings.php:741
|
467 |
+
msgid "<i>Enter your Facebook Page Token</i>"
|
|
|
|
|
|
|
|
|
|
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: includes/admin/wcap_pro_settings.php:751
|
471 |
+
msgid "Verify Token"
|
|
|
|
|
|
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: includes/admin/wcap_pro_settings.php:759
|
475 |
+
msgid "<i>Enter your Verify Token</i>"
|
|
|
|
|
|
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/admin/wcap_pro_settings_callbacks.php:45
|
479 |
+
msgid "Configure your Twilio account settings below. Please note that due to some restrictions from Twilio, customers <i>may sometimes</i> receive delayed messages"
|
|
|
|
|
|
|
|
|
|
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/admin/wcap_pro_settings_callbacks.php:183
|
483 |
+
msgid "Configure the plugin to send notifications to Facebook Messenger using the settings below. Please refer the <a href=\"https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger\" target=\"_blank\">following documentation</a> to complete the setup."
|
|
|
|
|
|
|
|
|
|
|
484 |
msgstr ""
|
485 |
|
486 |
+
#. translators: %s Link to Email Templates page
|
487 |
+
#: includes/class-wcal-admin-notice.php:59
|
488 |
+
msgid "<div id=\"wcal_update\" class=\"updated woocommerce-message\" style=\"padding:15px;\"><span>We need to update your email template database for some improvements. Please take a backup of your databases for your piece of mind</span><span class=\"submit\"><a href=\"%s\" class=\"button-primary\" style=\"float:right;\">Update</a></span></div>"
|
|
|
|
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:52
|
492 |
+
msgid "abandoned_order_id"
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:53
|
496 |
+
msgid "abandoned_order_ids"
|
|
|
|
|
|
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:96
|
500 |
+
msgid "Id"
|
|
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:98
|
504 |
+
msgid "Customer"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:99
|
508 |
+
#: includes/classes/class-wcal-recover-orders-table.php:128
|
509 |
+
msgid "Order Total"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:101
|
513 |
+
msgid "Status of Cart"
|
|
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:159
|
517 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:526
|
518 |
+
msgid "View order"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:160
|
522 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:566
|
523 |
+
#: includes/classes/class-wcal-templates-table.php:145
|
524 |
+
#: includes/classes/class-wcal-templates-table.php:332
|
525 |
+
msgid "Delete"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:292
|
529 |
+
msgid "User Deleted"
|
|
|
|
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:366
|
533 |
+
msgid "item"
|
|
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:368
|
537 |
+
msgid "items"
|
|
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:372
|
541 |
+
msgid "Unsubscribed"
|
|
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:567
|
545 |
+
msgid "Delete All Registered User Carts"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:568
|
549 |
+
msgid "Delete All Guest User Carts"
|
|
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:569
|
553 |
+
msgid "Delete All Visitor Carts"
|
|
|
|
|
|
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: includes/classes/class-wcal-abandoned-orders-table.php:570
|
557 |
+
msgid "Delete All Carts"
|
|
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: includes/classes/class-wcal-dashboard-report.php:102
|
561 |
+
msgid "Recovered Amount"
|
|
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: includes/classes/class-wcal-dashboard-report.php:107
|
565 |
+
#: includes/classes/class-wcal-dashboard-report.php:156
|
566 |
+
#: includes/classes/class-wcal-dashboard-report.php:191
|
567 |
+
#: includes/classes/class-wcal-dashboard-report.php:226
|
568 |
+
#: includes/classes/class-wcal-recover-orders-table.php:161
|
569 |
+
msgid "View Details"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#. translators: Count of carts recovered.
|
573 |
+
#: includes/classes/class-wcal-dashboard-report.php:118
|
574 |
+
msgid "<strong>%s</strong> Recovered Orders"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#. translators: recovered percent of carts.
|
578 |
+
#: includes/classes/class-wcal-dashboard-report.php:125
|
579 |
+
msgid "<strong>%s%%</strong> of Abandoned Carts Recovered"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#. translators: Percent of sales.
|
583 |
+
#: includes/classes/class-wcal-dashboard-report.php:132
|
584 |
+
msgid "<strong>%s%%</strong> of Total Revenue"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: includes/classes/class-wcal-dashboard-report.php:151
|
588 |
+
#: woocommerce-ac.php:1806
|
589 |
+
msgid "Abandoned Orders"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#. translators: Abandoned Orders amount.
|
593 |
+
#: includes/classes/class-wcal-dashboard-report.php:167
|
594 |
+
msgid "%s amount of Abandoned Orders"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: includes/classes/class-wcal-dashboard-report.php:186
|
598 |
+
msgid "Number of Emails Sent"
|
|
|
599 |
msgstr ""
|
600 |
|
601 |
+
#. translators: Link to Purchase the Pro version of the plugin.
|
602 |
+
#: includes/classes/class-wcal-dashboard-report.php:202
|
603 |
+
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to view the number of emails opened and links clicked."
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: includes/classes/class-wcal-dashboard-report.php:221
|
607 |
+
msgid "Emails Captured"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#. translators: Number of guest emails captured.
|
611 |
+
#: includes/classes/class-wcal-dashboard-report.php:237
|
612 |
+
msgid "%s Guest emails captured."
|
|
|
|
|
613 |
msgstr ""
|
614 |
|
615 |
+
#. translators: Link to Purchase the Pro version.
|
616 |
+
#: includes/classes/class-wcal-dashboard-report.php:243
|
617 |
+
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to capture more guest carts."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/classes/class-wcal-dashboard-report.php:270
|
621 |
+
msgid "This Month"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: includes/classes/class-wcal-dashboard-report.php:271
|
625 |
+
msgid "Last Month"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: includes/classes/class-wcal-dashboard-report.php:272
|
629 |
+
msgid "This Quarter"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: includes/classes/class-wcal-dashboard-report.php:273
|
633 |
+
msgid "Last Quarter"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: includes/classes/class-wcal-dashboard-report.php:274
|
637 |
+
msgid "This Year"
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: includes/classes/class-wcal-dashboard-report.php:275
|
641 |
+
msgid "Last Year"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: includes/classes/class-wcal-dashboard-report.php:276
|
645 |
+
msgid "Custom"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/classes/class-wcal-dashboard-report.php:291
|
649 |
+
msgid "Select date range:"
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: includes/classes/class-wcal-dashboard-report.php:311
|
653 |
+
#: woocommerce-ac.php:2589
|
654 |
+
msgid "Go"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: includes/classes/class-wcal-product-report-table.php:58
|
658 |
+
msgid "product_id"
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: includes/classes/class-wcal-product-report-table.php:59
|
662 |
msgid "product_ids"
|
663 |
msgstr ""
|
664 |
|
694 |
msgid "Cart Recovered Date"
|
695 |
msgstr ""
|
696 |
|
|
|
|
|
|
|
|
|
697 |
#: includes/classes/class-wcal-templates-table.php:53
|
698 |
msgid "template_id"
|
699 |
msgstr ""
|
722 |
msgid "Edit"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: includes/classes/class-wcal-templates-table.php:306
|
726 |
+
msgid "on"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: includes/classes/class-wcal-templates-table.php:309
|
730 |
+
msgid "off"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:30
|
734 |
+
msgid "Get Started with Abandoned Cart Lite"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:34
|
738 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:59
|
739 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:86
|
740 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:93
|
741 |
+
msgid "WooCommerce Abandoned Cart Lite"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:38
|
745 |
+
msgid "Activate Email Template"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:40
|
749 |
+
msgid "To start sending out abandoned cart notification emails, simply activate the email template from under WooCommerce -> Abandoned Carts -> Email Templates page."
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:42
|
753 |
+
msgid "Click Here to go to Email Templates page"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:52
|
757 |
+
msgid "Know more about Abandoned Cart Pro"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:63
|
761 |
+
msgid "Capture Visitor Emails on click of Add to Cart button"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:65
|
765 |
+
msgid "The ability to capture the email address early in the order process is very important to reduce cart abandonment by unknown users as well as to be able to recover their carts if they abandon it. This ultimately leads to increase in your store sales."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:67
|
769 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:80
|
770 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:101
|
771 |
+
msgid "Learn More"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:76
|
775 |
+
msgid "Set different cut-off times for visitors & logged-in users"
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:78
|
779 |
+
msgid "The provision for setting two separate cut-off times for different roles is mainly because sometimes if the store admin wants the visitor carts to be captured earlier than the registered user carts, then these different settings can play an important role."
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:97
|
783 |
+
msgid "Send abandoned cart recovery email in minutes of cart being abandoned"
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: includes/component/welcome-page/templates/welcome/welcome-page.php:99
|
787 |
+
msgid "The ability to send the abandoned cart recovery email within first few minutes of cart being abandoned is a big advantage. In the Lite plugin, the earliest an email can be sent is after 1 hour. Whereas in the Pro version, the first recovery email gets sent 15 minutes after the cart is abandoned. This increases the recovery chances manifold."
|
|
|
|
|
|
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: includes/wcal-common.php:674
|
791 |
+
msgid "Database Updated Successfully"
|
|
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: includes/wcal-common.php:689
|
795 |
+
msgid "Database Update Failed. Please try again after sometime"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: includes/wcal-common.php:849
|
799 |
+
msgid "This product no longer exists"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#. translators: %1$s Link to Differences article, %2$s link to pro version
|
803 |
+
#: includes/wcal_all_component.php:89
|
804 |
+
msgid "Now that you are all set with the Lite version, you can upgrade to Pro version to take your abandoned cart recovery to the next level. You can capture customer’s email address when they click Add to Cart, get access to 11 unique, fully responsive email templates, send text messages for recovery & <strong><a target=\"_blank\" href= \"%1$s\">much more</a></strong>. <strong><a target=\"_blank\" href= \"%2$s\">Purchase now</a></strong>."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#. translators: %s Link to Abandoned Cart Pro
|
808 |
+
#: includes/wcal_all_component.php:93
|
809 |
+
msgid "Boost your sales by recovering up to 60% of the abandoned carts with our Abandoned Cart Pro for WooCommerce plugin. You can capture customer email addresses right when they click the Add To Cart button. <strong><a target=\"_blank\" href= \"%s\"> Grab your copy of Abandon Cart Pro plugin now!</a></strong>"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#. translators: %s Link to Abandoned Cart Pro
|
813 |
+
#: includes/wcal_all_component.php:97
|
814 |
+
msgid "Don't loose your sales to abandoned carts. Use our Abandon Cart Pro plugin & start recovering your lost sales in less then 60 seconds. <strong><a target=\"_blank\" href= \"%s\">Grab it now!</a></strong>."
|
815 |
msgstr ""
|
816 |
|
817 |
+
#. translators: %s Link to Abandoned Cart Pro
|
818 |
+
#: includes/wcal_all_component.php:101
|
819 |
+
msgid "Send Abandoned Cart reminders that actually convert. Take advantage of our fully responsive email templates designed specially with an intent to trigger conversion. <strong><a target=\"_blank\" href= \"%s\">Purchase now</a></strong>."
|
820 |
msgstr ""
|
821 |
|
822 |
+
#. translators: %s Link to Abandoned Cart Pro
|
823 |
+
#: includes/wcal_all_component.php:105
|
824 |
+
msgid ""
|
825 |
+
"Increase your store sales by recovering your abandoned carts for just $119. No profit sharing, no monthly fees. Our Abandoned Cart Pro plugin comes with a 30 day money back guarantee as well. :) Use coupon code ACPRO20 & save $24!<br>\r\n"
|
826 |
+
" <strong><a target=\"_blank\" href= \"%s\">Grab your copy now!</a></strong>"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#. translators: %s Link to Order Delivery Date Pro
|
830 |
+
#: includes/wcal_all_component.php:110
|
831 |
+
msgid "Reduce cart abandonment rate by 57% with our Order Delivery Date Pro WooCommerce plugin. You can Create Delivery Settings by Shipping Zones & Shipping Classes. <br>Use discount code \"ORDPRO20\" and grab 20% discount on the purchase of the plugin. The discount code is valid only for the first 20 customers. <strong><a target=\"_blank\" href= \"%s\">Purchase now</a></strong>"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#. translators: %s Link to Order Delivery Date Pro
|
835 |
+
#: includes/wcal_all_component.php:114
|
836 |
+
msgid ""
|
837 |
+
"Allow your customers to select the Delivery Date on Single Product Page using our Product Delivery Date pro for WooCommerce Plugin. <br>\r\n"
|
838 |
+
" <strong><a target=\"_blank\" href= \"%s\">Shop now</a></strong> & be one of the 20 customers to get 20% discount on the plugin price. Use the code \"PRDPRO20\". Hurry!!"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#. translators: %s Link to WooCommerce Booking Plugin
|
842 |
+
#: includes/wcal_all_component.php:119
|
843 |
+
msgid "Allow your customers to book an appointment or rent an apartment with our Booking and Appointment for WooCommerce plugin. You can also sell your product as a resource or integrate with a few Vendor plugins. <br>Shop now & Save 20% on the plugin with the code \"BKAP20\". Only for first 20 customers. <strong><a target=\"_blank\" href= \"%s\">Have it now!</a></strong>"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#. translators: %s Link to Deposits for WooCommerce
|
847 |
+
#: includes/wcal_all_component.php:123
|
848 |
+
msgid ""
|
849 |
+
" Allow your customers to pay deposits on products using our Deposits for WooCommerce plugin. <br>\r\n"
|
850 |
+
" <strong><a target=\"_blank\" href= \"%s\">Purchase now</a></strong> & Grab 20% discount with the code \"DFWP20\". The discount code is valid only for the first 20 customers."
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: woocommerce-ac.php:222
|
854 |
+
#: woocommerce-ac.php:635
|
855 |
+
#: woocommerce-ac.php:1808
|
856 |
+
msgid "Settings"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: woocommerce-ac.php:249
|
860 |
+
msgid "Emails are not being sent to customers."
|
|
|
|
|
|
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: woocommerce-ac.php:255
|
864 |
+
msgid "Capturing of cart and other information was not satisfactory."
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: woocommerce-ac.php:261
|
868 |
+
msgid "I cannot see abandoned cart reminder emails records."
|
|
|
|
|
|
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: woocommerce-ac.php:267
|
872 |
+
msgid "I want to upgrade the plugin to the PRO version."
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: woocommerce-ac.php:371
|
876 |
+
msgid "HTML Email Template"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: woocommerce-ac.php:377
|
880 |
+
msgid "Abandoned cart Email Template"
|
|
|
|
|
|
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: woocommerce-ac.php:642
|
884 |
+
msgid "Enable abandoned cart emails"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: woocommerce-ac.php:646
|
888 |
+
msgid "Yes, enable the abandoned cart emails."
|
|
|
|
|
|
|
|
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: woocommerce-ac.php:651
|
892 |
+
msgid "Cart abandoned cut-off time"
|
|
|
|
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: woocommerce-ac.php:655
|
896 |
+
msgid "Consider cart abandoned after X minutes of item being added to cart & order not placed."
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: woocommerce-ac.php:660
|
900 |
+
msgid "Automatically Delete Abandoned Orders after X days"
|
|
|
|
|
|
|
|
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: woocommerce-ac.php:664
|
904 |
+
msgid "Automatically delete abandoned cart orders after X days."
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: woocommerce-ac.php:670
|
908 |
+
msgid "Email admin On Order Recovery"
|
909 |
+
msgstr ""
|
910 |
+
|
911 |
+
#: woocommerce-ac.php:674
|
912 |
+
msgid "Sends email to Admin if an Abandoned Cart Order is recovered."
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: woocommerce-ac.php:680
|
916 |
+
msgid "Start tracking from Cart Page"
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: woocommerce-ac.php:684
|
920 |
+
msgid "Enable tracking of abandoned products & carts even if customer does not visit the checkout page or does not enter any details on the checkout page like Name or Email. Tracking will begin as soon as a visitor adds a product to their cart and visits the cart page."
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: woocommerce-ac.php:689
|
924 |
+
msgid "Message to be displayed for Guest users when tracking their carts"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: woocommerce-ac.php:693
|
928 |
+
msgid "<br>In compliance with GDPR, add a message on the Checkout page to inform Guest users of how their data is being used.<br><i>For example: Your email address will help us support your shopping experience throughout the site. Please check our Privacy Policy to see how we use your personal data.</i>"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: woocommerce-ac.php:698
|
932 |
+
msgid "Message to be displayed for registered users when tracking their carts."
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: woocommerce-ac.php:702
|
936 |
+
msgid "<br>In compliance with GDPR, add a message on the Shop & Product pages to inform Registered users of how their data is being used.<br><i>For example: Please check our Privacy Policy to see how we use your personal data.</i>"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: woocommerce-ac.php:707
|
940 |
+
msgid "Allow the visitor to opt out of cart tracking."
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: woocommerce-ac.php:711
|
944 |
+
msgid "<br>In compliance with GDPR, allow the site visitor (guests & registered users) to opt out from cart tracking. This message will be displayed in conjunction with the GDPR message above.</i>"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: woocommerce-ac.php:716
|
948 |
+
msgid "Message to be displayed when the user chooses to opt out of cart tracking."
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: woocommerce-ac.php:720
|
952 |
+
msgid "<br>Message to be displayed when the user chooses to opt out of cart tracking.</i>"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: woocommerce-ac.php:730
|
956 |
+
msgid "Settings for abandoned cart recovery emails"
|
957 |
+
msgstr ""
|
958 |
+
|
959 |
+
#: woocommerce-ac.php:737
|
960 |
+
msgid "\"From\" Name"
|
961 |
+
msgstr ""
|
962 |
+
|
963 |
+
#: woocommerce-ac.php:746
|
964 |
+
msgid "\"From\" Address"
|
965 |
+
msgstr ""
|
966 |
+
|
967 |
+
#: woocommerce-ac.php:755
|
968 |
+
msgid "Send Reply Emails to"
|
969 |
+
msgstr ""
|
970 |
+
|
971 |
+
#: woocommerce-ac.php:880
|
972 |
+
msgid "Abandoned cart cut off time should be numeric and has to be greater than 0."
|
973 |
+
msgstr ""
|
974 |
+
|
975 |
+
#: woocommerce-ac.php:896
|
976 |
+
msgid "Automatically Delete Abandoned Orders after X days has to be greater than 0."
|
977 |
+
msgstr ""
|
978 |
+
|
979 |
+
#: woocommerce-ac.php:1805
|
980 |
+
msgid "Dashboard"
|
981 |
+
msgstr ""
|
982 |
+
|
983 |
+
#: woocommerce-ac.php:1807
|
984 |
+
msgid "Email Templates"
|
985 |
+
msgstr ""
|
986 |
+
|
987 |
+
#: woocommerce-ac.php:1809
|
988 |
+
msgid "Recovered Orders"
|
989 |
+
msgstr ""
|
990 |
+
|
991 |
+
#: woocommerce-ac.php:1810
|
992 |
+
msgid "Product Report"
|
993 |
+
msgstr ""
|
994 |
+
|
995 |
+
#: woocommerce-ac.php:2020
|
996 |
+
msgid "You do not have sufficient permissions to access this page."
|
997 |
+
msgstr ""
|
998 |
+
|
999 |
+
#: woocommerce-ac.php:2024
|
1000 |
+
msgid "WooCommerce - Abandon Cart Lite"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: woocommerce-ac.php:2105
|
1004 |
+
msgid "The Abandoned cart has been successfully deleted."
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: woocommerce-ac.php:2107
|
1008 |
+
msgid "All Abandoned Carts have been successfully deleted."
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: woocommerce-ac.php:2109
|
1012 |
+
msgid "All Visitor carts have been successfully deleted."
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: woocommerce-ac.php:2111
|
1016 |
+
msgid "All Guest carts have been successfully deleted."
|
1017 |
+
msgstr ""
|
1018 |
+
|
1019 |
+
#: woocommerce-ac.php:2113
|
1020 |
+
msgid "All Registered carts have been deleted."
|
1021 |
+
msgstr ""
|
1022 |
+
|
1023 |
+
#: woocommerce-ac.php:2124
|
1024 |
+
msgid "The Template has been successfully deleted."
|
1025 |
+
msgstr ""
|
1026 |
+
|
1027 |
+
#: woocommerce-ac.php:2130
|
1028 |
+
msgid "Change settings for sending email notifications to Customers, to Admin etc."
|
1029 |
+
msgstr ""
|
1030 |
+
|
1031 |
+
#: woocommerce-ac.php:2168
|
1032 |
+
msgid "General Settings"
|
1033 |
+
msgstr ""
|
1034 |
+
|
1035 |
+
#: woocommerce-ac.php:2171
|
1036 |
+
msgid "Email Sending Settings"
|
1037 |
+
msgstr ""
|
1038 |
+
|
1039 |
+
#: woocommerce-ac.php:2221
|
1040 |
+
msgid "The list below shows all Abandoned Carts which have remained in cart for a time higher than the \"Cart abandoned cut-off time\" setting."
|
1041 |
+
msgstr ""
|
1042 |
+
|
1043 |
+
#: woocommerce-ac.php:2263
|
1044 |
+
msgid "All "
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: woocommerce-ac.php:2268
|
1048 |
+
msgid "Registered %s"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: woocommerce-ac.php:2274
|
1052 |
+
msgid "Guest %s"
|
1053 |
+
msgstr ""
|
1054 |
+
|
1055 |
+
#: woocommerce-ac.php:2280
|
1056 |
+
msgid "Carts without Customer Details"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: woocommerce-ac.php:2301
|
1060 |
+
msgid "Add email templates at different intervals to maximize the possibility of recovering your abandoned carts."
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: woocommerce-ac.php:2421
|
1064 |
+
msgid "The Email Template has been successfully added. In order to start sending this email to your customers, please activate it."
|
1065 |
+
msgstr ""
|
1066 |
+
|
1067 |
+
#: woocommerce-ac.php:2430
|
1068 |
+
msgid "There was a problem adding the email template. Please contact the plugin author via <a href= \"https://wordpress.org/support/plugin/woocommerce-abandoned-cart\">support forum</a>."
|
1069 |
+
msgstr ""
|
1070 |
+
|
1071 |
+
#: woocommerce-ac.php:2441
|
1072 |
+
msgid "The Email Template has been successfully updated."
|
1073 |
+
msgstr ""
|
1074 |
+
|
1075 |
+
#: woocommerce-ac.php:2450
|
1076 |
+
msgid "There was a problem updating the email template. Please contact the plugin author via <a href= \"https://wordpress.org/support/plugin/woocommerce-abandoned-cart\">support forum</a>."
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: woocommerce-ac.php:2459
|
1080 |
+
msgid "Add New Template"
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: woocommerce-ac.php:2536
|
1084 |
+
msgid "The Report below shows how many Abandoned Carts we were able to recover for you by sending automatic emails to encourage shoppers."
|
1085 |
+
msgstr ""
|
1086 |
+
|
1087 |
+
#: woocommerce-ac.php:2585
|
1088 |
+
msgid "Start Date:"
|
1089 |
+
msgstr ""
|
1090 |
+
|
1091 |
+
#: woocommerce-ac.php:2587
|
1092 |
+
msgid "End Date:"
|
1093 |
+
msgstr ""
|
1094 |
+
|
1095 |
+
#: woocommerce-ac.php:2603
|
1096 |
+
msgid "During the selected range <strong>%d</strong> carts totaling <strong>%s</strong> were abandoned. We were able to recover <strong>%d</strong> of them, which led to an extra <strong>%s</strong>"
|
1097 |
+
msgstr ""
|
1098 |
+
|
1099 |
+
#: woocommerce-ac.php:2622
|
1100 |
+
msgid "Abandoned Order #%s Details"
|
1101 |
+
msgstr ""
|
1102 |
+
|
1103 |
+
#: woocommerce-ac.php:2630
|
1104 |
+
msgid "Line Total"
|
1105 |
+
msgstr ""
|
1106 |
+
|
1107 |
+
#: woocommerce-ac.php:2818
|
1108 |
+
msgid "Customer Details"
|
1109 |
+
msgstr ""
|
1110 |
+
|
1111 |
+
#: woocommerce-ac.php:2822
|
1112 |
+
msgid "Billing Details"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: woocommerce-ac.php:2823
|
1116 |
+
msgid "Name:"
|
1117 |
+
msgstr ""
|
1118 |
+
|
1119 |
+
#: woocommerce-ac.php:2826
|
1120 |
+
#: woocommerce-ac.php:2846
|
1121 |
+
msgid "Address:"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: woocommerce-ac.php:2836
|
1125 |
+
msgid "Email:"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: woocommerce-ac.php:2840
|
1129 |
+
msgid "Phone:"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: woocommerce-ac.php:2845
|
1133 |
+
msgid "Shipping Details"
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: woocommerce-ac.php:2934
|
1137 |
+
msgid "Template Name:"
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: woocommerce-ac.php:2943
|
1141 |
+
msgid "Enter a template name for reference"
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: woocommerce-ac.php:2949
|
1145 |
+
msgid "Subject:"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: woocommerce-ac.php:2958
|
1149 |
+
msgid "Enter the subject that should appear in the email sent"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: woocommerce-ac.php:2964
|
1153 |
+
msgid "Email Body:"
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: woocommerce-ac.php:2991
|
1157 |
+
msgid "Message to be sent in the reminder email."
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: woocommerce-ac.php:3018
|
1161 |
+
msgid "Use WooCommerce Template Style:"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: woocommerce-ac.php:3040
|
1165 |
+
msgid "Email Template Header Text: "
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: woocommerce-ac.php:3054
|
1169 |
+
msgid "Enter the header which will appear in the abandoned WooCommerce email sent. This is only applicable when only used when \"Use WooCommerce Template Style:\" is checked."
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: woocommerce-ac.php:3060
|
1173 |
+
msgid "Send this email:"
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: woocommerce-ac.php:3101
|
1177 |
+
msgid "after cart is abandoned."
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#: woocommerce-ac.php:3108
|
1181 |
+
msgid "Send a test email to:"
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: woocommerce-ac.php:3113
|
1185 |
+
msgid "Enter the email id to which the test email needs to be sent."
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: woocommerce-ac.php:3127
|
1189 |
+
msgid "Update Changes"
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: woocommerce-ac.php:3148
|
1193 |
+
msgid "If you love <strong>Abandoned Cart Lite for WooCommerce</strong>, then please leave us a <a href=\"https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/?rate=5#new-post\" target=\"_blank\" class=\"ac-rating-link\" data-rated=\"Thanks :)\">★★★★★</a> rating. Thank you in advance. :)"
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: woocommerce-ac.php:3353
|
1197 |
+
#: woocommerce-ac.php:3388
|
1198 |
+
msgid "Men's Formal Shoes"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
+
#: woocommerce-ac.php:3360
|
1202 |
+
#: woocommerce-ac.php:3395
|
1203 |
+
msgid "Woman's Hand Bags"
|
1204 |
msgstr ""
|
includes/admin/class-wcal-abandoned-cart-details.php
CHANGED
@@ -271,20 +271,20 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
271 |
$billing_field_display = 'none';
|
272 |
}
|
273 |
|
274 |
-
$wcal_billing_address_text
|
275 |
|
276 |
$wcal_create_billing_address = '' !== $user_billing_company ? '<br>' . $user_billing_company . '</br>' : '<br>';
|
277 |
if ( '' !== $user_billing_address_1 ) {
|
278 |
-
$wcal_create_billing_address .= $user_billing_address_1 . '</br>';
|
279 |
}
|
280 |
if ( '' !== $user_billing_address_2 ) {
|
281 |
-
$wcal_create_billing_address .= $user_billing_address_2 . '</br>';
|
282 |
}
|
283 |
if ( '' !== $user_billing_city ) {
|
284 |
-
$wcal_create_billing_address .= $user_billing_city . '</br>';
|
285 |
}
|
286 |
if ( '' !== $user_billing_postcode ) {
|
287 |
-
$wcal_create_billing_address .= $user_billing_postcode;
|
288 |
}
|
289 |
|
290 |
$wcal_shipping_address_text = __( 'Shipping Address:', 'woocommerce-abandon-cart' );
|
@@ -301,16 +301,16 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
301 |
} else {
|
302 |
$wcal_create_shipping_address = '' !== $user_shipping_company ? '<br>' . $user_shipping_company . '</br>' : '<br>';
|
303 |
if ( '' !== $user_shipping_address_1 ) {
|
304 |
-
$wcal_create_shipping_address .= $user_shipping_address_1 . '</br>';
|
305 |
}
|
306 |
if ( '' !== $user_shipping_address_2 ) {
|
307 |
-
$wcal_create_shipping_address .= $user_shipping_address_2 . '</br>';
|
308 |
}
|
309 |
if ( '' !== $user_shipping_city ) {
|
310 |
-
$wcal_create_shipping_address .= $user_shipping_city . '</br>';
|
311 |
}
|
312 |
if ( '' !== $user_shipping_postcode ) {
|
313 |
-
$wcal_create_shipping_address .= $user_shipping_postcode;
|
314 |
}
|
315 |
}
|
316 |
|
@@ -339,7 +339,7 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
339 |
</div>";
|
340 |
|
341 |
$wcal_cart_content_var = '';
|
342 |
-
$wcal_quantity_total
|
343 |
if ( isset( $wcal_get_abandoned_cart_result[0] ) && ! empty( $wcal_get_abandoned_cart_result ) ) {
|
344 |
|
345 |
$wcal_cart_info = json_decode( stripslashes( $wcal_get_abandoned_cart_result[0]->abandoned_cart_info ) );
|
@@ -349,6 +349,7 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
349 |
}
|
350 |
|
351 |
$wcal_cart_details = isset( $wcal_cart_info->cart ) ? $wcal_cart_info->cart : array();
|
|
|
352 |
|
353 |
// Currency selected.
|
354 |
$currency = isset( $wcal_cart_info->currency ) ? $wcal_cart_info->currency : '';
|
@@ -447,8 +448,15 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
447 |
$recovered_date = "$order_date_format $order_time_format";
|
448 |
|
449 |
$order_url = admin_url( "post.php?post=$recovered_order&action=edit" );
|
450 |
-
|
451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
}
|
453 |
?>
|
454 |
</div>
|
@@ -688,8 +696,8 @@ if ( ! class_exists( 'Wcal_Abandoned_Cart_Details' ) ) {
|
|
688 |
// Item subtotal is calculated as product total including taxes.
|
689 |
if ( isset( $wcal_include_tax ) && 'no' === $wcal_include_tax &&
|
690 |
isset( $wcal_include_tax_setting ) && 'yes' === $wcal_include_tax_setting ) {
|
691 |
-
$item_subtotal
|
692 |
-
$line_subtotal_tax = $v->line_tax; // This is fix.
|
693 |
|
694 |
$after_item_subtotal = $item_subtotal;
|
695 |
// On sent email we need this for first row.
|
271 |
$billing_field_display = 'none';
|
272 |
}
|
273 |
|
274 |
+
$wcal_billing_address_text = __( 'Billing Address:', 'woocommerce-abandon-cart' );
|
275 |
|
276 |
$wcal_create_billing_address = '' !== $user_billing_company ? '<br>' . $user_billing_company . '</br>' : '<br>';
|
277 |
if ( '' !== $user_billing_address_1 ) {
|
278 |
+
$wcal_create_billing_address .= $user_billing_address_1 . '</br>';
|
279 |
}
|
280 |
if ( '' !== $user_billing_address_2 ) {
|
281 |
+
$wcal_create_billing_address .= $user_billing_address_2 . '</br>';
|
282 |
}
|
283 |
if ( '' !== $user_billing_city ) {
|
284 |
+
$wcal_create_billing_address .= $user_billing_city . '</br>';
|
285 |
}
|
286 |
if ( '' !== $user_billing_postcode ) {
|
287 |
+
$wcal_create_billing_address .= $user_billing_postcode;
|
288 |
}
|
289 |
|
290 |
$wcal_shipping_address_text = __( 'Shipping Address:', 'woocommerce-abandon-cart' );
|
301 |
} else {
|
302 |
$wcal_create_shipping_address = '' !== $user_shipping_company ? '<br>' . $user_shipping_company . '</br>' : '<br>';
|
303 |
if ( '' !== $user_shipping_address_1 ) {
|
304 |
+
$wcal_create_shipping_address .= $user_shipping_address_1 . '</br>';
|
305 |
}
|
306 |
if ( '' !== $user_shipping_address_2 ) {
|
307 |
+
$wcal_create_shipping_address .= $user_shipping_address_2 . '</br>';
|
308 |
}
|
309 |
if ( '' !== $user_shipping_city ) {
|
310 |
+
$wcal_create_shipping_address .= $user_shipping_city . '</br>';
|
311 |
}
|
312 |
if ( '' !== $user_shipping_postcode ) {
|
313 |
+
$wcal_create_shipping_address .= $user_shipping_postcode;
|
314 |
}
|
315 |
}
|
316 |
|
339 |
</div>";
|
340 |
|
341 |
$wcal_cart_content_var = '';
|
342 |
+
$wcal_quantity_total = 0;
|
343 |
if ( isset( $wcal_get_abandoned_cart_result[0] ) && ! empty( $wcal_get_abandoned_cart_result ) ) {
|
344 |
|
345 |
$wcal_cart_info = json_decode( stripslashes( $wcal_get_abandoned_cart_result[0]->abandoned_cart_info ) );
|
349 |
}
|
350 |
|
351 |
$wcal_cart_details = isset( $wcal_cart_info->cart ) ? $wcal_cart_info->cart : array();
|
352 |
+
$wcal_cart_details = isset( $wcal_cart_details->cart_contents ) ? $wcal_cart_details->cart_contents : $wcal_cart_details;
|
353 |
|
354 |
// Currency selected.
|
355 |
$currency = isset( $wcal_cart_info->currency ) ? $wcal_cart_info->currency : '';
|
448 |
$recovered_date = "$order_date_format $order_time_format";
|
449 |
|
450 |
$order_url = admin_url( "post.php?post=$recovered_order&action=edit" );
|
451 |
+
echo wp_kses_post(
|
452 |
+
sprintf(
|
453 |
+
// translators: Recovered Order Link, Order ID, Recovered Date.
|
454 |
+
'<h1>' . __( 'Order', 'woocommerce-abandon-cart' ) . " <a href='%s' target='_blank'>#%s</a><h1> <h5>" . __( 'Recovered on %s', 'woocommerce-abandon-cart' ) . '</h5>',
|
455 |
+
esc_url( $order_url ),
|
456 |
+
esc_attr( $recovered_order ),
|
457 |
+
esc_attr( $recovered_date )
|
458 |
+
)
|
459 |
+
);
|
460 |
}
|
461 |
?>
|
462 |
</div>
|
696 |
// Item subtotal is calculated as product total including taxes.
|
697 |
if ( isset( $wcal_include_tax ) && 'no' === $wcal_include_tax &&
|
698 |
isset( $wcal_include_tax_setting ) && 'yes' === $wcal_include_tax_setting ) {
|
699 |
+
$item_subtotal += isset( $v->line_total ) ? $v->line_total : 0; // This is fix.
|
700 |
+
$line_subtotal_tax = isset( $v->line_tax ) ? $v->line_tax : 0; // This is fix.
|
701 |
|
702 |
$after_item_subtotal = $item_subtotal;
|
703 |
// On sent email we need this for first row.
|
includes/admin/wcap_add_cart_popup_modal.php
CHANGED
@@ -1,772 +1,772 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
|
5 |
-
* It will fetch the Add to cart data, generate and populate data in the modal.
|
6 |
-
|
7 |
-
* @author Tyche Softwares
|
8 |
-
|
9 |
-
* @package Abandoned-Cart-Pro-for-WooCommerce/Admin/Settings
|
10 |
-
|
11 |
-
* @since 6.0
|
12 |
-
*/
|
13 |
-
|
14 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
-
|
16 |
-
exit; // Exit if accessed directly.
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
-
if ( ! class_exists( 'Wcap_Add_Cart_Popup_Modal' ) ) {
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
|
26 |
-
* It will fetch the Add to cart data, generate and populate data in the modal.
|
27 |
-
|
28 |
-
* @since 6.0
|
29 |
-
*/
|
30 |
-
|
31 |
-
class Wcap_Add_Cart_Popup_Modal {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
|
37 |
-
* This function will add the add to cart popup medal's settings.
|
38 |
-
|
39 |
-
* @since 6.0
|
40 |
-
*/
|
41 |
-
|
42 |
-
public static function wcap_add_to_cart_popup_settings() {
|
43 |
-
|
44 |
-
$wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
|
45 |
-
|
46 |
-
$wcap_disabled_field = '';
|
47 |
-
|
48 |
-
if ( 'off' == $wcap_atc_enabled ) {
|
49 |
-
|
50 |
-
$wcap_disabled_field = 'disabled="disabled"';
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
?>
|
55 |
-
|
56 |
-
<div id = "wcap_popup_main_div" class = "wcap_popup_main_div ">
|
57 |
-
|
58 |
-
<table id = "wcap_popup_main_table" class = "wcap_popup_main_table test_borders">
|
59 |
-
|
60 |
-
<tr id = "wcap_popup_main_table_tr" class = "wcap_popup_main_table_tr test_borders">
|
61 |
-
|
62 |
-
<td id = "wcap_popup_main_table_td_settings" class = "wcap_popup_main_table_td_settings test_borders">
|
63 |
-
|
64 |
-
<?php self::wcap_enable_modal_section( $wcap_disabled_field ); ?>
|
65 |
-
|
66 |
-
<?php self::wcap_custom_pages_section( $wcap_disabled_field ); ?>
|
67 |
-
|
68 |
-
<div class = "wcap_atc_all_fields_container" >
|
69 |
-
|
70 |
-
<?php self::wcap_add_heading_section( $wcap_disabled_field ); ?>
|
71 |
-
|
72 |
-
<?php self::wcap_add_text_section( $wcap_disabled_field ); ?>
|
73 |
-
|
74 |
-
<?php self::wcap_email_placeholder_section( $wcap_disabled_field ); ?>
|
75 |
-
|
76 |
-
<?php self::wcap_button_section( $wcap_disabled_field ); ?>
|
77 |
-
|
78 |
-
<?php self::wcap_mandatory_modal_section( $wcap_disabled_field ); ?>
|
79 |
-
|
80 |
-
<?php self::wcap_non_mandatory_modal_section_field( $wcap_disabled_field ); ?>
|
81 |
-
|
82 |
-
</div>
|
83 |
-
|
84 |
-
</td>
|
85 |
-
|
86 |
-
<td id = "wcap_popup_main_table_td_preview" class = "wcap_popup_main_table_td_preview test_borders">
|
87 |
-
|
88 |
-
<div class = "wcap_atc_all_fields_container" >
|
89 |
-
|
90 |
-
<?php self::wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ); ?>
|
91 |
-
|
92 |
-
</div>
|
93 |
-
|
94 |
-
</td>
|
95 |
-
|
96 |
-
</tr>
|
97 |
-
|
98 |
-
<tr>
|
99 |
-
|
100 |
-
<td>
|
101 |
-
|
102 |
-
<div class = "wcap_atc_all_fields_container" >
|
103 |
-
|
104 |
-
<p class = "submit">
|
105 |
-
|
106 |
-
<input type = "submit" name = "submit" id = "submit" disabled class = "button button-primary" value = "Save Changes" <?php echo $wcap_disabled_field; ?> >
|
107 |
-
|
108 |
-
<input type = "submit" name = "submit" id = "submit" disabled class = "wcap_reset_button button button-primary" value = "Reset to default configuration" <?php echo $wcap_disabled_field; ?> >
|
109 |
-
|
110 |
-
</p>
|
111 |
-
|
112 |
-
</div>
|
113 |
-
|
114 |
-
</td>
|
115 |
-
|
116 |
-
</tr>
|
117 |
-
|
118 |
-
</table>
|
119 |
-
|
120 |
-
</div>
|
121 |
-
|
122 |
-
<?php
|
123 |
-
|
124 |
-
}
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
/**
|
129 |
-
|
130 |
-
* It will add the "Enable Add to cart popup modal" setting on the add to cart modal settings page.
|
131 |
-
|
132 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
133 |
-
|
134 |
-
* @since 6.0
|
135 |
-
*/
|
136 |
-
|
137 |
-
public static function wcap_enable_modal_section( $wcap_disabled_field ) {
|
138 |
-
|
139 |
-
?>
|
140 |
-
|
141 |
-
<table class = "wcap_enable_atc wcap_atc_between_fields_space" id = "wcap_enable_atc" >
|
142 |
-
|
143 |
-
<th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> <?php _e( 'Enable Add to cart popup modal', 'woocommerce-abandoned-cart' ); ?> </th>
|
144 |
-
|
145 |
-
<tr>
|
146 |
-
|
147 |
-
<td>
|
148 |
-
|
149 |
-
<?php
|
150 |
-
|
151 |
-
$wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
|
152 |
-
|
153 |
-
$active_text = $wcap_atc_enabled;
|
154 |
-
|
155 |
-
?>
|
156 |
-
|
157 |
-
<button type = "button" class = "wcap-enable-atc-modal wcap-toggle-atc-modal-enable-status" wcap-atc-switch-modal-enable = 'off' ?> readonly>
|
158 |
-
|
159 |
-
<?php echo $active_text; ?>
|
160 |
-
|
161 |
-
</button>
|
162 |
-
|
163 |
-
</td>
|
164 |
-
|
165 |
-
</tr>
|
166 |
-
|
167 |
-
</table>
|
168 |
-
|
169 |
-
<?php
|
170 |
-
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
/**
|
176 |
-
|
177 |
-
* Adds a multi select searchable dropdown from where
|
178 |
-
|
179 |
-
* the admin can select custom pages on which the
|
180 |
-
|
181 |
-
* Add to Cart Popup modal should be displayed.
|
182 |
-
*
|
183 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
184 |
-
|
185 |
-
* @since 7.10.0
|
186 |
-
*/
|
187 |
-
|
188 |
-
public static function wcap_custom_pages_section( $wcap_disabled_field ) {
|
189 |
-
|
190 |
-
global $woocommerce;
|
191 |
-
|
192 |
-
$post_title_array = array();
|
193 |
-
|
194 |
-
?>
|
195 |
-
|
196 |
-
<table class = "wcap_custom_pages wcap_atc_between_fields_space" id = "wcap_custom_pages" >
|
197 |
-
|
198 |
-
<tr>
|
199 |
-
|
200 |
-
<th id="wcap_button_section_table_heading" class="wcap_button_section_table_heading"> <?php _e( 'Custom pages to display the pop-up modal on', 'woocommerce-abandoned-cart' ); ?> </th>
|
201 |
-
|
202 |
-
</tr>
|
203 |
-
|
204 |
-
<tr>
|
205 |
-
|
206 |
-
<td>
|
207 |
-
|
208 |
-
<?php
|
209 |
-
|
210 |
-
$custom_pages = get_option( 'wcap_custom_pages_list' );
|
211 |
-
|
212 |
-
?>
|
213 |
-
|
214 |
-
<?php if ( $woocommerce->version >= '3.0' ) { ?>
|
215 |
-
|
216 |
-
<select style="width:80%" multiple="multiple" class="wcap_page_select wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr__( 'Search for a Page…', 'woocommerce-abandoned-cart' ); ?>' data-action='wcap_json_find_pages' disabled>
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
<?php
|
221 |
-
|
222 |
-
if ( is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
|
223 |
-
|
224 |
-
foreach ( $custom_pages as $page_ids ) {
|
225 |
-
|
226 |
-
$post_id = $page_ids;
|
227 |
-
|
228 |
-
$post_title = get_the_title( $post_id );
|
229 |
-
|
230 |
-
printf( "<option value='%s' selected>%s</option>\n", $post_id, $post_title );
|
231 |
-
|
232 |
-
}
|
233 |
-
}
|
234 |
-
|
235 |
-
?>
|
236 |
-
|
237 |
-
</select>
|
238 |
-
|
239 |
-
<?php
|
240 |
-
} else {
|
241 |
-
|
242 |
-
if ( is_array( $post_title_array ) && is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
|
243 |
-
|
244 |
-
foreach ( $custom_pages as $page_ids ) {
|
245 |
-
|
246 |
-
$post_id = $page_ids;
|
247 |
-
|
248 |
-
$post_title = get_the_title( $post_id );
|
249 |
-
|
250 |
-
$post_title_array[ $post_title ] = $post_title;
|
251 |
-
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
?>
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
<input type="hidden" style="width:80%" id = "wcap_page_select" class="wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr_e( 'Search for a Page…', 'woocommerce-abandoned-cart' ); ?>' data-multiple="true" data-action='wcap_json_find_pages' data-selected=" <?php echo esc_attr( json_encode( $post_title_array ) ); ?>" value="<?php echo implode( ',', array_keys( $post_title_array ) ); ?>" readonly/>
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
<?php } ?>
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
<?php $toolTip = __( 'Please add any custom pages (not created by WooCommerce) where you wish to display the Add to cart Pop-up Modal.', 'woocommerce-abandoned-cart' ); ?>
|
268 |
-
|
269 |
-
<?php echo wc_help_tip( $toolTip ); ?>
|
270 |
-
|
271 |
-
</td>
|
272 |
-
|
273 |
-
</tr>
|
274 |
-
|
275 |
-
<tr>
|
276 |
-
|
277 |
-
<td colspan="2" style="text-align: justify;">
|
278 |
-
|
279 |
-
<?php _e( '<b>Note:</b> Please ensure that the Add to Cart button links on these pages are added with the correct classes and attributes to ensure the plugin can capture the cart data correctly. For further guidance, please check the documentation.', 'woocommerce-abandoned-cart' ); ?>
|
280 |
-
|
281 |
-
</td>
|
282 |
-
|
283 |
-
</tr>
|
284 |
-
|
285 |
-
</table>
|
286 |
-
|
287 |
-
<?php
|
288 |
-
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
|
293 |
-
* It will Save the setting on the add to cart modal settings page.
|
294 |
-
|
295 |
-
* @since 6.0
|
296 |
-
*/
|
297 |
-
|
298 |
-
public static function wcap_add_to_cart_popup_save_settings() {
|
299 |
-
|
300 |
-
if ( $_POST ['wcap_heading_section_text_email'] ) {
|
301 |
-
|
302 |
-
update_option( 'wcap_heading_section_text_email', $_POST ['wcap_heading_section_text_email'] );
|
303 |
-
|
304 |
-
}
|
305 |
-
|
306 |
-
if ( $_POST ['wcap_popup_heading_color_picker'] ) {
|
307 |
-
|
308 |
-
update_option( 'wcap_popup_heading_color_picker', $_POST ['wcap_popup_heading_color_picker'] );
|
309 |
-
|
310 |
-
}
|
311 |
-
|
312 |
-
if ( $_POST ['wcap_text_section_text'] ) {
|
313 |
-
|
314 |
-
update_option( 'wcap_text_section_text', $_POST ['wcap_text_section_text'] );
|
315 |
-
|
316 |
-
}
|
317 |
-
|
318 |
-
if ( $_POST ['wcap_popup_text_color_picker'] ) {
|
319 |
-
|
320 |
-
update_option( 'wcap_popup_text_color_picker', $_POST ['wcap_popup_text_color_picker'] );
|
321 |
-
|
322 |
-
}
|
323 |
-
|
324 |
-
if ( $_POST ['wcap_email_placeholder_section_input_text'] ) {
|
325 |
-
|
326 |
-
update_option( 'wcap_email_placeholder_section_input_text', $_POST ['wcap_email_placeholder_section_input_text'] );
|
327 |
-
|
328 |
-
}
|
329 |
-
|
330 |
-
if ( $_POST ['wcap_button_section_input_text'] ) {
|
331 |
-
|
332 |
-
update_option( 'wcap_button_section_input_text', $_POST ['wcap_button_section_input_text'] );
|
333 |
-
|
334 |
-
}
|
335 |
-
|
336 |
-
if ( $_POST ['wcap_button_color_picker'] ) {
|
337 |
-
|
338 |
-
update_option( 'wcap_button_color_picker', $_POST ['wcap_button_color_picker'] );
|
339 |
-
|
340 |
-
}
|
341 |
-
|
342 |
-
if ( isset( $_POST ['wcap_button_text_color_picker'] ) ) {
|
343 |
-
|
344 |
-
update_option( 'wcap_button_text_color_picker', $_POST ['wcap_button_text_color_picker'] );
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
if ( isset( $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] ) ) {
|
349 |
-
|
350 |
-
update_option( 'wcap_non_mandatory_text', $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] );
|
351 |
-
|
352 |
-
}
|
353 |
-
|
354 |
-
$custom_pages = isset( $_POST['wcap_page_select'] ) ? $_POST['wcap_page_select'] : array();
|
355 |
-
|
356 |
-
update_option( 'wcap_custom_pages_list', $custom_pages );
|
357 |
-
|
358 |
-
}
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
/**
|
363 |
-
|
364 |
-
* It will add the setting for Heading section on the add to cart modal settings page.
|
365 |
-
|
366 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
367 |
-
|
368 |
-
* @since 6.0
|
369 |
-
*/
|
370 |
-
|
371 |
-
public static function wcap_add_heading_section( $wcap_disabled_field ) {
|
372 |
-
|
373 |
-
?>
|
374 |
-
|
375 |
-
<div id = "wcap_heading_section_div" class = "wcap_heading_section_div wcap_atc_between_fields_space">
|
376 |
-
|
377 |
-
<table id = "wcap_heading_section_table" class = "wcap_heading_section_table">
|
378 |
-
|
379 |
-
<th id = "wcap_heading_section_table_heading" class ="wcap_heading_section_table_heading"> Modal Heading </th>
|
380 |
-
|
381 |
-
<tr id = "wcap_heading_section_tr" class = "wcap_heading_section_tr" >
|
382 |
-
|
383 |
-
<td id = "wcap_heading_section_text_field" class = "wcap_heading_section_text_field test_borders">
|
384 |
-
|
385 |
-
<input id = "wcap_heading_section_text_email" v-model = "wcap_heading_section_text_email" name = "wcap_heading_section_text_email"class = "wcap_heading_section_text_email"
|
386 |
-
|
387 |
-
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Please enter your email address', 'woocommerce-abandoned-cart' ); ?>">
|
388 |
-
|
389 |
-
</td>
|
390 |
-
|
391 |
-
<td id = "wcap_heading_section_text_field_color" class = "wcap_heading_section_text_field_color test_borders">
|
392 |
-
|
393 |
-
<?php $wcap_popup_heading_color_picker = get_option( 'wcap_popup_heading_color_picker' ); ?>
|
394 |
-
|
395 |
-
<span class = "colorpickpreview" style = "background:<?php echo $wcap_popup_heading_color_picker; ?>"></span>
|
396 |
-
|
397 |
-
<input class = "wcap_popup_heading_color_picker colorpick" name = "wcap_popup_heading_color_picker" value = "#737f97" v-model = "wcap_popup_heading_color" v-on:input = "wcap_atc_popup_heading.color = $event.target.value"
|
398 |
-
|
399 |
-
<?php echo $wcap_disabled_field; ?> readonly >
|
400 |
-
|
401 |
-
</td>
|
402 |
-
|
403 |
-
</tr>
|
404 |
-
|
405 |
-
</table>
|
406 |
-
|
407 |
-
</div>
|
408 |
-
|
409 |
-
<?php
|
410 |
-
|
411 |
-
}
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
/**
|
416 |
-
|
417 |
-
* It will add the setting for Text displayed below heading section on the add to cart modal settings page.
|
418 |
-
|
419 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
420 |
-
|
421 |
-
* @since 6.0
|
422 |
-
*/
|
423 |
-
|
424 |
-
public static function wcap_add_text_section( $wcap_disabled_field ) {
|
425 |
-
|
426 |
-
?>
|
427 |
-
|
428 |
-
<div id = "wcap_text_section_div" class = "wcap_text_section_div wcap_atc_between_fields_space">
|
429 |
-
|
430 |
-
<table id = "wcap_text_section_table" class = "wcap_text_section_table">
|
431 |
-
|
432 |
-
<th id = "wcap_text_section_table_heading" class = "wcap_text_section_table_heading"> Modal Text </th>
|
433 |
-
|
434 |
-
<tr id = "wcap_text_section_tr" class = "wcap_text_section_tr" >
|
435 |
-
|
436 |
-
<td id = "wcap_text_section_text_field" class = "wcap_text_section_text_field test_borders">
|
437 |
-
|
438 |
-
<input id = "wcap_text_section_text" v-model = "wcap_text_section_text_field" class="wcap_text_section_input_text" name = "wcap_text_section_text"
|
439 |
-
|
440 |
-
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'To add this item to your cart, please enter your email address.', 'woocommerce-abandoned-cart' ); ?>">
|
441 |
-
|
442 |
-
</td>
|
443 |
-
|
444 |
-
<td id = "wcap_text_section_field_color" class = "wcap_text_section_field_color test_borders">
|
445 |
-
|
446 |
-
<?php $wcap_atc_popup_text_color = get_option( 'wcap_popup_text_color_picker' ); ?>
|
447 |
-
|
448 |
-
<span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_popup_text_color; ?>"></span>
|
449 |
-
|
450 |
-
<input class = "wcap_popup_text_color_picker colorpick" name = "wcap_popup_text_color_picker" value = "#bbc9d2" v-model = "wcap_popup_text_color" v-on:input = "wcap_atc_popup_text.color = $event.target.value"
|
451 |
-
|
452 |
-
<?php echo $wcap_disabled_field; ?> readonly>
|
453 |
-
|
454 |
-
</td>
|
455 |
-
|
456 |
-
</tr>
|
457 |
-
|
458 |
-
</table>
|
459 |
-
|
460 |
-
</div>
|
461 |
-
|
462 |
-
<?php
|
463 |
-
|
464 |
-
}
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
/**
|
469 |
-
|
470 |
-
* It will add the setting for email placeholder on the add to cart modal settings page.
|
471 |
-
|
472 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
473 |
-
|
474 |
-
* @since 6.0
|
475 |
-
*/
|
476 |
-
|
477 |
-
public static function wcap_email_placeholder_section( $wcap_disabled_field ) {
|
478 |
-
|
479 |
-
?>
|
480 |
-
|
481 |
-
<div id = "wcap_email_placeholder_section_div" class = "wcap_email_placeholder_section_div wcap_atc_between_fields_space">
|
482 |
-
|
483 |
-
<table id = "wcap_email_placeholder_section_table" class = "wcap_email_placeholder_section_table">
|
484 |
-
|
485 |
-
<th id = "wcap_email_placeholder_section_table_heading" class = "wcap_email_placeholder_section_table_heading"> Email placeholder </th>
|
486 |
-
|
487 |
-
<tr id = "wcap_email_placeholder_section_tr" class = "wcap_email_placeholder_section_tr" >
|
488 |
-
|
489 |
-
<td id = "wcap_email_placeholder_section_text_field" class = "wcap_email_placeholder_section_text_field test_borders">
|
490 |
-
|
491 |
-
<input id = "wcap_email_placeholder_section_input_text" v-model = "wcap_email_placeholder_section_input_text" class="wcap_email_placeholder_section_input_text" name = "wcap_email_placeholder_section_input_text"
|
492 |
-
|
493 |
-
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Email address', 'woocommerce-abandoned-cart' ); ?>">
|
494 |
-
|
495 |
-
</td>
|
496 |
-
|
497 |
-
</tr>
|
498 |
-
|
499 |
-
</table>
|
500 |
-
|
501 |
-
</div>
|
502 |
-
|
503 |
-
<?php
|
504 |
-
|
505 |
-
}
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
/**
|
510 |
-
|
511 |
-
* It will add the setting for Add to cart button on the add to cart modal settings page.
|
512 |
-
|
513 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
514 |
-
|
515 |
-
* @since 6.0
|
516 |
-
*/
|
517 |
-
|
518 |
-
public static function wcap_button_section( $wcap_disabled_field ) {
|
519 |
-
|
520 |
-
?>
|
521 |
-
|
522 |
-
<div id = "wcap_button_section_div" class = "wcap_button_section_div wcap_atc_between_fields_space">
|
523 |
-
|
524 |
-
<table id = "wcap_button_section_table" class = "wcap_button_section_table">
|
525 |
-
|
526 |
-
<th id = "wcap_button_section_table_heading" class="wcap_button_section_table_heading"> Add to cart button text </th>
|
527 |
-
|
528 |
-
<tr>
|
529 |
-
|
530 |
-
<td id = "wcap_button_section_text_field" class = "wcap_button_section_text_field test_borders">
|
531 |
-
|
532 |
-
<input id = "wcap_button_section_input_text" v-model = "wcap_button_section_input_text" class="wcap_button_section_input_text" name = "wcap_button_section_input_text"
|
533 |
-
|
534 |
-
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?>">
|
535 |
-
|
536 |
-
</td>
|
537 |
-
|
538 |
-
</tr>
|
539 |
-
|
540 |
-
<tr id = "wcap_button_color_section_tr" class = "wcap_button_color_section_tr">
|
541 |
-
|
542 |
-
<td id = "wcap_button_color_section_text_field" class = "wcap_button_color_section_text_field test_borders">
|
543 |
-
|
544 |
-
<?php $wcap_atc_button_bg_color = get_option( 'wcap_button_color_picker' ); ?>
|
545 |
-
|
546 |
-
<span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_button_bg_color; ?>"></span>
|
547 |
-
|
548 |
-
<input id = "wcap_button_color_picker" value = "#0085ba" v-model ="wcap_button_bg_color" v-on:input="wcap_atc_button.backgroundColor = $event.target.value" class="wcap_button_color_picker colorpick" name = "wcap_button_color_picker"
|
549 |
-
|
550 |
-
<?php echo $wcap_disabled_field; ?> readonly >
|
551 |
-
|
552 |
-
</td>
|
553 |
-
|
554 |
-
<td id = "wcap_button_text_color_section_text_field" class = "wcap_button_text_color_section_text_field test_borders">
|
555 |
-
|
556 |
-
<?php $wcap_button_text_color_picker = get_option( 'wcap_button_text_color_picker' ); ?>
|
557 |
-
|
558 |
-
<span class = "colorpickpreview" style = "background:<?php echo $wcap_button_text_color_picker; ?>"></span>
|
559 |
-
|
560 |
-
<input id = "wcap_button_text_color_picker" value = "#ffffff" v-model = "wcap_button_text_color" v-on:input = "wcap_atc_button.color = $event.target.value" class="wcap_button_text_color_picker colorpick" name = "wcap_button_text_color_picker"
|
561 |
-
|
562 |
-
<?php echo $wcap_disabled_field; ?> readonly>
|
563 |
-
|
564 |
-
</td>
|
565 |
-
|
566 |
-
</tr>
|
567 |
-
|
568 |
-
</table>
|
569 |
-
|
570 |
-
</div>
|
571 |
-
|
572 |
-
<?php
|
573 |
-
|
574 |
-
}
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
/**
|
579 |
-
|
580 |
-
* It will add the setting for Email address mandatory field on the add to cart modal settings page.
|
581 |
-
|
582 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
583 |
-
|
584 |
-
* @since 6.0
|
585 |
-
*/
|
586 |
-
|
587 |
-
public static function wcap_mandatory_modal_section( $wcap_disabled_field ) {
|
588 |
-
|
589 |
-
?>
|
590 |
-
|
591 |
-
<table class = "wcap_atc_between_fields_space">
|
592 |
-
|
593 |
-
<th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> Email address is mandatory ? </th>
|
594 |
-
|
595 |
-
<tr>
|
596 |
-
|
597 |
-
<td>
|
598 |
-
|
599 |
-
<?php
|
600 |
-
|
601 |
-
$wcap_atc_email_mandatory = get_option( 'wcap_atc_mandatory_email' );
|
602 |
-
|
603 |
-
$active_text = $wcap_atc_email_mandatory;
|
604 |
-
|
605 |
-
?>
|
606 |
-
|
607 |
-
<button type = "button" class = "wcap-switch-atc-modal-mandatory wcap-toggle-atc-modal-mandatory" wcap-atc-switch-modal-mandatory = <?php echo $wcap_atc_email_mandatory; ?>
|
608 |
-
|
609 |
-
<?php echo $wcap_disabled_field; ?> readonly >
|
610 |
-
|
611 |
-
<?php echo $active_text; ?> </button>
|
612 |
-
|
613 |
-
</td>
|
614 |
-
|
615 |
-
</tr>
|
616 |
-
|
617 |
-
</table>
|
618 |
-
|
619 |
-
<?php
|
620 |
-
|
621 |
-
}
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
/**
|
626 |
-
|
627 |
-
* It will add the setting for Email address non mandatory field on the add to cart modal settings page.
|
628 |
-
|
629 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
630 |
-
|
631 |
-
* @since 6.0
|
632 |
-
*/
|
633 |
-
|
634 |
-
public static function wcap_non_mandatory_modal_section_field( $wcap_disabled_field ) {
|
635 |
-
|
636 |
-
$wcap_get_mandatory_field = get_option( 'wcap_atc_mandatory_email' );
|
637 |
-
|
638 |
-
$wcap_disabled_email_field = '';
|
639 |
-
|
640 |
-
if ( 'on' == $wcap_get_mandatory_field ) {
|
641 |
-
|
642 |
-
$wcap_disabled_email_field = 'disabled="disabled"';
|
643 |
-
|
644 |
-
}
|
645 |
-
|
646 |
-
?>
|
647 |
-
|
648 |
-
<div id = "wcap_non_mandatory_modal_section_fields_div" class = "wcap_non_mandatory_modal_section_fields_div wcap_atc_between_fields_space">
|
649 |
-
|
650 |
-
<table id = "wcap_non_mandatory_modal_section_fields_div_table" class = "wcap_non_mandatory_modal_section_fields_div_table">
|
651 |
-
|
652 |
-
<th id = "wcap_non_mandatory_modal_section_fields_table_heading"
|
653 |
-
|
654 |
-
class="wcap_non_mandatory_modal_section_fields_table_heading"> Not mandatory text </th>
|
655 |
-
|
656 |
-
<tr id = "wcap_non_mandatory_modal_section_fields_tr" class = "wcap_non_mandatory_modal_section_fields_tr" >
|
657 |
-
|
658 |
-
<td id = "wcap_non_mandatory_modal_section_fields_text_field" class = "wcap_non_mandatory_modal_section_fields_text_field test_borders">
|
659 |
-
|
660 |
-
<input id = "wcap_non_mandatory_modal_section_fields_input_text" v-model = "wcap_non_mandatory_modal_input_text" class = "wcap_non_mandatory_modal_section_fields_input_text" name = "wcap_non_mandatory_modal_section_fields_input_text" readonly value="<?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?>"
|
661 |
-
|
662 |
-
<?php
|
663 |
-
echo $wcap_disabled_field;
|
664 |
-
|
665 |
-
echo $wcap_disabled_email_field;
|
666 |
-
|
667 |
-
?>
|
668 |
-
>
|
669 |
-
|
670 |
-
</td>
|
671 |
-
|
672 |
-
</tr>
|
673 |
-
|
674 |
-
</table>
|
675 |
-
|
676 |
-
</div>
|
677 |
-
|
678 |
-
<?php
|
679 |
-
|
680 |
-
}
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
/**
|
685 |
-
|
686 |
-
* It will will show th preview of the Add To cart Popup modal with the changes made on any of the settings for it.
|
687 |
-
|
688 |
-
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
689 |
-
|
690 |
-
* @since 6.0
|
691 |
-
*/
|
692 |
-
|
693 |
-
public static function wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ) {
|
694 |
-
|
695 |
-
?>
|
696 |
-
|
697 |
-
<div class = "wcap_container">
|
698 |
-
|
699 |
-
<div class = "wcap_popup_wrapper">
|
700 |
-
|
701 |
-
<div class = "wcap_popup_content">
|
702 |
-
|
703 |
-
<div class = "wcap_popup_heading_container">
|
704 |
-
|
705 |
-
<div class = "wcap_popup_icon_container" >
|
706 |
-
|
707 |
-
<span class = "wcap_popup_icon" >
|
708 |
-
|
709 |
-
<span class = "wcap_popup_plus_sign" v-bind:style = "wcap_atc_button">
|
710 |
-
|
711 |
-
</span>
|
712 |
-
|
713 |
-
</span>
|
714 |
-
|
715 |
-
</div>
|
716 |
-
|
717 |
-
<div class = "wcap_popup_text_container">
|
718 |
-
|
719 |
-
<h2 class = "wcap_popup_heading" v-bind:style = "wcap_atc_popup_heading" ><?php _e( 'Please enter your email address.', 'woocommerce-abandoned-cart' ); ?></h2>
|
720 |
-
|
721 |
-
<div class = "wcap_popup_text" v-bind:style = "wcap_atc_popup_text" ><?php _e( 'To add this item to your cart, please enter your email address.', 'woocommerce-abandoned-cart' ); ?></div>
|
722 |
-
|
723 |
-
</div>
|
724 |
-
|
725 |
-
</div>
|
726 |
-
|
727 |
-
<div class = "wcap_popup_form">
|
728 |
-
|
729 |
-
<form action = "" name = "wcap_modal_form">
|
730 |
-
|
731 |
-
<div class = "wcap_popup_input_field_container" >
|
732 |
-
|
733 |
-
<input class = "wcap_popup_input" type = "text" value = "" name = "email" placeholder ="<?php _e( 'Email address', 'woocommerce-abandoned-cart' ); ?>"
|
734 |
-
|
735 |
-
<?php echo $wcap_disabled_field; ?> readonly >
|
736 |
-
|
737 |
-
</div>
|
738 |
-
|
739 |
-
<button class = "wcap_popup_button" v-bind:style = "wcap_atc_button"
|
740 |
-
|
741 |
-
<?php echo $wcap_disabled_field; ?> ><?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?></button>
|
742 |
-
|
743 |
-
<br>
|
744 |
-
|
745 |
-
<br>
|
746 |
-
|
747 |
-
<div id = "wcap_non_mandatory_text_wrapper" class = "wcap_non_mandatory_text_wrapper">
|
748 |
-
|
749 |
-
<a class = "wcap_popup_non_mandatory_button" href = "" > <?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?></a>
|
750 |
-
|
751 |
-
</div>
|
752 |
-
|
753 |
-
</form>
|
754 |
-
|
755 |
-
</div>
|
756 |
-
|
757 |
-
<div class = "wcap_popup_close" ></div>
|
758 |
-
|
759 |
-
</div>
|
760 |
-
|
761 |
-
</div>
|
762 |
-
|
763 |
-
</div>
|
764 |
-
|
765 |
-
<?php
|
766 |
-
|
767 |
-
}
|
768 |
-
|
769 |
-
}
|
770 |
-
|
771 |
-
}
|
772 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
|
5 |
+
* It will fetch the Add to cart data, generate and populate data in the modal.
|
6 |
+
|
7 |
+
* @author Tyche Softwares
|
8 |
+
|
9 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Admin/Settings
|
10 |
+
|
11 |
+
* @since 6.0
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
|
16 |
+
exit; // Exit if accessed directly.
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
if ( ! class_exists( 'Wcap_Add_Cart_Popup_Modal' ) ) {
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
|
26 |
+
* It will fetch the Add to cart data, generate and populate data in the modal.
|
27 |
+
|
28 |
+
* @since 6.0
|
29 |
+
*/
|
30 |
+
|
31 |
+
class Wcap_Add_Cart_Popup_Modal {
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
|
37 |
+
* This function will add the add to cart popup medal's settings.
|
38 |
+
|
39 |
+
* @since 6.0
|
40 |
+
*/
|
41 |
+
|
42 |
+
public static function wcap_add_to_cart_popup_settings() {
|
43 |
+
|
44 |
+
$wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
|
45 |
+
|
46 |
+
$wcap_disabled_field = '';
|
47 |
+
|
48 |
+
if ( 'off' == $wcap_atc_enabled ) {
|
49 |
+
|
50 |
+
$wcap_disabled_field = 'disabled="disabled"';
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
?>
|
55 |
+
|
56 |
+
<div id = "wcap_popup_main_div" class = "wcap_popup_main_div ">
|
57 |
+
|
58 |
+
<table id = "wcap_popup_main_table" class = "wcap_popup_main_table test_borders">
|
59 |
+
|
60 |
+
<tr id = "wcap_popup_main_table_tr" class = "wcap_popup_main_table_tr test_borders">
|
61 |
+
|
62 |
+
<td id = "wcap_popup_main_table_td_settings" class = "wcap_popup_main_table_td_settings test_borders">
|
63 |
+
|
64 |
+
<?php self::wcap_enable_modal_section( $wcap_disabled_field ); ?>
|
65 |
+
|
66 |
+
<?php self::wcap_custom_pages_section( $wcap_disabled_field ); ?>
|
67 |
+
|
68 |
+
<div class = "wcap_atc_all_fields_container" >
|
69 |
+
|
70 |
+
<?php self::wcap_add_heading_section( $wcap_disabled_field ); ?>
|
71 |
+
|
72 |
+
<?php self::wcap_add_text_section( $wcap_disabled_field ); ?>
|
73 |
+
|
74 |
+
<?php self::wcap_email_placeholder_section( $wcap_disabled_field ); ?>
|
75 |
+
|
76 |
+
<?php self::wcap_button_section( $wcap_disabled_field ); ?>
|
77 |
+
|
78 |
+
<?php self::wcap_mandatory_modal_section( $wcap_disabled_field ); ?>
|
79 |
+
|
80 |
+
<?php self::wcap_non_mandatory_modal_section_field( $wcap_disabled_field ); ?>
|
81 |
+
|
82 |
+
</div>
|
83 |
+
|
84 |
+
</td>
|
85 |
+
|
86 |
+
<td id = "wcap_popup_main_table_td_preview" class = "wcap_popup_main_table_td_preview test_borders">
|
87 |
+
|
88 |
+
<div class = "wcap_atc_all_fields_container" >
|
89 |
+
|
90 |
+
<?php self::wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ); ?>
|
91 |
+
|
92 |
+
</div>
|
93 |
+
|
94 |
+
</td>
|
95 |
+
|
96 |
+
</tr>
|
97 |
+
|
98 |
+
<tr>
|
99 |
+
|
100 |
+
<td>
|
101 |
+
|
102 |
+
<div class = "wcap_atc_all_fields_container" >
|
103 |
+
|
104 |
+
<p class = "submit">
|
105 |
+
|
106 |
+
<input type = "submit" name = "submit" id = "submit" disabled class = "button button-primary" value = "Save Changes" <?php echo $wcap_disabled_field; ?> >
|
107 |
+
|
108 |
+
<input type = "submit" name = "submit" id = "submit" disabled class = "wcap_reset_button button button-primary" value = "Reset to default configuration" <?php echo $wcap_disabled_field; ?> >
|
109 |
+
|
110 |
+
</p>
|
111 |
+
|
112 |
+
</div>
|
113 |
+
|
114 |
+
</td>
|
115 |
+
|
116 |
+
</tr>
|
117 |
+
|
118 |
+
</table>
|
119 |
+
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<?php
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
/**
|
129 |
+
|
130 |
+
* It will add the "Enable Add to cart popup modal" setting on the add to cart modal settings page.
|
131 |
+
|
132 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
133 |
+
|
134 |
+
* @since 6.0
|
135 |
+
*/
|
136 |
+
|
137 |
+
public static function wcap_enable_modal_section( $wcap_disabled_field ) {
|
138 |
+
|
139 |
+
?>
|
140 |
+
|
141 |
+
<table class = "wcap_enable_atc wcap_atc_between_fields_space" id = "wcap_enable_atc" >
|
142 |
+
|
143 |
+
<th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> <?php _e( 'Enable Add to cart popup modal', 'woocommerce-abandoned-cart' ); ?> </th>
|
144 |
+
|
145 |
+
<tr>
|
146 |
+
|
147 |
+
<td>
|
148 |
+
|
149 |
+
<?php
|
150 |
+
|
151 |
+
$wcap_atc_enabled = get_option( 'wcap_atc_enable_modal' );
|
152 |
+
|
153 |
+
$active_text = $wcap_atc_enabled;
|
154 |
+
|
155 |
+
?>
|
156 |
+
|
157 |
+
<button type = "button" class = "wcap-enable-atc-modal wcap-toggle-atc-modal-enable-status" wcap-atc-switch-modal-enable = 'off' ?> readonly>
|
158 |
+
|
159 |
+
<?php echo $active_text; ?>
|
160 |
+
|
161 |
+
</button>
|
162 |
+
|
163 |
+
</td>
|
164 |
+
|
165 |
+
</tr>
|
166 |
+
|
167 |
+
</table>
|
168 |
+
|
169 |
+
<?php
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
|
175 |
+
/**
|
176 |
+
|
177 |
+
* Adds a multi select searchable dropdown from where
|
178 |
+
|
179 |
+
* the admin can select custom pages on which the
|
180 |
+
|
181 |
+
* Add to Cart Popup modal should be displayed.
|
182 |
+
*
|
183 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
184 |
+
|
185 |
+
* @since 7.10.0
|
186 |
+
*/
|
187 |
+
|
188 |
+
public static function wcap_custom_pages_section( $wcap_disabled_field ) {
|
189 |
+
|
190 |
+
global $woocommerce;
|
191 |
+
|
192 |
+
$post_title_array = array();
|
193 |
+
|
194 |
+
?>
|
195 |
+
|
196 |
+
<table class = "wcap_custom_pages wcap_atc_between_fields_space" id = "wcap_custom_pages" >
|
197 |
+
|
198 |
+
<tr>
|
199 |
+
|
200 |
+
<th id="wcap_button_section_table_heading" class="wcap_button_section_table_heading"> <?php _e( 'Custom pages to display the pop-up modal on', 'woocommerce-abandoned-cart' ); ?> </th>
|
201 |
+
|
202 |
+
</tr>
|
203 |
+
|
204 |
+
<tr>
|
205 |
+
|
206 |
+
<td>
|
207 |
+
|
208 |
+
<?php
|
209 |
+
|
210 |
+
$custom_pages = get_option( 'wcap_custom_pages_list' );
|
211 |
+
|
212 |
+
?>
|
213 |
+
|
214 |
+
<?php if ( $woocommerce->version >= '3.0' ) { ?>
|
215 |
+
|
216 |
+
<select style="width:80%" multiple="multiple" class="wcap_page_select wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr__( 'Search for a Page…', 'woocommerce-abandoned-cart' ); ?>' data-action='wcap_json_find_pages' disabled>
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
<?php
|
221 |
+
|
222 |
+
if ( is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
|
223 |
+
|
224 |
+
foreach ( $custom_pages as $page_ids ) {
|
225 |
+
|
226 |
+
$post_id = $page_ids;
|
227 |
+
|
228 |
+
$post_title = get_the_title( $post_id );
|
229 |
+
|
230 |
+
printf( "<option value='%s' selected>%s</option>\n", $post_id, $post_title );
|
231 |
+
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
?>
|
236 |
+
|
237 |
+
</select>
|
238 |
+
|
239 |
+
<?php
|
240 |
+
} else {
|
241 |
+
|
242 |
+
if ( is_array( $post_title_array ) && is_array( $custom_pages ) && count( $custom_pages ) > 0 ) {
|
243 |
+
|
244 |
+
foreach ( $custom_pages as $page_ids ) {
|
245 |
+
|
246 |
+
$post_id = $page_ids;
|
247 |
+
|
248 |
+
$post_title = get_the_title( $post_id );
|
249 |
+
|
250 |
+
$post_title_array[ $post_title ] = $post_title;
|
251 |
+
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
?>
|
256 |
+
|
257 |
+
|
258 |
+
|
259 |
+
<input type="hidden" style="width:80%" id = "wcap_page_select" class="wc-product-search" name="wcap_page_select[]" data-placeholder='<?php esc_attr_e( 'Search for a Page…', 'woocommerce-abandoned-cart' ); ?>' data-multiple="true" data-action='wcap_json_find_pages' data-selected=" <?php echo esc_attr( json_encode( $post_title_array ) ); ?>" value="<?php echo implode( ',', array_keys( $post_title_array ) ); ?>" readonly/>
|
260 |
+
|
261 |
+
|
262 |
+
|
263 |
+
<?php } ?>
|
264 |
+
|
265 |
+
|
266 |
+
|
267 |
+
<?php $toolTip = __( 'Please add any custom pages (not created by WooCommerce) where you wish to display the Add to cart Pop-up Modal.', 'woocommerce-abandoned-cart' ); ?>
|
268 |
+
|
269 |
+
<?php echo wc_help_tip( $toolTip ); ?>
|
270 |
+
|
271 |
+
</td>
|
272 |
+
|
273 |
+
</tr>
|
274 |
+
|
275 |
+
<tr>
|
276 |
+
|
277 |
+
<td colspan="2" style="text-align: justify;">
|
278 |
+
|
279 |
+
<?php _e( '<b>Note:</b> Please ensure that the Add to Cart button links on these pages are added with the correct classes and attributes to ensure the plugin can capture the cart data correctly. For further guidance, please check the documentation.', 'woocommerce-abandoned-cart' ); ?>
|
280 |
+
|
281 |
+
</td>
|
282 |
+
|
283 |
+
</tr>
|
284 |
+
|
285 |
+
</table>
|
286 |
+
|
287 |
+
<?php
|
288 |
+
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
|
293 |
+
* It will Save the setting on the add to cart modal settings page.
|
294 |
+
|
295 |
+
* @since 6.0
|
296 |
+
*/
|
297 |
+
|
298 |
+
public static function wcap_add_to_cart_popup_save_settings() {
|
299 |
+
|
300 |
+
if ( $_POST ['wcap_heading_section_text_email'] ) {
|
301 |
+
|
302 |
+
update_option( 'wcap_heading_section_text_email', $_POST ['wcap_heading_section_text_email'] );
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
if ( $_POST ['wcap_popup_heading_color_picker'] ) {
|
307 |
+
|
308 |
+
update_option( 'wcap_popup_heading_color_picker', $_POST ['wcap_popup_heading_color_picker'] );
|
309 |
+
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( $_POST ['wcap_text_section_text'] ) {
|
313 |
+
|
314 |
+
update_option( 'wcap_text_section_text', $_POST ['wcap_text_section_text'] );
|
315 |
+
|
316 |
+
}
|
317 |
+
|
318 |
+
if ( $_POST ['wcap_popup_text_color_picker'] ) {
|
319 |
+
|
320 |
+
update_option( 'wcap_popup_text_color_picker', $_POST ['wcap_popup_text_color_picker'] );
|
321 |
+
|
322 |
+
}
|
323 |
+
|
324 |
+
if ( $_POST ['wcap_email_placeholder_section_input_text'] ) {
|
325 |
+
|
326 |
+
update_option( 'wcap_email_placeholder_section_input_text', $_POST ['wcap_email_placeholder_section_input_text'] );
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
if ( $_POST ['wcap_button_section_input_text'] ) {
|
331 |
+
|
332 |
+
update_option( 'wcap_button_section_input_text', $_POST ['wcap_button_section_input_text'] );
|
333 |
+
|
334 |
+
}
|
335 |
+
|
336 |
+
if ( $_POST ['wcap_button_color_picker'] ) {
|
337 |
+
|
338 |
+
update_option( 'wcap_button_color_picker', $_POST ['wcap_button_color_picker'] );
|
339 |
+
|
340 |
+
}
|
341 |
+
|
342 |
+
if ( isset( $_POST ['wcap_button_text_color_picker'] ) ) {
|
343 |
+
|
344 |
+
update_option( 'wcap_button_text_color_picker', $_POST ['wcap_button_text_color_picker'] );
|
345 |
+
|
346 |
+
}
|
347 |
+
|
348 |
+
if ( isset( $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] ) ) {
|
349 |
+
|
350 |
+
update_option( 'wcap_non_mandatory_text', $_POST ['wcap_non_mandatory_modal_section_fields_input_text'] );
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
$custom_pages = isset( $_POST['wcap_page_select'] ) ? $_POST['wcap_page_select'] : array();
|
355 |
+
|
356 |
+
update_option( 'wcap_custom_pages_list', $custom_pages );
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
|
361 |
+
|
362 |
+
/**
|
363 |
+
|
364 |
+
* It will add the setting for Heading section on the add to cart modal settings page.
|
365 |
+
|
366 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
367 |
+
|
368 |
+
* @since 6.0
|
369 |
+
*/
|
370 |
+
|
371 |
+
public static function wcap_add_heading_section( $wcap_disabled_field ) {
|
372 |
+
|
373 |
+
?>
|
374 |
+
|
375 |
+
<div id = "wcap_heading_section_div" class = "wcap_heading_section_div wcap_atc_between_fields_space">
|
376 |
+
|
377 |
+
<table id = "wcap_heading_section_table" class = "wcap_heading_section_table">
|
378 |
+
|
379 |
+
<th id = "wcap_heading_section_table_heading" class ="wcap_heading_section_table_heading"> Modal Heading </th>
|
380 |
+
|
381 |
+
<tr id = "wcap_heading_section_tr" class = "wcap_heading_section_tr" >
|
382 |
+
|
383 |
+
<td id = "wcap_heading_section_text_field" class = "wcap_heading_section_text_field test_borders">
|
384 |
+
|
385 |
+
<input id = "wcap_heading_section_text_email" v-model = "wcap_heading_section_text_email" name = "wcap_heading_section_text_email"class = "wcap_heading_section_text_email"
|
386 |
+
|
387 |
+
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Please enter your email address', 'woocommerce-abandoned-cart' ); ?>">
|
388 |
+
|
389 |
+
</td>
|
390 |
+
|
391 |
+
<td id = "wcap_heading_section_text_field_color" class = "wcap_heading_section_text_field_color test_borders">
|
392 |
+
|
393 |
+
<?php $wcap_popup_heading_color_picker = get_option( 'wcap_popup_heading_color_picker' ); ?>
|
394 |
+
|
395 |
+
<span class = "colorpickpreview" style = "background:<?php echo $wcap_popup_heading_color_picker; ?>"></span>
|
396 |
+
|
397 |
+
<input class = "wcap_popup_heading_color_picker colorpick" name = "wcap_popup_heading_color_picker" value = "#737f97" v-model = "wcap_popup_heading_color" v-on:input = "wcap_atc_popup_heading.color = $event.target.value"
|
398 |
+
|
399 |
+
<?php echo $wcap_disabled_field; ?> readonly >
|
400 |
+
|
401 |
+
</td>
|
402 |
+
|
403 |
+
</tr>
|
404 |
+
|
405 |
+
</table>
|
406 |
+
|
407 |
+
</div>
|
408 |
+
|
409 |
+
<?php
|
410 |
+
|
411 |
+
}
|
412 |
+
|
413 |
+
|
414 |
+
|
415 |
+
/**
|
416 |
+
|
417 |
+
* It will add the setting for Text displayed below heading section on the add to cart modal settings page.
|
418 |
+
|
419 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
420 |
+
|
421 |
+
* @since 6.0
|
422 |
+
*/
|
423 |
+
|
424 |
+
public static function wcap_add_text_section( $wcap_disabled_field ) {
|
425 |
+
|
426 |
+
?>
|
427 |
+
|
428 |
+
<div id = "wcap_text_section_div" class = "wcap_text_section_div wcap_atc_between_fields_space">
|
429 |
+
|
430 |
+
<table id = "wcap_text_section_table" class = "wcap_text_section_table">
|
431 |
+
|
432 |
+
<th id = "wcap_text_section_table_heading" class = "wcap_text_section_table_heading"> Modal Text </th>
|
433 |
+
|
434 |
+
<tr id = "wcap_text_section_tr" class = "wcap_text_section_tr" >
|
435 |
+
|
436 |
+
<td id = "wcap_text_section_text_field" class = "wcap_text_section_text_field test_borders">
|
437 |
+
|
438 |
+
<input id = "wcap_text_section_text" v-model = "wcap_text_section_text_field" class="wcap_text_section_input_text" name = "wcap_text_section_text"
|
439 |
+
|
440 |
+
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'To add this item to your cart, please enter your email address.', 'woocommerce-abandoned-cart' ); ?>">
|
441 |
+
|
442 |
+
</td>
|
443 |
+
|
444 |
+
<td id = "wcap_text_section_field_color" class = "wcap_text_section_field_color test_borders">
|
445 |
+
|
446 |
+
<?php $wcap_atc_popup_text_color = get_option( 'wcap_popup_text_color_picker' ); ?>
|
447 |
+
|
448 |
+
<span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_popup_text_color; ?>"></span>
|
449 |
+
|
450 |
+
<input class = "wcap_popup_text_color_picker colorpick" name = "wcap_popup_text_color_picker" value = "#bbc9d2" v-model = "wcap_popup_text_color" v-on:input = "wcap_atc_popup_text.color = $event.target.value"
|
451 |
+
|
452 |
+
<?php echo $wcap_disabled_field; ?> readonly>
|
453 |
+
|
454 |
+
</td>
|
455 |
+
|
456 |
+
</tr>
|
457 |
+
|
458 |
+
</table>
|
459 |
+
|
460 |
+
</div>
|
461 |
+
|
462 |
+
<?php
|
463 |
+
|
464 |
+
}
|
465 |
+
|
466 |
+
|
467 |
+
|
468 |
+
/**
|
469 |
+
|
470 |
+
* It will add the setting for email placeholder on the add to cart modal settings page.
|
471 |
+
|
472 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
473 |
+
|
474 |
+
* @since 6.0
|
475 |
+
*/
|
476 |
+
|
477 |
+
public static function wcap_email_placeholder_section( $wcap_disabled_field ) {
|
478 |
+
|
479 |
+
?>
|
480 |
+
|
481 |
+
<div id = "wcap_email_placeholder_section_div" class = "wcap_email_placeholder_section_div wcap_atc_between_fields_space">
|
482 |
+
|
483 |
+
<table id = "wcap_email_placeholder_section_table" class = "wcap_email_placeholder_section_table">
|
484 |
+
|
485 |
+
<th id = "wcap_email_placeholder_section_table_heading" class = "wcap_email_placeholder_section_table_heading"> Email placeholder </th>
|
486 |
+
|
487 |
+
<tr id = "wcap_email_placeholder_section_tr" class = "wcap_email_placeholder_section_tr" >
|
488 |
+
|
489 |
+
<td id = "wcap_email_placeholder_section_text_field" class = "wcap_email_placeholder_section_text_field test_borders">
|
490 |
+
|
491 |
+
<input id = "wcap_email_placeholder_section_input_text" v-model = "wcap_email_placeholder_section_input_text" class="wcap_email_placeholder_section_input_text" name = "wcap_email_placeholder_section_input_text"
|
492 |
+
|
493 |
+
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Email address', 'woocommerce-abandoned-cart' ); ?>">
|
494 |
+
|
495 |
+
</td>
|
496 |
+
|
497 |
+
</tr>
|
498 |
+
|
499 |
+
</table>
|
500 |
+
|
501 |
+
</div>
|
502 |
+
|
503 |
+
<?php
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
|
508 |
+
|
509 |
+
/**
|
510 |
+
|
511 |
+
* It will add the setting for Add to cart button on the add to cart modal settings page.
|
512 |
+
|
513 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
514 |
+
|
515 |
+
* @since 6.0
|
516 |
+
*/
|
517 |
+
|
518 |
+
public static function wcap_button_section( $wcap_disabled_field ) {
|
519 |
+
|
520 |
+
?>
|
521 |
+
|
522 |
+
<div id = "wcap_button_section_div" class = "wcap_button_section_div wcap_atc_between_fields_space">
|
523 |
+
|
524 |
+
<table id = "wcap_button_section_table" class = "wcap_button_section_table">
|
525 |
+
|
526 |
+
<th id = "wcap_button_section_table_heading" class="wcap_button_section_table_heading"> Add to cart button text </th>
|
527 |
+
|
528 |
+
<tr>
|
529 |
+
|
530 |
+
<td id = "wcap_button_section_text_field" class = "wcap_button_section_text_field test_borders">
|
531 |
+
|
532 |
+
<input id = "wcap_button_section_input_text" v-model = "wcap_button_section_input_text" class="wcap_button_section_input_text" name = "wcap_button_section_input_text"
|
533 |
+
|
534 |
+
<?php echo $wcap_disabled_field; ?> readonly value="<?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?>">
|
535 |
+
|
536 |
+
</td>
|
537 |
+
|
538 |
+
</tr>
|
539 |
+
|
540 |
+
<tr id = "wcap_button_color_section_tr" class = "wcap_button_color_section_tr">
|
541 |
+
|
542 |
+
<td id = "wcap_button_color_section_text_field" class = "wcap_button_color_section_text_field test_borders">
|
543 |
+
|
544 |
+
<?php $wcap_atc_button_bg_color = get_option( 'wcap_button_color_picker' ); ?>
|
545 |
+
|
546 |
+
<span class = "colorpickpreview" style = "background:<?php echo $wcap_atc_button_bg_color; ?>"></span>
|
547 |
+
|
548 |
+
<input id = "wcap_button_color_picker" value = "#0085ba" v-model ="wcap_button_bg_color" v-on:input="wcap_atc_button.backgroundColor = $event.target.value" class="wcap_button_color_picker colorpick" name = "wcap_button_color_picker"
|
549 |
+
|
550 |
+
<?php echo $wcap_disabled_field; ?> readonly >
|
551 |
+
|
552 |
+
</td>
|
553 |
+
|
554 |
+
<td id = "wcap_button_text_color_section_text_field" class = "wcap_button_text_color_section_text_field test_borders">
|
555 |
+
|
556 |
+
<?php $wcap_button_text_color_picker = get_option( 'wcap_button_text_color_picker' ); ?>
|
557 |
+
|
558 |
+
<span class = "colorpickpreview" style = "background:<?php echo $wcap_button_text_color_picker; ?>"></span>
|
559 |
+
|
560 |
+
<input id = "wcap_button_text_color_picker" value = "#ffffff" v-model = "wcap_button_text_color" v-on:input = "wcap_atc_button.color = $event.target.value" class="wcap_button_text_color_picker colorpick" name = "wcap_button_text_color_picker"
|
561 |
+
|
562 |
+
<?php echo $wcap_disabled_field; ?> readonly>
|
563 |
+
|
564 |
+
</td>
|
565 |
+
|
566 |
+
</tr>
|
567 |
+
|
568 |
+
</table>
|
569 |
+
|
570 |
+
</div>
|
571 |
+
|
572 |
+
<?php
|
573 |
+
|
574 |
+
}
|
575 |
+
|
576 |
+
|
577 |
+
|
578 |
+
/**
|
579 |
+
|
580 |
+
* It will add the setting for Email address mandatory field on the add to cart modal settings page.
|
581 |
+
|
582 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
583 |
+
|
584 |
+
* @since 6.0
|
585 |
+
*/
|
586 |
+
|
587 |
+
public static function wcap_mandatory_modal_section( $wcap_disabled_field ) {
|
588 |
+
|
589 |
+
?>
|
590 |
+
|
591 |
+
<table class = "wcap_atc_between_fields_space">
|
592 |
+
|
593 |
+
<th id = "wcap_button_section_table_heading" class = "wcap_button_section_table_heading"> Email address is mandatory ? </th>
|
594 |
+
|
595 |
+
<tr>
|
596 |
+
|
597 |
+
<td>
|
598 |
+
|
599 |
+
<?php
|
600 |
+
|
601 |
+
$wcap_atc_email_mandatory = get_option( 'wcap_atc_mandatory_email' );
|
602 |
+
|
603 |
+
$active_text = $wcap_atc_email_mandatory;
|
604 |
+
|
605 |
+
?>
|
606 |
+
|
607 |
+
<button type = "button" class = "wcap-switch-atc-modal-mandatory wcap-toggle-atc-modal-mandatory" wcap-atc-switch-modal-mandatory = <?php echo $wcap_atc_email_mandatory; ?>
|
608 |
+
|
609 |
+
<?php echo $wcap_disabled_field; ?> readonly >
|
610 |
+
|
611 |
+
<?php echo $active_text; ?> </button>
|
612 |
+
|
613 |
+
</td>
|
614 |
+
|
615 |
+
</tr>
|
616 |
+
|
617 |
+
</table>
|
618 |
+
|
619 |
+
<?php
|
620 |
+
|
621 |
+
}
|
622 |
+
|
623 |
+
|
624 |
+
|
625 |
+
/**
|
626 |
+
|
627 |
+
* It will add the setting for Email address non mandatory field on the add to cart modal settings page.
|
628 |
+
|
629 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
630 |
+
|
631 |
+
* @since 6.0
|
632 |
+
*/
|
633 |
+
|
634 |
+
public static function wcap_non_mandatory_modal_section_field( $wcap_disabled_field ) {
|
635 |
+
|
636 |
+
$wcap_get_mandatory_field = get_option( 'wcap_atc_mandatory_email' );
|
637 |
+
|
638 |
+
$wcap_disabled_email_field = '';
|
639 |
+
|
640 |
+
if ( 'on' == $wcap_get_mandatory_field ) {
|
641 |
+
|
642 |
+
$wcap_disabled_email_field = 'disabled="disabled"';
|
643 |
+
|
644 |
+
}
|
645 |
+
|
646 |
+
?>
|
647 |
+
|
648 |
+
<div id = "wcap_non_mandatory_modal_section_fields_div" class = "wcap_non_mandatory_modal_section_fields_div wcap_atc_between_fields_space">
|
649 |
+
|
650 |
+
<table id = "wcap_non_mandatory_modal_section_fields_div_table" class = "wcap_non_mandatory_modal_section_fields_div_table">
|
651 |
+
|
652 |
+
<th id = "wcap_non_mandatory_modal_section_fields_table_heading"
|
653 |
+
|
654 |
+
class="wcap_non_mandatory_modal_section_fields_table_heading"> Not mandatory text </th>
|
655 |
+
|
656 |
+
<tr id = "wcap_non_mandatory_modal_section_fields_tr" class = "wcap_non_mandatory_modal_section_fields_tr" >
|
657 |
+
|
658 |
+
<td id = "wcap_non_mandatory_modal_section_fields_text_field" class = "wcap_non_mandatory_modal_section_fields_text_field test_borders">
|
659 |
+
|
660 |
+
<input id = "wcap_non_mandatory_modal_section_fields_input_text" v-model = "wcap_non_mandatory_modal_input_text" class = "wcap_non_mandatory_modal_section_fields_input_text" name = "wcap_non_mandatory_modal_section_fields_input_text" readonly value="<?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?>"
|
661 |
+
|
662 |
+
<?php
|
663 |
+
echo $wcap_disabled_field;
|
664 |
+
|
665 |
+
echo $wcap_disabled_email_field;
|
666 |
+
|
667 |
+
?>
|
668 |
+
>
|
669 |
+
|
670 |
+
</td>
|
671 |
+
|
672 |
+
</tr>
|
673 |
+
|
674 |
+
</table>
|
675 |
+
|
676 |
+
</div>
|
677 |
+
|
678 |
+
<?php
|
679 |
+
|
680 |
+
}
|
681 |
+
|
682 |
+
|
683 |
+
|
684 |
+
/**
|
685 |
+
|
686 |
+
* It will will show th preview of the Add To cart Popup modal with the changes made on any of the settings for it.
|
687 |
+
|
688 |
+
* @param string $wcap_disabled_field It will indicate if field need to be disabled or not.
|
689 |
+
|
690 |
+
* @since 6.0
|
691 |
+
*/
|
692 |
+
|
693 |
+
public static function wcap_add_to_cart_popup_modal_preview( $wcap_disabled_field ) {
|
694 |
+
|
695 |
+
?>
|
696 |
+
|
697 |
+
<div class = "wcap_container">
|
698 |
+
|
699 |
+
<div class = "wcap_popup_wrapper">
|
700 |
+
|
701 |
+
<div class = "wcap_popup_content">
|
702 |
+
|
703 |
+
<div class = "wcap_popup_heading_container">
|
704 |
+
|
705 |
+
<div class = "wcap_popup_icon_container" >
|
706 |
+
|
707 |
+
<span class = "wcap_popup_icon" >
|
708 |
+
|
709 |
+
<span class = "wcap_popup_plus_sign" v-bind:style = "wcap_atc_button">
|
710 |
+
|
711 |
+
</span>
|
712 |
+
|
713 |
+
</span>
|
714 |
+
|
715 |
+
</div>
|
716 |
+
|
717 |
+
<div class = "wcap_popup_text_container">
|
718 |
+
|
719 |
+
<h2 class = "wcap_popup_heading" v-bind:style = "wcap_atc_popup_heading" ><?php _e( 'Please enter your email address.', 'woocommerce-abandoned-cart' ); ?></h2>
|
720 |
+
|
721 |
+
<div class = "wcap_popup_text" v-bind:style = "wcap_atc_popup_text" ><?php _e( 'To add this item to your cart, please enter your email address.', 'woocommerce-abandoned-cart' ); ?></div>
|
722 |
+
|
723 |
+
</div>
|
724 |
+
|
725 |
+
</div>
|
726 |
+
|
727 |
+
<div class = "wcap_popup_form">
|
728 |
+
|
729 |
+
<form action = "" name = "wcap_modal_form">
|
730 |
+
|
731 |
+
<div class = "wcap_popup_input_field_container" >
|
732 |
+
|
733 |
+
<input class = "wcap_popup_input" type = "text" value = "" name = "email" placeholder ="<?php _e( 'Email address', 'woocommerce-abandoned-cart' ); ?>"
|
734 |
+
|
735 |
+
<?php echo $wcap_disabled_field; ?> readonly >
|
736 |
+
|
737 |
+
</div>
|
738 |
+
|
739 |
+
<button class = "wcap_popup_button" v-bind:style = "wcap_atc_button"
|
740 |
+
|
741 |
+
<?php echo $wcap_disabled_field; ?> ><?php _e( 'Add to Cart', 'woocommerce-abandoned-cart' ); ?></button>
|
742 |
+
|
743 |
+
<br>
|
744 |
+
|
745 |
+
<br>
|
746 |
+
|
747 |
+
<div id = "wcap_non_mandatory_text_wrapper" class = "wcap_non_mandatory_text_wrapper">
|
748 |
+
|
749 |
+
<a class = "wcap_popup_non_mandatory_button" href = "" > <?php _e( 'No Thanks', 'woocommerce-abandoned-cart' ); ?></a>
|
750 |
+
|
751 |
+
</div>
|
752 |
+
|
753 |
+
</form>
|
754 |
+
|
755 |
+
</div>
|
756 |
+
|
757 |
+
<div class = "wcap_popup_close" ></div>
|
758 |
+
|
759 |
+
</div>
|
760 |
+
|
761 |
+
</div>
|
762 |
+
|
763 |
+
</div>
|
764 |
+
|
765 |
+
<?php
|
766 |
+
|
767 |
+
}
|
768 |
+
|
769 |
+
}
|
770 |
+
|
771 |
+
}
|
772 |
+
|
includes/admin/wcap_pro_settings_callbacks.php
CHANGED
@@ -247,14 +247,14 @@ if ( ! class_exists('WCAP_Pro_Settings_Callbacks' ) ) {
|
|
247 |
|
248 |
|
249 |
|
250 |
-
$selected_value = isset( $args[
|
251 |
|
252 |
$selected = '';
|
253 |
|
254 |
|
255 |
-
if( is_array( $args ) && isset( $args[
|
256 |
-
$html = "<select name='$args[
|
257 |
-
$icon_array = $args[
|
258 |
} else {
|
259 |
$html = "<select name='wcap_fb_user_icon' id='wcap_fb_user_icon' disabled>";
|
260 |
$icon_array = array( 'small' => 'Small', 'medium' => 'Medium' );
|
@@ -270,7 +270,7 @@ if ( ! class_exists('WCAP_Pro_Settings_Callbacks' ) ) {
|
|
270 |
|
271 |
$html .= "</select>";
|
272 |
|
273 |
-
$html .= '<label for="$args[
|
274 |
|
275 |
echo $html;
|
276 |
|
247 |
|
248 |
|
249 |
|
250 |
+
$selected_value = isset( $args[1] ) ? get_option( $args[1], '' ) : '';
|
251 |
|
252 |
$selected = '';
|
253 |
|
254 |
|
255 |
+
if( is_array( $args ) && isset( $args[1] ) && isset( $args[2] ) ) {
|
256 |
+
$html = "<select name='$args[1]' id='$args[1]' disabled>";
|
257 |
+
$icon_array = $args[2];
|
258 |
} else {
|
259 |
$html = "<select name='wcap_fb_user_icon' id='wcap_fb_user_icon' disabled>";
|
260 |
$icon_array = array( 'small' => 'Small', 'medium' => 'Medium' );
|
270 |
|
271 |
$html .= "</select>";
|
272 |
|
273 |
+
$html .= '<label for="$args[1]"> ' . $args[0] . '</label>';
|
274 |
|
275 |
echo $html;
|
276 |
|
includes/class-wcal-delete-handler.php
CHANGED
@@ -28,38 +28,112 @@ class Wcal_Delete_Handler {
|
|
28 |
* @since 2.5.2
|
29 |
*/
|
30 |
public function wcal_delete_bulk_action_handler_function( $abandoned_cart_id ) {
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
$wpdb->
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
43 |
-
$results_delete = $wpdb->get_results(
|
44 |
-
$wpdb->prepare(
|
45 |
-
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
46 |
-
WHERE id = %s',
|
47 |
-
$abandoned_cart_id
|
48 |
-
)
|
49 |
-
);
|
50 |
|
51 |
-
if ( $user_id_of_guest >= '63000000' ) {
|
52 |
-
// Guest user.
|
53 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
54 |
-
$
|
55 |
$wpdb->prepare(
|
56 |
-
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
57 |
WHERE id = %s',
|
58 |
-
$
|
59 |
)
|
60 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
@@ -98,7 +172,7 @@ class Wcal_Delete_Handler {
|
|
98 |
if ( '' !== $delete_ac_after_days && 0 !== $delete_ac_after_days ) {
|
99 |
|
100 |
$delete_ac_after_days_time = $delete_ac_after_days * 86400;
|
101 |
-
$current_time = current_time( 'timestamp' );
|
102 |
$check_time = $current_time - $delete_ac_after_days_time;
|
103 |
|
104 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
28 |
* @since 2.5.2
|
29 |
*/
|
30 |
public function wcal_delete_bulk_action_handler_function( $abandoned_cart_id ) {
|
31 |
+
if ( $abandoned_cart_id > 0 ) {
|
32 |
+
global $wpdb;
|
33 |
+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
34 |
+
$results_get_user_id = $wpdb->get_results(
|
35 |
+
$wpdb->prepare(
|
36 |
+
'SELECT user_id FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
37 |
+
WHERE id = %s',
|
38 |
+
$abandoned_cart_id
|
39 |
+
)
|
40 |
+
);
|
41 |
+
$user_id_of_guest = isset( $results_get_user_id[0]->user_id ) ? $results_get_user_id[0]->user_id : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
|
|
|
|
43 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
44 |
+
$results_delete = $wpdb->get_results(
|
45 |
$wpdb->prepare(
|
46 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
47 |
WHERE id = %s',
|
48 |
+
$abandoned_cart_id
|
49 |
)
|
50 |
);
|
51 |
+
|
52 |
+
if ( $user_id_of_guest >= '63000000' ) {
|
53 |
+
// Guest user.
|
54 |
+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
55 |
+
$results_guest = $wpdb->get_results(
|
56 |
+
$wpdb->prepare(
|
57 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
58 |
+
WHERE id = %s',
|
59 |
+
$user_id_of_guest
|
60 |
+
)
|
61 |
+
);
|
62 |
+
}
|
63 |
+
wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=listcart&wcal_deleted=YES' ) );
|
64 |
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Delete all registered user carts from the Bulk Actions menu in Abandoned Orders page.
|
69 |
+
*
|
70 |
+
* @since 5.8.0
|
71 |
+
*/
|
72 |
+
public function wcal_bulk_action_delete_registered_carts_handler() {
|
73 |
+
global $wpdb;
|
74 |
+
|
75 |
+
$wpdb->query( // phpcs:ignore
|
76 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
77 |
+
WHERE user_id < 63000000
|
78 |
+
AND user_id > 0'
|
79 |
+
);
|
80 |
+
|
81 |
+
wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=listcart&wcal_deleted=YES&wcal_deleted_all_registered=YES' ) );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Delete all guest user carts from the Bulk Actions menu in Abandoned Orders page.
|
86 |
+
*
|
87 |
+
* @since 5.8.0
|
88 |
+
*/
|
89 |
+
public function wcal_bulk_action_delete_guest_carts_handler() {
|
90 |
+
global $wpdb;
|
91 |
+
|
92 |
+
$wpdb->query( // phpcs:ignore
|
93 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
94 |
+
WHERE user_id >= 63000000'
|
95 |
+
);
|
96 |
+
|
97 |
+
$wpdb->query( // phpcs:ignore
|
98 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite`'
|
99 |
+
);
|
100 |
+
|
101 |
+
wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=listcart&wcal_deleted=YES&wcal_deleted_all_guest=YES' ) );
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Delete all visitor user carts from the Bulk Actions menu in Abandoned Orders page.
|
106 |
+
*
|
107 |
+
* @since 5.8.0
|
108 |
+
*/
|
109 |
+
public function wcal_bulk_action_delete_visitor_carts_handler() {
|
110 |
+
global $wpdb;
|
111 |
+
|
112 |
+
$wpdb->query( // phpcs:ignore
|
113 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`
|
114 |
+
WHERE user_id = 0'
|
115 |
+
);
|
116 |
+
|
117 |
+
wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=listcart&wcal_deleted=YES&wcal_deleted_all_visitor=YES' ) );
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Delete all carts from the Bulk Actions menu in Abandoned Orders page.
|
122 |
+
*
|
123 |
+
* @since 5.8.0
|
124 |
+
*/
|
125 |
+
public function wcal_bulk_action_delete_all_carts_handler() {
|
126 |
+
global $wpdb;
|
127 |
+
|
128 |
+
$wpdb->query( // phpcs:ignore
|
129 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite`'
|
130 |
+
);
|
131 |
+
|
132 |
+
$wpdb->query( // phpcs:ignore
|
133 |
+
'DELETE FROM `' . $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite`'
|
134 |
+
);
|
135 |
+
|
136 |
+
wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=listcart&wcal_deleted=YES&wcal_deleted_all=YES' ) );
|
137 |
}
|
138 |
|
139 |
/**
|
172 |
if ( '' !== $delete_ac_after_days && 0 !== $delete_ac_after_days ) {
|
173 |
|
174 |
$delete_ac_after_days_time = $delete_ac_after_days * 86400;
|
175 |
+
$current_time = current_time( 'timestamp' ); // phpcs:ignore
|
176 |
$check_time = $current_time - $delete_ac_after_days_time;
|
177 |
|
178 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
includes/classes/class-wcal-abandoned-orders-table.php
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
4 |
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
5 |
}
|
@@ -13,7 +19,6 @@ if ( ! class_exists( 'WP_List_Table' ) ) {
|
|
13 |
* @package Abandoned-Cart-Lite-for-WooCommerce/Admin/List-Class
|
14 |
* @since 2.5.2
|
15 |
*/
|
16 |
-
|
17 |
class WCAL_Abandoned_Orders_Table extends WP_List_Table {
|
18 |
|
19 |
/**
|
@@ -40,543 +45,763 @@ class WCAL_Abandoned_Orders_Table extends WP_List_Table {
|
|
40 |
*/
|
41 |
public $total_count;
|
42 |
|
43 |
-
|
44 |
* It will add the bulk action function and other variable needed for the class.
|
|
|
45 |
* @since 2.5.2
|
46 |
* @see WP_List_Table::__construct()
|
47 |
*/
|
48 |
public function __construct() {
|
49 |
global $status, $page;
|
50 |
-
// Set parent defaults
|
51 |
-
parent::__construct(
|
52 |
-
|
53 |
-
|
54 |
-
'
|
55 |
-
|
|
|
|
|
56 |
$this->process_bulk_action();
|
57 |
-
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
* It will prepare the list of the abandoned carts, like columns, pagination, sortable column, all data.
|
|
|
62 |
* @since 2.5.2
|
63 |
*/
|
64 |
-
|
65 |
public function wcal_abandoned_order_prepare_items() {
|
66 |
$columns = $this->get_columns();
|
67 |
-
$hidden = array(); // No hidden columns
|
68 |
$sortable = $this->get_sortable_columns();
|
69 |
-
$this->total_count =
|
70 |
$data = $this->wcal_abandoned_cart_data();
|
71 |
$this->_column_headers = array( $columns, $hidden, $sortable );
|
72 |
$total_items = $this->total_count;
|
73 |
-
|
74 |
-
if( count( $data ) > 0 ) {
|
75 |
-
|
76 |
} else {
|
77 |
-
|
78 |
}
|
79 |
-
$this->set_pagination_args(
|
80 |
-
|
81 |
-
'
|
82 |
-
'
|
83 |
-
|
|
|
84 |
);
|
85 |
}
|
86 |
-
|
87 |
/**
|
88 |
* It will add the columns for abanodned orders list.
|
|
|
89 |
* @return array $columns All columns name.
|
90 |
* @since 2.5.2
|
91 |
*/
|
92 |
-
public function get_columns() {
|
93 |
-
|
94 |
$columns = array(
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
);
|
103 |
return apply_filters( 'wcal_abandoned_orders_columns', $columns );
|
104 |
}
|
105 |
-
|
106 |
-
/**
|
107 |
* It is used to add the check box for the items.
|
108 |
-
*
|
109 |
-
* @
|
|
|
110 |
* @since 2.5.2
|
111 |
*/
|
112 |
-
function column_cb( $item ){
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
}
|
123 |
-
|
124 |
/**
|
125 |
* We can mention on which column we need the sorting. Here, abandoned cart date, abandoned cart status
|
|
|
126 |
* @return array $columns Name of the column
|
127 |
* @since 2.5.2
|
128 |
*/
|
129 |
public function get_sortable_columns() {
|
130 |
$columns = array(
|
131 |
-
|
132 |
-
|
133 |
);
|
134 |
return apply_filters( 'wcal_abandoned_orders_sortable_columns', $columns );
|
135 |
}
|
136 |
-
|
137 |
/**
|
138 |
* Render the Email Column. So we will add the action on the hover affect.
|
139 |
* This function used for individual delete of row, It is for hover effect delete.
|
|
|
140 |
* @param array $abandoned_row_info Contains all the data of the abandoned order tabs row .
|
141 |
* @return string $value shown in the Email column.
|
142 |
* @since 2.5.2
|
143 |
*/
|
144 |
-
public function column_email( $abandoned_row_info ) {
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
$abandoned_order_id
|
150 |
-
|
151 |
$wcal_array = array(
|
152 |
-
'action'
|
153 |
-
'cart_id' => $abandoned_order_id
|
154 |
);
|
155 |
-
$wcal_url
|
156 |
-
$wcal_array
|
|
|
157 |
);
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
|
|
175 |
$return_abandoned_orders = array();
|
176 |
$per_page = $this->per_page;
|
177 |
-
$results = array();
|
178 |
$blank_cart_info = '{"cart":[]}';
|
179 |
$blank_cart_info_guest = '[]';
|
180 |
-
$blank_cart
|
181 |
-
$get_section_of_page =
|
182 |
-
$results
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
switch ( $get_section_of_page ) {
|
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 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
$i = 0;
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
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 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
if( isset( $_GET['paged'] ) && $_GET['paged'] > 1 ) {
|
420 |
-
$page_number = $_GET['paged'] - 1;
|
421 |
-
$k = $per_page * $page_number;
|
422 |
-
} else {
|
423 |
-
$k = 0;
|
424 |
-
}
|
425 |
-
$return_abandoned_orders_display = array();
|
426 |
-
for( $j = $k; $j < ( $k+$per_page ); $j++ ) {
|
427 |
-
if( isset( $return_abandoned_orders[$j] ) ) {
|
428 |
-
$return_abandoned_orders_display[$j] = $return_abandoned_orders[$j];
|
429 |
-
} else {
|
430 |
-
break;
|
431 |
-
}
|
432 |
-
}
|
433 |
-
return apply_filters( 'wcal_abandoned_orders_table_data', $return_abandoned_orders_display );
|
434 |
}
|
435 |
-
|
436 |
/**
|
437 |
* It will sort the ascending data based on the abandoned cart date.
|
438 |
-
*
|
439 |
-
* @param array | object $
|
440 |
-
* @
|
|
|
441 |
* @since 2.5.2
|
442 |
*/
|
443 |
-
function wcal_class_order_date_asc( $value1
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
457 |
}
|
458 |
-
|
459 |
/**
|
460 |
* It will sort the descending data based on the abandoned cart date.
|
461 |
-
*
|
462 |
-
* @param array | object $
|
463 |
-
* @
|
|
|
464 |
* @since 2.5.2
|
465 |
*/
|
466 |
-
function wcal_class_order_date_dsc( $value1
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
|
|
480 |
}
|
481 |
-
|
482 |
/**
|
483 |
* It will sort the alphabetally ascending on the abandoned cart staus.
|
484 |
-
*
|
485 |
-
* @param array | object $
|
486 |
-
* @
|
|
|
487 |
* @since 2.5.2
|
488 |
*/
|
489 |
-
function wcal_class_status_asc( $value1
|
490 |
-
|
491 |
}
|
492 |
-
|
493 |
/**
|
494 |
* It will sort the alphabetally descending on the abandoned cart staus.
|
495 |
-
*
|
496 |
-
* @param array | object $
|
497 |
-
* @
|
|
|
498 |
* @since 2.5.2
|
499 |
*/
|
500 |
-
function wcal_class_status_dsc( $value1
|
501 |
-
|
502 |
}
|
503 |
-
|
504 |
/**
|
505 |
* It will display the data for the abanodned column
|
506 |
-
*
|
507 |
-
* @param
|
|
|
508 |
* @return string $value Data of the column
|
509 |
* @since 2.5.2
|
510 |
*/
|
511 |
public function column_default( $wcal_abandoned_orders, $column_name ) {
|
512 |
-
|
513 |
-
|
514 |
-
case 'id'
|
515 |
-
|
516 |
|
517 |
$abandoned_order_id = $wcal_abandoned_orders->id;
|
518 |
-
$wcal_array
|
519 |
-
'action'
|
520 |
-
'cart_id' => $abandoned_order_id
|
521 |
);
|
522 |
-
$wcal_url
|
523 |
-
$wcal_array
|
|
|
524 |
);
|
525 |
-
|
526 |
-
$row_actions['edit']
|
527 |
-
|
528 |
-
|
529 |
-
|
|
|
|
|
|
|
|
|
|
|
530 |
break;
|
531 |
-
case '
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
break;
|
536 |
-
case '
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
break;
|
541 |
-
case '
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
break;
|
546 |
-
|
547 |
-
if( isset( $wcal_abandoned_orders->status ) ) {
|
548 |
-
$value = $wcal_abandoned_orders->status;
|
549 |
-
}
|
550 |
-
break;
|
551 |
-
default:
|
552 |
$value = isset( $wcal_abandoned_orders->$column_name ) ? $wcal_abandoned_orders->$column_name : '';
|
553 |
break;
|
554 |
-
|
555 |
return apply_filters( 'wcal_abandoned_orders_column_default', $value, $wcal_abandoned_orders, $column_name );
|
556 |
}
|
557 |
-
|
558 |
/**
|
559 |
-
*
|
|
|
560 |
* @return array
|
561 |
* @since 2.5.2
|
562 |
*/
|
563 |
public function get_bulk_actions() {
|
564 |
-
|
565 |
-
|
566 |
-
|
|
|
|
|
|
|
|
|
567 |
}
|
568 |
-
|
569 |
/**
|
570 |
* It will give the section name.
|
|
|
571 |
* @return string $section Name of the current section
|
572 |
* @since 2.5.2
|
573 |
*/
|
574 |
-
public function wcal_get_current_section
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
}
|
581 |
}
|
582 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WP List Table Abandoned Orders.
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Lite-for-WooCommerce
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Load WP_List_Table if not loaded.
|
9 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
10 |
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
11 |
}
|
19 |
* @package Abandoned-Cart-Lite-for-WooCommerce/Admin/List-Class
|
20 |
* @since 2.5.2
|
21 |
*/
|
|
|
22 |
class WCAL_Abandoned_Orders_Table extends WP_List_Table {
|
23 |
|
24 |
/**
|
45 |
*/
|
46 |
public $total_count;
|
47 |
|
48 |
+
/**
|
49 |
* It will add the bulk action function and other variable needed for the class.
|
50 |
+
*
|
51 |
* @since 2.5.2
|
52 |
* @see WP_List_Table::__construct()
|
53 |
*/
|
54 |
public function __construct() {
|
55 |
global $status, $page;
|
56 |
+
// Set parent defaults.
|
57 |
+
parent::__construct(
|
58 |
+
array(
|
59 |
+
'singular' => __( 'abandoned_order_id', 'woocommerce-abandoned-cart' ), // singular name of the listed records.
|
60 |
+
'plural' => __( 'abandoned_order_ids', 'woocommerce-abandoned-cart' ), // plural name of the listed records.
|
61 |
+
'ajax' => false, // Does this table support ajax?
|
62 |
+
)
|
63 |
+
);
|
64 |
$this->process_bulk_action();
|
65 |
+
$this->base_url = admin_url( 'admin.php?page=woocommerce_ac_page' );
|
66 |
}
|
67 |
|
68 |
/**
|
69 |
* It will prepare the list of the abandoned carts, like columns, pagination, sortable column, all data.
|
70 |
+
*
|
71 |
* @since 2.5.2
|
72 |
*/
|
|
|
73 |
public function wcal_abandoned_order_prepare_items() {
|
74 |
$columns = $this->get_columns();
|
75 |
+
$hidden = array(); // No hidden columns.
|
76 |
$sortable = $this->get_sortable_columns();
|
77 |
+
$this->total_count = $this->wcal_get_total_count();
|
78 |
$data = $this->wcal_abandoned_cart_data();
|
79 |
$this->_column_headers = array( $columns, $hidden, $sortable );
|
80 |
$total_items = $this->total_count;
|
81 |
+
|
82 |
+
if ( count( $data ) > 0 ) {
|
83 |
+
$this->items = $data;
|
84 |
} else {
|
85 |
+
$this->items = array();
|
86 |
}
|
87 |
+
$this->set_pagination_args(
|
88 |
+
array(
|
89 |
+
'total_items' => $total_items, // We have to calculate the total number of items.
|
90 |
+
'per_page' => $this->per_page, // We have to determine how many items to show on a page.
|
91 |
+
'total_pages' => ceil( $total_items / $this->per_page ), // We have to calculate the total number of pages.
|
92 |
+
)
|
93 |
);
|
94 |
}
|
95 |
+
|
96 |
/**
|
97 |
* It will add the columns for abanodned orders list.
|
98 |
+
*
|
99 |
* @return array $columns All columns name.
|
100 |
* @since 2.5.2
|
101 |
*/
|
102 |
+
public function get_columns() {
|
103 |
+
$columns = array();
|
104 |
$columns = array(
|
105 |
+
'cb' => '<input type="checkbox" />',
|
106 |
+
'id' => __( 'Id', 'woocommerce-abandoned-cart' ),
|
107 |
+
'email' => __( 'Email Address', 'woocommerce-abandoned-cart' ),
|
108 |
+
'customer' => __( 'Customer', 'woocommerce-abandoned-cart' ),
|
109 |
+
'order_total' => __( 'Order Total', 'woocommerce-abandoned-cart' ),
|
110 |
+
'date' => __( 'Abandoned Date', 'woocommerce-abandoned-cart' ),
|
111 |
+
'status' => __( 'Status of Cart', 'woocommerce-abandoned-cart' ),
|
112 |
);
|
113 |
return apply_filters( 'wcal_abandoned_orders_columns', $columns );
|
114 |
}
|
115 |
+
|
116 |
+
/**
|
117 |
* It is used to add the check box for the items.
|
118 |
+
*
|
119 |
+
* @param object $item - Item in the WP List.
|
120 |
+
* @return string html for checkbox.
|
121 |
* @since 2.5.2
|
122 |
*/
|
123 |
+
public function column_cb( $item ) {
|
124 |
+
$abandoned_order_id = '';
|
125 |
+
if ( isset( $item->id ) && $item->id > 0 ) {
|
126 |
+
$abandoned_order_id = $item->id;
|
127 |
+
}
|
128 |
+
return sprintf(
|
129 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
130 |
+
'abandoned_order_id',
|
131 |
+
$abandoned_order_id
|
132 |
+
);
|
133 |
}
|
134 |
+
|
135 |
/**
|
136 |
* We can mention on which column we need the sorting. Here, abandoned cart date, abandoned cart status
|
137 |
+
*
|
138 |
* @return array $columns Name of the column
|
139 |
* @since 2.5.2
|
140 |
*/
|
141 |
public function get_sortable_columns() {
|
142 |
$columns = array(
|
143 |
+
'date' => array( 'date', false ),
|
144 |
+
'status' => array( 'status', false ),
|
145 |
);
|
146 |
return apply_filters( 'wcal_abandoned_orders_sortable_columns', $columns );
|
147 |
}
|
148 |
+
|
149 |
/**
|
150 |
* Render the Email Column. So we will add the action on the hover affect.
|
151 |
* This function used for individual delete of row, It is for hover effect delete.
|
152 |
+
*
|
153 |
* @param array $abandoned_row_info Contains all the data of the abandoned order tabs row .
|
154 |
* @return string $value shown in the Email column.
|
155 |
* @since 2.5.2
|
156 |
*/
|
157 |
+
public function column_email( $abandoned_row_info ) {
|
158 |
+
$row_actions = array();
|
159 |
+
$value = '';
|
160 |
+
$abandoned_order_id = 0;
|
161 |
+
if ( isset( $abandoned_row_info->email ) ) {
|
162 |
+
$abandoned_order_id = $abandoned_row_info->id;
|
163 |
+
|
164 |
$wcal_array = array(
|
165 |
+
'action' => 'wcal_abandoned_cart_info',
|
166 |
+
'cart_id' => $abandoned_order_id,
|
167 |
);
|
168 |
+
$wcal_url = add_query_arg(
|
169 |
+
$wcal_array,
|
170 |
+
admin_url( 'admin-ajax.php' )
|
171 |
);
|
172 |
|
173 |
+
$row_actions['edit'] = '<a oncontextmenu="return false;" class="wcal-button-icon wcal-js-open-modal" data-modal-type="ajax" data-wcal-cart-id="' . $abandoned_order_id . '" href="' . $wcal_url . '">' . __( 'View order', 'woocommerce-abandoned-cart' ) . '</a>';
|
174 |
+
$row_actions['delete'] = '<a href="' . wp_nonce_url(
|
175 |
+
add_query_arg(
|
176 |
+
array(
|
177 |
+
'action' => 'wcal_delete',
|
178 |
+
'abandoned_order_id' => $abandoned_row_info->id,
|
179 |
+
),
|
180 |
+
$this->base_url
|
181 |
+
),
|
182 |
+
'abandoned_order_nonce'
|
183 |
+
) . '">' . __( 'Delete', 'woocommerce-abandoned-cart' ) . '</a>';
|
184 |
+
$email = $abandoned_row_info->email;
|
185 |
+
$value = $email . $this->row_actions( $row_actions );
|
186 |
+
}
|
187 |
+
return apply_filters( 'wcal_abandoned_orders_single_column', $value, $abandoned_order_id, 'email' );
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Return the total count of records for each view.
|
192 |
+
*
|
193 |
+
* @return int $count - Total number of records.
|
194 |
+
* @since 5.8.1
|
195 |
+
*/
|
196 |
+
public function wcal_get_total_count() {
|
197 |
+
|
198 |
+
global $wpdb;
|
199 |
+
$get_section_of_page = self::wcal_get_current_section();
|
200 |
+
$blank_cart_info = '{"cart":[]}';
|
201 |
+
$blank_cart_info_guest = '[]';
|
202 |
+
$blank_cart = '""';
|
203 |
+
$count = 0;
|
204 |
+
|
205 |
+
$ac_cutoff_time = get_option( 'ac_lite_cart_abandoned_time', 10 );
|
206 |
+
$cut_off_time = intval( $ac_cutoff_time ) * 60;
|
207 |
+
$compare_time = current_time( 'timestamp' ) - $cut_off_time; // phpcs:ignore
|
208 |
+
|
209 |
+
switch ( $get_section_of_page ) {
|
210 |
+
case 'wcal_all_abandoned':
|
211 |
+
if ( is_multisite() ) {
|
212 |
+
// Get main site's table prefix.
|
213 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
214 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
215 |
+
$wpdb->prepare(
|
216 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC", // phpcs:ignore
|
217 |
+
"%$blank_cart_info%",
|
218 |
+
$blank_cart_info_guest,
|
219 |
+
$blank_cart,
|
220 |
+
$compare_time
|
221 |
+
)
|
222 |
+
);
|
223 |
+
} else {
|
224 |
+
// Single site - regular table name.
|
225 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
226 |
+
$wpdb->prepare(
|
227 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC",
|
228 |
+
"%$blank_cart_info%",
|
229 |
+
$blank_cart_info_guest,
|
230 |
+
$blank_cart,
|
231 |
+
$compare_time
|
232 |
+
)
|
233 |
+
);
|
234 |
+
}
|
235 |
+
break;
|
236 |
+
|
237 |
+
case 'wcal_all_registered':
|
238 |
+
if ( is_multisite() ) {
|
239 |
+
// Get main site's table prefix.
|
240 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
241 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
242 |
+
$wpdb->prepare(
|
243 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC", // phpcs:ignore
|
244 |
+
"%$blank_cart_info%",
|
245 |
+
$blank_cart_info_guest,
|
246 |
+
$blank_cart,
|
247 |
+
$compare_time
|
248 |
+
)
|
249 |
+
);
|
250 |
+
} else {
|
251 |
+
// Single site - regular table name.
|
252 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
253 |
+
$wpdb->prepare(
|
254 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.user_type = 'REGISTERED' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.abandoned_cart_info NOT LIKE %s ORDER BY wpac.abandoned_cart_time DESC",
|
255 |
+
"%$blank_cart_info%",
|
256 |
+
"%$blank_cart%",
|
257 |
+
$blank_cart,
|
258 |
+
$compare_time
|
259 |
+
)
|
260 |
+
);
|
261 |
+
}
|
262 |
+
break;
|
263 |
+
|
264 |
+
case 'wcal_all_guest':
|
265 |
+
if ( is_multisite() ) {
|
266 |
+
// Get main site's table prefix.
|
267 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
268 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
269 |
+
$wpdb->prepare(
|
270 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC", // phpcs:ignore
|
271 |
+
$blank_cart_info_guest,
|
272 |
+
$blank_cart_info,
|
273 |
+
$blank_cart,
|
274 |
+
$compare_time
|
275 |
+
)
|
276 |
+
);
|
277 |
+
} else {
|
278 |
+
// Single site - regular table name.
|
279 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
280 |
+
$wpdb->prepare(
|
281 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC",
|
282 |
+
$blank_cart_info_guest,
|
283 |
+
$blank_cart_info,
|
284 |
+
$blank_cart,
|
285 |
+
$compare_time
|
286 |
+
)
|
287 |
+
);
|
288 |
+
}
|
289 |
+
break;
|
290 |
+
|
291 |
+
case 'wcal_all_visitor':
|
292 |
+
if ( is_multisite() ) {
|
293 |
+
// Get main site's table prefix.
|
294 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
295 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
296 |
+
$wpdb->prepare(
|
297 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC", // phpcs:ignore
|
298 |
+
$blank_cart_info_guest,
|
299 |
+
$blank_cart_info,
|
300 |
+
$blank_cart,
|
301 |
+
$compare_time
|
302 |
+
)
|
303 |
+
);
|
304 |
+
} else {
|
305 |
+
// Single site - regular table name.
|
306 |
+
$count = $wpdb->get_var( // phpcs:ignore
|
307 |
+
$wpdb->prepare(
|
308 |
+
'SELECT count( wpac.id ) FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id = 0 ORDER BY wpac.abandoned_cart_time DESC",
|
309 |
+
$blank_cart_info_guest,
|
310 |
+
$blank_cart_info,
|
311 |
+
$blank_cart,
|
312 |
+
$compare_time
|
313 |
+
)
|
314 |
+
);
|
315 |
+
}
|
316 |
+
break;
|
317 |
+
|
318 |
+
default:
|
319 |
+
break;
|
320 |
+
}
|
321 |
+
|
322 |
+
return $count;
|
323 |
+
|
324 |
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* It will generate the abandoned cart list data.
|
328 |
+
*
|
329 |
+
* @globals mixed $wpdb
|
330 |
+
* @return array $return_abandoned_orders_display Key and value of all the columns
|
331 |
+
* @since 2.5.2
|
332 |
+
*/
|
333 |
+
public function wcal_abandoned_cart_data() {
|
334 |
+
global $wpdb;
|
335 |
$return_abandoned_orders = array();
|
336 |
$per_page = $this->per_page;
|
337 |
+
$results = array();
|
338 |
$blank_cart_info = '{"cart":[]}';
|
339 |
$blank_cart_info_guest = '[]';
|
340 |
+
$blank_cart = '""';
|
341 |
+
$get_section_of_page = self::wcal_get_current_section();
|
342 |
+
$results = array();
|
343 |
+
|
344 |
+
$ac_cutoff_time = get_option( 'ac_lite_cart_abandoned_time', 10 );
|
345 |
+
$cut_off_time = intval( $ac_cutoff_time ) * 60;
|
346 |
+
$compare_time = current_time( 'timestamp' ) - $cut_off_time; // phpcs:ignore
|
347 |
+
|
348 |
+
$page_number = isset( $_GET['paged'] ) && $_GET['paged'] > 1 ? sanitize_text_field( wp_unslash( $_GET['paged'] ) ) - 1 : 0; // phpcs:ignore
|
349 |
+
if ( $page_number > 0 ) {
|
350 |
+
$offset = $page_number * $per_page;
|
351 |
+
} else {
|
352 |
+
$offset = 0;
|
353 |
+
}
|
354 |
+
|
355 |
switch ( $get_section_of_page ) {
|
356 |
+
case 'wcal_all_abandoned':
|
357 |
+
if ( is_multisite() ) {
|
358 |
+
// Get main site's table prefix.
|
359 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
360 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
361 |
+
$wpdb->prepare(
|
362 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d", // phpcs:ignore
|
363 |
+
"%$blank_cart_info%",
|
364 |
+
$blank_cart_info_guest,
|
365 |
+
$blank_cart,
|
366 |
+
$compare_time,
|
367 |
+
$per_page,
|
368 |
+
$offset
|
369 |
+
)
|
370 |
+
);
|
371 |
+
} else {
|
372 |
+
// Single site - regular table name.
|
373 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
374 |
+
$wpdb->prepare(
|
375 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d",
|
376 |
+
"%$blank_cart_info%",
|
377 |
+
$blank_cart_info_guest,
|
378 |
+
$blank_cart,
|
379 |
+
$compare_time,
|
380 |
+
$per_page,
|
381 |
+
$offset
|
382 |
+
)
|
383 |
+
);
|
384 |
+
}
|
385 |
+
break;
|
386 |
+
|
387 |
+
case 'wcal_all_registered':
|
388 |
+
if ( is_multisite() ) {
|
389 |
+
// Get main site's table prefix.
|
390 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
391 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
392 |
+
$wpdb->prepare(
|
393 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d", // phpcs:ignore
|
394 |
+
"%$blank_cart_info%",
|
395 |
+
$blank_cart_info_guest,
|
396 |
+
$blank_cart,
|
397 |
+
$compare_time,
|
398 |
+
$per_page,
|
399 |
+
$offset
|
400 |
+
)
|
401 |
+
);
|
402 |
+
} else {
|
403 |
+
// Single site - regular table name.
|
404 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
405 |
+
$wpdb->prepare(
|
406 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.user_type = 'REGISTERED' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d",
|
407 |
+
"%$blank_cart_info%",
|
408 |
+
"%$blank_cart%",
|
409 |
+
$blank_cart,
|
410 |
+
$compare_time,
|
411 |
+
$per_page,
|
412 |
+
$offset
|
413 |
+
)
|
414 |
+
);
|
415 |
+
}
|
416 |
+
break;
|
417 |
+
|
418 |
+
case 'wcal_all_guest':
|
419 |
+
if ( is_multisite() ) {
|
420 |
+
// Get main site's table prefix.
|
421 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
422 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
423 |
+
$wpdb->prepare(
|
424 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d", // phpcs:ignore
|
425 |
+
$blank_cart_info_guest,
|
426 |
+
$blank_cart_info,
|
427 |
+
$blank_cart,
|
428 |
+
$compare_time,
|
429 |
+
$per_page,
|
430 |
+
$offset
|
431 |
+
)
|
432 |
+
);
|
433 |
+
} else {
|
434 |
+
// Single site - regular table name.
|
435 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
436 |
+
$wpdb->prepare(
|
437 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d",
|
438 |
+
$blank_cart_info_guest,
|
439 |
+
$blank_cart_info,
|
440 |
+
$blank_cart,
|
441 |
+
$compare_time,
|
442 |
+
$per_page,
|
443 |
+
$offset
|
444 |
+
)
|
445 |
+
);
|
446 |
+
}
|
447 |
+
break;
|
448 |
+
|
449 |
+
case 'wcal_all_visitor':
|
450 |
+
if ( is_multisite() ) {
|
451 |
+
// Get main site's table prefix.
|
452 |
+
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
453 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
454 |
+
$wpdb->prepare(
|
455 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $main_prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id >= 63000000 ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d", // phpcs:ignore
|
456 |
+
$blank_cart_info_guest,
|
457 |
+
$blank_cart_info,
|
458 |
+
$blank_cart,
|
459 |
+
$compare_time,
|
460 |
+
$per_page,
|
461 |
+
$offset
|
462 |
+
)
|
463 |
+
);
|
464 |
+
} else {
|
465 |
+
// Single site - regular table name.
|
466 |
+
$results = $wpdb->get_results( // phpcs:ignore
|
467 |
+
$wpdb->prepare(
|
468 |
+
'SELECT wpac . * , wpu.user_login, wpu.user_email FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` AS wpac LEFT JOIN ' . $wpdb->prefix . "users AS wpu ON wpac.user_id = wpu.id WHERE wpac.recovered_cart='0' AND wpac.cart_ignored <> '1' AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_info NOT LIKE %s AND wpac.abandoned_cart_time <= %d AND wpac.user_id = 0 ORDER BY wpac.abandoned_cart_time DESC LIMIT %d OFFSET %d",
|
469 |
+
$blank_cart_info_guest,
|
470 |
+
$blank_cart_info,
|
471 |
+
$blank_cart,
|
472 |
+
$compare_time,
|
473 |
+
$per_page,
|
474 |
+
$offset
|
475 |
+
)
|
476 |
+
);
|
477 |
+
}
|
478 |
+
break;
|
479 |
+
|
480 |
+
default:
|
481 |
+
break;
|
482 |
}
|
483 |
$i = 0;
|
484 |
+
|
485 |
+
$process_wcal_abandoned_orders = $results;
|
486 |
+
foreach ( $process_wcal_abandoned_orders as $key => $value ) {
|
487 |
+
if ( 'GUEST' === $value->user_type ) {
|
488 |
+
$results_guest = $wpdb->get_results( // phpcs:ignore
|
489 |
+
$wpdb->prepare(
|
490 |
+
'SELECT * from `' . $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite` WHERE id = %d',
|
491 |
+
$value->user_id
|
492 |
+
)
|
493 |
+
);
|
494 |
+
}
|
495 |
+
$abandoned_order_id = $value->id;
|
496 |
+
$user_id = $value->user_id;
|
497 |
+
$user_login = $value->user_login;
|
498 |
+
|
499 |
+
if ( 'GUEST' === $value->user_type ) {
|
500 |
+
|
501 |
+
if ( isset( $results_guest[0]->email_id ) ) {
|
502 |
+
$user_email = $results_guest[0]->email_id;
|
503 |
+
} elseif ( '0' === $value->user_id ) {
|
504 |
+
$user_email = '';
|
505 |
+
} else {
|
506 |
+
$user_email = '';
|
507 |
+
}
|
508 |
+
|
509 |
+
if ( isset( $results_guest[0]->billing_first_name ) ) {
|
510 |
+
$user_first_name = $results_guest[0]->billing_first_name;
|
511 |
+
} elseif ( '0' === $value->user_id ) {
|
512 |
+
$user_first_name = 'Visitor';
|
513 |
+
} else {
|
514 |
+
$user_first_name = '';
|
515 |
+
}
|
516 |
+
|
517 |
+
if ( isset( $results_guest[0]->billing_last_name ) ) {
|
518 |
+
$user_last_name = $results_guest[0]->billing_last_name;
|
519 |
+
} elseif ( '0' === $value->user_id ) {
|
520 |
+
$user_last_name = '';
|
521 |
+
} else {
|
522 |
+
$user_last_name = '';
|
523 |
+
}
|
524 |
+
} else {
|
525 |
+
$user_email_biiling = get_user_meta( $user_id, 'billing_email', true );
|
526 |
+
$user_email = __( 'User Deleted', 'woocommerce-abandoned-cart' );
|
527 |
+
if ( isset( $user_email_biiling ) && '' === $user_email_biiling ) {
|
528 |
+
$user_data = get_userdata( $user_id );
|
529 |
+
if ( isset( $user_data->user_email ) && '' !== $user_data->user_email ) {
|
530 |
+
$user_email = $user_data->user_email;
|
531 |
+
}
|
532 |
+
} elseif ( '' !== $user_email_biiling ) {
|
533 |
+
$user_email = $user_email_biiling;
|
534 |
+
}
|
535 |
+
$user_first_name_temp = get_user_meta( $user_id, 'billing_first_name', true );
|
536 |
+
if ( isset( $user_first_name_temp ) && '' === $user_first_name_temp ) {
|
537 |
+
$user_data = get_userdata( $user_id );
|
538 |
+
if ( isset( $user_data->first_name ) && '' !== $user_data->first_name ) {
|
539 |
+
$user_first_name = $user_data->first_name;
|
540 |
+
} else {
|
541 |
+
$user_first_name = '';
|
542 |
+
}
|
543 |
+
} else {
|
544 |
+
$user_first_name = $user_first_name_temp;
|
545 |
+
}
|
546 |
+
|
547 |
+
$user_last_name_temp = get_user_meta( $user_id, 'billing_last_name', true );
|
548 |
+
if ( isset( $user_last_name_temp ) && '' === $user_last_name_temp ) {
|
549 |
+
$user_data = get_userdata( $user_id );
|
550 |
+
if ( isset( $user_data->last_name ) && '' !== $user_data->last_name ) {
|
551 |
+
$user_last_name = $user_data->last_name;
|
552 |
+
} else {
|
553 |
+
$user_last_name = '';
|
554 |
+
}
|
555 |
+
} else {
|
556 |
+
$user_last_name = $user_last_name_temp;
|
557 |
+
}
|
558 |
+
}
|
559 |
+
|
560 |
+
$cart_info = json_decode( $value->abandoned_cart_info );
|
561 |
+
$order_date = '';
|
562 |
+
$cart_update_time = $value->abandoned_cart_time;
|
563 |
+
|
564 |
+
if ( $cart_update_time > 0 ) {
|
565 |
+
$date_format = date_i18n( get_option( 'date_format' ), $cart_update_time );
|
566 |
+
$time_format = date_i18n( get_option( 'time_format' ), $cart_update_time );
|
567 |
+
$order_date = $date_format . ' ' . $time_format;
|
568 |
+
}
|
569 |
+
|
570 |
+
$cart_details = new stdClass();
|
571 |
+
if ( isset( $cart_info->cart ) ) {
|
572 |
+
$cart_details = $cart_info->cart;
|
573 |
+
}
|
574 |
+
$line_total = 0;
|
575 |
+
|
576 |
+
if ( count( get_object_vars( $cart_details ) ) > 0 ) {
|
577 |
+
foreach ( $cart_details as $k => $v ) {
|
578 |
+
if ( isset( $v->line_tax, $v->line_total ) && $v->line_tax > 0 && $v->line_tax > 0 ) {
|
579 |
+
$line_total = $line_total + $v->line_total + $v->line_tax;
|
580 |
+
} elseif ( isset( $v->line_total ) ) {
|
581 |
+
$line_total = $line_total + $v->line_total;
|
582 |
+
}
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
$line_total = wc_price( $line_total );
|
587 |
+
$quantity_total = 0;
|
588 |
+
|
589 |
+
if ( count( get_object_vars( $cart_details ) ) > 0 ) {
|
590 |
+
foreach ( $cart_details as $k => $v ) {
|
591 |
+
$quantity_total = $quantity_total + $v->quantity;
|
592 |
+
}
|
593 |
+
}
|
594 |
+
|
595 |
+
if ( $quantity_total > 1 ) {
|
596 |
+
$item_disp = __( 'items', 'woocommerce-abandoned-cart' );
|
597 |
+
} else {
|
598 |
+
$item_disp = __( 'item', 'woocommerce-abandoned-cart' );
|
599 |
+
}
|
600 |
+
|
601 |
+
if ( 1 === $value->unsubscribe_link ) {
|
602 |
+
$ac_status = __( 'Unsubscribed', 'woocommerce-abandoned-cart' );
|
603 |
+
} elseif ( '0' === $value->cart_ignored && '0' === $value->recovered_cart ) {
|
604 |
+
$ac_status = __( 'Abandoned', 'woocommerce-abandoned-cart' );
|
605 |
+
} else {
|
606 |
+
$ac_status = '';
|
607 |
+
}
|
608 |
+
|
609 |
+
if ( '' !== $ac_status ) {
|
610 |
+
$return_abandoned_orders[ $i ] = new stdClass();
|
611 |
+
if ( $quantity_total > 0 ) {
|
612 |
+
$abandoned_order_id = $abandoned_order_id;
|
613 |
+
$customer_information = $user_first_name . ' ' . $user_last_name;
|
614 |
+
$return_abandoned_orders[ $i ]->id = $abandoned_order_id;
|
615 |
+
$return_abandoned_orders[ $i ]->email = $user_email;
|
616 |
+
$return_abandoned_orders[ $i ]->customer = $customer_information;
|
617 |
+
$return_abandoned_orders[ $i ]->order_total = $line_total;
|
618 |
+
$return_abandoned_orders[ $i ]->date = $order_date;
|
619 |
+
$return_abandoned_orders[ $i ]->status = $ac_status;
|
620 |
+
} else {
|
621 |
+
$abandoned_order_id = $abandoned_order_id;
|
622 |
+
$return_abandoned_orders[ $i ]->id = $abandoned_order_id;
|
623 |
+
$return_abandoned_orders[ $i ]->date = $order_date;
|
624 |
+
$return_abandoned_orders[ $i ]->status = $ac_status;
|
625 |
+
}
|
626 |
+
$i++;
|
627 |
+
}
|
628 |
+
}
|
629 |
+
// Sort for order date.
|
630 |
+
if ( isset( $_GET['orderby'] ) && 'date' === $_GET['orderby'] ) { // phpcs:ignore WordPress.Security.NonceVerification
|
631 |
+
if ( isset( $_GET['order'] ) && 'asc' === $_GET['order'] ) { // phpcs:ignore WordPress.Security.NonceVerification
|
632 |
+
usort( $return_abandoned_orders, array( __CLASS__, 'wcal_class_order_date_asc' ) );
|
633 |
+
} else {
|
634 |
+
usort( $return_abandoned_orders, array( __CLASS__, 'wcal_class_order_date_dsc' ) );
|
635 |
+
}
|
636 |
+
} elseif ( isset( $_GET['orderby'] ) && 'status' === $_GET['orderby'] ) { // phpcs:ignore WordPress.Security.NonceVerification
|
637 |
+
if ( isset( $_GET['order'] ) && 'asc' === $_GET['order'] ) { // phpcs:ignore WordPress.Security.NonceVerification
|
638 |
+
usort( $return_abandoned_orders, array( __CLASS__, 'wcal_class_status_asc' ) );
|
639 |
+
} else {
|
640 |
+
usort( $return_abandoned_orders, array( __CLASS__, 'wcal_class_status_dsc' ) );
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
return apply_filters( 'wcal_abandoned_orders_table_data', $return_abandoned_orders );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
}
|
646 |
+
|
647 |
/**
|
648 |
* It will sort the ascending data based on the abandoned cart date.
|
649 |
+
*
|
650 |
+
* @param array | object $value1 All data of the list.
|
651 |
+
* @param array | object $value2 All data of the list.
|
652 |
+
* @return timestamp
|
653 |
* @since 2.5.2
|
654 |
*/
|
655 |
+
public function wcal_class_order_date_asc( $value1, $value2 ) {
|
656 |
+
$date_two = '';
|
657 |
+
$date_one = '';
|
658 |
+
$value_one = $value1->date;
|
659 |
+
$value_two = $value2->date;
|
660 |
+
$date_formatted_one = date_create_from_format( 'd M, Y h:i A', $value_one );
|
661 |
+
if ( isset( $date_formatted_one ) && '' !== $date_formatted_one ) {
|
662 |
+
$date_one = date_format( $date_formatted_one, 'Y-m-d h:i A' );
|
663 |
+
}
|
664 |
+
|
665 |
+
$date_formatted_two = date_create_from_format( 'd M, Y h:i A', $value_two );
|
666 |
+
if ( isset( $date_formatted_two ) && '' !== $date_formatted_two ) {
|
667 |
+
$date_two = date_format( $date_formatted_two, 'Y-m-d h:i A' );
|
668 |
+
}
|
669 |
+
return strtotime( $date_one ) - strtotime( $date_two );
|
670 |
}
|
671 |
+
|
672 |
/**
|
673 |
* It will sort the descending data based on the abandoned cart date.
|
674 |
+
*
|
675 |
+
* @param array | object $value1 All data of the list.
|
676 |
+
* @param array | object $value2 All data of the list.
|
677 |
+
* @return timestamp
|
678 |
* @since 2.5.2
|
679 |
*/
|
680 |
+
public function wcal_class_order_date_dsc( $value1, $value2 ) {
|
681 |
+
$date_two = '';
|
682 |
+
$date_one = '';
|
683 |
+
$value_one = $value1->date;
|
684 |
+
$value_two = $value2->date;
|
685 |
+
$date_formatted_one = date_create_from_format( 'd M, Y h:i A', $value_one );
|
686 |
+
if ( isset( $date_formatted_one ) && '' !== $date_formatted_one ) {
|
687 |
+
$date_one = date_format( $date_formatted_one, 'Y-m-d h:i A' );
|
688 |
+
}
|
689 |
+
|
690 |
+
$date_formatted_two = date_create_from_format( 'd M, Y h:i A', $value_two );
|
691 |
+
if ( isset( $date_formatted_two ) && '' !== $date_formatted_two ) {
|
692 |
+
$date_two = date_format( $date_formatted_two, 'Y-m-d h:i A' );
|
693 |
+
}
|
694 |
+
return strtotime( $date_two ) - strtotime( $date_one );
|
695 |
}
|
696 |
+
|
697 |
/**
|
698 |
* It will sort the alphabetally ascending on the abandoned cart staus.
|
699 |
+
*
|
700 |
+
* @param array | object $value1 All data of the list.
|
701 |
+
* @param array | object $value2 All data of the list.
|
702 |
+
* @return sorted array
|
703 |
* @since 2.5.2
|
704 |
*/
|
705 |
+
public function wcal_class_status_asc( $value1, $value2 ) {
|
706 |
+
return strcasecmp( $value1->status, $value2->status );
|
707 |
}
|
708 |
+
|
709 |
/**
|
710 |
* It will sort the alphabetally descending on the abandoned cart staus.
|
711 |
+
*
|
712 |
+
* @param array | object $value1 All data of the list.
|
713 |
+
* @param array | object $value2 All data of the list.
|
714 |
+
* @return sorted array
|
715 |
* @since 2.5.2
|
716 |
*/
|
717 |
+
public function wcal_class_status_dsc( $value1, $value2 ) {
|
718 |
+
return strcasecmp( $value2->status, $value1->status );
|
719 |
}
|
720 |
+
|
721 |
/**
|
722 |
* It will display the data for the abanodned column
|
723 |
+
*
|
724 |
+
* @param array | object $wcal_abandoned_orders All data of the list.
|
725 |
+
* @param stirng $column_name Name of the column.
|
726 |
* @return string $value Data of the column
|
727 |
* @since 2.5.2
|
728 |
*/
|
729 |
public function column_default( $wcal_abandoned_orders, $column_name ) {
|
730 |
+
$value = '';
|
731 |
+
switch ( $column_name ) {
|
732 |
+
case 'id':
|
733 |
+
if ( isset( $wcal_abandoned_orders->id ) ) {
|
734 |
|
735 |
$abandoned_order_id = $wcal_abandoned_orders->id;
|
736 |
+
$wcal_array = array(
|
737 |
+
'action' => 'wcal_abandoned_cart_info',
|
738 |
+
'cart_id' => $abandoned_order_id,
|
739 |
);
|
740 |
+
$wcal_url = add_query_arg(
|
741 |
+
$wcal_array,
|
742 |
+
admin_url( 'admin-ajax.php' )
|
743 |
);
|
744 |
+
|
745 |
+
$row_actions['edit'] = '' . __( 'View order', 'woocommerce-abandoned-cart' ) . '</a>';
|
746 |
+
|
747 |
+
$value = '<strong><a oncontextmenu="return false;" class="wcal-button-icon wcal-js-open-modal" data-modal-type="ajax" data-wcal-cart-id="' . $abandoned_order_id . '" href="' . $wcal_url . '">' . $abandoned_order_id . '</a> </strong>';
|
748 |
+
}
|
749 |
+
break;
|
750 |
+
case 'customer':
|
751 |
+
if ( isset( $wcal_abandoned_orders->customer ) ) {
|
752 |
+
$value = $wcal_abandoned_orders->customer;
|
753 |
+
}
|
754 |
break;
|
755 |
+
case 'order_total':
|
756 |
+
if ( isset( $wcal_abandoned_orders->order_total ) ) {
|
757 |
+
$value = $wcal_abandoned_orders->order_total;
|
758 |
+
}
|
759 |
+
break;
|
760 |
+
case 'date':
|
761 |
+
if ( isset( $wcal_abandoned_orders->date ) ) {
|
762 |
+
$value = $wcal_abandoned_orders->date;
|
763 |
+
}
|
764 |
+
break;
|
765 |
+
case 'status':
|
766 |
+
if ( isset( $wcal_abandoned_orders->status ) ) {
|
767 |
+
$value = $wcal_abandoned_orders->status;
|
768 |
+
}
|
769 |
+
break;
|
770 |
+
default:
|
|
|
|
|
|
|
|
|
|
|
771 |
$value = isset( $wcal_abandoned_orders->$column_name ) ? $wcal_abandoned_orders->$column_name : '';
|
772 |
break;
|
773 |
+
}
|
774 |
return apply_filters( 'wcal_abandoned_orders_column_default', $value, $wcal_abandoned_orders, $column_name );
|
775 |
}
|
776 |
+
|
777 |
/**
|
778 |
+
* Add bulk actions in the Abandoned Order tab.
|
779 |
+
*
|
780 |
* @return array
|
781 |
* @since 2.5.2
|
782 |
*/
|
783 |
public function get_bulk_actions() {
|
784 |
+
return array(
|
785 |
+
'wcal_delete' => __( 'Delete', 'woocommerce-abandoned-cart' ),
|
786 |
+
'wcal_delete_all_registered' => __( 'Delete All Registered User Carts', 'woocommerce-abandoned-cart' ),
|
787 |
+
'wcal_delete_all_guest' => __( 'Delete All Guest User Carts', 'woocommerce-abandoned-cart' ),
|
788 |
+
'wcal_delete_all_visitor' => __( 'Delete All Visitor Carts', 'woocommerce-abandoned-cart' ),
|
789 |
+
'wcal_delete_all' => __( 'Delete All Carts', 'woocommerce-abandoned-cart' ),
|
790 |
+
);
|
791 |
}
|
792 |
+
|
793 |
/**
|
794 |
* It will give the section name.
|
795 |
+
*
|
796 |
* @return string $section Name of the current section
|
797 |
* @since 2.5.2
|
798 |
*/
|
799 |
+
public function wcal_get_current_section() {
|
800 |
+
$section = 'wcal_all_abandoned';
|
801 |
+
if ( isset( $_GET['wcal_section'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
802 |
+
$section = sanitize_text_field( wp_unslash( $_GET['wcal_section'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
803 |
+
}
|
804 |
+
return $section;
|
805 |
}
|
806 |
}
|
807 |
+
|
includes/component/deactivate-survey-popup/class-ts-deactivation.php
CHANGED
@@ -1,231 +1,231 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Contains the logic for deactivation popups
|
5 |
-
* @since 1.0.0
|
6 |
-
*/
|
7 |
-
class Wcal_TS_deactivate {
|
8 |
-
public static $ts_deactivation_str;
|
9 |
-
|
10 |
-
public static $ts_generic_questions;
|
11 |
-
|
12 |
-
public static $ts_plugin_specific_questions;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* URL to the Tracker API endpoint.
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
|
19 |
-
private static $api_url = 'http://tracking.tychesoftwares.com/v1/';
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var string Plugin name
|
23 |
-
* @access public
|
24 |
-
*/
|
25 |
-
|
26 |
-
public static $plugin_name = '';
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var string Plugin file name
|
30 |
-
* @access public
|
31 |
-
*/
|
32 |
-
public static $ts_plugin_file_name = '';
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @var string Plugin URL
|
36 |
-
* @access public
|
37 |
-
*/
|
38 |
-
public static $ts_plugin_url = '';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Initialization of hooks where we prepare the functionality to ask use for survey
|
42 |
-
*/
|
43 |
-
public static function init( $ts_plugin_file_name = '', $ts_plugin_name = '' ) {
|
44 |
-
self::$ts_plugin_file_name = $ts_plugin_file_name;
|
45 |
-
self::$plugin_name = $ts_plugin_name;
|
46 |
-
self::$ts_plugin_url = untrailingslashit( plugin_dir_path ( __FILE__ ) );
|
47 |
-
|
48 |
-
self::ts_load_all_str();
|
49 |
-
add_action( 'admin_footer', array( __CLASS__, 'maybe_load_deactivate_options' ) );
|
50 |
-
add_action( 'wp_ajax_ts_submit_uninstall_reason', array( __CLASS__, '_submit_uninstall_reason_action' ) );
|
51 |
-
|
52 |
-
add_filter( 'plugin_action_links_' . self::$ts_plugin_file_name, array( __CLASS__, 'ts_plugin_settings_link' ) );
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Settings link on Plugins page
|
57 |
-
*
|
58 |
-
* @access public
|
59 |
-
* @param array $links
|
60 |
-
* @return array
|
61 |
-
*/
|
62 |
-
public static function ts_plugin_settings_link( $links ) {
|
63 |
-
|
64 |
-
if ( isset ( $links['deactivate'] ) ) {
|
65 |
-
$links['deactivate'] .= '<i class="ts-slug" data-slug="' . self::$ts_plugin_file_name . '"></i>';
|
66 |
-
}
|
67 |
-
return $links;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Localizes all the string used
|
72 |
-
*/
|
73 |
-
public static function ts_load_all_str() {
|
74 |
-
self::$ts_deactivation_str = array(
|
75 |
-
"deactivation-share-reason" => __( "If you have a moment, please let us know why you are deactivating", "ts-deactivation-survey" ),
|
76 |
-
"deactivation-modal-button-submit" => __( "Submit & Deactivate", "ts-deactivation-survey" ),
|
77 |
-
"deactivation-modal-button-deactivate" => __( "Deactivate", "ts-deactivation-survey" ),
|
78 |
-
"deactivation-modal-button-cancel" => __( "Cancel", "ts-deactivation-survey" ),
|
79 |
-
"deactivation-modal-button-confirm" => __( 'Yes - Deactivate', 'ts-deactivation-survey' ),
|
80 |
-
);
|
81 |
-
|
82 |
-
self::$ts_generic_questions = array(
|
83 |
-
"reason-found-a-better-plugin" => __( "I found a better plugin", "ts-deactivation-survey" ),
|
84 |
-
"placeholder-plugin-name" => __( "What's the plugin's name?", "ts-deactivation-survey" ),
|
85 |
-
"reason-needed-for-a-short-period" => __( "I only needed the plugin for a short period", "ts-deactivation-survey" ),
|
86 |
-
"reason-not-working" => __( "The plugin is not working", "ts-deactivation-survey" ),
|
87 |
-
"placeholder-share-what-didnt-work" => __( "Kindly share what didn't work so we can fix it for future users...", "ts-deactivation-survey" ),
|
88 |
-
"reason-great-but-need-specific-feature" => __( "The plugin is great, but I need specific feature that you don't support", "ts-deactivation-survey" ),
|
89 |
-
"placeholder-feature" => __( "What feature?", "ts-deactivation-survey" ),
|
90 |
-
"reason-dont-like-to-share-my-information" => __( "I don't like to share my information with you", "ts-deactivation-survey" ),
|
91 |
-
"reason-other" => _x( "Other", "the text of the 'other' reason for deactivating the plugin that is shown in the modal box.", "ts-deactivation-survey" ),
|
92 |
-
);
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Checking current page and pushing html, js and css for this task
|
97 |
-
* @global string $pagenow current admin page
|
98 |
-
* @global array $VARS global vars to pass to view file
|
99 |
-
*/
|
100 |
-
public static function maybe_load_deactivate_options() {
|
101 |
-
global $pagenow;
|
102 |
-
if ( $pagenow == "plugins.php" ) {
|
103 |
-
global $VARS;
|
104 |
-
$VARS = array( 'slug' => "asvbsd", 'reasons' => self::deactivate_options() );
|
105 |
-
include_once self::$ts_plugin_url . "/template/ts-deactivate-modal.php";
|
106 |
-
}
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* deactivation reasons in array format
|
111 |
-
* @return array reasons array
|
112 |
-
* @since 1.0.0
|
113 |
-
*/
|
114 |
-
public static function deactivate_options() {
|
115 |
-
|
116 |
-
self::$ts_plugin_specific_questions = apply_filters( 'ts_deativate_plugin_questions', array () );
|
117 |
-
|
118 |
-
|
119 |
-
$reason_found_better_plugin = array(
|
120 |
-
'id' => 2,
|
121 |
-
'text' => self::$ts_generic_questions[ 'reason-found-a-better-plugin' ],
|
122 |
-
'input_type' => 'textfield',
|
123 |
-
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-plugin-name' ]
|
124 |
-
);
|
125 |
-
|
126 |
-
$reason_not_working = array(
|
127 |
-
'id' => 3,
|
128 |
-
'text' => self::$ts_generic_questions[ 'reason-not-working' ],
|
129 |
-
'input_type' => 'textfield',
|
130 |
-
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-share-what-didnt-work' ]
|
131 |
-
);
|
132 |
-
|
133 |
-
$reason_great_but_need_specific_feature = array(
|
134 |
-
'id' => 8,
|
135 |
-
'text' => self::$ts_generic_questions[ 'reason-great-but-need-specific-feature' ],
|
136 |
-
'input_type' => 'textfield',
|
137 |
-
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-feature' ]
|
138 |
-
);
|
139 |
-
|
140 |
-
$reason_plugin_not_compatible = isset ( self::$ts_plugin_specific_questions[ 3 ] ) ? self::$ts_plugin_specific_questions[ 3 ] : '' ;
|
141 |
-
|
142 |
-
$reason_other = array(
|
143 |
-
'id' => 10,
|
144 |
-
'text' => self::$ts_generic_questions[ 'reason-other' ],
|
145 |
-
'input_type' => 'textfield',
|
146 |
-
'input_placeholder' => ''
|
147 |
-
);
|
148 |
-
|
149 |
-
$long_term_user_reasons = array(
|
150 |
-
array(
|
151 |
-
'id' => 1,
|
152 |
-
'text' => self::$ts_generic_questions[ 'reason-needed-for-a-short-period' ],
|
153 |
-
'input_type' => '',
|
154 |
-
'input_placeholder' => ''
|
155 |
-
),
|
156 |
-
$reason_found_better_plugin,
|
157 |
-
$reason_not_working,
|
158 |
-
isset ( self::$ts_plugin_specific_questions[ 0 ] ) ? self::$ts_plugin_specific_questions[ 0 ] : '',
|
159 |
-
isset ( self::$ts_plugin_specific_questions[ 1 ] ) ? self::$ts_plugin_specific_questions[ 1 ] : '',
|
160 |
-
isset ( self::$ts_plugin_specific_questions[ 2 ] ) ? self::$ts_plugin_specific_questions[ 2 ] : '',
|
161 |
-
$reason_plugin_not_compatible,
|
162 |
-
$reason_great_but_need_specific_feature,
|
163 |
-
array(
|
164 |
-
'id' => 9,
|
165 |
-
'text' => self::$ts_generic_questions[ 'reason-dont-like-to-share-my-information' ],
|
166 |
-
'input_type' => '',
|
167 |
-
'input_placeholder' => ''
|
168 |
-
)
|
169 |
-
);
|
170 |
-
|
171 |
-
|
172 |
-
$uninstall_reasons[ 'default' ] = $long_term_user_reasons;
|
173 |
-
|
174 |
-
$uninstall_reasons = apply_filters( 'ts_uninstall_reasons', $uninstall_reasons );
|
175 |
-
array_push( $uninstall_reasons['default'], $reason_other );
|
176 |
-
|
177 |
-
return $uninstall_reasons;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* get exact str against the slug
|
182 |
-
*
|
183 |
-
* @param type $slug
|
184 |
-
*
|
185 |
-
* @return type
|
186 |
-
*/
|
187 |
-
public static function load_str( $slug ) {
|
188 |
-
return self::$ts_deactivation_str[ $slug ];
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Called after the user has submitted his reason for deactivating the plugin.
|
193 |
-
*
|
194 |
-
* @since 1.1.2
|
195 |
-
*/
|
196 |
-
public static function _submit_uninstall_reason_action() {
|
197 |
-
if ( ! isset( $_POST[ 'reason_id' ] ) ) {
|
198 |
-
exit;
|
199 |
-
}
|
200 |
-
|
201 |
-
$plugin_data = array();
|
202 |
-
|
203 |
-
$plugin_data[ 'url' ] = home_url();
|
204 |
-
$plugin_data[ 'email' ] = apply_filters( 'ts_tracker_admin_email', get_option( 'admin_email' ) );
|
205 |
-
|
206 |
-
$reason_info = isset( $_REQUEST[ 'reason_info' ] ) ? trim( stripslashes( $_REQUEST[ 'reason_info' ] ) ) : '';
|
207 |
-
|
208 |
-
$plugin_data[ 'reason_id' ] = $_POST[ 'reason_id' ];
|
209 |
-
$plugin_data[ 'reason_info' ] = substr( $reason_info, 0, 128 );
|
210 |
-
$plugin_data[ 'reason_text' ] = $_POST[ 'reason_text' ];
|
211 |
-
|
212 |
-
$plugin_data[ 'ts_meta_data_table_name' ] = 'ts_deactivation_survey';
|
213 |
-
$plugin_data[ 'ts_plugin_name' ] = self::$plugin_name;
|
214 |
-
|
215 |
-
wp_safe_remote_post( self::$api_url, array(
|
216 |
-
'method' => 'POST',
|
217 |
-
'timeout' => 45,
|
218 |
-
'redirection' => 5,
|
219 |
-
'httpversion' => '1.0',
|
220 |
-
'blocking' => false,
|
221 |
-
'headers' => array( 'user-agent' => 'TSTracker/' . md5( esc_url( home_url( '/' ) ) ) . ';' ),
|
222 |
-
'body' => json_encode( $plugin_data ),
|
223 |
-
'cookies' => array(),
|
224 |
-
)
|
225 |
-
);
|
226 |
-
// Print '1' for successful operation.
|
227 |
-
echo 1;
|
228 |
-
exit;
|
229 |
-
}
|
230 |
-
|
231 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Contains the logic for deactivation popups
|
5 |
+
* @since 1.0.0
|
6 |
+
*/
|
7 |
+
class Wcal_TS_deactivate {
|
8 |
+
public static $ts_deactivation_str;
|
9 |
+
|
10 |
+
public static $ts_generic_questions;
|
11 |
+
|
12 |
+
public static $ts_plugin_specific_questions;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* URL to the Tracker API endpoint.
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
|
19 |
+
private static $api_url = 'http://tracking.tychesoftwares.com/v1/';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var string Plugin name
|
23 |
+
* @access public
|
24 |
+
*/
|
25 |
+
|
26 |
+
public static $plugin_name = '';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @var string Plugin file name
|
30 |
+
* @access public
|
31 |
+
*/
|
32 |
+
public static $ts_plugin_file_name = '';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var string Plugin URL
|
36 |
+
* @access public
|
37 |
+
*/
|
38 |
+
public static $ts_plugin_url = '';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Initialization of hooks where we prepare the functionality to ask use for survey
|
42 |
+
*/
|
43 |
+
public static function init( $ts_plugin_file_name = '', $ts_plugin_name = '' ) {
|
44 |
+
self::$ts_plugin_file_name = $ts_plugin_file_name;
|
45 |
+
self::$plugin_name = $ts_plugin_name;
|
46 |
+
self::$ts_plugin_url = untrailingslashit( plugin_dir_path ( __FILE__ ) );
|
47 |
+
|
48 |
+
self::ts_load_all_str();
|
49 |
+
add_action( 'admin_footer', array( __CLASS__, 'maybe_load_deactivate_options' ) );
|
50 |
+
add_action( 'wp_ajax_ts_submit_uninstall_reason', array( __CLASS__, '_submit_uninstall_reason_action' ) );
|
51 |
+
|
52 |
+
add_filter( 'plugin_action_links_' . self::$ts_plugin_file_name, array( __CLASS__, 'ts_plugin_settings_link' ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Settings link on Plugins page
|
57 |
+
*
|
58 |
+
* @access public
|
59 |
+
* @param array $links
|
60 |
+
* @return array
|
61 |
+
*/
|
62 |
+
public static function ts_plugin_settings_link( $links ) {
|
63 |
+
|
64 |
+
if ( isset ( $links['deactivate'] ) ) {
|
65 |
+
$links['deactivate'] .= '<i class="ts-slug" data-slug="' . self::$ts_plugin_file_name . '"></i>';
|
66 |
+
}
|
67 |
+
return $links;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Localizes all the string used
|
72 |
+
*/
|
73 |
+
public static function ts_load_all_str() {
|
74 |
+
self::$ts_deactivation_str = array(
|
75 |
+
"deactivation-share-reason" => __( "If you have a moment, please let us know why you are deactivating", "ts-deactivation-survey" ),
|
76 |
+
"deactivation-modal-button-submit" => __( "Submit & Deactivate", "ts-deactivation-survey" ),
|
77 |
+
"deactivation-modal-button-deactivate" => __( "Deactivate", "ts-deactivation-survey" ),
|
78 |
+
"deactivation-modal-button-cancel" => __( "Cancel", "ts-deactivation-survey" ),
|
79 |
+
"deactivation-modal-button-confirm" => __( 'Yes - Deactivate', 'ts-deactivation-survey' ),
|
80 |
+
);
|
81 |
+
|
82 |
+
self::$ts_generic_questions = array(
|
83 |
+
"reason-found-a-better-plugin" => __( "I found a better plugin", "ts-deactivation-survey" ),
|
84 |
+
"placeholder-plugin-name" => __( "What's the plugin's name?", "ts-deactivation-survey" ),
|
85 |
+
"reason-needed-for-a-short-period" => __( "I only needed the plugin for a short period", "ts-deactivation-survey" ),
|
86 |
+
"reason-not-working" => __( "The plugin is not working", "ts-deactivation-survey" ),
|
87 |
+
"placeholder-share-what-didnt-work" => __( "Kindly share what didn't work so we can fix it for future users...", "ts-deactivation-survey" ),
|
88 |
+
"reason-great-but-need-specific-feature" => __( "The plugin is great, but I need specific feature that you don't support", "ts-deactivation-survey" ),
|
89 |
+
"placeholder-feature" => __( "What feature?", "ts-deactivation-survey" ),
|
90 |
+
"reason-dont-like-to-share-my-information" => __( "I don't like to share my information with you", "ts-deactivation-survey" ),
|
91 |
+
"reason-other" => _x( "Other", "the text of the 'other' reason for deactivating the plugin that is shown in the modal box.", "ts-deactivation-survey" ),
|
92 |
+
);
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Checking current page and pushing html, js and css for this task
|
97 |
+
* @global string $pagenow current admin page
|
98 |
+
* @global array $VARS global vars to pass to view file
|
99 |
+
*/
|
100 |
+
public static function maybe_load_deactivate_options() {
|
101 |
+
global $pagenow;
|
102 |
+
if ( $pagenow == "plugins.php" ) {
|
103 |
+
global $VARS;
|
104 |
+
$VARS = array( 'slug' => "asvbsd", 'reasons' => self::deactivate_options() );
|
105 |
+
include_once self::$ts_plugin_url . "/template/ts-deactivate-modal.php";
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* deactivation reasons in array format
|
111 |
+
* @return array reasons array
|
112 |
+
* @since 1.0.0
|
113 |
+
*/
|
114 |
+
public static function deactivate_options() {
|
115 |
+
|
116 |
+
self::$ts_plugin_specific_questions = apply_filters( 'ts_deativate_plugin_questions', array () );
|
117 |
+
|
118 |
+
|
119 |
+
$reason_found_better_plugin = array(
|
120 |
+
'id' => 2,
|
121 |
+
'text' => self::$ts_generic_questions[ 'reason-found-a-better-plugin' ],
|
122 |
+
'input_type' => 'textfield',
|
123 |
+
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-plugin-name' ]
|
124 |
+
);
|
125 |
+
|
126 |
+
$reason_not_working = array(
|
127 |
+
'id' => 3,
|
128 |
+
'text' => self::$ts_generic_questions[ 'reason-not-working' ],
|
129 |
+
'input_type' => 'textfield',
|
130 |
+
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-share-what-didnt-work' ]
|
131 |
+
);
|
132 |
+
|
133 |
+
$reason_great_but_need_specific_feature = array(
|
134 |
+
'id' => 8,
|
135 |
+
'text' => self::$ts_generic_questions[ 'reason-great-but-need-specific-feature' ],
|
136 |
+
'input_type' => 'textfield',
|
137 |
+
'input_placeholder' => self::$ts_generic_questions[ 'placeholder-feature' ]
|
138 |
+
);
|
139 |
+
|
140 |
+
$reason_plugin_not_compatible = isset ( self::$ts_plugin_specific_questions[ 3 ] ) ? self::$ts_plugin_specific_questions[ 3 ] : '' ;
|
141 |
+
|
142 |
+
$reason_other = array(
|
143 |
+
'id' => 10,
|
144 |
+
'text' => self::$ts_generic_questions[ 'reason-other' ],
|
145 |
+
'input_type' => 'textfield',
|
146 |
+
'input_placeholder' => ''
|
147 |
+
);
|
148 |
+
|
149 |
+
$long_term_user_reasons = array(
|
150 |
+
array(
|
151 |
+
'id' => 1,
|
152 |
+
'text' => self::$ts_generic_questions[ 'reason-needed-for-a-short-period' ],
|
153 |
+
'input_type' => '',
|
154 |
+
'input_placeholder' => ''
|
155 |
+
),
|
156 |
+
$reason_found_better_plugin,
|
157 |
+
$reason_not_working,
|
158 |
+
isset ( self::$ts_plugin_specific_questions[ 0 ] ) ? self::$ts_plugin_specific_questions[ 0 ] : '',
|
159 |
+
isset ( self::$ts_plugin_specific_questions[ 1 ] ) ? self::$ts_plugin_specific_questions[ 1 ] : '',
|
160 |
+
isset ( self::$ts_plugin_specific_questions[ 2 ] ) ? self::$ts_plugin_specific_questions[ 2 ] : '',
|
161 |
+
$reason_plugin_not_compatible,
|
162 |
+
$reason_great_but_need_specific_feature,
|
163 |
+
array(
|
164 |
+
'id' => 9,
|
165 |
+
'text' => self::$ts_generic_questions[ 'reason-dont-like-to-share-my-information' ],
|
166 |
+
'input_type' => '',
|
167 |
+
'input_placeholder' => ''
|
168 |
+
)
|
169 |
+
);
|
170 |
+
|
171 |
+
|
172 |
+
$uninstall_reasons[ 'default' ] = $long_term_user_reasons;
|
173 |
+
|
174 |
+
$uninstall_reasons = apply_filters( 'ts_uninstall_reasons', $uninstall_reasons );
|
175 |
+
array_push( $uninstall_reasons['default'], $reason_other );
|
176 |
+
|
177 |
+
return $uninstall_reasons;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* get exact str against the slug
|
182 |
+
*
|
183 |
+
* @param type $slug
|
184 |
+
*
|
185 |
+
* @return type
|
186 |
+
*/
|
187 |
+
public static function load_str( $slug ) {
|
188 |
+
return self::$ts_deactivation_str[ $slug ];
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Called after the user has submitted his reason for deactivating the plugin.
|
193 |
+
*
|
194 |
+
* @since 1.1.2
|
195 |
+
*/
|
196 |
+
public static function _submit_uninstall_reason_action() {
|
197 |
+
if ( ! isset( $_POST[ 'reason_id' ] ) ) {
|
198 |
+
exit;
|
199 |
+
}
|
200 |
+
|
201 |
+
$plugin_data = array();
|
202 |
+
|
203 |
+
$plugin_data[ 'url' ] = home_url();
|
204 |
+
$plugin_data[ 'email' ] = apply_filters( 'ts_tracker_admin_email', get_option( 'admin_email' ) );
|
205 |
+
|
206 |
+
$reason_info = isset( $_REQUEST[ 'reason_info' ] ) ? trim( stripslashes( $_REQUEST[ 'reason_info' ] ) ) : '';
|
207 |
+
|
208 |
+
$plugin_data[ 'reason_id' ] = $_POST[ 'reason_id' ];
|
209 |
+
$plugin_data[ 'reason_info' ] = substr( $reason_info, 0, 128 );
|
210 |
+
$plugin_data[ 'reason_text' ] = $_POST[ 'reason_text' ];
|
211 |
+
|
212 |
+
$plugin_data[ 'ts_meta_data_table_name' ] = 'ts_deactivation_survey';
|
213 |
+
$plugin_data[ 'ts_plugin_name' ] = self::$plugin_name;
|
214 |
+
|
215 |
+
wp_safe_remote_post( self::$api_url, array(
|
216 |
+
'method' => 'POST',
|
217 |
+
'timeout' => 45,
|
218 |
+
'redirection' => 5,
|
219 |
+
'httpversion' => '1.0',
|
220 |
+
'blocking' => false,
|
221 |
+
'headers' => array( 'user-agent' => 'TSTracker/' . md5( esc_url( home_url( '/' ) ) ) . ';' ),
|
222 |
+
'body' => json_encode( $plugin_data ),
|
223 |
+
'cookies' => array(),
|
224 |
+
)
|
225 |
+
);
|
226 |
+
// Print '1' for successful operation.
|
227 |
+
echo 1;
|
228 |
+
exit;
|
229 |
+
}
|
230 |
+
|
231 |
}
|
includes/component/deactivate-survey-popup/template/ts-deactivate-modal.php
CHANGED
@@ -1,387 +1,387 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
$slug = $VARS[ 'slug' ];
|
7 |
-
$confirmation_message = '';
|
8 |
-
$reasons = $VARS['reasons']['default'];
|
9 |
-
$reasons_list_items_html = '';
|
10 |
-
$plugin_customized_reasons = array();
|
11 |
-
$incr = 0;
|
12 |
-
|
13 |
-
foreach ( $reasons as $reason ) {
|
14 |
-
$list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' ) . ( ( isset( $reason[ 'html' ] ) && ( ! empty( $reason[ 'html' ] ) ) ) ? ' has_html' : '' );
|
15 |
-
|
16 |
-
$reason_html = ( isset( $reason['html'] ) && ( ! empty( $reason['html'] ) ) ) ? '<div class="reason_html">' . $reason['html'] . '</div>' : '';
|
17 |
-
|
18 |
-
$ts_reason_input_type = ( isset( $reason['input_type'] ) && ( ! empty( $reason['input_type'] ) ) ) ? $reason['input_type'] : '';
|
19 |
-
|
20 |
-
$ts_reason_input_placeholder = ( isset( $reason['input_placeholder'] ) && ( ! empty( $reason['input_placeholder'] ) ) ) ? $reason['input_placeholder'] : '';
|
21 |
-
|
22 |
-
$ts_reason_id = ( isset( $reason['id'] ) && ( ! empty( $reason['id'] ) ) ) ? $reason['id'] : '';
|
23 |
-
|
24 |
-
$ts_reason_text = ( isset( $reason['text'] ) && ( ! empty( $reason['text'] ) ) ) ? $reason['text'] : '';
|
25 |
-
|
26 |
-
$selected = "";
|
27 |
-
if ( $incr == 0 ) {
|
28 |
-
$selected = "checked";
|
29 |
-
}
|
30 |
-
|
31 |
-
$reasons_list_items_html .= '<li class="' . $list_item_classes . '" data-input-type="' . $ts_reason_input_type . '" data-input-placeholder="' . $ts_reason_input_placeholder . '"><label><span><input type="radio" name="selected-reason" value="' . $ts_reason_id . '" ' . $selected . '/></span><span>' . $ts_reason_text . '</span></label>' . $reason_html . '</li>';
|
32 |
-
$incr ++;
|
33 |
-
}
|
34 |
-
|
35 |
-
?>
|
36 |
-
<style>
|
37 |
-
.ts-modal {
|
38 |
-
position: fixed;
|
39 |
-
overflow: auto;
|
40 |
-
height: 100%;
|
41 |
-
width: 100%;
|
42 |
-
top: 0;
|
43 |
-
z-index: 100000;
|
44 |
-
display: none;
|
45 |
-
background: rgba(0, 0, 0, 0.6)
|
46 |
-
}
|
47 |
-
|
48 |
-
.ts-modal .ts-modal-dialog {
|
49 |
-
background: transparent;
|
50 |
-
position: absolute;
|
51 |
-
left: 50%;
|
52 |
-
margin-left: -298px;
|
53 |
-
padding-bottom: 30px;
|
54 |
-
top: -100%;
|
55 |
-
z-index: 100001;
|
56 |
-
width: 596px
|
57 |
-
}
|
58 |
-
|
59 |
-
.ts-modal li.reason.has_html .reason_html {
|
60 |
-
display: none;
|
61 |
-
border: 1px solid #ddd;
|
62 |
-
padding: 4px 6px;
|
63 |
-
margin: 6px 0 0 20px;
|
64 |
-
}
|
65 |
-
|
66 |
-
.ts-modal li.reason.has_html.li-active .reason_html {
|
67 |
-
display: block;
|
68 |
-
}
|
69 |
-
|
70 |
-
@media (max-width: 650px) {
|
71 |
-
.ts-modal .ts-modal-dialog {
|
72 |
-
margin-left: -50%;
|
73 |
-
box-sizing: border-box;
|
74 |
-
padding-left: 10px;
|
75 |
-
padding-right: 10px;
|
76 |
-
width: 100%
|
77 |
-
}
|
78 |
-
|
79 |
-
.ts-modal .ts-modal-dialog .ts-modal-panel > h3 > strong {
|
80 |
-
font-size: 1.3em
|
81 |
-
}
|
82 |
-
|
83 |
-
.ts-modal .ts-modal-dialog li.reason {
|
84 |
-
margin-bottom: 10px
|
85 |
-
}
|
86 |
-
|
87 |
-
.ts-modal .ts-modal-dialog li.reason .reason-input {
|
88 |
-
margin-left: 29px
|
89 |
-
}
|
90 |
-
|
91 |
-
.ts-modal .ts-modal-dialog li.reason label {
|
92 |
-
display: table
|
93 |
-
}
|
94 |
-
|
95 |
-
.ts-modal .ts-modal-dialog li.reason label > span {
|
96 |
-
display: table-cell;
|
97 |
-
font-size: 1.3em
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
.ts-modal.active {
|
102 |
-
display: block
|
103 |
-
}
|
104 |
-
|
105 |
-
.ts-modal.active:before {
|
106 |
-
display: block
|
107 |
-
}
|
108 |
-
|
109 |
-
.ts-modal.active .ts-modal-dialog {
|
110 |
-
top: 10%
|
111 |
-
}
|
112 |
-
|
113 |
-
.ts-modal .ts-modal-body, .ts-modal .ts-modal-footer {
|
114 |
-
border: 0;
|
115 |
-
background: #fefefe;
|
116 |
-
padding: 20px
|
117 |
-
}
|
118 |
-
|
119 |
-
.ts-modal .ts-modal-body {
|
120 |
-
border-bottom: 0
|
121 |
-
}
|
122 |
-
|
123 |
-
.ts-modal .ts-modal-body h2 {
|
124 |
-
font-size: 20px
|
125 |
-
}
|
126 |
-
|
127 |
-
.ts-modal .ts-modal-body > div {
|
128 |
-
margin-top: 10px
|
129 |
-
}
|
130 |
-
|
131 |
-
.ts-modal .ts-modal-body > div h2 {
|
132 |
-
font-weight: bold;
|
133 |
-
font-size: 20px;
|
134 |
-
margin-top: 0
|
135 |
-
}
|
136 |
-
|
137 |
-
.ts-modal .ts-modal-footer {
|
138 |
-
border-top: #eeeeee solid 1px;
|
139 |
-
text-align: right
|
140 |
-
}
|
141 |
-
|
142 |
-
.ts-modal .ts-modal-footer > .button {
|
143 |
-
margin: 0 7px
|
144 |
-
}
|
145 |
-
|
146 |
-
.ts-modal .ts-modal-footer > .button:first-child {
|
147 |
-
margin: 0
|
148 |
-
}
|
149 |
-
|
150 |
-
.ts-modal .ts-modal-panel:not(.active) {
|
151 |
-
display: none
|
152 |
-
}
|
153 |
-
|
154 |
-
.ts-modal .reason-input {
|
155 |
-
margin: 3px 0 3px 22px
|
156 |
-
}
|
157 |
-
|
158 |
-
.ts-modal .reason-input input, .ts-modal .reason-input textarea {
|
159 |
-
width: 100%
|
160 |
-
}
|
161 |
-
|
162 |
-
body.has-ts-modal {
|
163 |
-
overflow: hidden
|
164 |
-
}
|
165 |
-
|
166 |
-
#the-list .deactivate > .ts-slug {
|
167 |
-
display: none
|
168 |
-
}
|
169 |
-
|
170 |
-
.ts-modal li.reason-hide {
|
171 |
-
display: none;
|
172 |
-
}
|
173 |
-
|
174 |
-
</style>
|
175 |
-
<script type="text/javascript">
|
176 |
-
var currentPluginName = "";
|
177 |
-
var TSCustomReasons = {};
|
178 |
-
var TSDefaultReason = {};
|
179 |
-
( function ($) {
|
180 |
-
var $deactivateLinks = {};
|
181 |
-
var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ); ?>,
|
182 |
-
modalHtml =
|
183 |
-
'<div class="ts-modal<?php echo ( $confirmation_message == "" ) ? ' no-confirmation-message' : ''; ?>">'
|
184 |
-
+ ' <div class="ts-modal-dialog">'
|
185 |
-
+ ' <div class="ts-modal-body">'
|
186 |
-
+ ' <div class="ts-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
|
187 |
-
+ ' <div class="ts-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( Wcal_TS_deactivate::load_str( 'deactivation-share-reason' ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
|
188 |
-
+ ' </div>'
|
189 |
-
+ ' <div class="ts-modal-footer">'
|
190 |
-
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
191 |
-
+ ' <a href="#" class="button button-primary button-close"><?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-cancel' ) ); ?></a>'
|
192 |
-
+ ' </div>'
|
193 |
-
+ ' </div>'
|
194 |
-
+ '</div>',
|
195 |
-
$modal = $(modalHtml),
|
196 |
-
|
197 |
-
$deactivateLink = $('#the-list .deactivate > .ts-slug').prev();
|
198 |
-
|
199 |
-
for( var i = 0; i < $deactivateLink.length; i++ ) {
|
200 |
-
$deactivateLinks[ $( $deactivateLink[i] ).siblings( ".ts-slug" ).attr( 'data-slug' ) ] = $deactivateLink[i].href;
|
201 |
-
}
|
202 |
-
|
203 |
-
$modal.appendTo( $( 'body' ) );
|
204 |
-
|
205 |
-
registerEventHandlers();
|
206 |
-
|
207 |
-
function registerEventHandlers() {
|
208 |
-
$deactivateLink.on( "click", function (evt) {
|
209 |
-
evt.preventDefault();
|
210 |
-
currentPluginName = $(this).siblings( ".ts-slug" ).attr( 'data-slug' );
|
211 |
-
showModal();
|
212 |
-
});
|
213 |
-
|
214 |
-
$modal.on( 'click', '.button', function (evt) {
|
215 |
-
evt.preventDefault();
|
216 |
-
if ($(this).hasClass( 'disabled' ) ) {
|
217 |
-
return;
|
218 |
-
}
|
219 |
-
|
220 |
-
var _parent = $(this).parents( '.ts-modal:first' );
|
221 |
-
var _this = $(this);
|
222 |
-
|
223 |
-
if( _this.hasClass( 'allow-deactivate' ) ) {
|
224 |
-
var $radio = $('input[type="radio"]:checked');
|
225 |
-
var $selected_reason = $radio.parents('li:first'),
|
226 |
-
$input = $selected_reason.find('textarea, input[type="text"]');
|
227 |
-
if( $radio.length == 0 ) {
|
228 |
-
var data = {
|
229 |
-
'action': 'ts_submit_uninstall_reason',
|
230 |
-
'reason_id': 0,
|
231 |
-
'reason_text': "Deactivated without any option",
|
232 |
-
'plugin_basename': currentPluginName,
|
233 |
-
};
|
234 |
-
} else {
|
235 |
-
var data = {
|
236 |
-
'action': 'ts_submit_uninstall_reason',
|
237 |
-
'reason_id': (0 !== $radio.length) ? $radio.val() : '',
|
238 |
-
'reason_text': $selected_reason.text(),
|
239 |
-
'reason_info': (0 !== $input.length) ? $input.val().trim() : '',
|
240 |
-
'plugin_basename': currentPluginName,
|
241 |
-
};
|
242 |
-
}
|
243 |
-
|
244 |
-
$.ajax({
|
245 |
-
url: ajaxurl,
|
246 |
-
method: 'POST',
|
247 |
-
data: data,
|
248 |
-
beforeSend: function () {
|
249 |
-
_parent.find('.button').addClass('disabled');
|
250 |
-
_parent.find('.button-secondary').text('Processing...');
|
251 |
-
},
|
252 |
-
complete: function () {
|
253 |
-
// Do not show the dialog box, deactivate the plugin.
|
254 |
-
window.location.href = $deactivateLinks[currentPluginName];
|
255 |
-
}
|
256 |
-
});
|
257 |
-
}
|
258 |
-
});
|
259 |
-
|
260 |
-
$modal.on('click', 'input[type="radio"]', function () {
|
261 |
-
console.log( this );
|
262 |
-
var _parent = $(this).parents('li:first');
|
263 |
-
var _parent_ul = $(this).parents('ul#reasons-list');
|
264 |
-
|
265 |
-
_parent_ul.children("li.li-active").removeClass("li-active");
|
266 |
-
|
267 |
-
$modal.find('.reason-input').remove();
|
268 |
-
$modal.find('.button-deactivate').text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-submit' ) ); ?>');
|
269 |
-
|
270 |
-
if (_parent.hasClass('has_html')) {
|
271 |
-
_parent.addClass('li-active');
|
272 |
-
}
|
273 |
-
if (_parent.hasClass('has-input')) {
|
274 |
-
var inputType = _parent.data('input-type'),
|
275 |
-
inputPlaceholder = _parent.data('input-placeholder'),
|
276 |
-
reasonInputHtml = '<div class="reason-input">' + (('textfield' === inputType) ? '<input type="text" />' : '<textarea rows="5"></textarea>') + '</div>';
|
277 |
-
|
278 |
-
_parent.append($(reasonInputHtml));
|
279 |
-
_parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
280 |
-
}
|
281 |
-
});
|
282 |
-
|
283 |
-
// If the user has clicked outside the window, cancel it.
|
284 |
-
$modal.on('click', function (evt) {
|
285 |
-
var $target = $(evt.target);
|
286 |
-
|
287 |
-
// If the user has clicked anywhere in the modal dialog, just return.
|
288 |
-
if ($target.hasClass('ts-modal-body') || $target.hasClass('ts-modal-footer')) {
|
289 |
-
return;
|
290 |
-
}
|
291 |
-
|
292 |
-
// If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
|
293 |
-
if (!$target.hasClass('button-close') && ($target.parents('.ts-modal-body').length > 0 || $target.parents('.ts-modal-footer').length > 0)) {
|
294 |
-
return;
|
295 |
-
}
|
296 |
-
|
297 |
-
closeModal();
|
298 |
-
});
|
299 |
-
}
|
300 |
-
|
301 |
-
function showModal() {
|
302 |
-
resetModal();
|
303 |
-
|
304 |
-
// Display the dialog box.
|
305 |
-
$modal.addClass('active');
|
306 |
-
|
307 |
-
$('body').addClass('has-ts-modal');
|
308 |
-
}
|
309 |
-
|
310 |
-
function closeModal() {
|
311 |
-
$modal.removeClass('active');
|
312 |
-
|
313 |
-
$('body').removeClass('has-ts-modal');
|
314 |
-
}
|
315 |
-
|
316 |
-
function resetModal() {
|
317 |
-
if (TSCustomReasons.hasOwnProperty(currentPluginName) === true) {
|
318 |
-
$modal.find("ul#reasons-list").html(TSCustomReasons[currentPluginName]);
|
319 |
-
} else {
|
320 |
-
$modal.find("ul#reasons-list").html(reasonsHtml);
|
321 |
-
|
322 |
-
}
|
323 |
-
var defaultSelect = TSDefaultReason[currentPluginName];
|
324 |
-
$modal.find('.button').removeClass('disabled');
|
325 |
-
|
326 |
-
// Remove all input fields ( textfield, textarea ).
|
327 |
-
$modal.find('.reason-input').remove();
|
328 |
-
|
329 |
-
var $deactivateButton = $modal.find('.button-deactivate');
|
330 |
-
$modal.find(".reason-hide").hide();
|
331 |
-
/*
|
332 |
-
* If the modal dialog has no confirmation message, that is, it has only one panel, then ensure
|
333 |
-
* that clicking the deactivate button will actually deactivate the plugin.
|
334 |
-
*/
|
335 |
-
if ($modal.hasClass('no-confirmation-message')) {
|
336 |
-
$deactivateButton.addClass('allow-deactivate');
|
337 |
-
showPanel('reasons');
|
338 |
-
}
|
339 |
-
}
|
340 |
-
|
341 |
-
function showPanel(panelType) {
|
342 |
-
$modal.find('.ts-modal-panel').removeClass('active ');
|
343 |
-
$modal.find('[data-panel-id="' + panelType + '"]').addClass('active');
|
344 |
-
|
345 |
-
updateButtonLabels();
|
346 |
-
}
|
347 |
-
|
348 |
-
function updateButtonLabels() {
|
349 |
-
var $deactivateButton = $modal.find('.button-deactivate');
|
350 |
-
|
351 |
-
// Reset the deactivate button's text.
|
352 |
-
if ('confirm' === getCurrentPanel()) {
|
353 |
-
$deactivateButton.text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-confirm' ) ); ?>');
|
354 |
-
} else {
|
355 |
-
var $radio = $('input[type="radio"]:checked');
|
356 |
-
if( $radio.length == 0 ) {
|
357 |
-
$deactivateButton.text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-deactivate' ) ); ?>');
|
358 |
-
} else {
|
359 |
-
var _parent = $( $radio ).parents('li:first');
|
360 |
-
var _parent_ul = $( $radio ).parents('ul#reasons-list');
|
361 |
-
|
362 |
-
_parent_ul.children("li.li-active").removeClass("li-active");
|
363 |
-
|
364 |
-
$modal.find('.reason-input').remove();
|
365 |
-
$modal.find('.button-deactivate').text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-submit' ) ); ?>');
|
366 |
-
|
367 |
-
if (_parent.hasClass('has_html')) {
|
368 |
-
_parent.addClass('li-active');
|
369 |
-
}
|
370 |
-
|
371 |
-
if (_parent.hasClass('has-input')) {
|
372 |
-
var inputType = _parent.data('input-type'),
|
373 |
-
inputPlaceholder = _parent.data('input-placeholder'),
|
374 |
-
reasonInputHtml = '<div class="reason-input">' + (('textfield' === inputType) ? '<input type="text" />' : '<textarea rows="5"></textarea>') + '</div>';
|
375 |
-
|
376 |
-
_parent.append($(reasonInputHtml));
|
377 |
-
_parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
378 |
-
}
|
379 |
-
}
|
380 |
-
}
|
381 |
-
}
|
382 |
-
|
383 |
-
function getCurrentPanel() {
|
384 |
-
return $modal.find('.ts-modal-panel.active').attr('data-panel-id');
|
385 |
-
}
|
386 |
-
})(jQuery);
|
387 |
-
</script>
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
$slug = $VARS[ 'slug' ];
|
7 |
+
$confirmation_message = '';
|
8 |
+
$reasons = $VARS['reasons']['default'];
|
9 |
+
$reasons_list_items_html = '';
|
10 |
+
$plugin_customized_reasons = array();
|
11 |
+
$incr = 0;
|
12 |
+
|
13 |
+
foreach ( $reasons as $reason ) {
|
14 |
+
$list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' ) . ( ( isset( $reason[ 'html' ] ) && ( ! empty( $reason[ 'html' ] ) ) ) ? ' has_html' : '' );
|
15 |
+
|
16 |
+
$reason_html = ( isset( $reason['html'] ) && ( ! empty( $reason['html'] ) ) ) ? '<div class="reason_html">' . $reason['html'] . '</div>' : '';
|
17 |
+
|
18 |
+
$ts_reason_input_type = ( isset( $reason['input_type'] ) && ( ! empty( $reason['input_type'] ) ) ) ? $reason['input_type'] : '';
|
19 |
+
|
20 |
+
$ts_reason_input_placeholder = ( isset( $reason['input_placeholder'] ) && ( ! empty( $reason['input_placeholder'] ) ) ) ? $reason['input_placeholder'] : '';
|
21 |
+
|
22 |
+
$ts_reason_id = ( isset( $reason['id'] ) && ( ! empty( $reason['id'] ) ) ) ? $reason['id'] : '';
|
23 |
+
|
24 |
+
$ts_reason_text = ( isset( $reason['text'] ) && ( ! empty( $reason['text'] ) ) ) ? $reason['text'] : '';
|
25 |
+
|
26 |
+
$selected = "";
|
27 |
+
if ( $incr == 0 ) {
|
28 |
+
$selected = "checked";
|
29 |
+
}
|
30 |
+
|
31 |
+
$reasons_list_items_html .= '<li class="' . $list_item_classes . '" data-input-type="' . $ts_reason_input_type . '" data-input-placeholder="' . $ts_reason_input_placeholder . '"><label><span><input type="radio" name="selected-reason" value="' . $ts_reason_id . '" ' . $selected . '/></span><span>' . $ts_reason_text . '</span></label>' . $reason_html . '</li>';
|
32 |
+
$incr ++;
|
33 |
+
}
|
34 |
+
|
35 |
+
?>
|
36 |
+
<style>
|
37 |
+
.ts-modal {
|
38 |
+
position: fixed;
|
39 |
+
overflow: auto;
|
40 |
+
height: 100%;
|
41 |
+
width: 100%;
|
42 |
+
top: 0;
|
43 |
+
z-index: 100000;
|
44 |
+
display: none;
|
45 |
+
background: rgba(0, 0, 0, 0.6)
|
46 |
+
}
|
47 |
+
|
48 |
+
.ts-modal .ts-modal-dialog {
|
49 |
+
background: transparent;
|
50 |
+
position: absolute;
|
51 |
+
left: 50%;
|
52 |
+
margin-left: -298px;
|
53 |
+
padding-bottom: 30px;
|
54 |
+
top: -100%;
|
55 |
+
z-index: 100001;
|
56 |
+
width: 596px
|
57 |
+
}
|
58 |
+
|
59 |
+
.ts-modal li.reason.has_html .reason_html {
|
60 |
+
display: none;
|
61 |
+
border: 1px solid #ddd;
|
62 |
+
padding: 4px 6px;
|
63 |
+
margin: 6px 0 0 20px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.ts-modal li.reason.has_html.li-active .reason_html {
|
67 |
+
display: block;
|
68 |
+
}
|
69 |
+
|
70 |
+
@media (max-width: 650px) {
|
71 |
+
.ts-modal .ts-modal-dialog {
|
72 |
+
margin-left: -50%;
|
73 |
+
box-sizing: border-box;
|
74 |
+
padding-left: 10px;
|
75 |
+
padding-right: 10px;
|
76 |
+
width: 100%
|
77 |
+
}
|
78 |
+
|
79 |
+
.ts-modal .ts-modal-dialog .ts-modal-panel > h3 > strong {
|
80 |
+
font-size: 1.3em
|
81 |
+
}
|
82 |
+
|
83 |
+
.ts-modal .ts-modal-dialog li.reason {
|
84 |
+
margin-bottom: 10px
|
85 |
+
}
|
86 |
+
|
87 |
+
.ts-modal .ts-modal-dialog li.reason .reason-input {
|
88 |
+
margin-left: 29px
|
89 |
+
}
|
90 |
+
|
91 |
+
.ts-modal .ts-modal-dialog li.reason label {
|
92 |
+
display: table
|
93 |
+
}
|
94 |
+
|
95 |
+
.ts-modal .ts-modal-dialog li.reason label > span {
|
96 |
+
display: table-cell;
|
97 |
+
font-size: 1.3em
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
.ts-modal.active {
|
102 |
+
display: block
|
103 |
+
}
|
104 |
+
|
105 |
+
.ts-modal.active:before {
|
106 |
+
display: block
|
107 |
+
}
|
108 |
+
|
109 |
+
.ts-modal.active .ts-modal-dialog {
|
110 |
+
top: 10%
|
111 |
+
}
|
112 |
+
|
113 |
+
.ts-modal .ts-modal-body, .ts-modal .ts-modal-footer {
|
114 |
+
border: 0;
|
115 |
+
background: #fefefe;
|
116 |
+
padding: 20px
|
117 |
+
}
|
118 |
+
|
119 |
+
.ts-modal .ts-modal-body {
|
120 |
+
border-bottom: 0
|
121 |
+
}
|
122 |
+
|
123 |
+
.ts-modal .ts-modal-body h2 {
|
124 |
+
font-size: 20px
|
125 |
+
}
|
126 |
+
|
127 |
+
.ts-modal .ts-modal-body > div {
|
128 |
+
margin-top: 10px
|
129 |
+
}
|
130 |
+
|
131 |
+
.ts-modal .ts-modal-body > div h2 {
|
132 |
+
font-weight: bold;
|
133 |
+
font-size: 20px;
|
134 |
+
margin-top: 0
|
135 |
+
}
|
136 |
+
|
137 |
+
.ts-modal .ts-modal-footer {
|
138 |
+
border-top: #eeeeee solid 1px;
|
139 |
+
text-align: right
|
140 |
+
}
|
141 |
+
|
142 |
+
.ts-modal .ts-modal-footer > .button {
|
143 |
+
margin: 0 7px
|
144 |
+
}
|
145 |
+
|
146 |
+
.ts-modal .ts-modal-footer > .button:first-child {
|
147 |
+
margin: 0
|
148 |
+
}
|
149 |
+
|
150 |
+
.ts-modal .ts-modal-panel:not(.active) {
|
151 |
+
display: none
|
152 |
+
}
|
153 |
+
|
154 |
+
.ts-modal .reason-input {
|
155 |
+
margin: 3px 0 3px 22px
|
156 |
+
}
|
157 |
+
|
158 |
+
.ts-modal .reason-input input, .ts-modal .reason-input textarea {
|
159 |
+
width: 100%
|
160 |
+
}
|
161 |
+
|
162 |
+
body.has-ts-modal {
|
163 |
+
overflow: hidden
|
164 |
+
}
|
165 |
+
|
166 |
+
#the-list .deactivate > .ts-slug {
|
167 |
+
display: none
|
168 |
+
}
|
169 |
+
|
170 |
+
.ts-modal li.reason-hide {
|
171 |
+
display: none;
|
172 |
+
}
|
173 |
+
|
174 |
+
</style>
|
175 |
+
<script type="text/javascript">
|
176 |
+
var currentPluginName = "";
|
177 |
+
var TSCustomReasons = {};
|
178 |
+
var TSDefaultReason = {};
|
179 |
+
( function ($) {
|
180 |
+
var $deactivateLinks = {};
|
181 |
+
var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ); ?>,
|
182 |
+
modalHtml =
|
183 |
+
'<div class="ts-modal<?php echo ( $confirmation_message == "" ) ? ' no-confirmation-message' : ''; ?>">'
|
184 |
+
+ ' <div class="ts-modal-dialog">'
|
185 |
+
+ ' <div class="ts-modal-body">'
|
186 |
+
+ ' <div class="ts-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
|
187 |
+
+ ' <div class="ts-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( Wcal_TS_deactivate::load_str( 'deactivation-share-reason' ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
|
188 |
+
+ ' </div>'
|
189 |
+
+ ' <div class="ts-modal-footer">'
|
190 |
+
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
191 |
+
+ ' <a href="#" class="button button-primary button-close"><?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-cancel' ) ); ?></a>'
|
192 |
+
+ ' </div>'
|
193 |
+
+ ' </div>'
|
194 |
+
+ '</div>',
|
195 |
+
$modal = $(modalHtml),
|
196 |
+
|
197 |
+
$deactivateLink = $('#the-list .deactivate > .ts-slug').prev();
|
198 |
+
|
199 |
+
for( var i = 0; i < $deactivateLink.length; i++ ) {
|
200 |
+
$deactivateLinks[ $( $deactivateLink[i] ).siblings( ".ts-slug" ).attr( 'data-slug' ) ] = $deactivateLink[i].href;
|
201 |
+
}
|
202 |
+
|
203 |
+
$modal.appendTo( $( 'body' ) );
|
204 |
+
|
205 |
+
registerEventHandlers();
|
206 |
+
|
207 |
+
function registerEventHandlers() {
|
208 |
+
$deactivateLink.on( "click", function (evt) {
|
209 |
+
evt.preventDefault();
|
210 |
+
currentPluginName = $(this).siblings( ".ts-slug" ).attr( 'data-slug' );
|
211 |
+
showModal();
|
212 |
+
});
|
213 |
+
|
214 |
+
$modal.on( 'click', '.button', function (evt) {
|
215 |
+
evt.preventDefault();
|
216 |
+
if ($(this).hasClass( 'disabled' ) ) {
|
217 |
+
return;
|
218 |
+
}
|
219 |
+
|
220 |
+
var _parent = $(this).parents( '.ts-modal:first' );
|
221 |
+
var _this = $(this);
|
222 |
+
|
223 |
+
if( _this.hasClass( 'allow-deactivate' ) ) {
|
224 |
+
var $radio = $('input[type="radio"]:checked');
|
225 |
+
var $selected_reason = $radio.parents('li:first'),
|
226 |
+
$input = $selected_reason.find('textarea, input[type="text"]');
|
227 |
+
if( $radio.length == 0 ) {
|
228 |
+
var data = {
|
229 |
+
'action': 'ts_submit_uninstall_reason',
|
230 |
+
'reason_id': 0,
|
231 |
+
'reason_text': "Deactivated without any option",
|
232 |
+
'plugin_basename': currentPluginName,
|
233 |
+
};
|
234 |
+
} else {
|
235 |
+
var data = {
|
236 |
+
'action': 'ts_submit_uninstall_reason',
|
237 |
+
'reason_id': (0 !== $radio.length) ? $radio.val() : '',
|
238 |
+
'reason_text': $selected_reason.text(),
|
239 |
+
'reason_info': (0 !== $input.length) ? $input.val().trim() : '',
|
240 |
+
'plugin_basename': currentPluginName,
|
241 |
+
};
|
242 |
+
}
|
243 |
+
|
244 |
+
$.ajax({
|
245 |
+
url: ajaxurl,
|
246 |
+
method: 'POST',
|
247 |
+
data: data,
|
248 |
+
beforeSend: function () {
|
249 |
+
_parent.find('.button').addClass('disabled');
|
250 |
+
_parent.find('.button-secondary').text('Processing...');
|
251 |
+
},
|
252 |
+
complete: function () {
|
253 |
+
// Do not show the dialog box, deactivate the plugin.
|
254 |
+
window.location.href = $deactivateLinks[currentPluginName];
|
255 |
+
}
|
256 |
+
});
|
257 |
+
}
|
258 |
+
});
|
259 |
+
|
260 |
+
$modal.on('click', 'input[type="radio"]', function () {
|
261 |
+
console.log( this );
|
262 |
+
var _parent = $(this).parents('li:first');
|
263 |
+
var _parent_ul = $(this).parents('ul#reasons-list');
|
264 |
+
|
265 |
+
_parent_ul.children("li.li-active").removeClass("li-active");
|
266 |
+
|
267 |
+
$modal.find('.reason-input').remove();
|
268 |
+
$modal.find('.button-deactivate').text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-submit' ) ); ?>');
|
269 |
+
|
270 |
+
if (_parent.hasClass('has_html')) {
|
271 |
+
_parent.addClass('li-active');
|
272 |
+
}
|
273 |
+
if (_parent.hasClass('has-input')) {
|
274 |
+
var inputType = _parent.data('input-type'),
|
275 |
+
inputPlaceholder = _parent.data('input-placeholder'),
|
276 |
+
reasonInputHtml = '<div class="reason-input">' + (('textfield' === inputType) ? '<input type="text" />' : '<textarea rows="5"></textarea>') + '</div>';
|
277 |
+
|
278 |
+
_parent.append($(reasonInputHtml));
|
279 |
+
_parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
280 |
+
}
|
281 |
+
});
|
282 |
+
|
283 |
+
// If the user has clicked outside the window, cancel it.
|
284 |
+
$modal.on('click', function (evt) {
|
285 |
+
var $target = $(evt.target);
|
286 |
+
|
287 |
+
// If the user has clicked anywhere in the modal dialog, just return.
|
288 |
+
if ($target.hasClass('ts-modal-body') || $target.hasClass('ts-modal-footer')) {
|
289 |
+
return;
|
290 |
+
}
|
291 |
+
|
292 |
+
// If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
|
293 |
+
if (!$target.hasClass('button-close') && ($target.parents('.ts-modal-body').length > 0 || $target.parents('.ts-modal-footer').length > 0)) {
|
294 |
+
return;
|
295 |
+
}
|
296 |
+
|
297 |
+
closeModal();
|
298 |
+
});
|
299 |
+
}
|
300 |
+
|
301 |
+
function showModal() {
|
302 |
+
resetModal();
|
303 |
+
|
304 |
+
// Display the dialog box.
|
305 |
+
$modal.addClass('active');
|
306 |
+
|
307 |
+
$('body').addClass('has-ts-modal');
|
308 |
+
}
|
309 |
+
|
310 |
+
function closeModal() {
|
311 |
+
$modal.removeClass('active');
|
312 |
+
|
313 |
+
$('body').removeClass('has-ts-modal');
|
314 |
+
}
|
315 |
+
|
316 |
+
function resetModal() {
|
317 |
+
if (TSCustomReasons.hasOwnProperty(currentPluginName) === true) {
|
318 |
+
$modal.find("ul#reasons-list").html(TSCustomReasons[currentPluginName]);
|
319 |
+
} else {
|
320 |
+
$modal.find("ul#reasons-list").html(reasonsHtml);
|
321 |
+
|
322 |
+
}
|
323 |
+
var defaultSelect = TSDefaultReason[currentPluginName];
|
324 |
+
$modal.find('.button').removeClass('disabled');
|
325 |
+
|
326 |
+
// Remove all input fields ( textfield, textarea ).
|
327 |
+
$modal.find('.reason-input').remove();
|
328 |
+
|
329 |
+
var $deactivateButton = $modal.find('.button-deactivate');
|
330 |
+
$modal.find(".reason-hide").hide();
|
331 |
+
/*
|
332 |
+
* If the modal dialog has no confirmation message, that is, it has only one panel, then ensure
|
333 |
+
* that clicking the deactivate button will actually deactivate the plugin.
|
334 |
+
*/
|
335 |
+
if ($modal.hasClass('no-confirmation-message')) {
|
336 |
+
$deactivateButton.addClass('allow-deactivate');
|
337 |
+
showPanel('reasons');
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
function showPanel(panelType) {
|
342 |
+
$modal.find('.ts-modal-panel').removeClass('active ');
|
343 |
+
$modal.find('[data-panel-id="' + panelType + '"]').addClass('active');
|
344 |
+
|
345 |
+
updateButtonLabels();
|
346 |
+
}
|
347 |
+
|
348 |
+
function updateButtonLabels() {
|
349 |
+
var $deactivateButton = $modal.find('.button-deactivate');
|
350 |
+
|
351 |
+
// Reset the deactivate button's text.
|
352 |
+
if ('confirm' === getCurrentPanel()) {
|
353 |
+
$deactivateButton.text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-confirm' ) ); ?>');
|
354 |
+
} else {
|
355 |
+
var $radio = $('input[type="radio"]:checked');
|
356 |
+
if( $radio.length == 0 ) {
|
357 |
+
$deactivateButton.text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-deactivate' ) ); ?>');
|
358 |
+
} else {
|
359 |
+
var _parent = $( $radio ).parents('li:first');
|
360 |
+
var _parent_ul = $( $radio ).parents('ul#reasons-list');
|
361 |
+
|
362 |
+
_parent_ul.children("li.li-active").removeClass("li-active");
|
363 |
+
|
364 |
+
$modal.find('.reason-input').remove();
|
365 |
+
$modal.find('.button-deactivate').text('<?php printf( Wcal_TS_deactivate::load_str( 'deactivation-modal-button-submit' ) ); ?>');
|
366 |
+
|
367 |
+
if (_parent.hasClass('has_html')) {
|
368 |
+
_parent.addClass('li-active');
|
369 |
+
}
|
370 |
+
|
371 |
+
if (_parent.hasClass('has-input')) {
|
372 |
+
var inputType = _parent.data('input-type'),
|
373 |
+
inputPlaceholder = _parent.data('input-placeholder'),
|
374 |
+
reasonInputHtml = '<div class="reason-input">' + (('textfield' === inputType) ? '<input type="text" />' : '<textarea rows="5"></textarea>') + '</div>';
|
375 |
+
|
376 |
+
_parent.append($(reasonInputHtml));
|
377 |
+
_parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
378 |
+
}
|
379 |
+
}
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
function getCurrentPanel() {
|
384 |
+
return $modal.find('.ts-modal-panel.active').attr('data-panel-id');
|
385 |
+
}
|
386 |
+
})(jQuery);
|
387 |
+
</script>
|
includes/wcal_all_component.php
CHANGED
@@ -186,10 +186,10 @@ if ( ! class_exists( 'Wcal_All_Component' ) ) {
|
|
186 |
<br/><br/>
|
187 |
You can refer to this document for creating a <a href="https://documentation.cpanel.net/display/68Docs/Cron+Jobs">cron job</a> in cPanel.'
|
188 |
),
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
9 => array (
|
194 |
'question' => 'How can we translate the strings of {{products.cart}} merge tag in the email?',
|
195 |
'answer' => 'To translate the strings, you need to generate ".po" and ".mo" files in your respective language. These files then need to be added to the following path: "woocommerce-abandoned-cart/i18n/languages"'
|
186 |
<br/><br/>
|
187 |
You can refer to this document for creating a <a href="https://documentation.cpanel.net/display/68Docs/Cron+Jobs">cron job</a> in cPanel.'
|
188 |
),
|
189 |
+
8 => array(
|
190 |
+
'question' => 'Does the plugin consider the cart as abandoned for Pending and Failed order status?',
|
191 |
+
'answer' => 'No, our plugin does not consider such carts (Pending Payment and Failed orders) as abandoned. It will not send the abandoned cart reminder email to the customers if they fail to proceed with the payment.',
|
192 |
+
),
|
193 |
9 => array (
|
194 |
'question' => 'How can we translate the strings of {{products.cart}} merge tag in the email?',
|
195 |
'answer' => 'To translate the strings, you need to generate ".po" and ".mo" files in your respective language. These files then need to be added to the following path: "woocommerce-abandoned-cart/i18n/languages"'
|
readme.txt
CHANGED
@@ -1,1068 +1,1088 @@
|
|
1 |
-
|
2 |
-
=== Abandoned Cart Lite for WooCommerce ===
|
3 |
-
Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares, dhruvin
|
4 |
-
Tags: cart abandonment, abandon cart, cart recovery, recover woocommerce cart, increase woocommerce conversion rate, increase sales with woocommerce
|
5 |
-
Author URI: https://www.tychesoftwares.com/
|
6 |
-
Requires at least: 1.3
|
7 |
-
Tested up to: 5.
|
8 |
-
Stable tag: trunk
|
9 |
-
Requires PHP: 5.6
|
10 |
-
License: GPLv2 or late
|
11 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
-
Donate link: https://www.paypal.me/TycheSoftwares
|
13 |
-
|
14 |
-
This easy-to-use plugin allows WooCommerce store owners to recover sales that are lost to abandoned shopping carts by customers.
|
15 |
-
|
16 |
-
== Description ==
|
17 |
-
|
18 |
-
With the average shopping cart abandonment rate as high as 70%, [Abandoned Cart Plugin](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=topprolink&utm_campaign=AbandonedCartLite) helps you recover those carts from your WooCommerce shop.
|
19 |
-
|
20 |
-
It works in the background, sending email notifications to your guests customers & logged-in customers, reminding them about their abandoned orders.
|
21 |
-
|
22 |
-
70% abandonment rate means that out of 100 potential customers, more than 70 of them are leaving without transacting on the store. Email Remarketing has proven to recover on average between 20-25% of abandoned shopping carts.
|
23 |
-
|
24 |
-
> This plugin works as described: the **lite version doesn't cut down in functionality**. **You can have your orders recovered and save on sales**. Depending on what you are selling, this can be a few orders to **justify ordering the full package - i'm only a few away!**
|
25 |
-
|
26 |
-
>**Very recommended!**
|
27 |
-
> - [jaysnl](https://wordpress.org/support/topic/great-support-and-value-buy-it/)
|
28 |
-
|
29 |
-
The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
|
30 |
-
|
31 |
-
Abandoned Cart Lite plugin enables to do the following things:
|
32 |
-
|
33 |
-
1. Allow your customers to recover their abandoned carts in a **single click**.
|
34 |
-
2. Identify the **Abandoned Orders information**, including the products that were abandoned.
|
35 |
-
3. The plugin now captures abandoned **guest carts**. A guest user's cart will be captured on the **Checkout page**, if it is abandoned after entering the **email address**.
|
36 |
-
4. Track **abandoned orders value v/s recovered orders value**.
|
37 |
-
5. Admin is notified by email when an order is **recovered**.
|
38 |
-
6. Works off-the-shelf as it comes with 1 **default email template**.
|
39 |
-
7. Create **unlimited email templates** to be sent at intervals that you set - Intervals start from 1 hour after cart is abandoned.
|
40 |
-
8. Add custom variables like **Customer First Name, Customer Last name, Customer full name, Cart Link & Product Cart Information** in the email template.
|
41 |
-
9. Copy HTML from anywhere & create templates using the powerful **Rich Text Editor**.
|
42 |
-
10. **Automatically stops email notifications** when a customer makes a purchase or uses the cart recovery link.
|
43 |
-
|
44 |
-
### Differences between Lite & PRO version:
|
45 |
-
|
46 |
-
You can check the detailed difference between Pro and Lite version **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=litelink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
|
47 |
-
|
48 |
-
> I'm using the plugin on my shop. **Installation is very easy and it works great**. I've already recovered some orders, **it doesn't cost any effort**.
|
49 |
-
|
50 |
-
> **Support is fast and extensive**.
|
51 |
-
|
52 |
-
> -[bertkat](https://wordpress.org/support/topic/easy-money/)
|
53 |
-
|
54 |
-
**Pro Version:**
|
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 |
-
<li>
|
154 |
-
<li>
|
155 |
-
</
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
<
|
161 |
-
<li>
|
162 |
-
<li>
|
163 |
-
<li>
|
164 |
-
</
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
<
|
170 |
-
<li>
|
171 |
-
<li>
|
172 |
-
<li>
|
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 |
-
When
|
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 |
-
|
229 |
-
*
|
230 |
-
|
231 |
-
= 5.
|
232 |
-
|
233 |
-
*
|
234 |
-
*
|
235 |
-
* Fix -
|
236 |
-
* Fix -
|
237 |
-
*
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
* Tweak -
|
242 |
-
|
243 |
-
|
244 |
-
*
|
245 |
-
*
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
*
|
255 |
-
*
|
256 |
-
*
|
257 |
-
*
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
*
|
262 |
-
*
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
*
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
*
|
275 |
-
*
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
*
|
280 |
-
* Bug -
|
281 |
-
* Bug -
|
282 |
-
*
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
*
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
*
|
296 |
-
|
297 |
-
= 5.
|
298 |
-
|
299 |
-
* Bug - Fixed
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
*
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
*
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
*
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
*
|
324 |
-
|
325 |
-
*
|
326 |
-
|
327 |
-
*
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
* Bug - Fixed
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
* Bug - Fixed
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
*
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
*
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
*
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
*
|
356 |
-
|
357 |
-
*
|
358 |
-
|
359 |
-
*
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
* Bug
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
*
|
368 |
-
|
369 |
-
*
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
*
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
*
|
382 |
-
|
383 |
-
*
|
384 |
-
|
385 |
-
*
|
386 |
-
|
387 |
-
*
|
388 |
-
|
389 |
-
*
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
*
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
*
|
402 |
-
|
403 |
-
*
|
404 |
-
|
405 |
-
*
|
406 |
-
|
407 |
-
*
|
408 |
-
|
409 |
-
*
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
*
|
414 |
-
|
415 |
-
*
|
416 |
-
|
417 |
-
*
|
418 |
-
|
419 |
-
* Bug Fixed -
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
*
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
*
|
438 |
-
|
439 |
-
*
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
*
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
*
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
*
|
462 |
-
|
463 |
-
* Bug Fixed -
|
464 |
-
|
465 |
-
* Bug Fixed -
|
466 |
-
|
467 |
-
* Bug Fixed -
|
468 |
-
|
469 |
-
*
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
*
|
476 |
-
|
477 |
-
*
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
*
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
*
|
486 |
-
|
487 |
-
* Bug Fixed -
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
*
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
*
|
498 |
-
|
499 |
-
*
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
*
|
506 |
-
|
507 |
-
* Bug Fixed -
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
*
|
514 |
-
|
515 |
-
=
|
516 |
-
|
517 |
-
*
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
*
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
*
|
528 |
-
|
529 |
-
* Bug Fixed -
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
*
|
534 |
-
|
535 |
-
= 3.
|
536 |
-
|
537 |
-
*
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
*
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
*
|
550 |
-
|
551 |
-
*
|
552 |
-
|
553 |
-
* Enhancement -
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
*
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
*
|
564 |
-
|
565 |
-
*
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
*
|
572 |
-
|
573 |
-
*
|
574 |
-
|
575 |
-
*
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
*
|
582 |
-
|
583 |
-
*
|
584 |
-
|
585 |
-
*
|
586 |
-
|
587 |
-
*
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
*
|
594 |
-
|
595 |
-
* Bug
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
*
|
600 |
-
|
601 |
-
*
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
* Enhancements -
|
606 |
-
|
607 |
-
*
|
608 |
-
|
609 |
-
*
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
*
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
*
|
618 |
-
|
619 |
-
*
|
620 |
-
|
621 |
-
*
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
*
|
628 |
-
|
629 |
-
*
|
630 |
-
|
631 |
-
*
|
632 |
-
|
633 |
-
*
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
*
|
638 |
-
|
639 |
-
*
|
640 |
-
|
641 |
-
*
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
*
|
648 |
-
|
649 |
-
*
|
650 |
-
|
651 |
-
*
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
*
|
677 |
-
|
678 |
-
*
|
679 |
-
|
680 |
-
*
|
681 |
-
|
682 |
-
= 2.5.
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
*
|
689 |
-
|
690 |
-
*
|
691 |
-
|
692 |
-
*
|
693 |
-
|
694 |
-
*
|
695 |
-
|
696 |
-
*
|
697 |
-
|
698 |
-
*
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
*
|
710 |
-
* A new
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
*
|
715 |
-
|
716 |
-
|
717 |
-
*
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
*
|
731 |
-
*
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
*
|
751 |
-
*
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
*
|
756 |
-
|
757 |
-
= 1.
|
758 |
-
*
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
*
|
767 |
-
|
768 |
-
=
|
769 |
-
|
770 |
-
*
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
*
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
*
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
*
|
785 |
-
|
786 |
-
*
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
*
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
*
|
816 |
-
|
817 |
-
* Bug Fixed -
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
*
|
824 |
-
|
825 |
-
=
|
826 |
-
|
827 |
-
*
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
*
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
*
|
838 |
-
|
839 |
-
* Bug Fixed -
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
*
|
844 |
-
|
845 |
-
= 3.
|
846 |
-
|
847 |
-
*
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
*
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
*
|
860 |
-
|
861 |
-
*
|
862 |
-
|
863 |
-
* Enhancement -
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
*
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
*
|
874 |
-
|
875 |
-
*
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
*
|
882 |
-
|
883 |
-
*
|
884 |
-
|
885 |
-
*
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
*
|
892 |
-
|
893 |
-
*
|
894 |
-
|
895 |
-
*
|
896 |
-
|
897 |
-
*
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
*
|
904 |
-
|
905 |
-
* Bug
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
*
|
910 |
-
|
911 |
-
*
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
* Enhancements -
|
916 |
-
|
917 |
-
*
|
918 |
-
|
919 |
-
*
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
*
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
*
|
928 |
-
|
929 |
-
*
|
930 |
-
|
931 |
-
*
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
*
|
938 |
-
|
939 |
-
*
|
940 |
-
|
941 |
-
*
|
942 |
-
|
943 |
-
*
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
*
|
948 |
-
|
949 |
-
*
|
950 |
-
|
951 |
-
*
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
*
|
958 |
-
|
959 |
-
*
|
960 |
-
|
961 |
-
*
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
*
|
966 |
-
|
967 |
-
*
|
968 |
-
|
969 |
-
*
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
*
|
976 |
-
|
977 |
-
*
|
978 |
-
|
979 |
-
*
|
980 |
-
|
981 |
-
*
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
*
|
986 |
-
|
987 |
-
*
|
988 |
-
|
989 |
-
*
|
990 |
-
|
991 |
-
= 2.5.
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
*
|
998 |
-
|
999 |
-
*
|
1000 |
-
|
1001 |
-
*
|
1002 |
-
|
1003 |
-
*
|
1004 |
-
|
1005 |
-
*
|
1006 |
-
|
1007 |
-
*
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
*
|
1019 |
-
* A new
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
*
|
1024 |
-
|
1025 |
-
|
1026 |
-
*
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
*
|
1040 |
-
*
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
*
|
1060 |
-
*
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
*
|
1065 |
-
|
1066 |
-
= 1.
|
1067 |
-
*
|
1068 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
=== Abandoned Cart Lite for WooCommerce ===
|
3 |
+
Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares, dhruvin
|
4 |
+
Tags: cart abandonment, abandon cart, cart recovery, recover woocommerce cart, increase woocommerce conversion rate, increase sales with woocommerce
|
5 |
+
Author URI: https://www.tychesoftwares.com/
|
6 |
+
Requires at least: 1.3
|
7 |
+
Tested up to: 5.5
|
8 |
+
Stable tag: trunk
|
9 |
+
Requires PHP: 5.6
|
10 |
+
License: GPLv2 or late
|
11 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
Donate link: https://www.paypal.me/TycheSoftwares
|
13 |
+
|
14 |
+
This easy-to-use plugin allows WooCommerce store owners to recover sales that are lost to abandoned shopping carts by customers.
|
15 |
+
|
16 |
+
== Description ==
|
17 |
+
|
18 |
+
With the average shopping cart abandonment rate as high as 70%, [Abandoned Cart Plugin](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=topprolink&utm_campaign=AbandonedCartLite) helps you recover those carts from your WooCommerce shop.
|
19 |
+
|
20 |
+
It works in the background, sending email notifications to your guests customers & logged-in customers, reminding them about their abandoned orders.
|
21 |
+
|
22 |
+
70% abandonment rate means that out of 100 potential customers, more than 70 of them are leaving without transacting on the store. Email Remarketing has proven to recover on average between 20-25% of abandoned shopping carts.
|
23 |
+
|
24 |
+
> This plugin works as described: the **lite version doesn't cut down in functionality**. **You can have your orders recovered and save on sales**. Depending on what you are selling, this can be a few orders to **justify ordering the full package - i'm only a few away!**
|
25 |
+
|
26 |
+
>**Very recommended!**
|
27 |
+
> - [jaysnl](https://wordpress.org/support/topic/great-support-and-value-buy-it/)
|
28 |
+
|
29 |
+
The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
|
30 |
+
|
31 |
+
Abandoned Cart Lite plugin enables to do the following things:
|
32 |
+
|
33 |
+
1. Allow your customers to recover their abandoned carts in a **single click**.
|
34 |
+
2. Identify the **Abandoned Orders information**, including the products that were abandoned.
|
35 |
+
3. The plugin now captures abandoned **guest carts**. A guest user's cart will be captured on the **Checkout page**, if it is abandoned after entering the **email address**.
|
36 |
+
4. Track **abandoned orders value v/s recovered orders value**.
|
37 |
+
5. Admin is notified by email when an order is **recovered**.
|
38 |
+
6. Works off-the-shelf as it comes with 1 **default email template**.
|
39 |
+
7. Create **unlimited email templates** to be sent at intervals that you set - Intervals start from 1 hour after cart is abandoned.
|
40 |
+
8. Add custom variables like **Customer First Name, Customer Last name, Customer full name, Cart Link & Product Cart Information** in the email template.
|
41 |
+
9. Copy HTML from anywhere & create templates using the powerful **Rich Text Editor**.
|
42 |
+
10. **Automatically stops email notifications** when a customer makes a purchase or uses the cart recovery link.
|
43 |
+
|
44 |
+
### Differences between Lite & PRO version:
|
45 |
+
|
46 |
+
You can check the detailed difference between Pro and Lite version **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=litelink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
|
47 |
+
|
48 |
+
> I'm using the plugin on my shop. **Installation is very easy and it works great**. I've already recovered some orders, **it doesn't cost any effort**.
|
49 |
+
|
50 |
+
> **Support is fast and extensive**.
|
51 |
+
|
52 |
+
> -[bertkat](https://wordpress.org/support/topic/easy-money/)
|
53 |
+
|
54 |
+
**Pro Version:**
|
55 |
+
|
56 |
+
[youtube https://www.youtube.com/watch?v=BemNllbQW1c]
|
57 |
+
|
58 |
+
**[Abandoned Cart Pro for WooCommerce](http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Abandoned Cart Pro for WooCommerce")** enables to do the following additional things:
|
59 |
+
|
60 |
+
1. Super powerful feature, **Add To Cart Popup Modal** - Grab your visitors' attention and build your mailing list. It offers an innovative, exclusive Add to Cart Popup Modal to abandoners to re-engage and capture emails from more of your guest customers before the checkout page.
|
61 |
+
|
62 |
+
It is simple, effective & a highly customizable popup using Live Preview when customizing it in the Add to Cart Popup Editor.
|
63 |
+
|
64 |
+
When guest customers clicks on the **Add to Cart** button on the shop or product page, the popup modal will appear immediately and ask for the email address. You can choose to prevent users from proceeding without submitting their email, or allow them to checkout as a guest.
|
65 |
+
2. Works off-the-shelf as it comes with **3 default email templates**.
|
66 |
+
3. Offer **incentives to customers** to return and complete their checkout with **discounts and coupons**.
|
67 |
+
4. Add custom variables like **Customer Name, Product Information, Coupons**, etc. in the email template.
|
68 |
+
5. Embed WooCommerce coupons & also **generate unique coupons** in the emails being sent to customers.
|
69 |
+
6. Track whether **expired coupons** are causing cart abandonment.
|
70 |
+
7. Track **emails sent, emails opened, links clicked** for each template/email.
|
71 |
+
8. **Product report** allows you to see which products are being abandoned & which are being recovered the most.
|
72 |
+
9. Start sending email templates **within minutes** of cart being abandoned.
|
73 |
+
10. Admin can send the customer emails to specific abandoned cart(s) using **'Send Custom Email'** feature.
|
74 |
+
11. If the store is using **WPML** then admin can translate all the abandoned cart reminder email templates using WPML. Then the emails will be sent to the customers in the **same language in which they have abandoned the cart**.
|
75 |
+
12. Admin can **Print** or export the Abandoned Orders to **CSV** format.
|
76 |
+
13. Admin can send **different email templates** to **'Registered Users', 'Guest Users', 'For carts Abandoned with one product' or 'with more than one product' or to 'All'**.
|
77 |
+
14. Admin can **restrict** the abandoned carts based on the **'Email address'**, **'IP address'** & **'Domain name'**.
|
78 |
+
15. Admin can take a **glimpse** of **abandoned carts**, **recovered orders**, and the **states of the email template** from the **Dashboard** tab.
|
79 |
+
16. The plugin will consider the **taxation** which is set in the WooCommerce. The abandoned cart total will be displayed as per the selected tax setting.
|
80 |
+
|
81 |
+
You can check the detailed difference between Pro and Lite version **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=prolink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
|
82 |
+
|
83 |
+
> Using the free version and for now it does all I need will give it a few days use but can quickly see that **I'll likely be upgrading to Pro version**-for a 99 bucks it's hard to go wrong
|
84 |
+
|
85 |
+
> Wish list for free version
|
86 |
+
> 1. Easy way to format "Abandoned cart reminder" Header
|
87 |
+
|
88 |
+
> -[clowmilk](https://wordpress.org/support/topic/super-nice-plug-in/)
|
89 |
+
|
90 |
+
|
91 |
+
**Email Sending Setup:**
|
92 |
+
|
93 |
+
Abandoned Cart Plugin relies on a function called WP-Cron, and this function only runs when there is a page requested. So, if there are no visits to your website, then the scheduled jobs are not run. Generally this method of sending the abandoned cart notification emails is reliable. However, if you are not very confident about the traffic volume of your website, then you can set a manual cron job via cPanel or any other control panel that your host provides.
|
94 |
+
|
95 |
+
**Some of our Pro plugins:**
|
96 |
+
|
97 |
+
1. **[Abandoned Cart Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=otherprolink&utm_campaign=AbandonedCartLite "Abandoned Cart Pro for WooCommerce")**
|
98 |
+
|
99 |
+
2. **[Booking & Appointment Plugin for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-booking-plugin/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Booking & Appointment Plugin for WooCommerce")**
|
100 |
+
|
101 |
+
3. **[Order Delivery Date Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Order Delivery Date Pro for WooCommerce")**
|
102 |
+
|
103 |
+
4. **[Product Delivery Date Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/product-delivery-date-pro-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Product Delivery Date Pro for WooCommerce")**
|
104 |
+
|
105 |
+
5. **[Deposits For WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/deposits-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Deposits For WooCommerce")**
|
106 |
+
|
107 |
+
6. **[Payment Gateway Based Fees and Discounts for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/payment-gateway-based-fees-and-discounts-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Payment Gateway Based Fees and Discounts for WooCommerce - Pro")**
|
108 |
+
|
109 |
+
7. **[Custom Order Status for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/custom-order-status-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Custom Order Status for WooCommerce - Pro")**
|
110 |
+
|
111 |
+
8. **[Custom Order Numbers for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/custom-order-numbers-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Custom Order Numbers for WooCommerce - Pro")**
|
112 |
+
|
113 |
+
9. **[Product Input Fields for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/product-input-fields-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Product Input Fields for WooCommerce - Pro")**
|
114 |
+
|
115 |
+
10. **[Call for Price for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-call-for-price-plugin/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Call for Price for WooCommerce - Pro")**
|
116 |
+
|
117 |
+
11. **[Price based on User Role for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/price-user-role-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Price based on User Role for WooCommerce - Pro")**
|
118 |
+
|
119 |
+
12. **[Currency per Product for WooCommerce - Pro](https://www.tychesoftwares.com/store/premium-plugins/currency-per-product-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Currency per Product for WooCommerce - Pro")**
|
120 |
+
|
121 |
+
**Some of our other free plugins:**
|
122 |
+
|
123 |
+
1. **[Order Delivery Date for WooCommerce](https://wordpress.org/plugins/order-delivery-date-for-woocommerce/ "Order Delivery Date for WooCommerce")**
|
124 |
+
|
125 |
+
2. **[Product Delivery Date for WooCommerce - Lite](https://wordpress.org/plugins/product-delivery-date-for-woocommerce-lite/ "Product Delivery Date for WooCommerce")**
|
126 |
+
|
127 |
+
3. **[WooCommerce Print Invoice & Delivery Note](https://wordpress.org/plugins/woocommerce-delivery-notes/ "WooCommerce Print Invoice & Delivery Note")**
|
128 |
+
|
129 |
+
4. **[Payment Gateway Based Fees and Discounts for WooCommerce](https://wordpress.org/plugins/checkout-fees-for-woocommerce/ "Payment Gateway Based Fees and Discounts for WooCommerce")**
|
130 |
+
|
131 |
+
5. **[Custom Order Status for WooCommerce](https://wordpress.org/plugins/custom-order-statuses-woocommerce/ "Custom Order Status for WooCommerce")**
|
132 |
+
|
133 |
+
6. **[Custom Order Numbers for WooCommerce](https://wordpress.org/plugins/custom-order-numbers-for-woocommerce/ "Custom Order Numbers for WooCommerce")**
|
134 |
+
|
135 |
+
7. **[Product Input Fields for WooCommerce](https://wordpress.org/plugins/product-input-fields-for-woocommerce/ "Product Input Fields for WooCommerce")**
|
136 |
+
|
137 |
+
8. **[Call for Price for WooCommerce](https://wordpress.org/plugins/woocommerce-call-for-price/ "Call for Price for WooCommerce")**
|
138 |
+
|
139 |
+
9. **[Price based on User Role for WooCommerce](https://wordpress.org/plugins/price-by-user-role-for-woocommerce/ "Price based on User Role for WooCommerce")**
|
140 |
+
|
141 |
+
10. **[Currency per Product for WooCommerce](https://wordpress.org/plugins/currency-per-product-for-woocommerce/ "Currency per Product for WooCommerce")**
|
142 |
+
|
143 |
+
**[Documentation](https://www.tychesoftwares.com/docs/docs/abandoned-cart-for-woocommerce-lite/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Documentation")**
|
144 |
+
|
145 |
+
**[Developer Documentation](https://www.tychesoftwares.com/docs/acl-apidocs/index.html "Developer Documentation")**
|
146 |
+
|
147 |
+
**[Github Repository](https://github.com/TycheSoftwares/Woocommerce-abandon-cart-lite "Github Repository")**
|
148 |
+
|
149 |
+
== Installation ==
|
150 |
+
|
151 |
+
Method 1:
|
152 |
+
<ol>
|
153 |
+
<li> Go to WordPress Dashboard->Plugins->Add New </li>
|
154 |
+
<li> Search Abandoned Cart Lite for WooCommerce plugin using search option </li>
|
155 |
+
<li> Find the plugin and click Install Now button </li>
|
156 |
+
<li> After installation, click on Activate Plugin link to activate the plugin. </li>
|
157 |
+
</ol>
|
158 |
+
|
159 |
+
Method 2:
|
160 |
+
<ol>
|
161 |
+
<li> Download the plugin woocommerce-abandoned-cart.zip </li>
|
162 |
+
<li> Unpack the woocommerce-abandoned-cart.zip file and extract the woocommerce-abandoned-cart folder </li>
|
163 |
+
<li> Upload the plugin folder to your /wp-content/plugins/ directory </li>
|
164 |
+
<li> Go to WordPress dashboard, click on Plugins from the menu </li>
|
165 |
+
<li> Locate the Abandoned Cart Lite for WooCommerce plugin and click on Activate link to activate the plugin. </li>
|
166 |
+
</ol>
|
167 |
+
|
168 |
+
Method 3:
|
169 |
+
<ol>
|
170 |
+
<li> Download the plugin woocommerce-abandoned-cart.zip </li>
|
171 |
+
<li> Go to WordPress Dashboard-Plugins-Add New </li>
|
172 |
+
<li> Click on Upload Plugin link from top </li>
|
173 |
+
<li> Upload the downloaded woocommerce-abandoned-cart.zip file and click on Install Now </li>
|
174 |
+
<li> After installation, click on Activate Plugin link to activate the plugin. </li>
|
175 |
+
</ol>
|
176 |
+
|
177 |
+
== Frequently Asked Questions ==
|
178 |
+
|
179 |
+
= What is the difference between Lite and Pro version of the plugin? =
|
180 |
+
|
181 |
+
To see how the PRO version can help you recover more abandoned carts compared to Lite, you can refer **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=faqlink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
|
182 |
+
|
183 |
+
= How is the email address of the customers captured? =
|
184 |
+
|
185 |
+
Our plugin captures visitor emails in real-time as they're typing it in to the email address field on the checkout page, so you don't need to worry about them changing their mind at the last second.
|
186 |
+
|
187 |
+
When logged-in user add the product to the cart we capture the email address from the user's profile.
|
188 |
+
|
189 |
+
= Can the plugin track carts abandoned by guest users? =
|
190 |
+
|
191 |
+
Yes, it captures the carts of the guest users from the checkout page. We capture the guest user's abandoned cart only after the customer enters the "Email Address" on the checkout page.
|
192 |
+
|
193 |
+
Also, plugin does capture the cart from the cart page, these carts do not have any personal information of the customers. It will contain only the cart details. To capture, this information guest customer should reach the cart page of the website.
|
194 |
+
|
195 |
+
= Why are abandoned cart notification emails not getting sent? =
|
196 |
+
|
197 |
+
Please ensure you have at least one Email template "Active". As only active email templates are sent to recover the abandoned carts.
|
198 |
+
|
199 |
+
For sending the abandoned cart notification emails automatically, we use WP-Cron. If you have Email templates activated and still notification are not sent, then you can debug the issue by following this **[post](https://www.tychesoftwares.com/using-wp_alternate_cron-to-overcome-the-problem-of-emails-not-being-sent-in-abandoned-cart-pro-plugin-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "WooCommerce Abandoned Cart Pro")**.
|
200 |
+
|
201 |
+
= When is the cart considered as an abandoned cart? =
|
202 |
+
|
203 |
+
When the products in the cart is not purchased within the set 'Cart abandoned cut-off time' then the cart is considered as an abandoned cart.
|
204 |
+
|
205 |
+
= How to unsubscribe the abandoned cart notification emails? =
|
206 |
+
|
207 |
+
The admin can use the merge code `{{cart.unsubscribe}}' in the email templates. It will be replaced with a url in the abandoned cart email notification sent to the customer. When clicked, the reminder email notification for the particular email will be unsubscribed.
|
208 |
+
|
209 |
+
|
210 |
+
== Screenshots ==
|
211 |
+
|
212 |
+
1. Lists all Abandoned Orders.
|
213 |
+
|
214 |
+
2. Lists Email Templates.
|
215 |
+
|
216 |
+
3. Abandoned Cart General Settings.
|
217 |
+
|
218 |
+
4. Abandoned Cart Recovery Email Settings.
|
219 |
+
|
220 |
+
5. Lists Recovered Orders.
|
221 |
+
|
222 |
+
6. Product Report Tab.
|
223 |
+
|
224 |
+
== Changelog ==
|
225 |
+
|
226 |
+
= 5.8.1 (26.08.2020) =
|
227 |
+
* Fix - When the plugin contained thousands of records, the Abandoned Orders page failed to load.
|
228 |
+
* Fix - The send email action schedule raised some warnings.
|
229 |
+
* Fix - Error displayed in Settings->Facebook Messenger.
|
230 |
+
|
231 |
+
= 5.8.0 (19.06.2020) =
|
232 |
+
* Fix - Some error warnings logged in debug.log
|
233 |
+
* Tweak - Added the ability to delete all carts based on user type. This can be found in WooCommerce->Abandoned Carts->Abandoned Orders->Bulk Actions.
|
234 |
+
* Fix - Added textdomain to ensure plugin strings are translated correctly.
|
235 |
+
* Fix - Scheduled action continues to recur after the plugin has been deactivated.
|
236 |
+
* Fix - WooCommerce Preview email doesn't reflect changes done in templates.
|
237 |
+
* Tweak - Added a filter to allow the site admin the ability to restrict the logging of registered user carts.
|
238 |
+
* Tweak - Removed some update code which deleted cart records with certain email addresses and were logged after particular time.
|
239 |
+
* Tweak - Introduced compatibility with Improved Variable Product Attributes for WooCommerce.
|
240 |
+
* Fix - Updated FAQ to reflect correct plugin behaviour with Pending and Failed order statuses.
|
241 |
+
* Tweak - Introduced some filters for {{products.cart}} merge tag. These filters allow the site admin to edit/hide columns such as Quantity, Price, Subtotal, Cart totals & Product Name.
|
242 |
+
|
243 |
+
= 5.7.2 (10.02.2020) =
|
244 |
+
* Update compatibility with WooCommerce 4.0.0.
|
245 |
+
* Tweak - Add a filter to modify the product name for variable products in reminder emails.
|
246 |
+
|
247 |
+
= 5.7.1 (10.02.2020) =
|
248 |
+
|
249 |
+
* Tweak - Bots and Crawlers used to log lot of Abandoned Carts. We have now prevented logging such carts and now only genuine carts will be tracked.
|
250 |
+
|
251 |
+
= 5.7 (29.01.2020) =
|
252 |
+
|
253 |
+
* Enhancement - Updated the plugin to use the Action Scheduler Library instead of WP Cron to send reminders.
|
254 |
+
* Tweak - Updated the plugin to ensure the merge tags in the reminders are case-insensitive.
|
255 |
+
* Fix - Some warnings displayed in debug.log.
|
256 |
+
* Fix - Abandoned cart is not marked as recovered when the user registers for a new account at Checkout.
|
257 |
+
* Fix - Fixed some warnings displayed with PHP 7.4.
|
258 |
+
|
259 |
+
= 5.6.2 (26.11.2019) =
|
260 |
+
|
261 |
+
* Tweak - Added nonce for guest user data capture.
|
262 |
+
* Tweak - Visitor carts will be tracked and logged if the 'Start tracking from Cart page' setting is on.
|
263 |
+
* Tweak - Updated FAQ to show how to avoid unwanted visitor carts.
|
264 |
+
* Fix - Missing zipcode for guest users in the Abandoned Order details view.
|
265 |
+
* Fix - The Recovered Order tab did not filter the data based on the selected date range.
|
266 |
+
* Fix - User role displayed as 'Guest' for registered users in the Abandoned Order details view.
|
267 |
+
|
268 |
+
= 5.6.1 (25.10.2019) =
|
269 |
+
|
270 |
+
* Tweak - Only those abandoned carts with email addresses entered on the checkout page will be considered and tracked.
|
271 |
+
|
272 |
+
= 5.6 (16.10.2019) =
|
273 |
+
|
274 |
+
* Enhancement - Added a dashboard for the plugin to display statistics.
|
275 |
+
* Enhancement - Made the plugin compatible with WPCS.
|
276 |
+
* Enhancement - Made the plugin compatible with Multisite installations.
|
277 |
+
* Enhancement - The Abandoned Order details will now be displayed in a popup view.
|
278 |
+
* Tweak - Modified the WooCommerce tested upto tag to 3.7.1
|
279 |
+
* Tweak - Added a loader to be displayed while the plugin sends the test email in the Add/Edit Email template page.
|
280 |
+
* Bug - Fixed an issue where product price is logged as 0.
|
281 |
+
* Bug - Optimized the code to ensure the plugin doesn't attempt to send reminder emails to guests whose email addressed are not tracked.
|
282 |
+
* Bug - Fixed some errors displayed in the console by the plugin.
|
283 |
+
|
284 |
+
= 5.5.1 (21.08.2019) =
|
285 |
+
|
286 |
+
* Tweak - Modified the WooCommerce tested upto tag to 3.7.
|
287 |
+
* Bug - Fixed an issue where guest email was not getting captured when GDPR message was not set.
|
288 |
+
* Bug - Fixed an issue where the cart price was recorded as 0 with WooCommerce 3.7.0.
|
289 |
+
|
290 |
+
= 5.5 (12.08.2019) =
|
291 |
+
|
292 |
+
* Enhancement - Added a setting to allow the admin the ability to enable/disable the sending of reminder emails.
|
293 |
+
* Tweak - Added a setting to allow the admin to add text for GDPR messages which will be displayed as links and allows the end user to opt out of cart tracking.
|
294 |
+
* Bug - Fixed some warnings displayed from the plugin.
|
295 |
+
* Bug - Carts were not accessible for guest users from links in the reminder emails.
|
296 |
+
|
297 |
+
= 5.4 (10.07.2019) =
|
298 |
+
|
299 |
+
* Bug - Fixed an issue where carts were being marked as abandoned even after they have been successfully recovered.
|
300 |
+
* Bug - Unsubscribe link in the test reminder email displayed some HTML content in Outlook.
|
301 |
+
* Bug - The data tracking notice in the plugin when dismissed affected other dismissible notices as well.
|
302 |
+
* Tweak - Made the plugin compatible with AeroCheckout plugin.
|
303 |
+
* Tweak - The settings for the Pro version will now be displayed in the Lite version of the plugin.
|
304 |
+
|
305 |
+
= 5.3.4 (18.04.2019) =
|
306 |
+
|
307 |
+
* This is a minor update to the plugin to remove the unwanted abandoned carts created for some customers after updating to the 5.3.2 release.
|
308 |
+
|
309 |
+
= 5.3.3 (18.04.2019) =
|
310 |
+
|
311 |
+
* We have reversed the changes of the previous release as it created an issue with some sites where carts that were abandoned a while back were receiving the abandoned cart email after the update.
|
312 |
+
|
313 |
+
= 5.3.2 (16.04.2019) =
|
314 |
+
|
315 |
+
* Tweak - Optimizing SQL queries by escaping the parameters passed.
|
316 |
+
|
317 |
+
= 5.3.1 (04.04.2019) =
|
318 |
+
|
319 |
+
* Bug - Fixed a bug where the login was conflicting with sites hosted on WP Engine.
|
320 |
+
|
321 |
+
= 5.3.0 (26.03.2019) =
|
322 |
+
|
323 |
+
* Enhancement - Corrected the way recovered orders were tracked. Replaced the hooks tracking orders.
|
324 |
+
|
325 |
+
* Bug - Newly created Email Templates will be inactive by default.
|
326 |
+
|
327 |
+
* Bug - When an email template is activated, the emails will not be sent to older abandoned carts.
|
328 |
+
|
329 |
+
* Bug - Fixed an issue where Recovered Order note was getting added to all the Orders.
|
330 |
+
|
331 |
+
* Bug - Fixed an issue where notices were getting displayed in abandoned details page if the product was deleted.
|
332 |
+
|
333 |
+
* Tweak - Updated the pot file with some new strings added. Also corrected the display of a few strings.
|
334 |
+
|
335 |
+
= 5.2.1 (18.02.2019) =
|
336 |
+
|
337 |
+
* Bug - Fixed an issue where ajax url was missing for some sites preventing emails to be captured.
|
338 |
+
|
339 |
+
= 5.2.0 (18.02.2019) =
|
340 |
+
|
341 |
+
This is a security release with the following fixes:
|
342 |
+
|
343 |
+
* Added sanitization checks for checkout field capture for guest users.
|
344 |
+
|
345 |
+
* Fixed an issue where the emails were getting sent to customers even after purchasing the products.
|
346 |
+
|
347 |
+
* Removed inline Javascript from checkout page and added to a minified file.
|
348 |
+
|
349 |
+
= 5.1.3 (29.11.2018) =
|
350 |
+
|
351 |
+
* Bug - Fixed a Fatal error related to including files.
|
352 |
+
|
353 |
+
= 5.1.2 (29.11.2018) =
|
354 |
+
|
355 |
+
* Tweak - Compatibility with WordPress 5.0 fixes.
|
356 |
+
|
357 |
+
* Bug - Fixed a warning which was generated when clicked on Cart or Checkout link in email.
|
358 |
+
|
359 |
+
* Bug - Fixed errors occuring when WooCommerce Admin scripts were included in the plugin.
|
360 |
+
|
361 |
+
= 5.1.1 (01.11.2018) =
|
362 |
+
|
363 |
+
* Bug Fixed - Changed the file name in the plugin.
|
364 |
+
|
365 |
+
= 5.1.0 (01.11.2018) =
|
366 |
+
|
367 |
+
* This version has 5 Enhancements and 5 bugs fixes along with 1 Tweak.
|
368 |
+
|
369 |
+
* Enhancement - Removed the reliability on PHP sessions. The plugin no longer uses PHP sessions from this release.
|
370 |
+
|
371 |
+
* Enhancement - Modified the plugin to no longer display carts with the status 'Abandoned but new Cart created'. Since, these carts are not sent any reminder emails, it made most sense to stop displaying them as well.
|
372 |
+
|
373 |
+
* Enhancement - Added new default email template that use the responsive email designs added in the plugin version.
|
374 |
+
|
375 |
+
* Enhancement - We have removed a few unwanted queries & optimised the code which was executed every 2-3 minutes. This will improve the site performance.
|
376 |
+
|
377 |
+
* Enhancement - We have added Product page URL on the Product Name under Abandoned Orders View page.
|
378 |
+
|
379 |
+
* Tweak - Changed the subject lines and Header text for the default email templates.
|
380 |
+
|
381 |
+
* Bug Fix - When the site language is Hebrew, the site admin is unable to activate email templates. The same has now been fixed.
|
382 |
+
|
383 |
+
* Bug Fix - Email Templates were not getting saved as "utf8mb4_unicode_ci" collation was not allowing to create table of the email template in the database due to some site restriction. This issue has been fixed.
|
384 |
+
|
385 |
+
* Bug Fix - The plugin now runs the process to send reminder emails in the background. This will help fix the issue where the site performance is affected due to the plugin.
|
386 |
+
|
387 |
+
* Bug Fix - In case, if wp-content folder is separated from WP core folders then the plugin could not find "wp-load.php" correctly and abandoned cart reminder emails were not being sent. This issue is fixed now.
|
388 |
+
|
389 |
+
* Bug Fix - Some error messages are fixed in this plugin version.
|
390 |
+
|
391 |
+
= 5.0.2 (13.10.2018) =
|
392 |
+
|
393 |
+
* Removed the Welcome page of the plugin and also removed the promotional notices which were being displayed on admin end of the WordPress website.
|
394 |
+
|
395 |
+
= 5.0.1 (30.07-2018) =
|
396 |
+
|
397 |
+
Bug Fix - The website was crashing as the folder name for the plugin was not changed. This is fixed now.
|
398 |
+
|
399 |
+
= 5.0 (30.07-2018) =
|
400 |
+
|
401 |
+
* This version has 1 new feature and 9 bugs fixes along with 4 Tweaks.
|
402 |
+
|
403 |
+
* New feature - From this version, we have added "Automatically Delete Abandoned Orders after X days" setting. The same setting will delete all the Abandoned carts automatically after number of days which will set in the setting.
|
404 |
+
|
405 |
+
* Bug Fixed - . When WordPress exports data for an email address and if there are no abandoned cart records for the said address, the export was failing. Fixed the same.
|
406 |
+
|
407 |
+
* Bug Fixed - In WooCommerce > Settings > Email menu, if the footer will have "{site_title}" merge tag then our plugin will show the title of website at the end of test email and abandoned cart reminder email.
|
408 |
+
|
409 |
+
* Bug Fixed - For Multisite, we were getting error message in the debug log file once we abandoned a cart. This issue has been fixed now.
|
410 |
+
|
411 |
+
* Bug Fixed - Under the Recovered Orders tab, duplicate records were showing for the recovered orders. This issue is fixed.
|
412 |
+
|
413 |
+
* Bug Fixed - When abandoned cart will have a variable product which has 3 attributes or more then the slug name of selected variations were showing in the abandoned cart reminder emails and on the abandoned cart details page. This has been fixed.
|
414 |
+
|
415 |
+
* Bug Fixed - With the Fresh Install of the plugin, some columns of abandoned cart history table were not created. This issue is fixed.
|
416 |
+
|
417 |
+
* Bug Fixed - With version 5.0 onwards, if the guest will use the same email address which was already used for abandoning the cart then the existing record will be updated and new record will added in the Abandoned Orders tab. This was not the case with older versions.
|
418 |
+
|
419 |
+
* Bug Fixed - The pagination on the Email Templates tab was not working. It has been fixed.
|
420 |
+
|
421 |
+
* Bug Fixed - Some error notices of debug log file are fixed.
|
422 |
+
|
423 |
+
* Tweak - We have updated .pot and .po & .mo files in our plugin. So all the strings from Abandoned Cart Pro for WooCommerce plugin can be translated to any language you want to.
|
424 |
+
|
425 |
+
* Tweak - We have added .po and .mo files of Hungarian language in plugin's folder. So, if the Site language will be Hungarian language then translated strings of our plugin will be displayed into Hungarian language.
|
426 |
+
|
427 |
+
* Tweak - Added Help tip below of Email Body section while editing or creating an email template.
|
428 |
+
|
429 |
+
* Tweak - "Unsubscribed" status added to Abandoned Orders page and will be displayed for Unsubscribed carts.
|
430 |
+
|
431 |
+
= 4.9 (24.05-2018) =
|
432 |
+
|
433 |
+
* The plugin is now GDPR compliant.
|
434 |
+
|
435 |
+
* New feature - Added two settings to show the message on the checkout page for guest users and the message to be displayed at the start of the shop page for Registered users.
|
436 |
+
|
437 |
+
* New feature - Abandoned Cart details will now be exported to the User's Personal Data from the Tools -> Export Personal Data menu and it can be erased from Tools -> Erase Personal Data.
|
438 |
+
|
439 |
+
* Bug Fixed - Some notices are fixed of the debug.log file.
|
440 |
+
|
441 |
+
= 4.8 (20.03-2018) =
|
442 |
+
* This is a minor update to the plugin which contains some bug fixes and requires Database update to include emojis in the email templates. We recommend that you take a backup of the database of your store for your piece of mind.
|
443 |
+
|
444 |
+
* Bug Fixed - Fixed compatibility issues related to PHP 7.2 where error notices were being displayed on Abandoned Order List page.
|
445 |
+
|
446 |
+
* Bug Fixed - Fixed issue related to saving email template where changes were not getting saved despite a success message.
|
447 |
+
|
448 |
+
* Additonal Changes - PHP Doc blocks added for generating documentation and readability.
|
449 |
+
|
450 |
+
= 4.7 (16.02-2018) =
|
451 |
+
* This version has 2 bug fixes.
|
452 |
+
|
453 |
+
* Bug Fixed - Due to the introduction of language packs through translate.wordpress.org, our plugin was not prepared for localization. So, we changed textdomain from "woocommerce-ac" to "woocommerce-abandoned-cart".
|
454 |
+
|
455 |
+
= 4.6 (31.01-2018) =
|
456 |
+
|
457 |
+
* This version has 7 bugs fixes.
|
458 |
+
|
459 |
+
* Bug Fixed - When the guest user places the order after the "Cart abandoned cut off time" then the plugin was capturing the blank records on Abandoned Orders tab. This has been fixed.
|
460 |
+
|
461 |
+
* Bug Fixed - Compatibility issues pertaining to PHP 7.2 has been fixed.
|
462 |
+
|
463 |
+
* Bug Fixed - Fixed some minor bugs related to notices coming in Debug Log.
|
464 |
+
|
465 |
+
* Bug Fixed - Fixed issue related to error occurring when clicked on cart link from abandoned cart reminder email.
|
466 |
+
|
467 |
+
* Bug Fixed - When the user places an order and goes to the order received page, blank carts were added in the database. So, twice entries had been created under Recovered Orders tab. This issue has been fixed.
|
468 |
+
|
469 |
+
* Bug Fixed - If "Email admin On Order Recovery" setting is enabled and admin of the store create manual order from WooCommerce -> Orders page then Recovery Email was getting sent to the Admin. This has been fixed.
|
470 |
+
|
471 |
+
* Bug Fixed - With the PHP 7.1.7, Abandoned cart reminder emails were not being sent. This issue has been fixed now.
|
472 |
+
|
473 |
+
= 4.5 (28.12-2017) =
|
474 |
+
|
475 |
+
* This version has 1 bug fix.
|
476 |
+
|
477 |
+
* Bug Fixed - Made some performance optimizations so the plugin occupies less CPU resources. We will continue working on this so the resource usage stays low.
|
478 |
+
|
479 |
+
= 4.4 (13.10-2017) =
|
480 |
+
|
481 |
+
* This version has 3 bugs fixes along with 1 Enhancement.
|
482 |
+
|
483 |
+
* Bug Fixed - If the guest user's id is wrong then the abandoned cart email will not be sent to the customers.
|
484 |
+
|
485 |
+
* Bug Fixed - If the variable products have a special character was not displaying the correct attributes. This has been fixed.
|
486 |
+
|
487 |
+
* Bug Fixed - Some error notices of debug log file are fixed.
|
488 |
+
|
489 |
+
* Enhancement - Now, admin can activate the email templates using toggle button from the Email Templates page.
|
490 |
+
|
491 |
+
= 4.3 (29.08.2017) =
|
492 |
+
|
493 |
+
* This version has 1 bug fix along with 3 Enhancements.
|
494 |
+
|
495 |
+
* Bug Fixed - When abandoned cart will have a variable product which has 3 attributes or more than that. Then the slug name of selected variations were showing in the abandoned cart reminder emails and on the abandoned cart details page. This has been fixed.
|
496 |
+
|
497 |
+
* Enhancement - If the abandoned cart total is zero then abandoned cart reminder emails will not be sent to the customers.
|
498 |
+
|
499 |
+
* Enhancement - When the email sending script is executed on the server, it was running a large number of MySQL queries for guest users. That was causing an increase in the server load. In this version, we have optimised the queries. Initially, it used to query even those guest user records for which emails were already sent. Now, it will only query those records where email is yet to be sent.
|
500 |
+
|
501 |
+
* Enhancement - Removed the Active field from the add / edit email template page. Admin can activate or deactivate the templates from the Email templates page.
|
502 |
+
|
503 |
+
= 4.2 (25.07.2017) =
|
504 |
+
|
505 |
+
* This version has 1 bug fix.
|
506 |
+
|
507 |
+
* Bug Fixed - When WooCommerce is deactivated and "Allow" button is clicked from the user tracking data notice. It was redirecting to a blank page. Now, if WooCommerce is deactivated then Abandoned cart lite plugin will be automatically deactivated & display the notice.
|
508 |
+
|
509 |
+
= 4.1 (11.07.2017) =
|
510 |
+
|
511 |
+
* This version has 1 bug fix.
|
512 |
+
|
513 |
+
* Bug Fixed - Some warning was displayed in the Debug log file. This has been fixed.
|
514 |
+
|
515 |
+
= 4.0 (04.07.2017) =
|
516 |
+
|
517 |
+
* This version has 1 bug fix.
|
518 |
+
|
519 |
+
* Bug Fixed - Logged-in user's carts were not captured with the WooCommerce version 3.1. This issue has been fixed.
|
520 |
+
|
521 |
+
= 3.9.3 (09.06.2017) =
|
522 |
+
|
523 |
+
* This version has 3 bugs fixes.
|
524 |
+
|
525 |
+
* Bug Fixed - When store admin clicks on the dismissible notice, the notice was not getting dismissed. This issue has been fixed.
|
526 |
+
|
527 |
+
* Bug Fixed - The dismissible notice was not displaying the 'Allow' & 'No Thanks' button properly. This issue has been fixed.
|
528 |
+
|
529 |
+
* Bug Fixed - The total Recovered amount was not tracked. This issue has been fixed.
|
530 |
+
|
531 |
+
= 3.9.2 (09.06.2017) =
|
532 |
+
|
533 |
+
* Added missing java script file.
|
534 |
+
|
535 |
+
= 3.9.1 (09.06.2017) =
|
536 |
+
|
537 |
+
* Added missing image.
|
538 |
+
|
539 |
+
= 3.9 (09.06.2017) =
|
540 |
+
|
541 |
+
* This version has 1 new feature.
|
542 |
+
|
543 |
+
* New Feature - A new dismissible notice is added in the WordPress admin, which provides an option to allow usage tracking of the non-sensitive data of our plugin from the website. [Find out more](https://www.tychesoftwares.com/abandoned-cart-lite-usage-tracking/?utm_source=wpplugin&utm_medium=usagelink&utm_campaign=AbandonedCartLite).
|
544 |
+
|
545 |
+
= 3.8 (29.05.2017) =
|
546 |
+
|
547 |
+
* This version has 1 bug fix and 2 enhancements.
|
548 |
+
|
549 |
+
* Bug Fixed - Earlier Abandoned Cart date and time format were not translated into the WordPress selected language in the plugin. This issue has been fixed.
|
550 |
+
|
551 |
+
* Enhancement - From this version, the admin can insert the WordPress supported emoji's in the abandoned cart email templates as well as in the subject.
|
552 |
+
|
553 |
+
* Enhancement - Earlier we had hardcoded date and time format in our plugin. Now, the plugin will use selected WordPress date and time format.
|
554 |
+
|
555 |
+
= 3.7 (10.04.2017) =
|
556 |
+
|
557 |
+
* This version has 1 bug fix.
|
558 |
+
|
559 |
+
* Bug Fixed - If guest customer places an order by selecting "Create an account" checkbox or enters the password in "Account password" field on the checkout page, then an abandoned cart was created after "Cart abandoned cut off time" is reached. Also, abandoned cart reminder email were sent to the customers after the order was placed. Now onwards, orders placed by guest users by registering while placing order will not be captured.
|
560 |
+
|
561 |
+
= 3.6 (01.04.2017) =
|
562 |
+
|
563 |
+
* This version has 1 bug fix.
|
564 |
+
|
565 |
+
* Bug Fixed - Warnings were displayed on the Order Received page with WooCommerce version 3.0.0. This is fixed now.
|
566 |
+
|
567 |
+
= 3.5 (10.03.2017) =
|
568 |
+
|
569 |
+
* This version has 1 new feature and 3 enhancements.
|
570 |
+
|
571 |
+
* New Feature - New setting named as "Enable tracking carts when customer doesn't enter details" on the settings page. When this setting is enabled it will enable tracking of abandoned products & carts even if the customer does not visit the checkout page or does not enter any details on the checkout page like Name or Email. Tracking will begin as soon as a visitor adds a product to their cart and visits the cart page.
|
572 |
+
|
573 |
+
* Enhancement - The default settings value for "Cart abandoned cut-off time" for logged-in users has been modified to 10 minutes.
|
574 |
+
|
575 |
+
* Enhancement - The Settings tab of the plugin has been redesigned. Now, the plugin will display 2 sub-tabs for different settings. The sub-tabs are named as "General Settings" & "Email Sending Settings". The settings of add/edit email template "Send From This Name", "Send From This Email Address" & "Send Reply Emails to" has been moved to the Settings -> Email Sending Setting tab.
|
576 |
+
|
577 |
+
* Enhancement - In this version we have introduced three new views of abandoned orders in the Abandoned Orders tab. The views named are "All", "Registered Users", "Guest Users" & "Carts without Customer Details". The "Registered Users" view will display only the logged-in user's abandoned carts. The "Guest Users" view will display the guest user's carts & "Carts without Customer Details" view will display all the abandoned carts of the guest users who have not entered an email address or any information on the checkout page.
|
578 |
+
|
579 |
+
= 3.4 (08.02.2017) =
|
580 |
+
|
581 |
+
* This version has 3 enhancements.
|
582 |
+
|
583 |
+
* Enhancement - We have made our plugin compatible with the "Loco Translation" plugin. Now, all the strings from Abandoned Cart Lite for WooCommerce plugin can be translated using the Loco Translation plugin.
|
584 |
+
|
585 |
+
* Enhancement - The email template are now compatible with the "WP Better Emails" plugin. If the "WP Better Emails" plugin is activated on the site then CSS style of this plugin will be applied to the test email and abandoned cart reminder email.
|
586 |
+
|
587 |
+
* Enhancement - When the email sending script is executed on the server, it was running a large number of MySQL queries for guest users. That was causing an increase in the server load. In this version, we have optimised the queries. Now, the plugin will not fetch all the guest users record as it will fetch the necessary record which needs to be checked. This will improve the site performance.
|
588 |
+
|
589 |
+
= 3.3 (22.11.2016) =
|
590 |
+
|
591 |
+
* This version has 2 bug fixes.
|
592 |
+
|
593 |
+
* Bug fixed: If the store has the wrong guest user id in the database then it was creating issues where guest users cart was not populating the correct cart data while recovering their cart from reminder email received. This has been fixed.
|
594 |
+
|
595 |
+
* Bug fixed: If plugin is being used with PHP7, it was showing an error "Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0". This has been fixed.
|
596 |
+
|
597 |
+
= 3.2 (19.10.2016) =
|
598 |
+
|
599 |
+
* This version has 3 enhancements along with 2 bug fixes.
|
600 |
+
|
601 |
+
* Enhancements - The plugin will now display the user's billing first name & billing last name for the "Customer Details" column of the abandoned orders tab.
|
602 |
+
|
603 |
+
* Enhancements - Earlier rounding off of the decimal values was hardcoded in the plugin. Now, it will round the decimal values based on the WooCommerce setting named "Number of Decimals" which is located at WooCommerce -> Settings menu.
|
604 |
+
|
605 |
+
* Enhancements - Earlier plugin was sending the abandoned cart reminder to the customer if the email body content was blank. Now, the plugin will not consider the blank email body template for sending the abandoned cart reminder emails.
|
606 |
+
|
607 |
+
* Bug Fixed - If "Send the Abandoned cart emails to the admin" setting is enabled and Admin of the store create manual order from WooCommerce -> Orders page then abandoned cart recovered email was getting sent to the Admin. This has been fixed.
|
608 |
+
|
609 |
+
* Bug Fixed - The count of abandoned carts on Recovered Orders tab was updated before "Cart abandoned cut-off time" limit is passed. This has been fixed.
|
610 |
+
|
611 |
+
= 3.1 (15.09.2016) =
|
612 |
+
|
613 |
+
* New Feature - The email sending logic has been changed. Due to some reason, the abandoned cart remainder emails are not sent to the customers at the time they are intended to be sent, and if after some time, the emails start sending, then multiple email templates whose interval has been reached were all sent together. Now, the plugin will also consider the last abandoned cart reminder email sent time and will keep a time gap between the last email template that was sent & the current email template's time, thereby ensuring emails are not sent together.
|
614 |
+
|
615 |
+
* Bug Fixed - The "Alter" table queries have been changed in the plugin. Instead of using get_results(), it now uses the query().
|
616 |
+
|
617 |
+
* Bug Fixed - We have used the encryption libraries mcrypt_encrypt, MCRYPT_MODE_CBC, MCRYPT_RIJNDAEL_256 to generate the cart links sent in the abandoned cart reminder emails. Due to this on some servers where these libraries were not enabled, the abandoned cart email notification were not sent to the recipients. This has been fixed.
|
618 |
+
|
619 |
+
* Bug Fixed - Earlier the "InnoDB" table engine type was hardcoded in plugin queries. As a result, the plugins tables were not created where the engine type was other than "InnoDB". This has been fixed.
|
620 |
+
|
621 |
+
* Bug Fixed - Some warnings were displayed in the Debug log file. This has been fixed.
|
622 |
+
|
623 |
+
= 3.0 (26.07.2016) =
|
624 |
+
|
625 |
+
* Enhancements - In this version, the code has been refined throughout the plugin & the folder structure has also been modified.
|
626 |
+
|
627 |
+
* Enhancements - Earlier rounding off of the decimal values was hardcoded in the plugin. Now, it will round the decimal values based on the WooCommerce setting named "Number of Decimals" which is located at WooCommerce -> Settings menu.
|
628 |
+
|
629 |
+
* Bugs Fixed - When setting "Email admin On Order Recovery" is enabled & order is recovered from the abandoned cart reminder notifications using "Cash On Delivery" payment gateway. Then the order is not considered as recovered & the order was not displayed in the "Recovered Orders" tab. This has been fixed.
|
630 |
+
|
631 |
+
* Bugs Fixed - Earlier the abandoned cart reminder emails & abandoned orders details page was not displaying the selected attributes for the variable products. This has been fixed.
|
632 |
+
|
633 |
+
* Bugs Fixed - The "Abandoned Date" column of the abandoned orders tab was not considering the time for sorting. This has been fixed.
|
634 |
+
|
635 |
+
= 2.9 (05.07.2016) =
|
636 |
+
|
637 |
+
* New Feature - New merge tag {{cart.unsubscribe}} has been added for email templates. This merge tag allows user to stop receiving further abandoned cart reminder email notifications. This merge tag has been added to comply with email sending laws in different countries.
|
638 |
+
|
639 |
+
* Bugs Fixed - Earlier if any user came from abandoned cart reminder email and place the order using PayPal payment gateway and do not reach the order received page. Then plugin was not considering that order as a recovered order. From now onwards if the user came from the abandoned cart reminder email and place the order using PayPal and does not reach the order received the page. Then plugin will consider that cart as a recovered order.
|
640 |
+
|
641 |
+
* Bugs Fixed - When the cart is abandoned as a guest & product have the special character in the attributes name, then it was displaying a blank row with only a checkbox on the Abandoned Orders tab. This has been fixed.
|
642 |
+
|
643 |
+
* Tweak - If the order is recovered from the abandoned cart reminder email then it will add a note "This order was abandoned & subsequently recovered." for the order.
|
644 |
+
|
645 |
+
= 2.8 (18.05.2016) =
|
646 |
+
|
647 |
+
* We have changed the encryption for the links that are sent in the Abandoned cart email notifications. Earlier we were using the mcrypt library for encoding the data. If mcrypt library was not installed on the server, then abandoned cart email notifications were not sent. Now we have used different functions for encoding the string. We have used microtime function & a security key. Using this security key, and after applying an algorithm on it, we generate the encoded string.
|
648 |
+
|
649 |
+
* The session now starts only on required pages of the store. Earlier it was started globally. This will help to improve the site performance.
|
650 |
+
|
651 |
+
* If billing email address of the logged-in user is not set then it was showing blank space on the abandoned orders list. This has been fixed. Now it will show the email address which was used while registering to the store.
|
652 |
+
|
653 |
+
* Earlier if email body was blank and we send the test email then blank email was sent. This has been fixed. Now if email body is blank then test email will not be sent.
|
654 |
+
|
655 |
+
* Tweak - Earlier we were populating the guest cart information by looping into the global WooCommerce cart. Now we are not looping & instead using the WooCommerce session object itself.
|
656 |
+
|
657 |
+
* Tweak - Earlier if the 'wp-content' directory has been renamed, then wp-load.php file was not included and abandoned cart reminder email was not sent. Now, we have changed the way of including the wp-load.php file for sending the abandoned cart reminder notifications.
|
658 |
+
|
659 |
+
* Tweak - Earlier when {{products.cart}} merge tag is used in abandoned cart email template, then on click of the product name and product image, it was redirecting to the product page. Now it will redirect the user to the cart page.
|
660 |
+
|
661 |
+
* Tweak - We are now rounding off the prices with the 'round' function.
|
662 |
+
|
663 |
+
= 2.7 (14.04.2016) =
|
664 |
+
|
665 |
+
* New setting named as "Email Template Header Text" is added in Add / Edit template page. It will allow to change the header text of the email which have WooCommerce template style setting enabled for the template.
|
666 |
+
|
667 |
+
* From this version, the email sending process will run every 15 minutes instead of every 5 minutes. This will result in improved overall performance of the website.
|
668 |
+
|
669 |
+
* When Lite version of the plugin is activated on the site then it was not allowing to activate the PRO version of the plugin. This has been fixed.
|
670 |
+
|
671 |
+
* When templates are created / updated and if it has the same duration as one of the existing templates, then new template was not saved. This has been fixed.
|
672 |
+
|
673 |
+
|
674 |
+
= 2.6 (02.03.2016) =
|
675 |
+
|
676 |
+
* The plugin is now using the TinyMCE editor available in WordPress core for the email body content. The external TinyMCE library is removed from the plugin.
|
677 |
+
|
678 |
+
* The plugin is made compatible with Huge IT Image Gallery plugin. The test email was not sent to the user when Huge IT Image Gallery plugin was activated.
|
679 |
+
|
680 |
+
* The Product Report tab has been redesigned to look consistent with the WordPress style.
|
681 |
+
|
682 |
+
= 2.5.2 (12.02.2016) =
|
683 |
+
|
684 |
+
* Abandoned Orders tab has been redesigned with the WordPress WP list tables. "Action" column has been removed. The "Delete" link has been added in the abandoned orders tab. It is capable of deleting the abandoned orders when hovering the abandoned order in the list. It is also capable of deleting abandoned orders in bulk from the "Abandoned orders" tab.
|
685 |
+
|
686 |
+
* Email Templates tab has been re-designed to be consistent with the WordPress styling. It is now capable of deleting email templates in bulk. Action column in the Email templates tab has been removed. User can Edit & Delete template using hover affect on the template. This update allows you to activate / deactivate email template from the "Email Templates" page itself without having to edit the template & set it as "Active" by checking the checkbox.
|
687 |
+
|
688 |
+
* Recover Orders tab has been re-designed to be consistent with the WordPress style tables. "View Details" column in the Recovered Orders tab has been removed. User can view Details of the recovered cart using the link 'View Details' on the hover affect on 'User name' column.
|
689 |
+
|
690 |
+
* New setting named as "Send From This Email Address:" is added in Add / Edit template page. It will allow to change the From Email address of abandoned cart notification.
|
691 |
+
|
692 |
+
* New setting named as "Send Reply Emails to:" is added in Add / Edit template page. It will allow the user to change the Reply to email address of the abandoned cart notification.
|
693 |
+
|
694 |
+
* If the "Wp-Content" folder name is changed using iThemes Security (formerly Better WP Security) plugin then abandoned cart email notifications were not sent. This has been fixed.
|
695 |
+
|
696 |
+
* If the cart has been empty and we have tried to recover the order via email then it was displaying wrong Cart Recovery date. It has been fixed.
|
697 |
+
|
698 |
+
* In some cases, when cart or checkout link was clicked from the abandoned cart email notification, it was displaying "Link Expired" in the browser. This has been fixed.
|
699 |
+
|
700 |
+
* If the user has emptied their cart before the abandoned cut-off time is reached, for such carts the record in the DB will become blank. Such cart records were displayed in the abandoned orders list. This has been fixed.
|
701 |
+
|
702 |
+
= 2.5.1 (05.01.2016) =
|
703 |
+
* Some warnings were displayed on Email Templates tab. These have been fixed.
|
704 |
+
|
705 |
+
= 2.5 (05.01.2016) =
|
706 |
+
|
707 |
+
* The Settings page for the plugin has been redone. We are now using the WordPress Settings API for all the options on that page.
|
708 |
+
* When the plugin is installed & activated for the first time, 1 default email template will also be created. The template will be inactive when the plugin is activated.
|
709 |
+
* A new setting is added on the Add/Edit Template page named as "Active". If this setting is checked, only then the abandoned cart reminder email will be sent to the customers. If this setting is unchecked, then the email template won't be sent to the customers, but still you can keep it in the plugin. By default, this is unchecked.
|
710 |
+
* A new setting is added on the Add/Edit Template page named as "Use WooCommerce Template Style". If this setting is checked then abandoned cart reminder email will use the WooCommerce style (header, footer, background, etc.) for the notifications. If it is not checked then the regular email will be sent to the customer as per the formatting that is set in the template editor.
|
711 |
+
For existing users, this setting will remain unchecked. For new users of the plugin, the setting will be enabled for the existing default email template that is provided with the plugin.
|
712 |
+
* Abandoned cart email notification will be sent to the client's billing address entered on checkout instead of on the email address added by the user while registering to the website. This applies only for logged in users.
|
713 |
+
* New shortcode "{{cart.abandoned_date}}" has been introduced in this version. It will display the date and time when the cart was abandoned in the abandoned cart email notification.
|
714 |
+
* When a customer places an order within the abandoned cart cut off time, then the order received page was displaying a warning. This has been fixed.
|
715 |
+
* Abandoned Orders tab was not sorting according to the "Date" column. Same way, Recovered Orders tab was not sorting according to "Created On" & "Recovered Date" column. This has been fixed.
|
716 |
+
* Some warnings were displayed on the Abandoned Orders, Recovered Orders and Product Report tab. These have been fixed.
|
717 |
+
* The 'mailto' link was not working on the Abandoned Order details page. This has been fixed.
|
718 |
+
* Tweak - Removed the background white color for the add / edit template page.
|
719 |
+
* Tweak - Abandoned Orders tab will display the user's billing address using which the cart was abandoned. This applies only for logged in users.
|
720 |
+
|
721 |
+
= 2.4 (10.12.2015) =
|
722 |
+
* Abandon Cart record was not being deleted for users, when they do not reach the order received page but the payment for the order is already done. Also user was receiving the abandoned cart notification for such orders. This has been fixed.
|
723 |
+
|
724 |
+
= 2.3 (04.12.2015) =
|
725 |
+
* A new setting has been added "Email admin on order recovery". It will send an email to the admin's email address when an abandoned cart is recovered by the customer. This will work only for registered users.
|
726 |
+
* A new tab "Product Report" has been added. It will list the product name, number of times product has been abandoned and the number of times product has been recovered.
|
727 |
+
|
728 |
+
= 2.2 (05.11.2015) =
|
729 |
+
* The plugin now captures abandoned guest carts. A guest user's cart will be captured on the Checkout page, if it is abandoned after entering the email address.
|
730 |
+
* A new shortcode "{{cart.link}}" is added, which will include the cart URL of your shop.
|
731 |
+
* Fixed some warnings being displayed in the Settings tab.
|
732 |
+
|
733 |
+
= 2.1 (14.10.2015) =
|
734 |
+
* From this version, you can view the abandoned order details, which includes product details, billing & shipping address, under the Abandoned Orders tab.
|
735 |
+
|
736 |
+
= 2.0.1 (20.08.2015) =
|
737 |
+
* Applied fix for warning displayed on the abandoned orders page.
|
738 |
+
|
739 |
+
= 2.0 (20.08.2015) =
|
740 |
+
* The image link was coming broken while creating or editing the template if the image is present on the same server. This is fixed now.
|
741 |
+
* Added translations file for Hebrew which was contributed by a user.
|
742 |
+
|
743 |
+
= 1.9 (24.07.2015) =
|
744 |
+
* Fixed security issues pointed out by Wordpress.org review team.
|
745 |
+
|
746 |
+
= 1.8 (16.07.2015) =
|
747 |
+
* The strings for the products table, added using the shortcode {{products.cart}} in email templates have been added to the .pot, .po and .mo files of the plugin. Now the cart data will be translated to the respective language in the reminder emails as well as the test emails.
|
748 |
+
|
749 |
+
= 1.7 (07.07.2015) =
|
750 |
+
* Merge fields like {{products.cart}}, {{customer.firstname}}, etc. will be replaced with dummy data in the test emails that are sent from the template add / edit page. This ensures that you get a very close approximation of the actual email that will be delivered to your customers.
|
751 |
+
* Product image size in the abandon cart notification emails is set to a fixed height & width now.
|
752 |
+
* On WordPress Multisite, incorrect table prefix was used due to which the plugin was not functioning correctly on multisite installs. This is fixed now.
|
753 |
+
|
754 |
+
= 1.6 (24.06.2015) =
|
755 |
+
* We have included .po, .pot and .mo files in the plugin. The plugin strings can now be translated to any language using these files.
|
756 |
+
|
757 |
+
= 1.5 (25.05.2015) =
|
758 |
+
* A shortcode {{products.cart}} can now be added in the abandoned cart notification emails. It will add the product information in the email like Product image, Product name, Quantity, Price & Total. The shortcode needs to be added from the AC menu from the template editor.
|
759 |
+
* The default value of the field "Cart abandoned cut-off time" in Settings tab was blank when the plugin is installed. This is now set to 60 minutes upon plugin activation.
|
760 |
+
|
761 |
+
= 1.4 (14.05.2015) =
|
762 |
+
* The abandoned cart emails were being sent multiple times for a single email template due to a bug. This is fixed.
|
763 |
+
* The plugin will now work on WordPress Multisite too.
|
764 |
+
|
765 |
+
= 1.3 (01.04.2015) =
|
766 |
+
* The abandoned cart email notifications are now sent out automatically without the necessity of having to set up a cron job manually.
|
767 |
+
|
768 |
+
= 1.2 (02.12.2014) =
|
769 |
+
* The test emails were not getting sent.
|
770 |
+
* Warnings fixed for some of the plugin setting pages.
|
771 |
+
* The image urls in the email were coming broken, this is fixed.
|
772 |
+
|
773 |
+
= 1.1 (25.04.2013) =
|
774 |
+
* Compatibility with WooCommerce 2.x versions
|
775 |
+
* Fixed 404 errors with images & other files
|
776 |
+
|
777 |
+
= 1.0 (18.02.2013) =
|
778 |
+
* Initial release.
|
779 |
+
|
780 |
+
== Upgrade Notice ==
|
781 |
+
|
782 |
+
= 4.5 (28.12-2017) =
|
783 |
+
|
784 |
+
* This version has 1 bug fix.
|
785 |
+
|
786 |
+
* Bug Fixed - Made some performance optimizations so the plugin occupies less CPU resources. We will continue working on this so the resource usage stays low.
|
787 |
+
|
788 |
+
= 4.4 (13.10-2017) =
|
789 |
+
|
790 |
+
* This version has 3 bugs fixes along with 1 Enhancement.
|
791 |
+
|
792 |
+
* Bug Fixed - If the guest user's id is wrong then the abandoned cart email will not be sent to the customers.
|
793 |
+
|
794 |
+
* Bug Fixed - If the variable products have a special character was not displaying the correct attributes. This has been fixed.
|
795 |
+
|
796 |
+
* Bug Fixed - Some error notices of debug log file are fixed.
|
797 |
+
|
798 |
+
* Enhancement - Now, admin can activate the email templates using toggle button from the Email Templates page.
|
799 |
+
|
800 |
+
= 4.3 (29.08.2017) =
|
801 |
+
|
802 |
+
* This version has 1 bug fix along with 3 Enhancements.
|
803 |
+
|
804 |
+
* Bug Fixed - When abandoned cart will have a variable product which has 3 attributes or more than that. Then the slug name of selected variations were showing in the abandoned cart reminder emails and on the abandoned cart details page. This has been fixed.
|
805 |
+
|
806 |
+
* Enhancement - If the abandoned cart total is zero then abandoned cart reminder emails will not be sent to the customers.
|
807 |
+
|
808 |
+
* Enhancement - When the email sending script is executed on the server, it was running a large number of MySQL queries for guest users. That was causing an increase in the server load. In this version, we have optimised the queries. Initially, it used to query even those guest user records for which emails were already sent. Now, it will only query those records where email is yet to be sent.
|
809 |
+
|
810 |
+
* Enhancement - Removed the Active field from the add / edit email template page. Admin can activate or deactivate the templates from the Email templates page.
|
811 |
+
|
812 |
+
|
813 |
+
= 4.2 (25.07.2017) =
|
814 |
+
|
815 |
+
* This version has 1 bug fix.
|
816 |
+
|
817 |
+
* Bug Fixed - When WooCommerce is deactivated and "Allow" button is clicked from the user tracking data notice. It was redirecting to a blank page. Now, if WooCommerce is deactivated then Abandoned cart lite plugin will be automatically deactivated & display the notice.
|
818 |
+
|
819 |
+
= 4.1 (11.07.2017) =
|
820 |
+
|
821 |
+
* This version has 1 bug fix.
|
822 |
+
|
823 |
+
* Bug Fixed - Some warning was displayed in the Debug log file. This has been fixed.
|
824 |
+
|
825 |
+
= 4.0 (04.07.2017) =
|
826 |
+
|
827 |
+
* This version has 1 bug fix.
|
828 |
+
|
829 |
+
* Bug Fixed - Logged-in user's carts were not captured with the WooCommerce version 3.1. This issue has been fixed.
|
830 |
+
|
831 |
+
= 3.9.3 (09.06.2017) =
|
832 |
+
|
833 |
+
* This version has 3 bugs fixes.
|
834 |
+
|
835 |
+
* Bug Fixed - When store admin clicks on the dismissible notice, the notice was not getting dismissed. This issue has been fixed.
|
836 |
+
|
837 |
+
* Bug Fixed - The dismissible notice was not displaying the 'Allow' & 'No Thanks' button properly. This issue has been fixed.
|
838 |
+
|
839 |
+
* Bug Fixed - The total Recovered amount was not tracked. This issue has been fixed.
|
840 |
+
|
841 |
+
= 3.9.2 (09.06.2017) =
|
842 |
+
|
843 |
+
* Added missing java script file.
|
844 |
+
|
845 |
+
= 3.9.1 (09.06.2017) =
|
846 |
+
|
847 |
+
* Added missing image.
|
848 |
+
|
849 |
+
= 3.9 (09.06.2017) =
|
850 |
+
|
851 |
+
* This version has 1 new feature.
|
852 |
+
|
853 |
+
* New Feature - A new dismissible notice is added in the WordPress admin, which provides an option to allow usage tracking of the non-sensitive data of our plugin from the website. [Find out more](https://www.tychesoftwares.com/abandoned-cart-lite-usage-tracking/?utm_source=wpplugin&utm_medium=usagelink&utm_campaign=AbandonedCartLite).
|
854 |
+
|
855 |
+
= 3.8 (29.05.2017) =
|
856 |
+
|
857 |
+
* This version has 1 bug fix and 2 enhancements.
|
858 |
+
|
859 |
+
* Bug Fixed - Earlier Abandoned Cart date and time format were not translated into the WordPress selected language in the plugin. This issue has been fixed.
|
860 |
+
|
861 |
+
* Enhancement - From this version, the admin can insert the WordPress supported emoji's in the abandoned cart email templates as well as in the subject.
|
862 |
+
|
863 |
+
* Enhancement - Earlier we had hardcoded date and time format in our plugin. Now, the plugin will use selected WordPress date and time format.
|
864 |
+
|
865 |
+
= 3.7 (10.04.2017) =
|
866 |
+
|
867 |
+
* This version has 1 bug fix.
|
868 |
+
|
869 |
+
* Bug Fixed - If guest customer places an order by selecting "Create an account" checkbox or enters the password in "Account password" field on the checkout page, then an abandoned cart was created after "Cart abandoned cut off time" is reached. Also, abandoned cart reminder email were sent to the customers after the order was placed. Now onwards, orders placed by guest users by registering while placing order will not be captured.
|
870 |
+
|
871 |
+
= 3.6 (01.04.2017) =
|
872 |
+
|
873 |
+
* This version has 1 bug fix.
|
874 |
+
|
875 |
+
* Bug Fixed - Warnings were displayed on the Order Received page with WooCommerce version 3.0.0. This is fixed now.
|
876 |
+
|
877 |
+
= 3.5 (10.03.2017) =
|
878 |
+
|
879 |
+
* This version has 1 new feature and 3 enhancements.
|
880 |
+
|
881 |
+
* New Feature - New setting named as "Enable tracking carts when customer doesn't enter details" on the settings page. When this setting is enabled it will enable tracking of abandoned products & carts even if the customer does not visit the checkout page or does not enter any details on the checkout page like Name or Email. Tracking will begin as soon as a visitor adds a product to their cart and visits the cart page.
|
882 |
+
|
883 |
+
* Enhancement - The default settings value for "Cart abandoned cut-off time" for logged-in users has been modified to 10 minutes.
|
884 |
+
|
885 |
+
* Enhancement - The Settings tab of the plugin has been redesigned. Now, the plugin will display 2 sub-tabs for different settings. The sub-tabs are named as "General Settings" & "Email Sending Settings". The settings of add/edit email template "Send From This Name", "Send From This Email Address" & "Send Reply Emails to" has been moved to the Settings -> Email Sending Setting tab.
|
886 |
+
|
887 |
+
* Enhancement - In this version we have introduced three new views of abandoned orders in the Abandoned Orders tab. The views named are "All", "Registered Users", "Guest Users" & "Carts without Customer Details". The "Registered Users" view will display only the logged-in user's abandoned carts. The "Guest Users" view will display the guest user's carts & "Carts without Customer Details" view will display all the abandoned carts of the guest users who have not entered an email address or any information on the checkout page.
|
888 |
+
|
889 |
+
= 3.4 (08.02.2017) =
|
890 |
+
|
891 |
+
* This version has 3 enhancements.
|
892 |
+
|
893 |
+
* Enhancement - We have made our plugin compatible with the "Loco Translation" plugin. Now, all the strings from Abandoned Cart Lite for WooCommerce plugin can be translated using the Loco Translation plugin.
|
894 |
+
|
895 |
+
* Enhancement - The email template are now compatible with the "WP Better Emails" plugin. If the "WP Better Emails" plugin is activated on the site then CSS style of this plugin will be applied to the test email and abandoned cart reminder email.
|
896 |
+
|
897 |
+
* Enhancement - When the email sending script is executed on the server, it was running a large number of MySQL queries for guest users. That was causing an increase in the server load. In this version, we have optimised the queries. Now, the plugin will not fetch all the guest users record as it will fetch the necessary record which needs to be checked. This will improve the site performance.
|
898 |
+
|
899 |
+
= 3.3 (22.11.2016) =
|
900 |
+
|
901 |
+
* This version has 2 bug fixes.
|
902 |
+
|
903 |
+
* Bug fixed: If the store has the wrong guest user id in the database then it was creating issues where guest users cart was not populating the correct cart data while recovering their cart from reminder email received. This has been fixed.
|
904 |
+
|
905 |
+
* Bug fixed: If plugin is being used with PHP7, it was showing an error "Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0". This has been fixed.
|
906 |
+
|
907 |
+
= 3.2 (19.10.2016) =
|
908 |
+
|
909 |
+
* This version has 3 enhancements along with 2 bug fixes.
|
910 |
+
|
911 |
+
* Enhancements - The plugin will now display the user's billing first name & billing last name for the "Customer Details" column of the abandoned orders tab.
|
912 |
+
|
913 |
+
* Enhancements - Earlier rounding off of the decimal values was hardcoded in the plugin. Now, it will round the decimal values based on the WooCommerce setting named "Number of Decimals" which is located at WooCommerce -> Settings menu.
|
914 |
+
|
915 |
+
* Enhancements - Earlier plugin was sending the abandoned cart reminder to the customer if the email body content was blank. Now, the plugin will not consider the blank email body template for sending the abandoned cart reminder emails.
|
916 |
+
|
917 |
+
* Bug Fixed - If "Send the Abandoned cart emails to the admin" setting is enabled and Admin of the store create manual order from WooCommerce -> Orders page then abandoned cart recovered email was getting sent to the Admin. This has been fixed.
|
918 |
+
|
919 |
+
* Bug Fixed - The count of abandoned carts on Recovered Orders tab was updated before "Cart abandoned cut-off time" limit is passed. This has been fixed.
|
920 |
+
|
921 |
+
= 3.1 (15.09.2016) =
|
922 |
+
|
923 |
+
* New Feature - The email sending logic has been changed. Due to some reason, the abandoned cart remainder emails are not sent to the customers at the time they are intended to be sent, and if after some time, the emails start sending, then multiple email templates whose interval has been reached were all sent together. Now, the plugin will also consider the last abandoned cart reminder email sent time and will keep a time gap between the last email template that was sent & the current email template's time, thereby ensuring emails are not sent together.
|
924 |
+
|
925 |
+
* Bug Fixed - The "Alter" table queries have been changed in the plugin. Instead of using get_results(), it now uses the query().
|
926 |
+
|
927 |
+
* Bug Fixed - We have used the encryption libraries mcrypt_encrypt, MCRYPT_MODE_CBC, MCRYPT_RIJNDAEL_256 to generate the cart links sent in the abandoned cart reminder emails. Due to this on some servers where these libraries were not enabled, the abandoned cart email notification were not sent to the recipients. This has been fixed.
|
928 |
+
|
929 |
+
* Bug Fixed - Earlier the "InnoDB" table engine type was hardcoded in plugin queries. As a result, the plugins tables were not created where the engine type was other than "InnoDB". This has been fixed.
|
930 |
+
|
931 |
+
* Bug Fixed - Some warnings were displayed in the Debug log file. This has been fixed.
|
932 |
+
|
933 |
+
= 3.0 (26.07.2016) =
|
934 |
+
|
935 |
+
* Enhancements - In this version, the code has been refined throughout the plugin & the folder structure has also been modified.
|
936 |
+
|
937 |
+
* Enhancements - Earlier rounding off of the decimal values was hardcoded in the plugin. Now, it will round the decimal values based on the WooCommerce setting named "Number of Decimals" which is located at WooCommerce -> Settings menu.
|
938 |
+
|
939 |
+
* Bugs Fixed - When setting "Email admin On Order Recovery" is enabled & order is recovered from the abandoned cart reminder notifications using "Cash On Delivery" payment gateway. Then the order is not considered as recovered & the order was not displayed in the "Recovered Orders" tab. This has been fixed.
|
940 |
+
|
941 |
+
* Bugs Fixed - Earlier the abandoned cart reminder emails & abandoned orders details page was not displaying the selected attributes for the variable products. This has been fixed.
|
942 |
+
|
943 |
+
* Bugs Fixed - The "Abandoned Date" column of the abandoned orders tab was not considering the time for sorting. This has been fixed.
|
944 |
+
|
945 |
+
= 2.9 (05.07.2016) =
|
946 |
+
|
947 |
+
* New Feature - New merge tag {{cart.unsubscribe}} has been added for email templates. This merge tag allows user to stop receiving further abandoned cart reminder email notifications. This merge tag has been added to comply with email sending laws in different countries.
|
948 |
+
|
949 |
+
* Bugs Fixed - Earlier if any user came from abandoned cart reminder email and place the order using PayPal payment gateway and do not reach the order received page. Then plugin was not considering that order as a recovered order. From now onwards if the user came from the abandoned cart reminder email and place the order using PayPal and does not reach the order received the page. Then plugin will consider that cart as a recovered order.
|
950 |
+
|
951 |
+
* Bugs Fixed - When the cart is abandoned as a guest & product have the special character in the attributes name, then it was displaying a blank row with only a checkbox on the Abandoned Orders tab. This has been fixed.
|
952 |
+
|
953 |
+
* Tweak - If the order is recovered from the abandoned cart reminder email then it will add a note "This order was abandoned & subsequently recovered." for the order.
|
954 |
+
|
955 |
+
= 2.8 (18.05.2016) =
|
956 |
+
|
957 |
+
* We have changed the encryption for the links that are sent in the Abandoned cart email notifications. Earlier we were using the mcrypt library for encoding the data. If mcrypt library was not installed on the server, then abandoned cart email notifications were not sent. Now we have used different functions for encoding the string. We have used microtime function & a security key. Using this security key, and after applying an algorithm on it, we generate the encoded string.
|
958 |
+
|
959 |
+
* The session now starts only on required pages of the store. Earlier it was started globally. This will help to improve the site performance.
|
960 |
+
|
961 |
+
* If billing email address of the logged-in user is not set then it was showing blank space on the abandoned orders list. This has been fixed. Now it will show the email address which was used while registering to the store.
|
962 |
+
|
963 |
+
* Earlier if email body was blank and we send the test email then blank email was sent. This has been fixed. Now if email body is blank then test email will not be sent.
|
964 |
+
|
965 |
+
* Tweak - Earlier we were populating the guest cart information by looping into the global WooCommerce cart. Now we are not looping & instead using the WooCommerce session object itself.
|
966 |
+
|
967 |
+
* Tweak - Earlier if the 'wp-content' directory has been renamed, then wp-load.php file was not included and abandoned cart reminder email was not sent. Now, we have changed the way of including the wp-load.php file for sending the abandoned cart reminder notifications.
|
968 |
+
|
969 |
+
* Tweak - Earlier when {{products.cart}} merge tag is used in abandoned cart email template, then on click of the product name and product image, it was redirecting to the product page. Now it will redirect the user to the cart page.
|
970 |
+
|
971 |
+
* Tweak - We are now rounding off the prices with the 'round' function.
|
972 |
+
|
973 |
+
= 2.7 (14.04.2016) =
|
974 |
+
|
975 |
+
* New setting named as "Email Template Header Text" is added in Add / Edit template page. It will allow to change the header text of the email which have WooCommerce template style setting enabled for the template.
|
976 |
+
|
977 |
+
* From this version, the email sending process will run every 15 minutes instead of every 5 minutes. This will result in improved overall performance of the website.
|
978 |
+
|
979 |
+
* When Lite version of the plugin is activated on the site then it was not allowing to activate the PRO version of the plugin. This has been fixed.
|
980 |
+
|
981 |
+
* When templates are created / updated and if it has the same duration as one of the existing templates, then new template was not saved. This has been fixed.
|
982 |
+
|
983 |
+
= 2.6 (02.03.2016) =
|
984 |
+
|
985 |
+
* The plugin is now using the TinyMCE editor available in WordPress core for the email body content. The external TinyMCE library is removed from the plugin.
|
986 |
+
|
987 |
+
* The plugin is made compatible with Huge IT Image Gallery plugin. The test email was not sent to the user when Huge IT Image Gallery plugin was activated.
|
988 |
+
|
989 |
+
* The Product Report tab has been redesigned to look consistent with the WordPress style.
|
990 |
+
|
991 |
+
= 2.5.2 (12.02.2016) =
|
992 |
+
|
993 |
+
* Abandoned Orders tab has been redesigned with the WordPress WP list tables. "Action" column has been removed. The "Delete" link has been added in the abandoned orders tab. It is capable of deleting the abandoned orders when hovering the abandoned order in the list. It is also capable of deleting abandoned orders in bulk from the "Abandoned orders" tab.
|
994 |
+
|
995 |
+
* Email Templates tab has been re-designed to be consistent with the WordPress styling. It is now capable of deleting email templates in bulk. Action column in the Email templates tab has been removed. User can Edit & Delete template using hover affect on the template. This update allows you to activate / deactivate email template from the "Email Templates" page itself without having to edit the template & set it as "Active" by checking the checkbox.
|
996 |
+
|
997 |
+
* Recover Orders tab has been re-designed to be consistent with the WordPress style tables. "View Details" column in the Recovered Orders tab has been removed. User can view Details of the recovered cart using the link 'View Details' on the hover affect on 'User name' column.
|
998 |
+
|
999 |
+
* New setting named as "Send From This Email Address:" is added in Add / Edit template page. It will allow to change the From Email address of abandoned cart notification.
|
1000 |
+
|
1001 |
+
* New setting named as "Send Reply Emails to:" is added in Add / Edit template page. It will allow the user to change the Reply to email address of the abandoned cart notification.
|
1002 |
+
|
1003 |
+
* If the "Wp-Content" folder name is changed using iThemes Security (formerly Better WP Security) plugin then abandoned cart email notifications were not sent. This has been fixed.
|
1004 |
+
|
1005 |
+
* If the cart has been empty and we have tried to recover the order via email then it was displaying wrong Cart Recovery date. It has been fixed.
|
1006 |
+
|
1007 |
+
* In some cases, when cart or checkout link was clicked from the abandoned cart email notification, it was displaying "Link Expired" in the browser. This has been fixed.
|
1008 |
+
|
1009 |
+
* If the user has emptied their cart before the abandoned cut-off time is reached, for such carts the record in the DB will become blank. Such cart records were displayed in the abandoned orders list. This has been fixed.
|
1010 |
+
|
1011 |
+
= 2.5.1 (05.01.2016) =
|
1012 |
+
* Some warnings were displayed on Email Templates tab. These have been fixed.
|
1013 |
+
|
1014 |
+
= 2.5 (05.01.2016) =
|
1015 |
+
|
1016 |
+
* The Settings page for the plugin has been redone. We are now using the WordPress Settings API for all the options on that page.
|
1017 |
+
* When the plugin is installed & activated for the first time, 1 default email template will also be created. The template will be inactive when the plugin is activated.
|
1018 |
+
* A new setting is added on the Add/Edit Template page named as "Active". If this setting is checked, only then the abandoned cart reminder email will be sent to the customers. If this setting is unchecked, then the email template won't be sent to the customers, but still you can keep it in the plugin. By default, this is unchecked.
|
1019 |
+
* A new setting is added on the Add/Edit Template page named as "Use WooCommerce Template Style". If this setting is checked then abandoned cart reminder email will use the WooCommerce style (header, footer, background, etc.) for the notifications. If it is not checked then the regular email will be sent to the customer as per the formatting that is set in the template editor.
|
1020 |
+
For existing users, this setting will remain unchecked. For new users of the plugin, the setting will be enabled for the existing default email template that is provided with the plugin.
|
1021 |
+
* Abandoned cart email notification will be sent to the client's billing address entered on checkout instead of on the email address added by the user while registering to the website. This applies only for logged in users.
|
1022 |
+
* New shortcode "{{cart.abandoned_date}}" has been introduced in this version. It will display the date and time when the cart was abandoned in the abandoned cart email notification.
|
1023 |
+
* When a customer places an order within the abandoned cart cut off time, then the order received page was displaying a warning. This has been fixed.
|
1024 |
+
* Abandoned Orders tab was not sorting according to the "Date" column. Same way, Recovered Orders tab was not sorting according to "Created On" & "Recovered Date" column. This has been fixed.
|
1025 |
+
* Some warnings were displayed on the Abandoned Orders, Recovered Orders and Product Report tab. These have been fixed.
|
1026 |
+
* The 'mailto' link was not working on the Abandoned Order details page. This has been fixed.
|
1027 |
+
* Tweak - Removed the background white color for the add / edit template page.
|
1028 |
+
* Tweak - Abandoned Orders tab will display the user's billing address using which the cart was abandoned. This applies only for logged in users.
|
1029 |
+
|
1030 |
+
= 2.4 (10.12.2015) =
|
1031 |
+
* Abandon Cart record was not being deleted for users, when they do not reach the order received page but the payment for the order is already done. Also user was receiving the abandoned cart notification for such orders. This has been fixed.
|
1032 |
+
|
1033 |
+
= 2.3 (04.12.2015) =
|
1034 |
+
* A new setting has been added "Email admin on order recovery". It will send an email to the admin's email address when an abandoned cart is recovered by the customer. This will work only for registered users.
|
1035 |
+
* A new tab "Product Report" has been added. It will list the product name, number of times product has been abandoned and the number of times product has been recovered.
|
1036 |
+
|
1037 |
+
= 2.2 (05.11.2015) =
|
1038 |
+
* The plugin now captures abandoned guest carts. A guest user's cart will be captured on the Checkout page, if it is abandoned after entering the email address.
|
1039 |
+
* A new shortcode "{{cart.link}}" is added, which will include the cart URL of your shop.
|
1040 |
+
* Fixed some warnings being displayed in the Settings tab.
|
1041 |
+
|
1042 |
+
= 2.1 (14.10.2015) =
|
1043 |
+
* From this version, you can view the abandoned order details, which includes product details, billing & shipping address, under the Abandoned Orders tab.
|
1044 |
+
|
1045 |
+
= 2.0.1 (20.08.2015) =
|
1046 |
+
* Applied fix for warning displayed on the abandoned orders page.
|
1047 |
+
|
1048 |
+
= 2.0 (20.08.2015) =
|
1049 |
+
* The image link was coming broken while creating or editing the template if the image is present on the same server. This is fixed now.
|
1050 |
+
* Added translations file for Hebrew which was contributed by a user.
|
1051 |
+
|
1052 |
+
= 1.9 (24.07.2015) =
|
1053 |
+
* Fixed security issues pointed out by Wordpress.org review team.
|
1054 |
+
|
1055 |
+
= 1.8 (16.07.2015) =
|
1056 |
+
* The strings for the products table, added using the shortcode {{products.cart}} in email templates have been added to the .pot, .po and .mo files of the plugin. Now the cart data will be translated to the respective language in the reminder emails as well as the test emails.
|
1057 |
+
|
1058 |
+
= 1.7 (07.07.2015) =
|
1059 |
+
* Merge fields like {{products.cart}}, {{customer.firstname}}, etc. will be replaced with dummy data in the test emails that are sent from the template add / edit page. This ensures that you get a very close approximation of the actual email that will be delivered to your customers.
|
1060 |
+
* Product image size in the abandon cart notification emails is set to a fixed height & width now.
|
1061 |
+
* On WordPress Multisite, incorrect table prefix was used due to which the plugin was not functioning correctly on multisite installs. This is fixed now.
|
1062 |
+
|
1063 |
+
= 1.6 (24.06.2015) =
|
1064 |
+
* We have included .po, .pot and .mo files in the plugin. The plugin strings can now be translated to any language using these files.
|
1065 |
+
|
1066 |
+
= 1.5 (25.05.2015) =
|
1067 |
+
* A shortcode {{products.cart}} can now be added in the abandoned cart notification emails. It will add the product information in the email like Product image, Product name, Quantity, Price & Total. The shortcode needs to be added from the AC menu from the template editor.
|
1068 |
+
* The default value of the field "Cart abandoned cut-off time" in Settings tab was blank when the plugin is installed. This is now set to 60 minutes upon plugin activation.
|
1069 |
+
|
1070 |
+
= 1.4 (14.05.2015) =
|
1071 |
+
* The abandoned cart emails were being sent multiple times for a single email template due to a bug. This is fixed.
|
1072 |
+
* The plugin will now work on WordPress Multisite too.
|
1073 |
+
|
1074 |
+
= 1.3 (01.04.2015) =
|
1075 |
+
* The abandoned cart email notifications are now sent out automatically without the necessity of having to set up a cron job manually.
|
1076 |
+
|
1077 |
+
= 1.2 (02.12.2014) =
|
1078 |
+
* The test emails were not getting sent.
|
1079 |
+
* Warnings fixed for some of the plugin setting pages.
|
1080 |
+
* The image urls in the email were coming broken, this is fixed.
|
1081 |
+
|
1082 |
+
= 1.1 (25.04.2013) =
|
1083 |
+
* Compatibility with WooCommerce 2.x versions
|
1084 |
+
* Fixed 404 errors with images & other files
|
1085 |
+
|
1086 |
+
= 1.0 (18.02.2013) =
|
1087 |
+
* Initial release.
|
1088 |
+
|
woocommerce-ac.php
CHANGED
@@ -5,14 +5,14 @@
|
|
5 |
* Description: This plugin captures abandoned carts by logged-in users & emails them about it.
|
6 |
* <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
|
7 |
* PRO Version.</a></strong>
|
8 |
-
* Version: 5.
|
9 |
* Author: Tyche Softwares
|
10 |
* Author URI: http://www.tychesoftwares.com/
|
11 |
* Text Domain: woocommerce-abandoned-cart
|
12 |
* Domain Path: /i18n/languages/
|
13 |
* Requires PHP: 5.6
|
14 |
* WC requires at least: 3.0.0
|
15 |
-
* WC tested up to: 4.
|
16 |
*
|
17 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
18 |
*/
|
@@ -35,6 +35,8 @@ require_once( 'includes/admin/wcap_pro_settings.php' );
|
|
35 |
require_once( 'includes/admin/wcap_pro_settings_callbacks.php' );
|
36 |
require_once( 'includes/admin/wcap_add_cart_popup_modal.php' );
|
37 |
|
|
|
|
|
38 |
/**
|
39 |
* Schedule an action to delete old carts once a day
|
40 |
*
|
@@ -78,7 +80,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
78 |
}
|
79 |
|
80 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
81 |
-
define( 'WCAL_PLUGIN_VERSION', '5.
|
82 |
}
|
83 |
$this->one_hour = 60 * 60;
|
84 |
$this->three_hours = 3 * $this->one_hour;
|
@@ -129,6 +131,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
129 |
|
130 |
// Initialize settings.
|
131 |
register_activation_hook( __FILE__, array( &$this, 'wcal_activate' ) );
|
|
|
132 |
|
133 |
// Action Scheduler for Cron.
|
134 |
require_once( 'includes/libraries/action-scheduler/action-scheduler.php' );
|
@@ -270,6 +273,73 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
270 |
return $wcal_add_questions;
|
271 |
}
|
272 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
/**
|
274 |
* It will ganerate the preview email template.
|
275 |
* @hook admin_init
|
@@ -278,6 +348,13 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
278 |
*/
|
279 |
public function wcal_preview_emails() {
|
280 |
global $woocommerce;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
if ( isset( $_GET['wcal_preview_woocommerce_mail'] ) ) {
|
282 |
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-abandoned-cart' ) ) {
|
283 |
die( 'Security check' );
|
@@ -300,8 +377,12 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
300 |
$email_heading = __( 'Abandoned cart Email Template', 'woocommerce-abandoned-cart' );
|
301 |
// get the preview email content
|
302 |
ob_start();
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
|
|
305 |
// create a new email
|
306 |
$email = new WC_Email();
|
307 |
// wrap the content with the email template and then add styles
|
@@ -317,8 +398,12 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
317 |
}
|
318 |
// get the preview email content
|
319 |
ob_start();
|
320 |
-
|
321 |
-
|
|
|
|
|
|
|
|
|
322 |
// print the preview email
|
323 |
echo $message;
|
324 |
exit;
|
@@ -371,6 +456,18 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
371 |
}
|
372 |
}
|
373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
/**
|
375 |
* Activation code: Create tables, default settings etc.
|
376 |
*
|
@@ -1055,7 +1152,10 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1055 |
$gdpr_consent = true;
|
1056 |
}
|
1057 |
|
1058 |
-
|
|
|
|
|
|
|
1059 |
|
1060 |
$query = "SELECT * FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite`
|
1061 |
WHERE user_id = %d
|
@@ -1959,7 +2059,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1959 |
}
|
1960 |
// Detect when a bulk action is being triggered on abandoned orders page.
|
1961 |
if ( 'wcal_delete' === $action || 'wcal_delete' === $action_two ) {
|
1962 |
-
$ids = isset( $_GET['abandoned_order_id'] ) ? $_GET['abandoned_order_id'] :
|
1963 |
if ( ! is_array( $ids ) ) {
|
1964 |
$ids = array( $ids );
|
1965 |
}
|
@@ -1968,26 +2068,60 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1968 |
$class->wcal_delete_bulk_action_handler_function( $id );
|
1969 |
}
|
1970 |
}
|
1971 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1972 |
if ( 'wcal_delete_template' === $action || 'wcal_delete_template' === $action_two ) {
|
1973 |
-
$ids = isset( $_GET['template_id'] ) ? $_GET['template_id'] : false;
|
1974 |
if ( ! is_array( $ids ) ) {
|
1975 |
-
|
1976 |
}
|
1977 |
foreach ( $ids as $id ) {
|
1978 |
-
|
1979 |
-
|
1980 |
}
|
1981 |
}
|
1982 |
|
1983 |
-
if ( isset( $_GET['wcal_deleted'] ) && 'YES'
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1989 |
<div id="message" class="updated fade">
|
1990 |
-
<p><strong><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1991 |
</div>
|
1992 |
<?php }
|
1993 |
if ( 'emailsettings' == $action ) {
|
@@ -2760,6 +2894,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2760 |
if ( isset( $_GET['mode'] ) ) {
|
2761 |
$mode = $_GET['mode'];
|
2762 |
}
|
|
|
2763 |
if ( 'emailtemplates' == $action && ( 'addnewtemplate' == $mode || 'edittemplate' == $mode ) ) {
|
2764 |
if ( 'edittemplate' == $mode ) {
|
2765 |
$results = array();
|
@@ -2895,8 +3030,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2895 |
}
|
2896 |
}
|
2897 |
print'<input type="checkbox" name="is_wc_template" id="is_wc_template" ' . $is_wc_template . '> </input>'; ?>
|
2898 |
-
<img class="help_tip" width="16" height="16" data-tip='<?php _e( 'Use WooCommerce default style template for abandoned cart reminder emails.', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /> <a target = '_blank' href= <?php echo wp_nonce_url( admin_url(
|
2899 |
-
Click here to preview </a>how the email template will look with WooCommerce Template Style enabled. Alternatively, if this is unchecked, the template will appear as <a target = '_blank' href=<?php echo wp_nonce_url( admin_url(
|
2900 |
</td>
|
2901 |
</tr>
|
2902 |
|
@@ -3310,4 +3445,4 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
3310 |
}
|
3311 |
}
|
3312 |
$woocommerce_abandon_cart = new woocommerce_abandon_cart_lite();
|
3313 |
-
?>
|
5 |
* Description: This plugin captures abandoned carts by logged-in users & emails them about it.
|
6 |
* <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
|
7 |
* PRO Version.</a></strong>
|
8 |
+
* Version: 5.8.1
|
9 |
* Author: Tyche Softwares
|
10 |
* Author URI: http://www.tychesoftwares.com/
|
11 |
* Text Domain: woocommerce-abandoned-cart
|
12 |
* Domain Path: /i18n/languages/
|
13 |
* Requires PHP: 5.6
|
14 |
* WC requires at least: 3.0.0
|
15 |
+
* WC tested up to: 4.4.1
|
16 |
*
|
17 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
18 |
*/
|
35 |
require_once( 'includes/admin/wcap_pro_settings_callbacks.php' );
|
36 |
require_once( 'includes/admin/wcap_add_cart_popup_modal.php' );
|
37 |
|
38 |
+
load_plugin_textdomain( 'woocommerce-abandoned-cart', false, basename( dirname( __FILE__ ) ) . '/i18n/languages' );
|
39 |
+
|
40 |
/**
|
41 |
* Schedule an action to delete old carts once a day
|
42 |
*
|
80 |
}
|
81 |
|
82 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
83 |
+
define( 'WCAL_PLUGIN_VERSION', '5.8.1' );
|
84 |
}
|
85 |
$this->one_hour = 60 * 60;
|
86 |
$this->three_hours = 3 * $this->one_hour;
|
131 |
|
132 |
// Initialize settings.
|
133 |
register_activation_hook( __FILE__, array( &$this, 'wcal_activate' ) );
|
134 |
+
register_deactivation_hook( __FILE__, array( &$this, 'wcal_deactivate' ) );
|
135 |
|
136 |
// Action Scheduler for Cron.
|
137 |
require_once( 'includes/libraries/action-scheduler/action-scheduler.php' );
|
273 |
return $wcal_add_questions;
|
274 |
}
|
275 |
|
276 |
+
/**
|
277 |
+
* Replace Merge tags in email previews.
|
278 |
+
* @since 5.8
|
279 |
+
*/
|
280 |
+
function replace_mergetags( $content ) {
|
281 |
+
|
282 |
+
$admin_args = array(
|
283 |
+
'role' => 'administrator',
|
284 |
+
'fields' => array( 'id' ),
|
285 |
+
);
|
286 |
+
|
287 |
+
$admin_usr = get_users( $admin_args );
|
288 |
+
$uid = $admin_usr[0]->id;
|
289 |
+
$admin_phone = get_user_meta( $uid, 'billing_phone', true );
|
290 |
+
|
291 |
+
$wcal_price = wc_price( '150' );
|
292 |
+
$wcal_total_price = wc_price( '300' );
|
293 |
+
|
294 |
+
$allowed_html = [
|
295 |
+
'span' => [
|
296 |
+
'class' => [],
|
297 |
+
],
|
298 |
+
];
|
299 |
+
$plugins_url = esc_url( plugins_url() );
|
300 |
+
$replace_data['products_cart'] = "<table border='0' width='100%' cellspacing='0' cellpadding='0'><b>Your Shopping Cart</b>
|
301 |
+
<tbody>
|
302 |
+
<tr>
|
303 |
+
<td style='background-color: #666666; color: #ffffff; text-align: center; font-size: 13px; text-transform: uppercase; padding: 5px;' align='center' bgcolor='#666666'></td>
|
304 |
+
|
305 |
+
<td style='background-color: #666666; color: #ffffff; text-align: center; font-size: 13px; text-transform: uppercase; padding: 5px;' align='center' bgcolor='#666666'>Product</td>
|
306 |
+
|
307 |
+
<td style='background-color: #666666; color: #ffffff; text-align: center; font-size: 13px; text-transform: uppercase; padding: 5px;' align='center' bgcolor='#666666'>Price</td>
|
308 |
+
|
309 |
+
<td style='background-color: #666666; color: #ffffff; text-align: center; font-size: 13px; text-transform: uppercase; padding: 5px;' align='center' bgcolor='#666666'>Quantity</td>
|
310 |
+
|
311 |
+
<td style='background-color: #666666; color: #ffffff; text-align: center; font-size: 13px; text-transform: uppercase; padding: 5px;' align='center' bgcolor='#666666'>Total</td>
|
312 |
+
|
313 |
+
</tr>
|
314 |
+
<tr style='background-color:#f4f5f4;'>
|
315 |
+
<td><img src = '$plugins_url/woocommerce-abandoned-cart/assets/images/spectre.jpg' height='40px' width='40px'></td><td>Spectre</td><td>" . wp_kses( $wcal_price, $allowed_html ) . "</td><td>2</td><td>" . wp_kses( $wcal_total_price, $allowed_html ) . "</td>
|
316 |
+
</tr>
|
317 |
+
<tr>
|
318 |
+
<td> </td>
|
319 |
+
<td> </td>
|
320 |
+
<td> </td>
|
321 |
+
<th>Cart Total:</th>
|
322 |
+
<td>" . wp_kses( $wcal_total_price, $allowed_html ) . "</td>
|
323 |
+
</tr>
|
324 |
+
|
325 |
+
</tbody>
|
326 |
+
</table>";
|
327 |
+
$replace_data['admin_phone'] = $admin_phone;
|
328 |
+
$replace_data['site_title'] = get_bloginfo( 'name' );
|
329 |
+
$replace_data['site_url'] = get_option( 'siteurl' );
|
330 |
+
|
331 |
+
|
332 |
+
$content = str_ireplace( '{{products.cart}}', $replace_data['products_cart'], $content );
|
333 |
+
$content = str_ireplace( '{{admin.phone}}', $replace_data['admin_phone'], $content );
|
334 |
+
$content = str_ireplace( '{{customer.firstname}}', "John", $content );
|
335 |
+
$content = str_ireplace( '{{customer.lastname}}', "Doe", $content );
|
336 |
+
$content = str_ireplace( '{{customer.fullname}}', "John Doe", $content );
|
337 |
+
$content = str_ireplace( 'site_title', $replace_data['site_title'], $content );
|
338 |
+
$content = str_ireplace( 'site_url', $replace_data['site_url'], $content );
|
339 |
+
|
340 |
+
return $content;
|
341 |
+
}
|
342 |
+
|
343 |
/**
|
344 |
* It will ganerate the preview email template.
|
345 |
* @hook admin_init
|
348 |
*/
|
349 |
public function wcal_preview_emails() {
|
350 |
global $woocommerce;
|
351 |
+
|
352 |
+
if ( isset( $_GET[ 'id' ] ) && 0 < $_GET['id'] ) {
|
353 |
+
global $wpdb;
|
354 |
+
$content = $wpdb->get_var( $wpdb->prepare( "SELECT body FROM `" . $wpdb->prefix . "ac_email_templates_lite` WHERE id = %d", absint( $_GET['id'] ) ) );
|
355 |
+
$content = $this->replace_mergetags( $content );
|
356 |
+
}
|
357 |
+
|
358 |
if ( isset( $_GET['wcal_preview_woocommerce_mail'] ) ) {
|
359 |
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'woocommerce-abandoned-cart' ) ) {
|
360 |
die( 'Security check' );
|
377 |
$email_heading = __( 'Abandoned cart Email Template', 'woocommerce-abandoned-cart' );
|
378 |
// get the preview email content
|
379 |
ob_start();
|
380 |
+
if ( isset( $_GET[ 'id' ] ) && 0 < $_GET['id'] ) {
|
381 |
+
$message = stripslashes( $content );
|
382 |
+
} else {
|
383 |
+
include( 'views/wcal-wc-email-template-preview.php' );
|
384 |
+
$message = ob_get_clean();
|
385 |
+
}
|
386 |
// create a new email
|
387 |
$email = new WC_Email();
|
388 |
// wrap the content with the email template and then add styles
|
398 |
}
|
399 |
// get the preview email content
|
400 |
ob_start();
|
401 |
+
if ( isset( $_GET[ 'id' ] ) && 0 < $_GET['id'] ) {
|
402 |
+
$message = stripslashes( $content );
|
403 |
+
} else {
|
404 |
+
include_once( 'views/wcal-email-template-preview.php' );
|
405 |
+
$message = ob_get_clean();
|
406 |
+
}
|
407 |
// print the preview email
|
408 |
echo $message;
|
409 |
exit;
|
456 |
}
|
457 |
}
|
458 |
|
459 |
+
/**
|
460 |
+
* Things to do when the plugin is deactivated.
|
461 |
+
*
|
462 |
+
* @since 5.8.0
|
463 |
+
*/
|
464 |
+
public static function wcal_deactivate() {
|
465 |
+
if ( false !== as_next_scheduled_action( 'woocommerce_ac_send_email_action' ) ) {
|
466 |
+
as_unschedule_action( 'woocommerce_ac_send_email_action' ); // Remove the scheduled action.
|
467 |
+
}
|
468 |
+
do_action( 'wcal_deactivate' );
|
469 |
+
}
|
470 |
+
|
471 |
/**
|
472 |
* Activation code: Create tables, default settings etc.
|
473 |
*
|
1152 |
$gdpr_consent = true;
|
1153 |
}
|
1154 |
|
1155 |
+
$wcal_user_restricted = false;
|
1156 |
+
$wcal_user_restricted = apply_filters( 'wcal_restrict_user', $wcal_user_restricted, $user_id );
|
1157 |
+
|
1158 |
+
if( $gdpr_consent && ! $wcal_user_restricted ) {
|
1159 |
|
1160 |
$query = "SELECT * FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite`
|
1161 |
WHERE user_id = %d
|
2059 |
}
|
2060 |
// Detect when a bulk action is being triggered on abandoned orders page.
|
2061 |
if ( 'wcal_delete' === $action || 'wcal_delete' === $action_two ) {
|
2062 |
+
$ids = isset( $_GET['abandoned_order_id'] ) && is_array( $_GET['abandoned_order_id'] ) ? array_map( 'intval', wp_unslash( $_GET['abandoned_order_id'] ) ) : sanitize_text_field( wp_unslash( $_GET['abandoned_order_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
2063 |
if ( ! is_array( $ids ) ) {
|
2064 |
$ids = array( $ids );
|
2065 |
}
|
2068 |
$class->wcal_delete_bulk_action_handler_function( $id );
|
2069 |
}
|
2070 |
}
|
2071 |
+
// Abandoned Orders page - Bulk Action - Delete all registered user carts.
|
2072 |
+
if ( 'wcal_delete_all_registered' === $action || 'wcal_delete_all_registered' === $action_two ) {
|
2073 |
+
$class = new Wcal_Delete_Handler();
|
2074 |
+
$class->wcal_bulk_action_delete_registered_carts_handler();
|
2075 |
+
}
|
2076 |
+
// Abandoned Orders page - Bulk Action - Delete all guest carts.
|
2077 |
+
if ( 'wcal_delete_all_guest' === $action || 'wcal_delete_all_guest' === $action_two ) {
|
2078 |
+
$class = new Wcal_Delete_Handler();
|
2079 |
+
$class->wcal_bulk_action_delete_guest_carts_handler();
|
2080 |
+
}
|
2081 |
+
// Abandoned Orders page - Bulk Action - Delete all visitor carts.
|
2082 |
+
if ( 'wcal_delete_all_visitor' === $action || 'wcal_delete_all_visitor' === $action_two ) {
|
2083 |
+
$class = new Wcal_Delete_Handler();
|
2084 |
+
$class->wcal_bulk_action_delete_visitor_carts_handler();
|
2085 |
+
}
|
2086 |
+
// Abandoned Orders page - Bulk Action - Delete all carts.
|
2087 |
+
if ( 'wcal_delete_all' === $action || 'wcal_delete_all' === $action_two ) {
|
2088 |
+
$class = new Wcal_Delete_Handler();
|
2089 |
+
$class->wcal_bulk_action_delete_all_carts_handler();
|
2090 |
+
}
|
2091 |
+
|
2092 |
+
// Detect when a bulk action is being triggered on templates page.
|
2093 |
if ( 'wcal_delete_template' === $action || 'wcal_delete_template' === $action_two ) {
|
2094 |
+
$ids = isset( $_GET['template_id'] ) ? sanitize_text_field( wp_unslash( $_GET['template_id'] ) ) : false;
|
2095 |
if ( ! is_array( $ids ) ) {
|
2096 |
+
$ids = array( $ids );
|
2097 |
}
|
2098 |
foreach ( $ids as $id ) {
|
2099 |
+
$class = new Wcal_Delete_Handler();
|
2100 |
+
$class->wcal_delete_template_bulk_action_handler_function( $id );
|
2101 |
}
|
2102 |
}
|
2103 |
|
2104 |
+
if ( isset( $_GET['wcal_deleted'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_deleted'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2105 |
+
$msg = __( 'The Abandoned cart has been successfully deleted.', 'woocommerce-abandoned-cart' ); // Default Msg.
|
2106 |
+
if ( isset( $_GET['wcal_deleted_all'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_deleted_all'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2107 |
+
$msg = __( 'All Abandoned Carts have been successfully deleted.', 'woocommerce-abandoned-cart' ); // Delete All Carts.
|
2108 |
+
} elseif ( isset( $_GET['wcal_deleted_all_visitor'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_deleted_all_visitor'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2109 |
+
$msg = __( 'All Visitor carts have been successfully deleted.', 'woocommerce-abandoned-cart' ); // Delete all visitor carts.
|
2110 |
+
} elseif ( isset( $_GET['wcal_deleted_all_guest'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_deleted_all_guest'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2111 |
+
$msg = __( 'All Guest carts have been successfully deleted.', 'woocommerce-abandoned-cart' ); // Delete all Guest carts.
|
2112 |
+
} elseif ( isset( $_GET['wcal_deleted_all_registered'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_deleted_all_registered'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2113 |
+
$msg = __( 'All Registered carts have been deleted.', 'woocommerce-abandoned-cart' ); // Delete all registered carts.
|
2114 |
+
}
|
2115 |
+
?>
|
2116 |
<div id="message" class="updated fade">
|
2117 |
+
<p><strong><?php echo esc_html( $msg ); ?></strong></p>
|
2118 |
+
</div>
|
2119 |
+
<?php
|
2120 |
+
}
|
2121 |
+
if ( isset( $_GET ['wcal_template_deleted'] ) && 'YES' === sanitize_text_field( wp_unslash( $_GET['wcal_template_deleted'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
2122 |
+
?>
|
2123 |
+
<div id="message" class="updated fade">
|
2124 |
+
<p><strong><?php esc_html_e( 'The Template has been successfully deleted.', 'woocommerce-abandoned-cart' ); ?></strong></p>
|
2125 |
</div>
|
2126 |
<?php }
|
2127 |
if ( 'emailsettings' == $action ) {
|
2894 |
if ( isset( $_GET['mode'] ) ) {
|
2895 |
$mode = $_GET['mode'];
|
2896 |
}
|
2897 |
+
$edit_id = 0;
|
2898 |
if ( 'emailtemplates' == $action && ( 'addnewtemplate' == $mode || 'edittemplate' == $mode ) ) {
|
2899 |
if ( 'edittemplate' == $mode ) {
|
2900 |
$results = array();
|
3030 |
}
|
3031 |
}
|
3032 |
print'<input type="checkbox" name="is_wc_template" id="is_wc_template" ' . $is_wc_template . '> </input>'; ?>
|
3033 |
+
<img class="help_tip" width="16" height="16" data-tip='<?php _e( 'Use WooCommerce default style template for abandoned cart reminder emails.', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /> <a target = '_blank' href= <?php echo wp_nonce_url( admin_url( "?wcal_preview_woocommerce_mail=true&id=$edit_id" ), 'woocommerce-abandoned-cart' ) ; ?> >
|
3034 |
+
Click here to preview </a>how the email template will look with WooCommerce Template Style enabled. Alternatively, if this is unchecked, the template will appear as <a target = '_blank' href=<?php echo wp_nonce_url( admin_url( "?wcal_preview_mail=true&id=$edit_id" ), 'woocommerce-abandoned-cart' ) ; ?>>shown here</a>. <br> <strong>Note: </strong>When this setting is enabled, then "Send From This Name:" & "Send From This Email Address:" will be overwritten with WooCommerce -> Settings -> Email -> Email Sender Options.
|
3035 |
</td>
|
3036 |
</tr>
|
3037 |
|
3445 |
}
|
3446 |
}
|
3447 |
$woocommerce_abandon_cart = new woocommerce_abandon_cart_lite();
|
3448 |
+
?>
|