Version Description
( 08.02.2022 ) = * Enhancement - Introduced 2 new webhooks that allows the admin to send cart abandonment and recovery data to delivery URLs. * Tweak - Introduced the ability to enable/disable GDPR consent. * Tweak - Introduced new Pro version features & settings. * Fix - Fixed compatibility with WP Better Emails plugin. * Fix - Made the default email template responsive.
Download this release
Release Info
Developer | tychesoftwares |
Plugin | Abandoned Cart Lite for WooCommerce |
Version | 5.12.0 |
Comparing to | |
See all releases |
Code changes from version 5.11.1 to 5.12.0
- assets/css/admin/wcap_integrations_main.css +457 -0
- assets/css/admin/wcap_integrations_main.min.css +1 -0
- assets/js/wcal_guest_capture.js +1 -1
- assets/js/wcal_guest_capture.min.js +1 -1
- class-wcal-update.php +11 -0
- cron/class-wcal-cron.php +4 -16
- i18n/languages/woocommerce-abandoned-cart.pot +241 -206
- includes/admin/class-wcap-pro-settings-callbacks.php +23 -1
- includes/admin/class-wcap-pro-settings.php +73 -176
- includes/class-wcal-common.php +129 -1
- includes/class-wcal-guest-ac.php +19 -7
- includes/class-wcal-tracking-msg.php +12 -5
- includes/class-wcal-webhooks.php +346 -0
- includes/class-wcap-integrations.php +150 -0
- includes/connectors/activecampaign/connector.php +129 -0
- includes/connectors/activecampaign/index.php +2 -0
- includes/connectors/activecampaign/views/icon.png +0 -0
- includes/connectors/activecampaign/views/logo.png +0 -0
- includes/connectors/class-wcap-connector.php +68 -0
- includes/connectors/class-wcap-connectors-common.php +254 -0
- includes/connectors/class-wcap-display-connectors.php +130 -0
- includes/connectors/custom_smtp/connector.php +130 -0
- includes/connectors/custom_smtp/index.php +2 -0
- includes/connectors/custom_smtp/views/logo.png +0 -0
- includes/connectors/drip/connector.php +125 -0
- includes/connectors/drip/index.php +2 -0
- includes/connectors/drip/views/icon.png +0 -0
- includes/connectors/drip/views/logo.png +0 -0
- includes/connectors/fluentcrm/connector.php +129 -0
- includes/connectors/fluentcrm/index.php +2 -0
- includes/connectors/fluentcrm/views/icon.png +0 -0
- includes/connectors/fluentcrm/views/logo.png +0 -0
- includes/connectors/hubspot/connector.php +148 -0
- includes/connectors/hubspot/index.php +2 -0
- includes/connectors/hubspot/views/icon.png +0 -0
- includes/connectors/hubspot/views/logo.png +0 -0
- includes/connectors/klaviyo/connector.php +125 -0
- includes/connectors/klaviyo/index.php +2 -0
- includes/connectors/klaviyo/views/icon.png +0 -0
- includes/connectors/klaviyo/views/logo.png +0 -0
- includes/connectors/mailchimp/connector.php +124 -0
- includes/connectors/mailchimp/index.php +2 -0
- includes/connectors/mailchimp/views/icon.png +0 -0
- includes/connectors/mailchimp/views/logo.png +0 -0
- includes/connectors/mailjet/connector.php +118 -0
- includes/connectors/mailjet/index.php +2 -0
- includes/connectors/mailjet/views/icon.png +0 -0
- includes/connectors/mailjet/views/logo.png +0 -0
- includes/connectors/sendinblue/connector.php +125 -0
- includes/connectors/sendinblue/index.php +2 -0
- includes/connectors/sendinblue/views/icon.png +0 -0
- includes/connectors/sendinblue/views/logo.png +0 -0
- includes/connectors/wp_fusion/connector.php +118 -0
- includes/connectors/wp_fusion/index.php +2 -0
- includes/connectors/wp_fusion/views/icon.png +0 -0
- includes/connectors/wp_fusion/views/logo.png +0 -0
- includes/frontend/class-wcal-checkout-process.php +31 -137
- includes/templates/template_1.php +7 -5
- includes/wcal-functions.php +87 -0
- readme.txt +9 -2
- uninstall.php +5 -0
- woocommerce-ac.php +129 -38
assets/css/admin/wcap_integrations_main.css
ADDED
@@ -0,0 +1,457 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wcap_integrators_break {
|
2 |
+
margin-top: 70px;
|
3 |
+
border-color: #a9a9a9;
|
4 |
+
}
|
5 |
+
|
6 |
+
li a.wcap_integrators_view {
|
7 |
+
font-size:15px;
|
8 |
+
padding: 0px 15px 0px 15px;
|
9 |
+
}
|
10 |
+
|
11 |
+
/* Connector boxes */
|
12 |
+
.wcap-col-group {
|
13 |
+
width: 100%;
|
14 |
+
}
|
15 |
+
|
16 |
+
.wcap-col-md-4 {
|
17 |
+
width: 31%;
|
18 |
+
float: left;
|
19 |
+
padding: 1%;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wcap-connector-wrap {
|
23 |
+
background-color: #fff;
|
24 |
+
border: 1px solid #dedfea;
|
25 |
+
width: 100%;
|
26 |
+
position: relative;
|
27 |
+
}
|
28 |
+
|
29 |
+
.wcap-connector-img-outer {
|
30 |
+
text-align: center;
|
31 |
+
max-width: 110px;
|
32 |
+
box-shadow: 0 0 2px 0 rgba(0,0,0,.11);
|
33 |
+
float: left;
|
34 |
+
}
|
35 |
+
|
36 |
+
.wcap-connector-img {
|
37 |
+
min-height: 90px;
|
38 |
+
display: table;
|
39 |
+
}
|
40 |
+
|
41 |
+
.wcap-connector-img-section {
|
42 |
+
display: table-cell;
|
43 |
+
vertical-align: middle;
|
44 |
+
}
|
45 |
+
|
46 |
+
.wcap_connector_icon {
|
47 |
+
width: 100%;
|
48 |
+
}
|
49 |
+
|
50 |
+
.wcap_connector_info {
|
51 |
+
margin-left: 110px;
|
52 |
+
padding-left: 20px;
|
53 |
+
}
|
54 |
+
|
55 |
+
.wcap_connector_info_head {
|
56 |
+
color: #0073aa;
|
57 |
+
font-size: 18px;
|
58 |
+
line-height: 24px;
|
59 |
+
margin-bottom: 5px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.wcap_connector_info_details {
|
63 |
+
color: #8e8e8e;
|
64 |
+
font-size: 15px;
|
65 |
+
line-height: 20px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.wcap-connector-action {
|
69 |
+
clear: both;
|
70 |
+
border-top: 1px solid #dedfea;
|
71 |
+
display: flow-root;
|
72 |
+
width: 100%;
|
73 |
+
height: 72px;
|
74 |
+
box-sizing: border-box;
|
75 |
+
background: #f9f9f9;
|
76 |
+
padding-bottom: 20px;
|
77 |
+
width: 100%;
|
78 |
+
}
|
79 |
+
|
80 |
+
.wcap-connector-btns {
|
81 |
+
width: auto;
|
82 |
+
padding-top: 20px;
|
83 |
+
padding-bottom: 20px;
|
84 |
+
padding-right: 15px;
|
85 |
+
padding-left: 15px;
|
86 |
+
background: #f9f9f9;
|
87 |
+
/* display: flex; */
|
88 |
+
justify-content: space-between;
|
89 |
+
min-height: 30px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.wcap_button_sync {
|
93 |
+
background: #2271b1;
|
94 |
+
border-color: #2271b1;
|
95 |
+
color: #fff;
|
96 |
+
text-decoration: none;
|
97 |
+
text-shadow: none;
|
98 |
+
border-radius: 3px;
|
99 |
+
padding: 5px 10px 5px 10px;
|
100 |
+
border-width: 1px;
|
101 |
+
border-style: solid;
|
102 |
+
box-sizing: border-box;
|
103 |
+
float: right;
|
104 |
+
}
|
105 |
+
|
106 |
+
.wcap_settings {
|
107 |
+
color: #2271b1;
|
108 |
+
border-color: #2271b1;
|
109 |
+
background: #f6f7f7;
|
110 |
+
text-decoration: none;
|
111 |
+
font-size: 13px;
|
112 |
+
line-height: 2.15384615;
|
113 |
+
min-height: 30px;
|
114 |
+
margin: 0;
|
115 |
+
padding: 0 10px;
|
116 |
+
cursor: pointer;
|
117 |
+
border-width: 1px;
|
118 |
+
border-style: solid;
|
119 |
+
-webkit-appearance: none;
|
120 |
+
border-radius: 3px;
|
121 |
+
white-space: nowrap;
|
122 |
+
box-sizing: border-box;
|
123 |
+
float: right;
|
124 |
+
margin-right: 5%;
|
125 |
+
}
|
126 |
+
.wcap_main_connect {
|
127 |
+
display: inline;
|
128 |
+
margin-right: 10px;
|
129 |
+
float: right;
|
130 |
+
}
|
131 |
+
|
132 |
+
.wcap_button_disconnect {
|
133 |
+
border: none;
|
134 |
+
color: #2271b1;
|
135 |
+
background-color: transparent;
|
136 |
+
}
|
137 |
+
|
138 |
+
.span_disconnect {
|
139 |
+
margin-right: 4px;
|
140 |
+
}
|
141 |
+
|
142 |
+
.wcap_button_disconnect:hover {
|
143 |
+
cursor: pointer;
|
144 |
+
}
|
145 |
+
|
146 |
+
.wcap_button_sync:hover {
|
147 |
+
cursor: pointer;
|
148 |
+
}
|
149 |
+
|
150 |
+
/** Popup **/
|
151 |
+
body.wcap-modal-open {
|
152 |
+
overflow: hidden;
|
153 |
+
}
|
154 |
+
|
155 |
+
.wcap-modal {
|
156 |
+
z-index: 100000;
|
157 |
+
width: 40%;
|
158 |
+
position: fixed;
|
159 |
+
top: 50%;
|
160 |
+
left: 50%;
|
161 |
+
max-width: 93%;
|
162 |
+
max-height: 80%;
|
163 |
+
}
|
164 |
+
body.wcap-modal-loading .wcap-modal:before {
|
165 |
+
height: 24px;
|
166 |
+
width: 24px;
|
167 |
+
display: block;
|
168 |
+
position: absolute;
|
169 |
+
top: 75%;
|
170 |
+
left: 50%;
|
171 |
+
margin-left: -12px;
|
172 |
+
margin-top: -12px;
|
173 |
+
-webkit-animation: spin .8s linear infinite;
|
174 |
+
animation: spin .8s linear infinite;
|
175 |
+
content: "";
|
176 |
+
background: url("../../images/loader.svg") center center;
|
177 |
+
background-size: cover;
|
178 |
+
line-height: 1;
|
179 |
+
text-align: center;
|
180 |
+
font-size: 2em;
|
181 |
+
color: rgba(0, 0, 0, 0.75);
|
182 |
+
z-index: 10;
|
183 |
+
}
|
184 |
+
|
185 |
+
.wcap_msg {
|
186 |
+
font-size: 2em;
|
187 |
+
text-align: center;
|
188 |
+
margin-top: 30%;
|
189 |
+
}
|
190 |
+
|
191 |
+
body.wcap-modal-success .wcap-modal:before {
|
192 |
+
height: 100px;
|
193 |
+
width: 100px;
|
194 |
+
display: block;
|
195 |
+
position: absolute;
|
196 |
+
top: 28%;
|
197 |
+
left: 45%;
|
198 |
+
margin-left: -30px;
|
199 |
+
content: "";
|
200 |
+
background: url("../../images/success.svg") center center;
|
201 |
+
background-size: cover;
|
202 |
+
line-height: 1;
|
203 |
+
text-align: center;
|
204 |
+
font-size: 2em;
|
205 |
+
color: rgba(0, 0, 0, 0.75);
|
206 |
+
z-index: 10;
|
207 |
+
}
|
208 |
+
|
209 |
+
body.wcap-modal-failure .wcap-modal:before {
|
210 |
+
height: 100px;
|
211 |
+
width: 100px;
|
212 |
+
display: block;
|
213 |
+
position: absolute;
|
214 |
+
top: 28%;
|
215 |
+
left: 45%;
|
216 |
+
margin-left: -30px;
|
217 |
+
content: "";
|
218 |
+
background: url("../../images/failure.svg") center center;
|
219 |
+
background-size: cover;
|
220 |
+
line-height: 1;
|
221 |
+
text-align: center;
|
222 |
+
font-size: 2em;
|
223 |
+
color: rgba(0, 0, 0, 0.75);
|
224 |
+
z-index: 10;
|
225 |
+
}
|
226 |
+
|
227 |
+
.wcap-modal .wcap-icon-close {
|
228 |
+
text-align: center;
|
229 |
+
line-height: 29px;
|
230 |
+
width: 53px;
|
231 |
+
height: 53px;
|
232 |
+
position: absolute;
|
233 |
+
top: 0;
|
234 |
+
right: 0;
|
235 |
+
color: #666;
|
236 |
+
cursor: pointer;
|
237 |
+
border-left: 1px solid #E1E1E1;
|
238 |
+
|
239 |
+
}
|
240 |
+
.wcap-modal .wcap-icon-close:before {
|
241 |
+
font-size: 23px;
|
242 |
+
font-family: dashicons;
|
243 |
+
line-height: 53px;
|
244 |
+
speak: none;
|
245 |
+
-webkit-font-smoothing: antialiased;
|
246 |
+
content: "\f335";
|
247 |
+
}
|
248 |
+
.wcap-modal .wcap-icon-close:hover {
|
249 |
+
background: #f5f5f5;
|
250 |
+
color: #000000;
|
251 |
+
border-radius: 0px 10px 0px 0px;
|
252 |
+
}
|
253 |
+
.wcap-modal h2 {
|
254 |
+
font-size: 1.4em;
|
255 |
+
}
|
256 |
+
.wcap-modal h3 {
|
257 |
+
font-size: 1.2em;
|
258 |
+
}
|
259 |
+
|
260 |
+
.wcap-modal__contents {
|
261 |
+
background-color: #f5f5f5;
|
262 |
+
min-height: 230px;
|
263 |
+
border-radius: 10px 10px 10px 10px;
|
264 |
+
}
|
265 |
+
|
266 |
+
.wcap-modal-overlay {
|
267 |
+
background: #000;
|
268 |
+
opacity: 0.7;
|
269 |
+
filter: alpha(opacity=70);
|
270 |
+
position: fixed;
|
271 |
+
top: 0;
|
272 |
+
right: 0;
|
273 |
+
bottom: 0;
|
274 |
+
left: 0;
|
275 |
+
z-index: 100000;
|
276 |
+
}
|
277 |
+
|
278 |
+
.wcap-modal__header {
|
279 |
+
height: 53px;
|
280 |
+
background: #ffffff;
|
281 |
+
border-bottom: 1px solid #E1E1E1;
|
282 |
+
box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
|
283 |
+
border-radius: 10px 10px 0px 0px ;
|
284 |
+
}
|
285 |
+
.wcap-modal__header h1 {
|
286 |
+
padding: 0 18px;
|
287 |
+
font-size: 19px;
|
288 |
+
line-height: 53px;
|
289 |
+
margin: 0;
|
290 |
+
float: left;
|
291 |
+
}
|
292 |
+
|
293 |
+
.wcap-modal__header h5 {
|
294 |
+
padding: 0;
|
295 |
+
font-size: 12px;
|
296 |
+
line-height: 53px;
|
297 |
+
margin: 0;
|
298 |
+
float: left;
|
299 |
+
}
|
300 |
+
|
301 |
+
.wcap-modal__footer {
|
302 |
+
box-sizing: border-box;
|
303 |
+
background: #ffffff;
|
304 |
+
border-top: 1px solid #E1E1E1;
|
305 |
+
box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, 0.1);
|
306 |
+
padding: 14px 18px;
|
307 |
+
min-height: 50px;
|
308 |
+
border-radius: 0px 0px 10px 10px ;
|
309 |
+
|
310 |
+
}
|
311 |
+
.wcap-modal__footer.button {
|
312 |
+
width: 100%;
|
313 |
+
float: left;
|
314 |
+
margin-left: 3px;
|
315 |
+
}
|
316 |
+
|
317 |
+
.wcap-modal__footer.button {
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
.wcap-modal__body {
|
322 |
+
overflow: auto;
|
323 |
+
min-height: 130px;
|
324 |
+
padding: 10px 20px 10px 20px;
|
325 |
+
}
|
326 |
+
.wcap-modal__body hr {
|
327 |
+
margin: 17px 0;
|
328 |
+
border: none;
|
329 |
+
border-bottom: 1px solid #E1E1E1;
|
330 |
+
}
|
331 |
+
.wcap-modal__body ul {
|
332 |
+
margin: 17px 0 17px;
|
333 |
+
}
|
334 |
+
|
335 |
+
.wcap-modal__body-inner {
|
336 |
+
margin: 17px 18px 22px;
|
337 |
+
}
|
338 |
+
|
339 |
+
input.form-control {
|
340 |
+
width: 79%;
|
341 |
+
margin: 10px 0px 10px 0px;
|
342 |
+
padding: 2px;
|
343 |
+
}
|
344 |
+
|
345 |
+
select.form-control {
|
346 |
+
width: 100%;
|
347 |
+
margin: 10px 0px 10px 0px;
|
348 |
+
padding: 2px;
|
349 |
+
}
|
350 |
+
|
351 |
+
.wcap_form_submit {
|
352 |
+
margin-top: 10px;
|
353 |
+
}
|
354 |
+
|
355 |
+
@media (max-width:1024px) {
|
356 |
+
.wcap-col-md-4 {
|
357 |
+
width: 100%;
|
358 |
+
margin-top: 2%;
|
359 |
+
}
|
360 |
+
|
361 |
+
.wcap_button_sync {
|
362 |
+
background: #2271b1;
|
363 |
+
border-color: #2271b1;
|
364 |
+
color: #fff;
|
365 |
+
text-decoration: none;
|
366 |
+
text-shadow: none;
|
367 |
+
border-radius: 3px;
|
368 |
+
padding: 5px 10px 5px 10px;
|
369 |
+
border-width: 1px;
|
370 |
+
border-style: solid;
|
371 |
+
box-sizing: border-box;
|
372 |
+
}
|
373 |
+
|
374 |
+
input.form-control {
|
375 |
+
width: 100%;
|
376 |
+
margin: 10px 0px 10px 0px;
|
377 |
+
padding: 2px;
|
378 |
+
}
|
379 |
+
|
380 |
+
.wcap_msg {
|
381 |
+
font-size: 2em;
|
382 |
+
text-align: center;
|
383 |
+
margin-top: 55%;
|
384 |
+
}
|
385 |
+
|
386 |
+
body.wcap-modal-success .wcap-modal:before {
|
387 |
+
height: 100px;
|
388 |
+
width: 100px;
|
389 |
+
display: block;
|
390 |
+
position: absolute;
|
391 |
+
top: 30%;
|
392 |
+
left: 45%;
|
393 |
+
margin-left: -30px;
|
394 |
+
content: "";
|
395 |
+
background: url("../../images/success.svg") center center;
|
396 |
+
background-size: cover;
|
397 |
+
line-height: 1;
|
398 |
+
text-align: center;
|
399 |
+
font-size: 2em;
|
400 |
+
color: rgba(0, 0, 0, 0.75);
|
401 |
+
z-index: 10;
|
402 |
+
}
|
403 |
+
|
404 |
+
body.wcap-modal-failure .wcap-modal:before {
|
405 |
+
height: 100px;
|
406 |
+
width: 100px;
|
407 |
+
display: block;
|
408 |
+
position: absolute;
|
409 |
+
top: 30%;
|
410 |
+
left: 45%;
|
411 |
+
margin-left: -30px;
|
412 |
+
content: "";
|
413 |
+
background: url("../../images/failure.svg") center center;
|
414 |
+
background-size: cover;
|
415 |
+
line-height: 1;
|
416 |
+
text-align: center;
|
417 |
+
font-size: 2em;
|
418 |
+
color: rgba(0, 0, 0, 0.75);
|
419 |
+
z-index: 10;
|
420 |
+
}
|
421 |
+
|
422 |
+
}
|
423 |
+
@media (min-width:1201px) {
|
424 |
+
.wcap-connector_card_outer {
|
425 |
+
height: 120px;
|
426 |
+
}
|
427 |
+
.wcap-col-md-4 {
|
428 |
+
height: 210px;
|
429 |
+
margin-bottom: 20px;
|
430 |
+
}
|
431 |
+
}
|
432 |
+
@media (min-width:1024px) and (max-width:1200px){
|
433 |
+
.wcap-connector_card_outer {
|
434 |
+
height: 180px;
|
435 |
+
}
|
436 |
+
.wcap-col-md-4 {
|
437 |
+
height: 280px;
|
438 |
+
margin-bottom: 20px;
|
439 |
+
}
|
440 |
+
.wcap_connector_info_head {
|
441 |
+
font-size: 14px;
|
442 |
+
}
|
443 |
+
.wcap-connector_card_outer {
|
444 |
+
min-height: 165px;
|
445 |
+
}
|
446 |
+
.wcap_connector_info_details {
|
447 |
+
min-height: 100px;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
.no_link {
|
451 |
+
color: #000 !important;
|
452 |
+
cursor: default !important;
|
453 |
+
font-weight: 600;
|
454 |
+
}
|
455 |
+
.wcap_integrators_view {
|
456 |
+
cursor: pointer;
|
457 |
+
}
|
assets/css/admin/wcap_integrations_main.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#wcap_integrators_break{margin-top:70px;border-color:#a9a9a9}li a.wcap_integrators_view{font-size:15px;padding:0 15px 0 15px}.wcap-col-group{width:100%}.wcap-col-md-4{width:31%;float:left;padding:1%}.wcap-connector-wrap{background-color:#fff;border:1px solid #dedfea;width:100%;position:relative}.wcap-connector-img-outer{text-align:center;max-width:110px;box-shadow:0 0 2px 0 rgba(0,0,0,.11);float:left}.wcap-connector-img{min-height:90px;display:table}.wcap-connector-img-section{display:table-cell;vertical-align:middle}.wcap_connector_icon{width:100%}.wcap_connector_info{margin-left:110px;padding-left:20px}.wcap_connector_info_head{color:#0073aa;font-size:18px;line-height:24px;margin-bottom:5px}.wcap_connector_info_details{color:#8e8e8e;font-size:15px;line-height:20px}.wcap-connector-action{clear:both;border-top:1px solid #dedfea;display:flow-root;width:100%;height:72px;box-sizing:border-box;background:#f9f9f9;padding-bottom:20px;width:100%}.wcap-connector-btns{width:auto;padding-top:20px;padding-bottom:20px;padding-right:15px;padding-left:15px;background:#f9f9f9;justify-content:space-between;min-height:30px}.wcap_button_sync{background:#2271b1;border-color:#2271b1;color:#fff;text-decoration:none;text-shadow:none;border-radius:3px;padding:5px 10px 5px 10px;border-width:1px;border-style:solid;box-sizing:border-box;float:right}.wcap_settings{color:#2271b1;border-color:#2271b1;background:#f6f7f7;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;float:right;margin-right:5%}.wcap_main_connect{display:inline;margin-right:10px;float:right}.wcap_button_disconnect{border:none;color:#2271b1;background-color:transparent}.span_disconnect{margin-right:4px}.wcap_button_disconnect:hover{cursor:pointer}.wcap_button_sync:hover{cursor:pointer}body.wcap-modal-open{overflow:hidden}.wcap-modal{z-index:100000;width:40%;position:fixed;top:50%;left:50%;max-width:93%;max-height:80%}body.wcap-modal-loading .wcap-modal:before{height:24px;width:24px;display:block;position:absolute;top:75%;left:50%;margin-left:-12px;margin-top:-12px;-webkit-animation:spin .8s linear infinite;animation:spin .8s linear infinite;content:"";background:url(../images/loader.svg) center center;background-size:cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);z-index:10}.wcap_msg{font-size:2em;text-align:center;margin-top:30%}body.wcap-modal-success .wcap-modal:before{height:100px;width:100px;display:block;position:absolute;top:28%;left:45%;margin-left:-30px;content:"";background:url(../../images/success.svg) center center;background-size:cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);z-index:10}body.wcap-modal-failure .wcap-modal:before{height:100px;width:100px;display:block;position:absolute;top:28%;left:45%;margin-left:-30px;content:"";background:url(../../images/failure.svg) center center;background-size:cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);z-index:10}.wcap-modal .wcap-icon-close{text-align:center;line-height:29px;width:53px;height:53px;position:absolute;top:0;right:0;color:#666;cursor:pointer;border-left:1px solid #e1e1e1}.wcap-modal .wcap-icon-close:before{font-size:23px;font-family:dashicons;line-height:53px;speak:none;-webkit-font-smoothing:antialiased;content:"\f335"}.wcap-modal .wcap-icon-close:hover{background:#f5f5f5;color:#000;border-radius:0 10px 0 0}.wcap-modal h2{font-size:1.4em}.wcap-modal h3{font-size:1.2em}.wcap-modal__contents{background-color:#f5f5f5;min-height:230px;border-radius:10px 10px 10px 10px}.wcap-modal-overlay{background:#000;opacity:.7;position:fixed;top:0;right:0;bottom:0;left:0;z-index:100000}.wcap-modal__header{height:53px;background:#fff;border-bottom:1px solid #e1e1e1;box-shadow:0 4px 4px -4px rgba(0,0,0,.1);border-radius:10px 10px 0 0}.wcap-modal__header h1{padding:0 18px;font-size:19px;line-height:53px;margin:0;float:left}.wcap-modal__header h5{padding:0;font-size:12px;line-height:53px;margin:0;float:left}.wcap-modal__footer{box-sizing:border-box;background:#fff;border-top:1px solid #e1e1e1;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1);padding:14px 18px;min-height:50px;border-radius:0 0 10px 10px}.wcap-modal__footer.button{width:100%;float:left;margin-left:3px}.wcap-modal__body{overflow:auto;min-height:130px;padding:10px 20px 10px 20px}.wcap-modal__body hr{margin:17px 0;border:none;border-bottom:1px solid #e1e1e1}.wcap-modal__body ul{margin:17px 0 17px}.wcap-modal__body-inner{margin:17px 18px 22px}input.form-control{width:79%;margin:10px 0 10px 0;padding:2px}select.form-control{width:100%;margin:10px 0 10px 0;padding:2px}.wcap_form_submit{margin-top:10px}@media (max-width:1024px){.wcap-col-md-4{width:100%;margin-top:2%}.wcap_button_sync{background:#2271b1;border-color:#2271b1;color:#fff;text-decoration:none;text-shadow:none;border-radius:3px;padding:5px 10px 5px 10px;border-width:1px;border-style:solid;box-sizing:border-box}input.form-control{width:100%;margin:10px 0 10px 0;padding:2px}.wcap_msg{font-size:2em;text-align:center;margin-top:55%}body.wcap-modal-success .wcap-modal:before{height:100px;width:100px;display:block;position:absolute;top:30%;left:45%;margin-left:-30px;content:"";background:url(../../images/success.svg) center center;background-size:cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);z-index:10}body.wcap-modal-failure .wcap-modal:before{height:100px;width:100px;display:block;position:absolute;top:30%;left:45%;margin-left:-30px;content:"";background:url(../../images/failure.svg) center center;background-size:cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);z-index:10}}@media (min-width:1201px){.wcap-connector_card_outer{height:120px}.wcap-col-md-4{height:210px;margin-bottom:20px}}@media (min-width:1024px) and (max-width:1200px){.wcap-connector_card_outer{height:180px}.wcap-col-md-4{height:280px;margin-bottom:20px}.wcap_connector_info_head{font-size:14px}.wcap-connector_card_outer{min-height:165px}.wcap_connector_info_details{min-height:100px}}.no_link{color:#000!important;cursor:default!important;font-weight:600}.wcap_integrators_view{cursor:pointer}
|
assets/js/wcal_guest_capture.js
CHANGED
@@ -38,7 +38,7 @@ jQuery( 'input#billing_email' ).on( 'change', function() {
|
|
38 |
jQuery( document ).ready( function() {
|
39 |
|
40 |
if ( wcal_guest_capture_params._show_gdpr_message && ! jQuery("#wcal_gdpr_message_block").length && gdpr_consent ) {
|
41 |
-
jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+ wcal_guest_capture_params._gdpr_message +" <a style='cursor: pointer' id='wcal_gdpr_no_thanks'> "+ wcal_guest_capture_params._gdpr_nothanks_msg +" </a></span></span>");
|
42 |
}
|
43 |
|
44 |
jQuery("#wcal_gdpr_no_thanks").click( function () {
|
38 |
jQuery( document ).ready( function() {
|
39 |
|
40 |
if ( wcal_guest_capture_params._show_gdpr_message && ! jQuery("#wcal_gdpr_message_block").length && gdpr_consent ) {
|
41 |
+
jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+ wcal_guest_capture_params._gdpr_message +" <a style='cursor: pointer; text-decoration:none;' id='wcal_gdpr_no_thanks'> "+ wcal_guest_capture_params._gdpr_nothanks_msg +" </a></span></span>");
|
42 |
}
|
43 |
|
44 |
jQuery("#wcal_gdpr_no_thanks").click( function () {
|
assets/js/wcal_guest_capture.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var gdpr_consent=!0;jQuery("input#billing_email").on("change",function(){var a=!wcal_guest_capture_params._show_gdpr_message||wcal_guest_capture_params._show_gdpr_message;if(gdpr_consent&&a){var _={billing_first_name:jQuery("#billing_first_name").val(),billing_last_name:jQuery("#billing_last_name").val(),billing_company:jQuery("#billing_company").val(),billing_address_1:jQuery("#billing_address_1").val(),billing_address_2:jQuery("#billing_address_2").val(),billing_city:jQuery("#billing_city").val(),billing_state:jQuery("#billing_state").val(),billing_postcode:jQuery("#billing_postcode").val(),billing_country:jQuery("#billing_country").val(),billing_phone:jQuery("#billing_phone").val(),billing_email:jQuery("#billing_email").val(),order_notes:jQuery("#order_comments").val(),shipping_first_name:jQuery("#shipping_first_name").val(),shipping_last_name:jQuery("#shipping_last_name").val(),shipping_company:jQuery("#shipping_company").val(),shipping_address_1:jQuery("#shipping_address_1").val(),shipping_address_2:jQuery("#shipping_address_2").val(),shipping_city:jQuery("#shipping_city").val(),shipping_state:jQuery("#shipping_state").val(),shipping_postcode:jQuery("#shipping_postcode").val(),shipping_country:jQuery("#shipping_country").val(),ship_to_billing:jQuery("#shiptobilling-checkbox").val(),wcal_guest_capture_nonce:jQuery("#wcal_guest_capture_nonce").val(),action:"save_data"};jQuery.post(wcal_guest_capture_params.ajax_url,_,function(a){})}}),jQuery(document).ready(function(){wcal_guest_capture_params._show_gdpr_message&&!jQuery("#wcal_gdpr_message_block").length&&gdpr_consent&&jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+wcal_guest_capture_params._gdpr_message+" <a style='cursor: pointer' id='wcal_gdpr_no_thanks'> "+wcal_guest_capture_params._gdpr_nothanks_msg+" </a></span></span>"),jQuery("#wcal_gdpr_no_thanks").click(function(){wcal_guest_capture_params._show_gdpr_message=!1,gdpr_consent=!1;jQuery.post(wcal_guest_capture_params.ajax_url,{action:"wcal_gdpr_refused"},function(){jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>"+wcal_guest_capture_params._gdpr_after_no_thanks_msg+"</span>").delay(5e3).fadeOut()})})});
|
1 |
+
var gdpr_consent=!0;jQuery("input#billing_email").on("change",function(){var a=!wcal_guest_capture_params._show_gdpr_message||wcal_guest_capture_params._show_gdpr_message;if(gdpr_consent&&a){var _={billing_first_name:jQuery("#billing_first_name").val(),billing_last_name:jQuery("#billing_last_name").val(),billing_company:jQuery("#billing_company").val(),billing_address_1:jQuery("#billing_address_1").val(),billing_address_2:jQuery("#billing_address_2").val(),billing_city:jQuery("#billing_city").val(),billing_state:jQuery("#billing_state").val(),billing_postcode:jQuery("#billing_postcode").val(),billing_country:jQuery("#billing_country").val(),billing_phone:jQuery("#billing_phone").val(),billing_email:jQuery("#billing_email").val(),order_notes:jQuery("#order_comments").val(),shipping_first_name:jQuery("#shipping_first_name").val(),shipping_last_name:jQuery("#shipping_last_name").val(),shipping_company:jQuery("#shipping_company").val(),shipping_address_1:jQuery("#shipping_address_1").val(),shipping_address_2:jQuery("#shipping_address_2").val(),shipping_city:jQuery("#shipping_city").val(),shipping_state:jQuery("#shipping_state").val(),shipping_postcode:jQuery("#shipping_postcode").val(),shipping_country:jQuery("#shipping_country").val(),ship_to_billing:jQuery("#shiptobilling-checkbox").val(),wcal_guest_capture_nonce:jQuery("#wcal_guest_capture_nonce").val(),action:"save_data"};jQuery.post(wcal_guest_capture_params.ajax_url,_,function(a){})}}),jQuery(document).ready(function(){wcal_guest_capture_params._show_gdpr_message&&!jQuery("#wcal_gdpr_message_block").length&&gdpr_consent&&jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+wcal_guest_capture_params._gdpr_message+" <a style='cursor: pointer; text-decoration:none;' id='wcal_gdpr_no_thanks'> "+wcal_guest_capture_params._gdpr_nothanks_msg+" </a></span></span>"),jQuery("#wcal_gdpr_no_thanks").click(function(){wcal_guest_capture_params._show_gdpr_message=!1,gdpr_consent=!1;jQuery.post(wcal_guest_capture_params.ajax_url,{action:"wcal_gdpr_refused"},function(){jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>"+wcal_guest_capture_params._gdpr_after_no_thanks_msg+"</span>").delay(5e3).fadeOut()})})});
|
class-wcal-update.php
CHANGED
@@ -286,6 +286,10 @@ if ( ! class_exists( 'Wcal_Update' ) ) {
|
|
286 |
if ( ! $wpdb->get_var( 'SHOW COLUMNS FROM ' . $db_prefix . "ac_email_templates_lite LIKE 'individual_use'" ) ) { //phpcs:ignore
|
287 |
$wpdb->query( 'ALTER TABLE ' . $db_prefix . 'ac_email_templates_lite ADD COLUMN `individual_use` ENUM("0","1") CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `discount_expiry`' ); //phpcs:ignore
|
288 |
}
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
/**
|
291 |
* Add a new column email_reminder_status in the cart history lite table.
|
@@ -362,6 +366,13 @@ if ( ! class_exists( 'Wcal_Update' ) ) {
|
|
362 |
}
|
363 |
}
|
364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
}
|
366 |
|
367 |
/**
|
286 |
if ( ! $wpdb->get_var( 'SHOW COLUMNS FROM ' . $db_prefix . "ac_email_templates_lite LIKE 'individual_use'" ) ) { //phpcs:ignore
|
287 |
$wpdb->query( 'ALTER TABLE ' . $db_prefix . 'ac_email_templates_lite ADD COLUMN `individual_use` ENUM("0","1") CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `discount_expiry`' ); //phpcs:ignore
|
288 |
}
|
289 |
+
// 5.12.0
|
290 |
+
if ( ! $wpdb->get_var( 'SHOW COLUMNS FROM `' . $db_prefix . "ac_abandoned_cart_history_lite` LIKE 'checkout_link'" ) ) { // phpcs:ignore
|
291 |
+
$wpdb->query( 'ALTER TABLE ' . $db_prefix . 'ac_abandoned_cart_history_lite ADD `checkout_link` varchar(500) NOT NULL AFTER `email_reminder_status`' ); // phpcs:ignore
|
292 |
+
}
|
293 |
}
|
294 |
/**
|
295 |
* Add a new column email_reminder_status in the cart history lite table.
|
366 |
}
|
367 |
}
|
368 |
|
369 |
+
// 5.12.0 - GDPR Consent.
|
370 |
+
if ( '' === get_option( 'wcal_gdpr_consent_migrated', '' ) ) {
|
371 |
+
update_option( 'wcal_gdpr_consent_migrated', 'yes' );
|
372 |
+
if ( '' !== get_option( 'wcal_guest_cart_capture_msg', '' ) || '' !== get_option( 'wcal_logged_cart_capture_msg', '' ) ) {
|
373 |
+
update_option( 'wcal_enable_gdpr_consent', 'on' );
|
374 |
+
}
|
375 |
+
}
|
376 |
}
|
377 |
|
378 |
/**
|
cron/class-wcal-cron.php
CHANGED
@@ -83,7 +83,7 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
83 |
$wcal_reply_email = get_option( 'wcal_reply_email' );
|
84 |
if ( class_exists( 'WP_Better_Emails' ) ) {
|
85 |
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
86 |
-
$headers .= 'Content-Type: text/
|
87 |
$headers .= 'Reply-To: ' . $wcal_reply_email . ' ' . "\r\n";
|
88 |
} else {
|
89 |
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
@@ -283,17 +283,17 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
283 |
}
|
284 |
|
285 |
$encoding_cart = $email_sent_id . '&url=' . $cart_page_link . $utm;
|
286 |
-
$validate_cart =
|
287 |
$cart_link_track = get_option( 'siteurl' ) . '/?wcal_action=track_links&validate=' . $validate_cart;
|
288 |
|
289 |
list( $email_body , $coupon_code_to_apply ) = wcal_common::wcal_check_and_replace_email_tag( $email_body, $wc_email_template );
|
290 |
if ( '' !== $coupon_code_to_apply ) {
|
291 |
-
$encypted_coupon_code =
|
292 |
$cart_link_track .= '&c=' . $encypted_coupon_code;
|
293 |
}
|
294 |
|
295 |
$email_body = str_ireplace( '{{cart.link}}', $cart_link_track, $email_body );
|
296 |
-
$validate_unsubscribe =
|
297 |
if ( count( $results_sent ) > 0 && isset( $results_sent[0]->sent_email_id ) ) {
|
298 |
$email_sent_id_address = $results_sent[0]->sent_email_id;
|
299 |
}
|
@@ -803,18 +803,6 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
803 |
|
804 |
return false;
|
805 |
}
|
806 |
-
/**
|
807 |
-
* This function is used to encode the validate string.
|
808 |
-
*
|
809 |
-
* @param string $validate String to validate.
|
810 |
-
* @return encoded data $validate_encoded.
|
811 |
-
* @since 1.3
|
812 |
-
*/
|
813 |
-
public function wcal_encrypt_validate( $validate ) {
|
814 |
-
$crypt_key = get_option( 'wcal_security_key' );
|
815 |
-
$validate_encoded = Wcal_Aes_Ctr::encrypt( $validate, $crypt_key, 256 );
|
816 |
-
return( $validate_encoded );
|
817 |
-
}
|
818 |
|
819 |
/**
|
820 |
* It will check if the reminder email has been sent to the abandoned cart.
|
83 |
$wcal_reply_email = get_option( 'wcal_reply_email' );
|
84 |
if ( class_exists( 'WP_Better_Emails' ) ) {
|
85 |
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
86 |
+
$headers .= 'Content-Type: text/html' . "\r\n";
|
87 |
$headers .= 'Reply-To: ' . $wcal_reply_email . ' ' . "\r\n";
|
88 |
} else {
|
89 |
$headers = 'From: ' . $wcal_from_name . ' <' . $wcal_from_email . '>' . "\r\n";
|
283 |
}
|
284 |
|
285 |
$encoding_cart = $email_sent_id . '&url=' . $cart_page_link . $utm;
|
286 |
+
$validate_cart = wcal_common::wcal_encrypt_validate( $encoding_cart );
|
287 |
$cart_link_track = get_option( 'siteurl' ) . '/?wcal_action=track_links&validate=' . $validate_cart;
|
288 |
|
289 |
list( $email_body , $coupon_code_to_apply ) = wcal_common::wcal_check_and_replace_email_tag( $email_body, $wc_email_template );
|
290 |
if ( '' !== $coupon_code_to_apply ) {
|
291 |
+
$encypted_coupon_code = wcal_common::wcal_encrypt_validate( $coupon_code_to_apply );
|
292 |
$cart_link_track .= '&c=' . $encypted_coupon_code;
|
293 |
}
|
294 |
|
295 |
$email_body = str_ireplace( '{{cart.link}}', $cart_link_track, $email_body );
|
296 |
+
$validate_unsubscribe = wcal_common::wcal_encrypt_validate( $email_sent_id );
|
297 |
if ( count( $results_sent ) > 0 && isset( $results_sent[0]->sent_email_id ) ) {
|
298 |
$email_sent_id_address = $results_sent[0]->sent_email_id;
|
299 |
}
|
803 |
|
804 |
return false;
|
805 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
|
807 |
/**
|
808 |
* It will check if the reminder email has been sent to the abandoned cart.
|
i18n/languages/woocommerce-abandoned-cart.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
# Copyright (C)
|
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.
|
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:
|
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"
|
@@ -39,45 +39,45 @@ msgid "Abandoned cart reminder"
|
|
39 |
msgstr ""
|
40 |
|
41 |
#: cron/class-wcal-cron.php:306
|
42 |
-
#: woocommerce-ac.php:
|
43 |
-
#: woocommerce-ac.php:
|
44 |
-
#: woocommerce-ac.php:
|
45 |
msgid "Quantity"
|
46 |
msgstr ""
|
47 |
|
48 |
#: cron/class-wcal-cron.php:307
|
49 |
-
#: woocommerce-ac.php:
|
50 |
-
#: woocommerce-ac.php:
|
51 |
msgid "Price"
|
52 |
msgstr ""
|
53 |
|
54 |
#: cron/class-wcal-cron.php:308
|
55 |
-
#: woocommerce-ac.php:
|
56 |
-
#: woocommerce-ac.php:
|
57 |
-
#: woocommerce-ac.php:
|
58 |
msgid "Line Subtotal"
|
59 |
msgstr ""
|
60 |
|
61 |
#: cron/class-wcal-cron.php:313
|
62 |
#: cron/class-wcal-cron.php:324
|
63 |
-
#: woocommerce-ac.php:
|
64 |
-
#: woocommerce-ac.php:
|
65 |
msgid "Your Shopping Cart"
|
66 |
msgstr ""
|
67 |
|
68 |
#: cron/class-wcal-cron.php:315
|
69 |
#: cron/class-wcal-cron.php:326
|
70 |
-
#: woocommerce-ac.php:
|
71 |
-
#: woocommerce-ac.php:
|
72 |
-
#: woocommerce-ac.php:
|
73 |
msgid "Item"
|
74 |
msgstr ""
|
75 |
|
76 |
#: cron/class-wcal-cron.php:316
|
77 |
#: cron/class-wcal-cron.php:327
|
78 |
-
#: woocommerce-ac.php:
|
79 |
-
#: woocommerce-ac.php:
|
80 |
-
#: woocommerce-ac.php:
|
81 |
msgid "Name"
|
82 |
msgstr ""
|
83 |
|
@@ -87,8 +87,8 @@ msgid "SKU: "
|
|
87 |
msgstr ""
|
88 |
|
89 |
#: cron/class-wcal-cron.php:433
|
90 |
-
#: woocommerce-ac.php:
|
91 |
-
#: woocommerce-ac.php:
|
92 |
msgid "Cart Total:"
|
93 |
msgstr ""
|
94 |
|
@@ -99,7 +99,6 @@ msgstr ""
|
|
99 |
#: cron/class-wcal-cron.php:660
|
100 |
#: cron/class-wcal-cron.php:729
|
101 |
#: includes/frontend/class-wcal-checkout-process.php:220
|
102 |
-
#: includes/frontend/class-wcal-checkout-process.php:557
|
103 |
msgid "This order was abandoned & subsequently recovered."
|
104 |
msgstr ""
|
105 |
|
@@ -132,7 +131,7 @@ msgid "ANONYMIZED"
|
|
132 |
msgstr ""
|
133 |
|
134 |
#: includes/admin/class-wcal-personal-data-export.php:137
|
135 |
-
#: woocommerce-ac.php:
|
136 |
msgid "Abandoned Carts"
|
137 |
msgstr ""
|
138 |
|
@@ -198,8 +197,8 @@ msgstr ""
|
|
198 |
|
199 |
#: includes/admin/class-wcap-add-cart-popup-modal.php:84
|
200 |
#: includes/admin/class-wcap-pro-settings.php:66
|
201 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
202 |
-
#: woocommerce-ac.php:
|
203 |
msgid "Save Changes"
|
204 |
msgstr ""
|
205 |
|
@@ -337,303 +336,314 @@ msgstr ""
|
|
337 |
msgid "No Thanks"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: includes/admin/class-wcap-pro-settings-callbacks.php:33
|
341 |
-
msgid "Configure your Twilio account settings below. Please note that due to some restrictions from Twilio, customers <i>may sometimes</i> receive delayed messages"
|
342 |
-
msgstr ""
|
343 |
-
|
344 |
#. translators: %s Purchase Link.
|
|
|
|
|
345 |
#: includes/admin/class-wcap-pro-settings.php:45
|
346 |
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature."
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
msgid "Cart abandoned cut-off time for guest users"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
354 |
msgid "For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed."
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
358 |
msgid "Do not track carts of guest users"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
362 |
msgid "Abandoned carts of guest users will not be tracked."
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
366 |
msgid "Do not track carts of logged-in users"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
370 |
msgid "Abandoned carts of logged-in users will not be tracked."
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
374 |
msgid "Send reminder emails for newly abandoned carts after X days of order placement"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
378 |
msgid "Reminder emails will be sent for newly abandoned carts only after X days of a previously placed order for a user with the same email address as that of the abandoned cart"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
382 |
msgid "Capture email address from custom fields."
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
386 |
msgid "Enable this setting to capture email address from other form fields."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
390 |
msgid "Class names of the form fields."
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
394 |
msgid "Enter class names of fields separated by commas from where email needs to be captured."
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
398 |
msgid "Capture Email address from URL"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
402 |
msgid "If your site URL contain the same key, then it will capture it as an email address of customer."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
406 |
msgid "Remove Data on Uninstall?"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
410 |
msgid "Enable this setting if you want to completely remove Abandoned Cart data when plugin is deleted."
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
414 |
msgid "Add Product to Cart when Close Icon is clicked?"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
418 |
msgid "Enable this setting if you want the product to the added to cart when the user clicks on the Close Icon in the Add to Cart Popup Modal."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
422 |
msgid "Enable Email Verification:"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
426 |
msgid "Enable this checkbox to allow email verification to be done via DeBounce API services."
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
430 |
msgid "Enter DeBounce API Key"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
434 |
msgid "Enter DeBounce JS API Key."
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
438 |
msgid "Product Image( H x W )"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
442 |
msgid "This setting affects the dimension of the product image in the abandoned cart reminder email."
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
446 |
msgid "Setting for sending Emails & SMS using Action Scheduler"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
450 |
msgid "Send Abandoned cart emails automatically using Action Scheduler"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
454 |
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."
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
458 |
msgid "Run automated Scheduler every X minutes"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
462 |
msgid "The duration in minutes after which an action should be automatically scheduled to send email, SMS & FB reminders to customers."
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
466 |
msgid "Rules to exclude capturing abandoned carts"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
470 |
msgid "Do not capture abandoned carts for these IP addresses"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
474 |
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>"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
478 |
msgid "Do not capture abandoned carts for these email addresses"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
482 |
msgid "The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
486 |
msgid "Do not capture abandoned carts for email addresses from these domains"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
490 |
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>"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
494 |
msgid "Unsubscribe Settings"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
498 |
msgid "Unsubscribe Landing Page"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
502 |
msgid "Send Test SMS"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
506 |
msgid "Recipient"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
510 |
msgid "Must be a valid phone number in E.164 format."
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
514 |
msgid "Message"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
518 |
msgid "Hello World!"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
522 |
msgid "Twilio"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
526 |
msgid "Enable SMS"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
530 |
msgid "<i>Enable the ability to send reminder SMS for abandoned carts.</i>"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
534 |
msgid "From"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
538 |
msgid "<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>"
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
542 |
msgid "Account SID"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
546 |
msgid "Auth Token"
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
550 |
msgid "Facebook Messenger Settings"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
554 |
msgid "Enable Facebook Messenger Reminders"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
558 |
msgid "<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
562 |
msgid "Facebook Messenger on Add to Cart Pop-up modal"
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
566 |
msgid "<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
570 |
msgid "Icon size of user"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
574 |
msgid "<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
578 |
msgid "Small"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
582 |
msgid "Medium"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
586 |
msgid "Large"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
590 |
msgid "Standard"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
594 |
msgid "Extra Large"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
598 |
msgid "Consent text"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
602 |
msgid "<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
606 |
msgid "Facebook Page ID"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
610 |
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>"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
614 |
msgid "Messenger App ID"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
618 |
msgid "<i>Enter your Messenger App ID</i>"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
622 |
msgid "Facebook Page Token"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
626 |
msgid "<i>Enter your Facebook Page Token</i>"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
630 |
msgid "Verify Token"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: includes/admin/class-wcap-pro-settings.php:
|
634 |
msgid "<i>Enter your Verify Token</i>"
|
635 |
msgstr ""
|
636 |
|
|
|
|
|
|
|
|
|
|
|
637 |
#. Translators: Plugin Name and URL.
|
638 |
#: includes/class-wcal-admin-notice.php:42
|
639 |
msgid "The %1$s now uses the Action Scheduler library to send reminders. For further details, please visit %2$s."
|
@@ -710,6 +720,11 @@ msgstr ""
|
|
710 |
msgid "This product no longer exists"
|
711 |
msgstr ""
|
712 |
|
|
|
|
|
|
|
|
|
|
|
713 |
#: includes/classes/class-wcal-abandoned-orders-table.php:59
|
714 |
msgid "abandoned_order_id"
|
715 |
msgstr ""
|
@@ -807,7 +822,7 @@ msgid "<strong>%s%%</strong> of Total Revenue"
|
|
807 |
msgstr ""
|
808 |
|
809 |
#: includes/classes/class-wcal-dashboard-report.php:161
|
810 |
-
#: woocommerce-ac.php:
|
811 |
msgid "Abandoned Orders"
|
812 |
msgstr ""
|
813 |
|
@@ -872,7 +887,7 @@ msgid "Select date range:"
|
|
872 |
msgstr ""
|
873 |
|
874 |
#: includes/classes/class-wcal-dashboard-report.php:319
|
875 |
-
#: woocommerce-ac.php:
|
876 |
msgid "Go"
|
877 |
msgstr ""
|
878 |
|
@@ -1013,395 +1028,415 @@ msgstr ""
|
|
1013 |
msgid "Search & select one coupon code that customers should use to get a discount. Generated coupon code which will be sent in email reminder will have the settings of coupon selected in this option."
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: woocommerce-ac.php:
|
1017 |
-
#: woocommerce-ac.php:
|
1018 |
-
#: woocommerce-ac.php:2154
|
1019 |
msgid "Settings"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: woocommerce-ac.php:
|
1023 |
msgid "Emails are not being sent to customers."
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: woocommerce-ac.php:
|
1027 |
msgid "Capturing of cart and other information was not satisfactory."
|
1028 |
msgstr ""
|
1029 |
|
1030 |
-
#: woocommerce-ac.php:
|
1031 |
msgid "I cannot see abandoned cart reminder emails records."
|
1032 |
msgstr ""
|
1033 |
|
1034 |
-
#: woocommerce-ac.php:
|
1035 |
msgid "I want to upgrade the plugin to the PRO version."
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: woocommerce-ac.php:
|
1039 |
msgid "HTML Email Template"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: woocommerce-ac.php:
|
1043 |
msgid "Abandoned cart Email Template"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
#: woocommerce-ac.php:761
|
|
|
|
|
|
|
|
|
1047 |
msgid "Enable abandoned cart emails"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
-
#: woocommerce-ac.php:
|
1051 |
msgid "Yes, enable the abandoned cart emails."
|
1052 |
msgstr ""
|
1053 |
|
1054 |
-
#: woocommerce-ac.php:
|
1055 |
msgid "Cart abandoned cut-off time"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: woocommerce-ac.php:
|
1059 |
msgid "Consider cart abandoned after X minutes of item being added to cart & order not placed."
|
1060 |
msgstr ""
|
1061 |
|
1062 |
-
#: woocommerce-ac.php:
|
1063 |
msgid "Automatically Delete Abandoned Orders after X days"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
-
#: woocommerce-ac.php:
|
1067 |
msgid "Automatically delete abandoned cart orders after X days."
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: woocommerce-ac.php:
|
1071 |
msgid "Email admin On Order Recovery"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: woocommerce-ac.php:
|
1075 |
msgid "Sends email to Admin if an Abandoned Cart Order is recovered."
|
1076 |
msgstr ""
|
1077 |
|
1078 |
-
#: woocommerce-ac.php:
|
1079 |
msgid "Start tracking from Cart Page"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: woocommerce-ac.php:
|
1083 |
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."
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: woocommerce-ac.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1087 |
msgid "Message to be displayed for Guest users when tracking their carts"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: woocommerce-ac.php:
|
1091 |
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>"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
-
#: woocommerce-ac.php:
|
1095 |
msgid "Message to be displayed for registered users when tracking their carts."
|
1096 |
msgstr ""
|
1097 |
|
1098 |
-
#: woocommerce-ac.php:
|
1099 |
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>"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: woocommerce-ac.php:
|
1103 |
msgid "Allow the visitor to opt out of cart tracking."
|
1104 |
msgstr ""
|
1105 |
|
1106 |
-
#: woocommerce-ac.php:
|
1107 |
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>"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
-
#: woocommerce-ac.php:
|
1111 |
msgid "Message to be displayed when the user chooses to opt out of cart tracking."
|
1112 |
msgstr ""
|
1113 |
|
1114 |
-
#: woocommerce-ac.php:
|
1115 |
msgid "<br>Message to be displayed when the user chooses to opt out of cart tracking.</i>"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: woocommerce-ac.php:
|
|
|
|
|
|
|
|
|
1119 |
msgid "Delete Coupons Automatically"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: woocommerce-ac.php:
|
1123 |
msgid "Enable this setting if you want to completely remove the expired and used coupon code automatically every 15 days."
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: woocommerce-ac.php:
|
1127 |
msgid "Delete Coupons Manually"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: woocommerce-ac.php:
|
1131 |
msgid "If you want to completely remove the expired and used coupon code now then click on \"Delete\" button."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: woocommerce-ac.php:
|
1135 |
msgid "Settings for abandoned cart recovery emails"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: woocommerce-ac.php:
|
1139 |
msgid "\"From\" Name"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: woocommerce-ac.php:
|
1143 |
msgid "\"From\" Address"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
-
#: woocommerce-ac.php:
|
1147 |
msgid "Send Reply Emails to"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: woocommerce-ac.php:
|
1151 |
msgid "UTM parameters to be added to all the links in reminder emails"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
-
#: woocommerce-ac.php:
|
1155 |
msgid "UTM parameters that should be added to all the links in reminder emails."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: woocommerce-ac.php:
|
1159 |
msgid "Abandoned cart cut off time should be numeric and has to be greater than 0."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
-
#: woocommerce-ac.php:
|
1163 |
msgid "Automatically Delete Abandoned Orders after X days has to be greater than 0."
|
1164 |
msgstr ""
|
1165 |
|
1166 |
-
#: woocommerce-ac.php:
|
1167 |
msgid "Dashboard"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
-
#: woocommerce-ac.php:
|
1171 |
msgid "Email Templates"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: woocommerce-ac.php:
|
1175 |
msgid "Recovered Orders"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: woocommerce-ac.php:
|
1179 |
msgid "Product Report"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
-
#: woocommerce-ac.php:
|
1183 |
msgid "You do not have sufficient permissions to access this page."
|
1184 |
msgstr ""
|
1185 |
|
1186 |
-
#: woocommerce-ac.php:
|
1187 |
msgid "WooCommerce - Abandon Cart Lite"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
-
#: woocommerce-ac.php:
|
1191 |
msgid "The Abandoned cart has been successfully deleted."
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: woocommerce-ac.php:
|
1195 |
msgid "All Abandoned Carts have been successfully deleted."
|
1196 |
msgstr ""
|
1197 |
|
1198 |
-
#: woocommerce-ac.php:
|
1199 |
msgid "All Visitor carts have been successfully deleted."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: woocommerce-ac.php:
|
1203 |
msgid "All Guest carts have been successfully deleted."
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: woocommerce-ac.php:
|
1207 |
msgid "All Registered carts have been deleted."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: woocommerce-ac.php:
|
1211 |
msgid "The Template has been successfully deleted."
|
1212 |
msgstr ""
|
1213 |
|
1214 |
-
#: woocommerce-ac.php:
|
1215 |
-
msgid "Change settings for sending email notifications to Customers, to Admin etc."
|
1216 |
-
msgstr ""
|
1217 |
-
|
1218 |
-
#: woocommerce-ac.php:2581
|
1219 |
msgid "General Settings"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: woocommerce-ac.php:
|
1223 |
msgid "Email Sending Settings"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: woocommerce-ac.php:
|
|
|
|
|
|
|
|
|
|
|
1227 |
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."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: woocommerce-ac.php:
|
1231 |
msgid "All "
|
1232 |
msgstr ""
|
1233 |
|
1234 |
#. translators: Users.
|
1235 |
-
#: woocommerce-ac.php:
|
1236 |
msgid "Registered %s"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
#. translators: Users.
|
1240 |
-
#: woocommerce-ac.php:
|
1241 |
msgid "Guest %s"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: woocommerce-ac.php:
|
1245 |
msgid "Carts without Customer Details"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: woocommerce-ac.php:
|
1249 |
msgid "Add email templates at different intervals to maximize the possibility of recovering your abandoned carts."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: woocommerce-ac.php:
|
1253 |
msgid "The Email Template has been successfully added. In order to start sending this email to your customers, please activate it."
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#: woocommerce-ac.php:
|
1257 |
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>."
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: woocommerce-ac.php:
|
1261 |
msgid "The Email Template has been successfully updated."
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#: woocommerce-ac.php:
|
1265 |
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>."
|
1266 |
msgstr ""
|
1267 |
|
1268 |
-
#: woocommerce-ac.php:
|
1269 |
msgid "Add New Template"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: woocommerce-ac.php:
|
1273 |
msgid "The Report below shows how many Abandoned Carts we were able to recover for you by sending automatic emails to encourage shoppers."
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: woocommerce-ac.php:
|
1277 |
msgid "Start Date:"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: woocommerce-ac.php:
|
1281 |
msgid "End Date:"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
#. translators: Abandoned & recovered numbers and order totals.
|
1285 |
-
#: woocommerce-ac.php:
|
1286 |
msgid "During the selected range <strong>%1$d</strong> carts totaling <strong>%2$s</strong> were abandoned. We were able to recover <strong>%3$d</strong> of them, which led to an extra <strong>%4$s</strong>"
|
1287 |
msgstr ""
|
1288 |
|
1289 |
#. translators: Abandoned Order ID.
|
1290 |
-
#: woocommerce-ac.php:
|
1291 |
msgid "Abandoned Order #%s Details"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: woocommerce-ac.php:
|
1295 |
msgid "Line Total"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
-
#: woocommerce-ac.php:
|
1299 |
msgid "Customer Details"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
-
#: woocommerce-ac.php:
|
1303 |
msgid "Billing Details"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#: woocommerce-ac.php:
|
1307 |
msgid "Name:"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
-
#: woocommerce-ac.php:
|
1311 |
-
#: woocommerce-ac.php:
|
1312 |
msgid "Address:"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: woocommerce-ac.php:
|
1316 |
msgid "Email:"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: woocommerce-ac.php:
|
1320 |
msgid "Phone:"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: woocommerce-ac.php:
|
1324 |
msgid "Shipping Details"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: woocommerce-ac.php:
|
1328 |
msgid "Shipping Address same as Billing Address"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: woocommerce-ac.php:
|
1332 |
msgid "Shipping Charges"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: woocommerce-ac.php:
|
1336 |
msgid "Template Name:"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: woocommerce-ac.php:
|
1340 |
msgid "Enter a template name for reference"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: woocommerce-ac.php:
|
1344 |
msgid "Subject:"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: woocommerce-ac.php:
|
1348 |
msgid "Enter the subject that should appear in the email sent"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
-
#: woocommerce-ac.php:
|
1352 |
msgid "Email Body:"
|
1353 |
msgstr ""
|
1354 |
|
1355 |
-
#: woocommerce-ac.php:
|
1356 |
msgid "Message to be sent in the reminder email."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#: woocommerce-ac.php:
|
1360 |
msgid "Use WooCommerce Template Style:"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: woocommerce-ac.php:
|
1364 |
msgid "Email Template Header Text: "
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#: woocommerce-ac.php:
|
1368 |
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."
|
1369 |
msgstr ""
|
1370 |
|
1371 |
-
#: woocommerce-ac.php:
|
1372 |
msgid "Send this email:"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
-
#: woocommerce-ac.php:
|
1376 |
msgid "after cart is abandoned."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: woocommerce-ac.php:
|
1380 |
msgid "Send a test email to:"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: woocommerce-ac.php:
|
1384 |
msgid "Enter the email id to which the test email needs to be sent."
|
1385 |
msgstr ""
|
1386 |
|
1387 |
-
#: woocommerce-ac.php:
|
1388 |
msgid "Update Changes"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
-
#: woocommerce-ac.php:
|
1392 |
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. :)"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
-
#: woocommerce-ac.php:
|
1396 |
msgid "Please enter a valid email."
|
1397 |
msgstr ""
|
1398 |
|
1399 |
-
#: woocommerce-ac.php:
|
1400 |
-
#: woocommerce-ac.php:
|
1401 |
msgid "Men's Formal Shoes"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: woocommerce-ac.php:
|
1405 |
-
#: woocommerce-ac.php:
|
1406 |
msgid "Woman's Hand Bags"
|
1407 |
msgstr ""
|
1 |
+
# Copyright (C) 2022 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.12.0\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: 2022-02-08T08:16:11+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"
|
39 |
msgstr ""
|
40 |
|
41 |
#: cron/class-wcal-cron.php:306
|
42 |
+
#: woocommerce-ac.php:3153
|
43 |
+
#: woocommerce-ac.php:3975
|
44 |
+
#: woocommerce-ac.php:4010
|
45 |
msgid "Quantity"
|
46 |
msgstr ""
|
47 |
|
48 |
#: cron/class-wcal-cron.php:307
|
49 |
+
#: woocommerce-ac.php:3976
|
50 |
+
#: woocommerce-ac.php:4011
|
51 |
msgid "Price"
|
52 |
msgstr ""
|
53 |
|
54 |
#: cron/class-wcal-cron.php:308
|
55 |
+
#: woocommerce-ac.php:3154
|
56 |
+
#: woocommerce-ac.php:3977
|
57 |
+
#: woocommerce-ac.php:4012
|
58 |
msgid "Line Subtotal"
|
59 |
msgstr ""
|
60 |
|
61 |
#: cron/class-wcal-cron.php:313
|
62 |
#: cron/class-wcal-cron.php:324
|
63 |
+
#: woocommerce-ac.php:3971
|
64 |
+
#: woocommerce-ac.php:4005
|
65 |
msgid "Your Shopping Cart"
|
66 |
msgstr ""
|
67 |
|
68 |
#: cron/class-wcal-cron.php:315
|
69 |
#: cron/class-wcal-cron.php:326
|
70 |
+
#: woocommerce-ac.php:3151
|
71 |
+
#: woocommerce-ac.php:3973
|
72 |
+
#: woocommerce-ac.php:4008
|
73 |
msgid "Item"
|
74 |
msgstr ""
|
75 |
|
76 |
#: cron/class-wcal-cron.php:316
|
77 |
#: cron/class-wcal-cron.php:327
|
78 |
+
#: woocommerce-ac.php:3152
|
79 |
+
#: woocommerce-ac.php:3974
|
80 |
+
#: woocommerce-ac.php:4009
|
81 |
msgid "Name"
|
82 |
msgstr ""
|
83 |
|
87 |
msgstr ""
|
88 |
|
89 |
#: cron/class-wcal-cron.php:433
|
90 |
+
#: woocommerce-ac.php:3997
|
91 |
+
#: woocommerce-ac.php:4032
|
92 |
msgid "Cart Total:"
|
93 |
msgstr ""
|
94 |
|
99 |
#: cron/class-wcal-cron.php:660
|
100 |
#: cron/class-wcal-cron.php:729
|
101 |
#: includes/frontend/class-wcal-checkout-process.php:220
|
|
|
102 |
msgid "This order was abandoned & subsequently recovered."
|
103 |
msgstr ""
|
104 |
|
131 |
msgstr ""
|
132 |
|
133 |
#: includes/admin/class-wcal-personal-data-export.php:137
|
134 |
+
#: woocommerce-ac.php:1347
|
135 |
msgid "Abandoned Carts"
|
136 |
msgstr ""
|
137 |
|
197 |
|
198 |
#: includes/admin/class-wcap-add-cart-popup-modal.php:84
|
199 |
#: includes/admin/class-wcap-pro-settings.php:66
|
200 |
+
#: includes/admin/class-wcap-pro-settings.php:299
|
201 |
+
#: woocommerce-ac.php:3721
|
202 |
msgid "Save Changes"
|
203 |
msgstr ""
|
204 |
|
336 |
msgid "No Thanks"
|
337 |
msgstr ""
|
338 |
|
|
|
|
|
|
|
|
|
339 |
#. translators: %s Purchase Link.
|
340 |
+
#: includes/admin/class-wcap-pro-settings-callbacks.php:39
|
341 |
+
#: includes/admin/class-wcap-pro-settings-callbacks.php:123
|
342 |
#: includes/admin/class-wcap-pro-settings.php:45
|
343 |
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: includes/admin/class-wcap-pro-settings-callbacks.php:44
|
347 |
+
msgid "Configure your Twilio account settings below. Please note that due to some restrictions from Twilio, customers <i>may sometimes</i> receive delayed messages"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: includes/admin/class-wcap-pro-settings.php:90
|
351 |
+
msgid "Pro Version Settings"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: includes/admin/class-wcap-pro-settings.php:97
|
355 |
msgid "Cart abandoned cut-off time for guest users"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: includes/admin/class-wcap-pro-settings.php:101
|
359 |
msgid "For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed."
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: includes/admin/class-wcap-pro-settings.php:106
|
363 |
msgid "Do not track carts of guest users"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/admin/class-wcap-pro-settings.php:110
|
367 |
msgid "Abandoned carts of guest users will not be tracked."
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/admin/class-wcap-pro-settings.php:115
|
371 |
msgid "Do not track carts of logged-in users"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: includes/admin/class-wcap-pro-settings.php:119
|
375 |
msgid "Abandoned carts of logged-in users will not be tracked."
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: includes/admin/class-wcap-pro-settings.php:124
|
379 |
msgid "Send reminder emails for newly abandoned carts after X days of order placement"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: includes/admin/class-wcap-pro-settings.php:128
|
383 |
msgid "Reminder emails will be sent for newly abandoned carts only after X days of a previously placed order for a user with the same email address as that of the abandoned cart"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: includes/admin/class-wcap-pro-settings.php:133
|
387 |
msgid "Capture email address from custom fields."
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: includes/admin/class-wcap-pro-settings.php:137
|
391 |
msgid "Enable this setting to capture email address from other form fields."
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/admin/class-wcap-pro-settings.php:142
|
395 |
msgid "Class names of the form fields."
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: includes/admin/class-wcap-pro-settings.php:146
|
399 |
msgid "Enter class names of fields separated by commas from where email needs to be captured."
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: includes/admin/class-wcap-pro-settings.php:151
|
403 |
msgid "Capture Email address from URL"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: includes/admin/class-wcap-pro-settings.php:155
|
407 |
msgid "If your site URL contain the same key, then it will capture it as an email address of customer."
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: includes/admin/class-wcap-pro-settings.php:160
|
411 |
msgid "Remove Data on Uninstall?"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: includes/admin/class-wcap-pro-settings.php:164
|
415 |
msgid "Enable this setting if you want to completely remove Abandoned Cart data when plugin is deleted."
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: includes/admin/class-wcap-pro-settings.php:169
|
419 |
msgid "Add Product to Cart when Close Icon is clicked?"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/admin/class-wcap-pro-settings.php:173
|
423 |
msgid "Enable this setting if you want the product to the added to cart when the user clicks on the Close Icon in the Add to Cart Popup Modal."
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: includes/admin/class-wcap-pro-settings.php:178
|
427 |
msgid "Enable Email Verification:"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: includes/admin/class-wcap-pro-settings.php:182
|
431 |
msgid "Enable this checkbox to allow email verification to be done via DeBounce API services."
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: includes/admin/class-wcap-pro-settings.php:187
|
435 |
msgid "Enter DeBounce API Key"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: includes/admin/class-wcap-pro-settings.php:191
|
439 |
msgid "Enter DeBounce JS API Key."
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: includes/admin/class-wcap-pro-settings.php:196
|
443 |
msgid "Product Image( H x W )"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: includes/admin/class-wcap-pro-settings.php:200
|
447 |
msgid "This setting affects the dimension of the product image in the abandoned cart reminder email."
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: includes/admin/class-wcap-pro-settings.php:214
|
451 |
msgid "Setting for sending Emails & SMS using Action Scheduler"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: includes/admin/class-wcap-pro-settings.php:221
|
455 |
msgid "Send Abandoned cart emails automatically using Action Scheduler"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: includes/admin/class-wcap-pro-settings.php:225
|
459 |
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."
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: includes/admin/class-wcap-pro-settings.php:230
|
463 |
msgid "Run automated Scheduler every X minutes"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: includes/admin/class-wcap-pro-settings.php:234
|
467 |
msgid "The duration in minutes after which an action should be automatically scheduled to send email, SMS & FB reminders to customers."
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: includes/admin/class-wcap-pro-settings.php:239
|
471 |
msgid "Rules to exclude capturing abandoned carts"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: includes/admin/class-wcap-pro-settings.php:246
|
475 |
msgid "Do not capture abandoned carts for these IP addresses"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/admin/class-wcap-pro-settings.php:250
|
479 |
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>"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/admin/class-wcap-pro-settings.php:255
|
483 |
msgid "Do not capture abandoned carts for these email addresses"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/admin/class-wcap-pro-settings.php:259
|
487 |
msgid "The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/admin/class-wcap-pro-settings.php:264
|
491 |
msgid "Do not capture abandoned carts for email addresses from these domains"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: includes/admin/class-wcap-pro-settings.php:268
|
495 |
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>"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: includes/admin/class-wcap-pro-settings.php:273
|
499 |
msgid "Unsubscribe Settings"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: includes/admin/class-wcap-pro-settings.php:281
|
503 |
msgid "Unsubscribe Landing Page"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: includes/admin/class-wcap-pro-settings.php:305
|
507 |
msgid "Send Test SMS"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: includes/admin/class-wcap-pro-settings.php:309
|
511 |
msgid "Recipient"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: includes/admin/class-wcap-pro-settings.php:312
|
515 |
msgid "Must be a valid phone number in E.164 format."
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: includes/admin/class-wcap-pro-settings.php:317
|
519 |
msgid "Message"
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: includes/admin/class-wcap-pro-settings.php:318
|
523 |
msgid "Hello World!"
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: includes/admin/class-wcap-pro-settings.php:338
|
527 |
msgid "Twilio"
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: includes/admin/class-wcap-pro-settings.php:345
|
531 |
msgid "Enable SMS"
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/admin/class-wcap-pro-settings.php:349
|
535 |
msgid "<i>Enable the ability to send reminder SMS for abandoned carts.</i>"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: includes/admin/class-wcap-pro-settings.php:354
|
539 |
msgid "From"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: includes/admin/class-wcap-pro-settings.php:358
|
543 |
msgid "<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: includes/admin/class-wcap-pro-settings.php:363
|
547 |
msgid "Account SID"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/admin/class-wcap-pro-settings.php:372
|
551 |
msgid "Auth Token"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/admin/class-wcap-pro-settings.php:381
|
555 |
msgid "Facebook Messenger Settings"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: includes/admin/class-wcap-pro-settings.php:388
|
559 |
msgid "Enable Facebook Messenger Reminders"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: includes/admin/class-wcap-pro-settings.php:392
|
563 |
msgid "<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: includes/admin/class-wcap-pro-settings.php:397
|
567 |
msgid "Facebook Messenger on Add to Cart Pop-up modal"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: includes/admin/class-wcap-pro-settings.php:401
|
571 |
msgid "<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: includes/admin/class-wcap-pro-settings.php:406
|
575 |
msgid "Icon size of user"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: includes/admin/class-wcap-pro-settings.php:411
|
579 |
msgid "<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: includes/admin/class-wcap-pro-settings.php:414
|
583 |
msgid "Small"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: includes/admin/class-wcap-pro-settings.php:415
|
587 |
msgid "Medium"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: includes/admin/class-wcap-pro-settings.php:416
|
591 |
msgid "Large"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: includes/admin/class-wcap-pro-settings.php:417
|
595 |
msgid "Standard"
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: includes/admin/class-wcap-pro-settings.php:418
|
599 |
msgid "Extra Large"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: includes/admin/class-wcap-pro-settings.php:425
|
603 |
msgid "Consent text"
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: includes/admin/class-wcap-pro-settings.php:429
|
607 |
msgid "<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: includes/admin/class-wcap-pro-settings.php:434
|
611 |
msgid "Facebook Page ID"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: includes/admin/class-wcap-pro-settings.php:438
|
615 |
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>"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: includes/admin/class-wcap-pro-settings.php:443
|
619 |
msgid "Messenger App ID"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: includes/admin/class-wcap-pro-settings.php:447
|
623 |
msgid "<i>Enter your Messenger App ID</i>"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: includes/admin/class-wcap-pro-settings.php:452
|
627 |
msgid "Facebook Page Token"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: includes/admin/class-wcap-pro-settings.php:456
|
631 |
msgid "<i>Enter your Facebook Page Token</i>"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: includes/admin/class-wcap-pro-settings.php:461
|
635 |
msgid "Verify Token"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/admin/class-wcap-pro-settings.php:465
|
639 |
msgid "<i>Enter your Verify Token</i>"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#. translators: Link to purchase Pro version.
|
643 |
+
#: includes/admin/class-wcap-pro-settings.php:482
|
644 |
+
msgid "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the settings shown below."
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
#. Translators: Plugin Name and URL.
|
648 |
#: includes/class-wcal-admin-notice.php:42
|
649 |
msgid "The %1$s now uses the Action Scheduler library to send reminders. For further details, please visit %2$s."
|
720 |
msgid "This product no longer exists"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/class-wcal-guest-ac.php:71
|
724 |
+
#: includes/class-wcal-tracking-msg.php:71
|
725 |
+
msgid "Saving your email and cart details helps us keep you up to date with this order."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
#: includes/classes/class-wcal-abandoned-orders-table.php:59
|
729 |
msgid "abandoned_order_id"
|
730 |
msgstr ""
|
822 |
msgstr ""
|
823 |
|
824 |
#: includes/classes/class-wcal-dashboard-report.php:161
|
825 |
+
#: woocommerce-ac.php:2210
|
826 |
msgid "Abandoned Orders"
|
827 |
msgstr ""
|
828 |
|
887 |
msgstr ""
|
888 |
|
889 |
#: includes/classes/class-wcal-dashboard-report.php:319
|
890 |
+
#: woocommerce-ac.php:3104
|
891 |
msgid "Go"
|
892 |
msgstr ""
|
893 |
|
1028 |
msgid "Search & select one coupon code that customers should use to get a discount. Generated coupon code which will be sent in email reminder will have the settings of coupon selected in this option."
|
1029 |
msgstr ""
|
1030 |
|
1031 |
+
#: woocommerce-ac.php:311
|
1032 |
+
#: woocommerce-ac.php:2224
|
|
|
1033 |
msgid "Settings"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: woocommerce-ac.php:340
|
1037 |
msgid "Emails are not being sent to customers."
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: woocommerce-ac.php:346
|
1041 |
msgid "Capturing of cart and other information was not satisfactory."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: woocommerce-ac.php:352
|
1045 |
msgid "I cannot see abandoned cart reminder emails records."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: woocommerce-ac.php:358
|
1049 |
msgid "I want to upgrade the plugin to the PRO version."
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: woocommerce-ac.php:481
|
1053 |
msgid "HTML Email Template"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: woocommerce-ac.php:487
|
1057 |
msgid "Abandoned cart Email Template"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
#: woocommerce-ac.php:761
|
1061 |
+
msgid "Cart Abandonment Settings"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: woocommerce-ac.php:768
|
1065 |
msgid "Enable abandoned cart emails"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: woocommerce-ac.php:772
|
1069 |
msgid "Yes, enable the abandoned cart emails."
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: woocommerce-ac.php:777
|
1073 |
msgid "Cart abandoned cut-off time"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: woocommerce-ac.php:781
|
1077 |
msgid "Consider cart abandoned after X minutes of item being added to cart & order not placed."
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: woocommerce-ac.php:786
|
1081 |
msgid "Automatically Delete Abandoned Orders after X days"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: woocommerce-ac.php:790
|
1085 |
msgid "Automatically delete abandoned cart orders after X days."
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: woocommerce-ac.php:795
|
1089 |
msgid "Email admin On Order Recovery"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: woocommerce-ac.php:799
|
1093 |
msgid "Sends email to Admin if an Abandoned Cart Order is recovered."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: woocommerce-ac.php:804
|
1097 |
msgid "Start tracking from Cart Page"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: woocommerce-ac.php:808
|
1101 |
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."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: woocommerce-ac.php:813
|
1105 |
+
msgid "GDPR Settings"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: woocommerce-ac.php:820
|
1109 |
+
msgid "Enable GDPR Notice"
|
1110 |
+
msgstr ""
|
1111 |
+
|
1112 |
+
#: woocommerce-ac.php:824
|
1113 |
+
msgid "Enable this setting to display a notice informing customers that their email and cart data are saved to send abandonment reminders."
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: woocommerce-ac.php:829
|
1117 |
msgid "Message to be displayed for Guest users when tracking their carts"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: woocommerce-ac.php:833
|
1121 |
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>"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: woocommerce-ac.php:838
|
1125 |
msgid "Message to be displayed for registered users when tracking their carts."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: woocommerce-ac.php:842
|
1129 |
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>"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: woocommerce-ac.php:847
|
1133 |
msgid "Allow the visitor to opt out of cart tracking."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: woocommerce-ac.php:851
|
1137 |
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>"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: woocommerce-ac.php:856
|
1141 |
msgid "Message to be displayed when the user chooses to opt out of cart tracking."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: woocommerce-ac.php:860
|
1145 |
msgid "<br>Message to be displayed when the user chooses to opt out of cart tracking.</i>"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: woocommerce-ac.php:864
|
1149 |
+
msgid "Coupon Settings"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: woocommerce-ac.php:870
|
1153 |
msgid "Delete Coupons Automatically"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: woocommerce-ac.php:874
|
1157 |
msgid "Enable this setting if you want to completely remove the expired and used coupon code automatically every 15 days."
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: woocommerce-ac.php:878
|
1161 |
msgid "Delete Coupons Manually"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: woocommerce-ac.php:882
|
1165 |
msgid "If you want to completely remove the expired and used coupon code now then click on \"Delete\" button."
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: woocommerce-ac.php:891
|
1169 |
msgid "Settings for abandoned cart recovery emails"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: woocommerce-ac.php:898
|
1173 |
msgid "\"From\" Name"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: woocommerce-ac.php:907
|
1177 |
msgid "\"From\" Address"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: woocommerce-ac.php:916
|
1181 |
msgid "Send Reply Emails to"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: woocommerce-ac.php:925
|
1185 |
msgid "UTM parameters to be added to all the links in reminder emails"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: woocommerce-ac.php:929
|
1189 |
msgid "UTM parameters that should be added to all the links in reminder emails."
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: woocommerce-ac.php:1071
|
1193 |
msgid "Abandoned cart cut off time should be numeric and has to be greater than 0."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: woocommerce-ac.php:1088
|
1197 |
msgid "Automatically Delete Abandoned Orders after X days has to be greater than 0."
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: woocommerce-ac.php:2203
|
1201 |
msgid "Dashboard"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: woocommerce-ac.php:2217
|
1205 |
msgid "Email Templates"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
+
#: woocommerce-ac.php:2231
|
1209 |
msgid "Recovered Orders"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
+
#: woocommerce-ac.php:2238
|
1213 |
msgid "Product Report"
|
1214 |
msgstr ""
|
1215 |
|
1216 |
+
#: woocommerce-ac.php:2517
|
1217 |
msgid "You do not have sufficient permissions to access this page."
|
1218 |
msgstr ""
|
1219 |
|
1220 |
+
#: woocommerce-ac.php:2521
|
1221 |
msgid "WooCommerce - Abandon Cart Lite"
|
1222 |
msgstr ""
|
1223 |
|
1224 |
+
#: woocommerce-ac.php:2593
|
1225 |
msgid "The Abandoned cart has been successfully deleted."
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: woocommerce-ac.php:2595
|
1229 |
msgid "All Abandoned Carts have been successfully deleted."
|
1230 |
msgstr ""
|
1231 |
|
1232 |
+
#: woocommerce-ac.php:2597
|
1233 |
msgid "All Visitor carts have been successfully deleted."
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: woocommerce-ac.php:2599
|
1237 |
msgid "All Guest carts have been successfully deleted."
|
1238 |
msgstr ""
|
1239 |
|
1240 |
+
#: woocommerce-ac.php:2601
|
1241 |
msgid "All Registered carts have been deleted."
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: woocommerce-ac.php:2612
|
1245 |
msgid "The Template has been successfully deleted."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: woocommerce-ac.php:2656
|
|
|
|
|
|
|
|
|
1249 |
msgid "General Settings"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: woocommerce-ac.php:2659
|
1253 |
msgid "Email Sending Settings"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: woocommerce-ac.php:2679
|
1257 |
+
#: woocommerce-ac.php:2689
|
1258 |
+
msgid "Change settings for sending email notifications to Customers, to Admin etc."
|
1259 |
+
msgstr ""
|
1260 |
+
|
1261 |
+
#: woocommerce-ac.php:2716
|
1262 |
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."
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: woocommerce-ac.php:2758
|
1266 |
msgid "All "
|
1267 |
msgstr ""
|
1268 |
|
1269 |
#. translators: Users.
|
1270 |
+
#: woocommerce-ac.php:2763
|
1271 |
msgid "Registered %s"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
#. translators: Users.
|
1275 |
+
#: woocommerce-ac.php:2769
|
1276 |
msgid "Guest %s"
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: woocommerce-ac.php:2775
|
1280 |
msgid "Carts without Customer Details"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: woocommerce-ac.php:2796
|
1284 |
msgid "Add email templates at different intervals to maximize the possibility of recovering your abandoned carts."
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: woocommerce-ac.php:2936
|
1288 |
msgid "The Email Template has been successfully added. In order to start sending this email to your customers, please activate it."
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: woocommerce-ac.php:2946
|
1292 |
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>."
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: woocommerce-ac.php:2958
|
1296 |
msgid "The Email Template has been successfully updated."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: woocommerce-ac.php:2968
|
1300 |
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>."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: woocommerce-ac.php:2977
|
1304 |
msgid "Add New Template"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: woocommerce-ac.php:3049
|
1308 |
msgid "The Report below shows how many Abandoned Carts we were able to recover for you by sending automatic emails to encourage shoppers."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: woocommerce-ac.php:3100
|
1312 |
msgid "Start Date:"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
+
#: woocommerce-ac.php:3102
|
1316 |
msgid "End Date:"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
#. translators: Abandoned & recovered numbers and order totals.
|
1320 |
+
#: woocommerce-ac.php:3122
|
1321 |
msgid "During the selected range <strong>%1$d</strong> carts totaling <strong>%2$s</strong> were abandoned. We were able to recover <strong>%3$d</strong> of them, which led to an extra <strong>%4$s</strong>"
|
1322 |
msgstr ""
|
1323 |
|
1324 |
#. translators: Abandoned Order ID.
|
1325 |
+
#: woocommerce-ac.php:3147
|
1326 |
msgid "Abandoned Order #%s Details"
|
1327 |
msgstr ""
|
1328 |
|
1329 |
+
#: woocommerce-ac.php:3155
|
1330 |
msgid "Line Total"
|
1331 |
msgstr ""
|
1332 |
|
1333 |
+
#: woocommerce-ac.php:3380
|
1334 |
msgid "Customer Details"
|
1335 |
msgstr ""
|
1336 |
|
1337 |
+
#: woocommerce-ac.php:3384
|
1338 |
msgid "Billing Details"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
+
#: woocommerce-ac.php:3385
|
1342 |
msgid "Name:"
|
1343 |
msgstr ""
|
1344 |
|
1345 |
+
#: woocommerce-ac.php:3388
|
1346 |
+
#: woocommerce-ac.php:3409
|
1347 |
msgid "Address:"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: woocommerce-ac.php:3399
|
1351 |
msgid "Email:"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: woocommerce-ac.php:3403
|
1355 |
msgid "Phone:"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: woocommerce-ac.php:3408
|
1359 |
msgid "Shipping Details"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
+
#: woocommerce-ac.php:3418
|
1363 |
msgid "Shipping Address same as Billing Address"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
+
#: woocommerce-ac.php:3431
|
1367 |
msgid "Shipping Charges"
|
1368 |
msgstr ""
|
1369 |
|
1370 |
+
#: woocommerce-ac.php:3515
|
1371 |
msgid "Template Name:"
|
1372 |
msgstr ""
|
1373 |
|
1374 |
+
#: woocommerce-ac.php:3525
|
1375 |
msgid "Enter a template name for reference"
|
1376 |
msgstr ""
|
1377 |
|
1378 |
+
#: woocommerce-ac.php:3531
|
1379 |
msgid "Subject:"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: woocommerce-ac.php:3541
|
1383 |
msgid "Enter the subject that should appear in the email sent"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: woocommerce-ac.php:3547
|
1387 |
msgid "Email Body:"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: woocommerce-ac.php:3574
|
1391 |
msgid "Message to be sent in the reminder email."
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: woocommerce-ac.php:3601
|
1395 |
msgid "Use WooCommerce Template Style:"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: woocommerce-ac.php:3624
|
1399 |
msgid "Email Template Header Text: "
|
1400 |
msgstr ""
|
1401 |
|
1402 |
+
#: woocommerce-ac.php:3639
|
1403 |
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."
|
1404 |
msgstr ""
|
1405 |
|
1406 |
+
#: woocommerce-ac.php:3645
|
1407 |
msgid "Send this email:"
|
1408 |
msgstr ""
|
1409 |
|
1410 |
+
#: woocommerce-ac.php:3687
|
1411 |
msgid "after cart is abandoned."
|
1412 |
msgstr ""
|
1413 |
|
1414 |
+
#: woocommerce-ac.php:3694
|
1415 |
msgid "Send a test email to:"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
+
#: woocommerce-ac.php:3703
|
1419 |
msgid "Enter the email id to which the test email needs to be sent."
|
1420 |
msgstr ""
|
1421 |
|
1422 |
+
#: woocommerce-ac.php:3717
|
1423 |
msgid "Update Changes"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
+
#: woocommerce-ac.php:3743
|
1427 |
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. :)"
|
1428 |
msgstr ""
|
1429 |
|
1430 |
+
#: woocommerce-ac.php:3795
|
1431 |
msgid "Please enter a valid email."
|
1432 |
msgstr ""
|
1433 |
|
1434 |
+
#: woocommerce-ac.php:3981
|
1435 |
+
#: woocommerce-ac.php:4016
|
1436 |
msgid "Men's Formal Shoes"
|
1437 |
msgstr ""
|
1438 |
|
1439 |
+
#: woocommerce-ac.php:3988
|
1440 |
+
#: woocommerce-ac.php:4023
|
1441 |
msgid "Woman's Hand Bags"
|
1442 |
msgstr ""
|
includes/admin/class-wcap-pro-settings-callbacks.php
CHANGED
@@ -30,7 +30,18 @@ if ( ! class_exists( 'WCAP_Pro_Settings_Callbacks' ) ) {
|
|
30 |
* SMS Settings section.
|
31 |
*/
|
32 |
public static function wcap_sms_settings_section_callback() {
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
/**
|
@@ -103,6 +114,17 @@ if ( ! class_exists( 'WCAP_Pro_Settings_Callbacks' ) ) {
|
|
103 |
* FB Section.
|
104 |
*/
|
105 |
public static function wcap_fb_description() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
$doc_link = 'https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger';
|
107 |
echo wp_kses_post( __( "Configure the plugin to send notifications to Facebook Messenger using the settings below. Please refer the <a href='$doc_link' target='_blank'>following documentation</a> to complete the setup.", 'woocommerce-abandoned-cart' ) ); // phpcs:ignore
|
108 |
}
|
30 |
* SMS Settings section.
|
31 |
*/
|
32 |
public static function wcap_sms_settings_section_callback() {
|
33 |
+
$purchase_link = 'https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite';
|
34 |
+
?>
|
35 |
+
<p style="font-size:16px;">
|
36 |
+
<b><i>
|
37 |
+
<?php
|
38 |
+
// translators: %s Purchase Link.
|
39 |
+
printf( wp_kses_post( __( "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature.", 'woocommerce-abandoned-cart' ) ), esc_url( $purchase_link ) );
|
40 |
+
?>
|
41 |
+
</i></b>
|
42 |
+
</p>
|
43 |
+
<?php
|
44 |
+
echo wp_kses_post( _e( 'Configure your Twilio account settings below. Please note that due to some restrictions from Twilio, customers <i>may sometimes</i> receive delayed messages', 'woocommerce-abandoned-cart' ) );
|
45 |
}
|
46 |
|
47 |
/**
|
114 |
* FB Section.
|
115 |
*/
|
116 |
public static function wcap_fb_description() {
|
117 |
+
$purchase_link = 'https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite';
|
118 |
+
?>
|
119 |
+
<p style="font-size:16px;">
|
120 |
+
<b><i>
|
121 |
+
<?php
|
122 |
+
// translators: %s Purchase Link.
|
123 |
+
printf( wp_kses_post( __( "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the feature.", 'woocommerce-abandoned-cart' ) ), esc_url( $purchase_link ) );
|
124 |
+
?>
|
125 |
+
</i></b>
|
126 |
+
</p>
|
127 |
+
<?php
|
128 |
$doc_link = 'https://www.tychesoftwares.com/docs/docs/abandoned-cart-pro-for-woocommerce/send-abandoned-cart-reminder-notifications-using-facebook-messenger';
|
129 |
echo wp_kses_post( __( "Configure the plugin to send notifications to Facebook Messenger using the settings below. Please refer the <a href='$doc_link' target='_blank'>following documentation</a> to complete the setup.", 'woocommerce-abandoned-cart' ) ); // phpcs:ignore
|
130 |
}
|
includes/admin/class-wcap-pro-settings.php
CHANGED
@@ -70,6 +70,14 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
70 |
<?php
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
/**
|
74 |
* General Settings for AC Pro.
|
75 |
*/
|
@@ -77,13 +85,20 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
77 |
|
78 |
$upgrade_pro_msg = '<br><b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable the setting.</i></b>';
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
add_settings_field(
|
81 |
'ac_cart_abandoned_time_guest',
|
82 |
__( 'Cart abandoned cut-off time for guest users', 'woocommerce-abandoned-cart' ),
|
83 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cart_abandoned_time_guest_callback' ),
|
84 |
'woocommerce_ac_page',
|
85 |
-
'
|
86 |
-
array( __( 'For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed.', 'woocommerce-abandoned-cart' )
|
87 |
);
|
88 |
|
89 |
add_settings_field(
|
@@ -91,8 +106,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
91 |
__( 'Do not track carts of guest users', 'woocommerce-abandoned-cart' ),
|
92 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_guest_cart_email_callback' ),
|
93 |
'woocommerce_ac_page',
|
94 |
-
'
|
95 |
-
array( __( 'Abandoned carts of guest users will not be tracked.', 'woocommerce-abandoned-cart' )
|
96 |
);
|
97 |
|
98 |
add_settings_field(
|
@@ -100,8 +115,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
100 |
__( 'Do not track carts of logged-in users', 'woocommerce-abandoned-cart' ),
|
101 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_logged_in_cart_email_callback' ),
|
102 |
'woocommerce_ac_page',
|
103 |
-
'
|
104 |
-
array( __( 'Abandoned carts of logged-in users will not be tracked.', 'woocommerce-abandoned-cart' )
|
105 |
);
|
106 |
|
107 |
add_settings_field(
|
@@ -109,8 +124,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
109 |
__( 'Send reminder emails for newly abandoned carts after X days of order placement', 'woocommerce-abandoned-cart' ),
|
110 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cart_abandoned_after_x_days_order_placed_callback' ),
|
111 |
'woocommerce_ac_page',
|
112 |
-
'
|
113 |
-
array( __( 'Reminder emails will be sent for newly abandoned carts only after X days of a previously placed order for a user with the same email address as that of the abandoned cart', 'woocommerce-abandoned-cart' )
|
114 |
);
|
115 |
|
116 |
add_settings_field(
|
@@ -118,8 +133,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
118 |
__( 'Capture email address from custom fields.', 'woocommerce-abandoned-cart' ),
|
119 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_capture_email_from_forms' ),
|
120 |
'woocommerce_ac_page',
|
121 |
-
'
|
122 |
-
array( __( 'Enable this setting to capture email address from other form fields.', 'woocommerce-abandoned-cart' )
|
123 |
);
|
124 |
|
125 |
add_settings_field(
|
@@ -127,8 +142,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
127 |
__( 'Class names of the form fields.', 'woocommerce-abandoned-cart' ),
|
128 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_email_forms_classes' ),
|
129 |
'woocommerce_ac_page',
|
130 |
-
'
|
131 |
-
array( __( 'Enter class names of fields separated by commas from where email needs to be captured.', 'woocommerce-abandoned-cart' )
|
132 |
);
|
133 |
|
134 |
add_settings_field(
|
@@ -136,8 +151,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
136 |
__( 'Capture Email address from URL', 'woocommerce-abandoned-cart' ),
|
137 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_capture_email_address_from_url' ),
|
138 |
'woocommerce_ac_page',
|
139 |
-
'
|
140 |
-
array( __( 'If your site URL contain the same key, then it will capture it as an email address of customer.', 'woocommerce-abandoned-cart' )
|
141 |
);
|
142 |
|
143 |
add_settings_field(
|
@@ -145,8 +160,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
145 |
__( 'Remove Data on Uninstall?', 'woocommerce-abandoned-cart' ),
|
146 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_deleting_plugin_data' ),
|
147 |
'woocommerce_ac_page',
|
148 |
-
'
|
149 |
-
array( __( 'Enable this setting if you want to completely remove Abandoned Cart data when plugin is deleted.', 'woocommerce-abandoned-cart' )
|
150 |
);
|
151 |
|
152 |
add_settings_field(
|
@@ -154,8 +169,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
154 |
__( 'Add Product to Cart when Close Icon is clicked?', 'woocommerce-abandoned-cart' ),
|
155 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_atc_close_icon_add_product_to_cart_callback' ),
|
156 |
'woocommerce_ac_page',
|
157 |
-
'
|
158 |
-
array( __( 'Enable this setting if you want the product to the added to cart when the user clicks on the Close Icon in the Add to Cart Popup Modal.', 'woocommerce-abandoned-cart' )
|
159 |
);
|
160 |
|
161 |
add_settings_field(
|
@@ -163,8 +178,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
163 |
__( 'Enable Email Verification:', 'woocommerce-abandoned-cart' ),
|
164 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_debounce_callback' ),
|
165 |
'woocommerce_ac_page',
|
166 |
-
'
|
167 |
-
array( __( 'Enable this checkbox to allow email verification to be done via DeBounce API services.', 'woocommerce-abandoned-cart' )
|
168 |
);
|
169 |
|
170 |
add_settings_field(
|
@@ -172,68 +187,8 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
172 |
__( 'Enter DeBounce API Key', 'woocommerce-abandoned-cart' ),
|
173 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_debounce_api_callback' ),
|
174 |
'woocommerce_ac_page',
|
175 |
-
'
|
176 |
-
array( __( 'Enter DeBounce JS API Key.', 'woocommerce-abandoned-cart' )
|
177 |
-
);
|
178 |
-
|
179 |
-
register_setting(
|
180 |
-
'woocommerce_ac_settings',
|
181 |
-
'ac_enable_cart_emails'
|
182 |
-
);
|
183 |
-
|
184 |
-
register_setting(
|
185 |
-
'woocommerce_ac_settings',
|
186 |
-
'ac_cart_abandoned_time_guest'
|
187 |
-
);
|
188 |
-
|
189 |
-
register_setting(
|
190 |
-
'woocommerce_ac_settings',
|
191 |
-
'ac_disable_guest_cart_email'
|
192 |
-
);
|
193 |
-
|
194 |
-
register_setting(
|
195 |
-
'woocommerce_ac_settings',
|
196 |
-
'ac_disable_logged_in_cart_email'
|
197 |
-
);
|
198 |
-
|
199 |
-
register_setting(
|
200 |
-
'woocommerce_ac_settings',
|
201 |
-
'ac_capture_email_from_forms'
|
202 |
-
);
|
203 |
-
|
204 |
-
register_setting(
|
205 |
-
'woocommerce_ac_settings',
|
206 |
-
'ac_cart_abandoned_after_x_days_order_placed'
|
207 |
-
);
|
208 |
-
|
209 |
-
register_setting(
|
210 |
-
'woocommerce_ac_settings',
|
211 |
-
'ac_email_forms_classes'
|
212 |
-
);
|
213 |
-
|
214 |
-
register_setting(
|
215 |
-
'woocommerce_ac_settings',
|
216 |
-
'ac_capture_email_address_from_url'
|
217 |
-
);
|
218 |
-
|
219 |
-
register_setting(
|
220 |
-
'woocommerce_ac_settings',
|
221 |
-
'wcac_delete_plugin_data'
|
222 |
-
);
|
223 |
-
|
224 |
-
register_setting(
|
225 |
-
'woocommerce_ac_settings',
|
226 |
-
'wcap_atc_close_icon_add_product_to_cart'
|
227 |
-
);
|
228 |
-
|
229 |
-
register_setting(
|
230 |
-
'woocommerce_ac_settings',
|
231 |
-
'wcap_enable_debounce'
|
232 |
-
);
|
233 |
-
|
234 |
-
register_setting(
|
235 |
-
'woocommerce_ac_settings',
|
236 |
-
'ac_debounce_api'
|
237 |
);
|
238 |
|
239 |
add_settings_field(
|
@@ -254,16 +209,6 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
254 |
array( __( 'Select the page where product name in reminder emails should redirect to.', 'woocommerce-ac' ) . $upgrade_pro_msg )
|
255 |
);
|
256 |
|
257 |
-
register_setting(
|
258 |
-
'ac_email_settings_section',
|
259 |
-
'wcap_product_image_size'
|
260 |
-
);
|
261 |
-
|
262 |
-
register_setting(
|
263 |
-
'woocommerce_ac_settings',
|
264 |
-
'wcap_product_name_redirect'
|
265 |
-
);
|
266 |
-
|
267 |
add_settings_section(
|
268 |
'ac_cron_job_settings_section', // ID used to identify this section and with which to register options.
|
269 |
__( 'Setting for sending Emails & SMS using Action Scheduler', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
@@ -277,7 +222,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
277 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_use_auto_cron_callback' ),
|
278 |
'woocommerce_ac_page',
|
279 |
'ac_cron_job_settings_section',
|
280 |
-
array( __( '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.', 'woocommerce-abandoned-cart' )
|
281 |
);
|
282 |
|
283 |
add_settings_field(
|
@@ -286,7 +231,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
286 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cron_time_duration_callback' ),
|
287 |
'woocommerce_ac_page',
|
288 |
'ac_cron_job_settings_section',
|
289 |
-
array( __( 'The duration in minutes after which an action should be automatically scheduled to send email, SMS & FB reminders to customers.', 'woocommerce-abandoned-cart' )
|
290 |
);
|
291 |
|
292 |
add_settings_section(
|
@@ -302,7 +247,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
302 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_ip_address_callback' ),
|
303 |
'woocommerce_ac_page',
|
304 |
'ac_restrict_settings_section',
|
305 |
-
array( __( '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>', 'woocommerce-abandoned-cart' )
|
306 |
);
|
307 |
|
308 |
add_settings_field(
|
@@ -311,7 +256,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
311 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_email_address_callback' ),
|
312 |
'woocommerce_ac_page',
|
313 |
'ac_restrict_settings_section',
|
314 |
-
array( __( 'The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>', 'woocommerce-abandoned-cart' )
|
315 |
);
|
316 |
|
317 |
add_settings_field(
|
@@ -320,7 +265,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
320 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_domain_address_callback' ),
|
321 |
'woocommerce_ac_page',
|
322 |
'ac_restrict_settings_section',
|
323 |
-
array( __( 'The carts abandoned from email addresses with these domains will not be tracked by the plugin. <i>Separate email address domains with commas.</i>', 'woocommerce-abandoned-cart' )
|
324 |
);
|
325 |
|
326 |
add_settings_section(
|
@@ -337,13 +282,9 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
337 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_unsubscribe_landing_page_callback' ),
|
338 |
'woocommerce_ac_page',
|
339 |
'ac_unsubscribe_section',
|
340 |
-
array( __( "Select a source where the user must be redirected when an Unsubscribe link is clicked from reminders sent. For details, please check the <a href='$doc_link' target='_blank'>documentation</a>.", 'woocommerce-abandoned-cart' )
|
341 |
);
|
342 |
|
343 |
-
register_setting(
|
344 |
-
'woocommerce_ac_settings',
|
345 |
-
'wcap_unsubscribe_landing_page'
|
346 |
-
);
|
347 |
}
|
348 |
|
349 |
/**
|
@@ -351,7 +292,6 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
351 |
*/
|
352 |
public static function wcap_sms_settings() {
|
353 |
?>
|
354 |
-
|
355 |
<form method="post" action="options.php">
|
356 |
<?php
|
357 |
settings_fields( 'woocommerce_sms_settings' );
|
@@ -392,8 +332,6 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
392 |
*/
|
393 |
public function wcal_pro_settings() {
|
394 |
|
395 |
-
$upgrade_pro_msg = '<br><b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable the setting.</i></b>';
|
396 |
-
|
397 |
// New Settings for SMS Notifications.
|
398 |
add_settings_section(
|
399 |
'wcap_sms_settings_section', // ID used to identify this section and with which to register options.
|
@@ -408,7 +346,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
408 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_sms_reminders_callback' ),
|
409 |
'woocommerce_ac_sms_page',
|
410 |
'wcap_sms_settings_section',
|
411 |
-
array( __( '<i>Enable the ability to send reminder SMS for abandoned carts.</i>', 'woocommerce-abandoned-cart' )
|
412 |
);
|
413 |
|
414 |
add_settings_field(
|
@@ -417,7 +355,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
417 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_from_phone_callback' ),
|
418 |
'woocommerce_ac_sms_page',
|
419 |
'wcap_sms_settings_section',
|
420 |
-
array( __( '<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>', 'woocommerce-abandoned-cart' )
|
421 |
);
|
422 |
|
423 |
add_settings_field(
|
@@ -426,7 +364,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
426 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_account_sid_callback' ),
|
427 |
'woocommerce_ac_sms_page',
|
428 |
'wcap_sms_settings_section',
|
429 |
-
array(
|
430 |
);
|
431 |
|
432 |
add_settings_field(
|
@@ -435,27 +373,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
435 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_auth_token_callback' ),
|
436 |
'woocommerce_ac_sms_page',
|
437 |
'wcap_sms_settings_section',
|
438 |
-
array(
|
439 |
-
);
|
440 |
-
|
441 |
-
register_setting(
|
442 |
-
'woocommerce_sms_settings',
|
443 |
-
'wcap_enable_sms_reminders'
|
444 |
-
);
|
445 |
-
|
446 |
-
register_setting(
|
447 |
-
'woocommerce_sms_settings',
|
448 |
-
'wcap_sms_from_phone'
|
449 |
-
);
|
450 |
-
|
451 |
-
register_setting(
|
452 |
-
'woocommerce_sms_settings',
|
453 |
-
'wcap_sms_account_sid'
|
454 |
-
);
|
455 |
-
|
456 |
-
register_setting(
|
457 |
-
'woocommerce_sms_settings',
|
458 |
-
'wcap_sms_auth_token'
|
459 |
);
|
460 |
|
461 |
add_settings_section(
|
@@ -471,7 +389,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
471 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
|
472 |
'woocommerce_ac_fb_page',
|
473 |
'wcap_fb_settings_section',
|
474 |
-
array( wp_kses_post( __( '<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>', 'woocommerce-abandoned-cart' ), 'wcap_enable_fb_reminders' )
|
475 |
);
|
476 |
|
477 |
add_settings_field(
|
@@ -480,7 +398,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
480 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
|
481 |
'woocommerce_ac_fb_page',
|
482 |
'wcap_fb_settings_section',
|
483 |
-
array( wp_kses_post( __( '<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>', 'woocommerce-abandoned-cart' ), 'wcap_enable_fb_reminders_popup' )
|
484 |
);
|
485 |
|
486 |
add_settings_field(
|
@@ -490,7 +408,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
490 |
'woocommerce_ac_fb_page',
|
491 |
'wcap_fb_settings_section',
|
492 |
array(
|
493 |
-
__( '<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>', 'woocommerce-abandoned-cart' )
|
494 |
'wcap_fb_user_icon',
|
495 |
array(
|
496 |
'small' => __( 'Small', 'woocommerce-abandoned-cart' ),
|
@@ -508,7 +426,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
508 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
509 |
'woocommerce_ac_fb_page',
|
510 |
'wcap_fb_settings_section',
|
511 |
-
array( __( '<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>', 'woocommerce-abandoned-cart' )
|
512 |
);
|
513 |
|
514 |
add_settings_field(
|
@@ -517,7 +435,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
517 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
518 |
'woocommerce_ac_fb_page',
|
519 |
'wcap_fb_settings_section',
|
520 |
-
array( __( "<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>", 'woocommerce-abandoned-cart' )
|
521 |
);
|
522 |
|
523 |
add_settings_field(
|
@@ -526,7 +444,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
526 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
527 |
'woocommerce_ac_fb_page',
|
528 |
'wcap_fb_settings_section',
|
529 |
-
array( __( '<i>Enter your Messenger App ID</i>', 'woocommerce-abandoned-cart' )
|
530 |
);
|
531 |
|
532 |
add_settings_field(
|
@@ -535,7 +453,7 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
535 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
536 |
'woocommerce_ac_fb_page',
|
537 |
'wcap_fb_settings_section',
|
538 |
-
array( __( '<i>Enter your Facebook Page Token</i>', 'woocommerce-abandoned-cart' )
|
539 |
);
|
540 |
|
541 |
add_settings_field(
|
@@ -544,49 +462,28 @@ if ( ! class_exists( 'WCAP_Pro_Settings' ) ) {
|
|
544 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
545 |
'woocommerce_ac_fb_page',
|
546 |
'wcap_fb_settings_section',
|
547 |
-
array( __( '<i>Enter your Verify Token</i>', 'woocommerce-abandoned-cart' )
|
548 |
-
);
|
549 |
-
|
550 |
-
register_setting(
|
551 |
-
'woocommerce_fb_settings',
|
552 |
-
'wcap_enable_fb_reminders'
|
553 |
-
);
|
554 |
-
|
555 |
-
register_setting(
|
556 |
-
'woocommerce_fb_settings',
|
557 |
-
'wcap_enable_fb_reminders_popup'
|
558 |
-
);
|
559 |
-
|
560 |
-
register_setting(
|
561 |
-
'woocommerce_fb_settings',
|
562 |
-
'wcap_fb_consent_text'
|
563 |
);
|
564 |
|
565 |
-
|
566 |
-
'woocommerce_fb_settings',
|
567 |
-
'wcap_fb_page_id'
|
568 |
-
);
|
569 |
-
|
570 |
-
register_setting(
|
571 |
-
'woocommerce_fb_settings',
|
572 |
-
'wcap_fb_user_icon'
|
573 |
-
);
|
574 |
-
|
575 |
-
register_setting(
|
576 |
-
'woocommerce_fb_settings',
|
577 |
-
'wcap_fb_app_id'
|
578 |
-
);
|
579 |
-
|
580 |
-
register_setting(
|
581 |
-
'woocommerce_fb_settings',
|
582 |
-
'wcap_fb_page_token'
|
583 |
-
);
|
584 |
-
|
585 |
-
register_setting(
|
586 |
-
'woocommerce_fb_settings',
|
587 |
-
'wcap_fb_verify_token'
|
588 |
-
);
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
}
|
591 |
|
592 |
} // end of class.
|
70 |
<?php
|
71 |
}
|
72 |
|
73 |
+
/**
|
74 |
+
* Connector tab.
|
75 |
+
*
|
76 |
+
* @since 5.12.0
|
77 |
+
*/
|
78 |
+
public static function wcap_connectors() {
|
79 |
+
Wcap_Integrations::wcap_integrations_main();
|
80 |
+
}
|
81 |
/**
|
82 |
* General Settings for AC Pro.
|
83 |
*/
|
85 |
|
86 |
$upgrade_pro_msg = '<br><b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable the setting.</i></b>';
|
87 |
|
88 |
+
add_settings_section(
|
89 |
+
'ac_lite_pro_settings', // ID used to identify this section and with which to register options.
|
90 |
+
__( 'Pro Version Settings', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
91 |
+
array( 'WCAP_Pro_Settings', 'ac_lite_pro_callback' ), // Callback used to render the description of the section.
|
92 |
+
'woocommerce_ac_page' // Page on which to add this section of options.
|
93 |
+
);
|
94 |
+
|
95 |
add_settings_field(
|
96 |
'ac_cart_abandoned_time_guest',
|
97 |
__( 'Cart abandoned cut-off time for guest users', 'woocommerce-abandoned-cart' ),
|
98 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cart_abandoned_time_guest_callback' ),
|
99 |
'woocommerce_ac_page',
|
100 |
+
'ac_lite_pro_settings',
|
101 |
+
array( __( 'For guest users & visitors consider cart abandoned after X minutes of item being added to cart & order not placed.', 'woocommerce-abandoned-cart' ) )
|
102 |
);
|
103 |
|
104 |
add_settings_field(
|
106 |
__( 'Do not track carts of guest users', 'woocommerce-abandoned-cart' ),
|
107 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_guest_cart_email_callback' ),
|
108 |
'woocommerce_ac_page',
|
109 |
+
'ac_lite_pro_settings',
|
110 |
+
array( __( 'Abandoned carts of guest users will not be tracked.', 'woocommerce-abandoned-cart' ) )
|
111 |
);
|
112 |
|
113 |
add_settings_field(
|
115 |
__( 'Do not track carts of logged-in users', 'woocommerce-abandoned-cart' ),
|
116 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_disable_logged_in_cart_email_callback' ),
|
117 |
'woocommerce_ac_page',
|
118 |
+
'ac_lite_pro_settings',
|
119 |
+
array( __( 'Abandoned carts of logged-in users will not be tracked.', 'woocommerce-abandoned-cart' ) )
|
120 |
);
|
121 |
|
122 |
add_settings_field(
|
124 |
__( 'Send reminder emails for newly abandoned carts after X days of order placement', 'woocommerce-abandoned-cart' ),
|
125 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cart_abandoned_after_x_days_order_placed_callback' ),
|
126 |
'woocommerce_ac_page',
|
127 |
+
'ac_lite_pro_settings',
|
128 |
+
array( __( 'Reminder emails will be sent for newly abandoned carts only after X days of a previously placed order for a user with the same email address as that of the abandoned cart', 'woocommerce-abandoned-cart' ) )
|
129 |
);
|
130 |
|
131 |
add_settings_field(
|
133 |
__( 'Capture email address from custom fields.', 'woocommerce-abandoned-cart' ),
|
134 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_capture_email_from_forms' ),
|
135 |
'woocommerce_ac_page',
|
136 |
+
'ac_lite_pro_settings',
|
137 |
+
array( __( 'Enable this setting to capture email address from other form fields.', 'woocommerce-abandoned-cart' ) )
|
138 |
);
|
139 |
|
140 |
add_settings_field(
|
142 |
__( 'Class names of the form fields.', 'woocommerce-abandoned-cart' ),
|
143 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_email_forms_classes' ),
|
144 |
'woocommerce_ac_page',
|
145 |
+
'ac_lite_pro_settings',
|
146 |
+
array( __( 'Enter class names of fields separated by commas from where email needs to be captured.', 'woocommerce-abandoned-cart' ) )
|
147 |
);
|
148 |
|
149 |
add_settings_field(
|
151 |
__( 'Capture Email address from URL', 'woocommerce-abandoned-cart' ),
|
152 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_capture_email_address_from_url' ),
|
153 |
'woocommerce_ac_page',
|
154 |
+
'ac_lite_pro_settings',
|
155 |
+
array( __( 'If your site URL contain the same key, then it will capture it as an email address of customer.', 'woocommerce-abandoned-cart' ) )
|
156 |
);
|
157 |
|
158 |
add_settings_field(
|
160 |
__( 'Remove Data on Uninstall?', 'woocommerce-abandoned-cart' ),
|
161 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_deleting_plugin_data' ),
|
162 |
'woocommerce_ac_page',
|
163 |
+
'ac_lite_pro_settings',
|
164 |
+
array( __( 'Enable this setting if you want to completely remove Abandoned Cart data when plugin is deleted.', 'woocommerce-abandoned-cart' ) )
|
165 |
);
|
166 |
|
167 |
add_settings_field(
|
169 |
__( 'Add Product to Cart when Close Icon is clicked?', 'woocommerce-abandoned-cart' ),
|
170 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_atc_close_icon_add_product_to_cart_callback' ),
|
171 |
'woocommerce_ac_page',
|
172 |
+
'ac_lite_pro_settings',
|
173 |
+
array( __( 'Enable this setting if you want the product to the added to cart when the user clicks on the Close Icon in the Add to Cart Popup Modal.', 'woocommerce-abandoned-cart' ) )
|
174 |
);
|
175 |
|
176 |
add_settings_field(
|
178 |
__( 'Enable Email Verification:', 'woocommerce-abandoned-cart' ),
|
179 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_debounce_callback' ),
|
180 |
'woocommerce_ac_page',
|
181 |
+
'ac_lite_pro_settings',
|
182 |
+
array( __( 'Enable this checkbox to allow email verification to be done via DeBounce API services.', 'woocommerce-abandoned-cart' ) )
|
183 |
);
|
184 |
|
185 |
add_settings_field(
|
187 |
__( 'Enter DeBounce API Key', 'woocommerce-abandoned-cart' ),
|
188 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_debounce_api_callback' ),
|
189 |
'woocommerce_ac_page',
|
190 |
+
'ac_lite_pro_settings',
|
191 |
+
array( __( 'Enter DeBounce JS API Key.', 'woocommerce-abandoned-cart' ) )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
);
|
193 |
|
194 |
add_settings_field(
|
209 |
array( __( 'Select the page where product name in reminder emails should redirect to.', 'woocommerce-ac' ) . $upgrade_pro_msg )
|
210 |
);
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
add_settings_section(
|
213 |
'ac_cron_job_settings_section', // ID used to identify this section and with which to register options.
|
214 |
__( 'Setting for sending Emails & SMS using Action Scheduler', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
222 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_use_auto_cron_callback' ),
|
223 |
'woocommerce_ac_page',
|
224 |
'ac_cron_job_settings_section',
|
225 |
+
array( __( '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.', 'woocommerce-abandoned-cart' ) )
|
226 |
);
|
227 |
|
228 |
add_settings_field(
|
231 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_cron_time_duration_callback' ),
|
232 |
'woocommerce_ac_page',
|
233 |
'ac_cron_job_settings_section',
|
234 |
+
array( __( 'The duration in minutes after which an action should be automatically scheduled to send email, SMS & FB reminders to customers.', 'woocommerce-abandoned-cart' ) )
|
235 |
);
|
236 |
|
237 |
add_settings_section(
|
247 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_ip_address_callback' ),
|
248 |
'woocommerce_ac_page',
|
249 |
'ac_restrict_settings_section',
|
250 |
+
array( __( '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>', 'woocommerce-abandoned-cart' ) )
|
251 |
);
|
252 |
|
253 |
add_settings_field(
|
256 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_email_address_callback' ),
|
257 |
'woocommerce_ac_page',
|
258 |
'ac_restrict_settings_section',
|
259 |
+
array( __( 'The carts abandoned using these email addresses will not be tracked by the plugin. <i>Separate email addresses with commas.</i>', 'woocommerce-abandoned-cart' ) )
|
260 |
);
|
261 |
|
262 |
add_settings_field(
|
265 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_restrict_domain_address_callback' ),
|
266 |
'woocommerce_ac_page',
|
267 |
'ac_restrict_settings_section',
|
268 |
+
array( __( 'The carts abandoned from email addresses with these domains will not be tracked by the plugin. <i>Separate email address domains with commas.</i>', 'woocommerce-abandoned-cart' ) )
|
269 |
);
|
270 |
|
271 |
add_settings_section(
|
282 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_unsubscribe_landing_page_callback' ),
|
283 |
'woocommerce_ac_page',
|
284 |
'ac_unsubscribe_section',
|
285 |
+
array( __( "Select a source where the user must be redirected when an Unsubscribe link is clicked from reminders sent. For details, please check the <a href='$doc_link' target='_blank'>documentation</a>.", 'woocommerce-abandoned-cart' ) ) // phpcs:ignore
|
286 |
);
|
287 |
|
|
|
|
|
|
|
|
|
288 |
}
|
289 |
|
290 |
/**
|
292 |
*/
|
293 |
public static function wcap_sms_settings() {
|
294 |
?>
|
|
|
295 |
<form method="post" action="options.php">
|
296 |
<?php
|
297 |
settings_fields( 'woocommerce_sms_settings' );
|
332 |
*/
|
333 |
public function wcal_pro_settings() {
|
334 |
|
|
|
|
|
335 |
// New Settings for SMS Notifications.
|
336 |
add_settings_section(
|
337 |
'wcap_sms_settings_section', // ID used to identify this section and with which to register options.
|
346 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_enable_sms_reminders_callback' ),
|
347 |
'woocommerce_ac_sms_page',
|
348 |
'wcap_sms_settings_section',
|
349 |
+
array( __( '<i>Enable the ability to send reminder SMS for abandoned carts.</i>', 'woocommerce-abandoned-cart' ) ) // phpcs:ignore
|
350 |
);
|
351 |
|
352 |
add_settings_field(
|
355 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_from_phone_callback' ),
|
356 |
'woocommerce_ac_sms_page',
|
357 |
'wcap_sms_settings_section',
|
358 |
+
array( __( '<i>Must be a Twilio phone number (in E.164 format) or alphanumeric sender ID.</i>', 'woocommerce-abandoned-cart' ) ) // phpcs:ignore
|
359 |
);
|
360 |
|
361 |
add_settings_field(
|
364 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_account_sid_callback' ),
|
365 |
'woocommerce_ac_sms_page',
|
366 |
'wcap_sms_settings_section',
|
367 |
+
array( '' )
|
368 |
);
|
369 |
|
370 |
add_settings_field(
|
373 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_sms_auth_token_callback' ),
|
374 |
'woocommerce_ac_sms_page',
|
375 |
'wcap_sms_settings_section',
|
376 |
+
array( '' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
);
|
378 |
|
379 |
add_settings_section(
|
389 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
|
390 |
'woocommerce_ac_fb_page',
|
391 |
'wcap_fb_settings_section',
|
392 |
+
array( wp_kses_post( __( '<i>This option will display a checkbox after the Add to cart button for user consent to connect with Facebook.</i>', 'woocommerce-abandoned-cart' ), 'wcap_enable_fb_reminders' ) ) // phpcs:ignore
|
393 |
);
|
394 |
|
395 |
add_settings_field(
|
398 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_checkbox_callback' ),
|
399 |
'woocommerce_ac_fb_page',
|
400 |
'wcap_fb_settings_section',
|
401 |
+
array( wp_kses_post( __( '<i>This option will display a checkbox on the pop-up modal to connect with Facebook.</i>', 'woocommerce-abandoned-cart' ), 'wcap_enable_fb_reminders_popup' ) ) // phpcs:ignore
|
402 |
);
|
403 |
|
404 |
add_settings_field(
|
408 |
'woocommerce_ac_fb_page',
|
409 |
'wcap_fb_settings_section',
|
410 |
array(
|
411 |
+
__( '<i>Select the size of user icon which shall be displayed below the checkbox in case the user is logged in.</i>', 'woocommerce-abandoned-cart' ), // phpcs:ignore
|
412 |
'wcap_fb_user_icon',
|
413 |
array(
|
414 |
'small' => __( 'Small', 'woocommerce-abandoned-cart' ),
|
426 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
427 |
'woocommerce_ac_fb_page',
|
428 |
'wcap_fb_settings_section',
|
429 |
+
array( __( '<i>Text that will appear above the consent checkbox. HTML tags are also allowed.</i>', 'woocommerce-abandoned-cart' ), 'wcap_fb_consent_text' ) // phpcs:ignore
|
430 |
);
|
431 |
|
432 |
add_settings_field(
|
435 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
436 |
'woocommerce_ac_fb_page',
|
437 |
'wcap_fb_settings_section',
|
438 |
+
array( __( "<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>", 'woocommerce-abandoned-cart' ), 'wcap_fb_page_id' )
|
439 |
);
|
440 |
|
441 |
add_settings_field(
|
444 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
445 |
'woocommerce_ac_fb_page',
|
446 |
'wcap_fb_settings_section',
|
447 |
+
array( __( '<i>Enter your Messenger App ID</i>', 'woocommerce-abandoned-cart' ), 'wcap_fb_app_id' ) // phpcs:ignore
|
448 |
);
|
449 |
|
450 |
add_settings_field(
|
453 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
454 |
'woocommerce_ac_fb_page',
|
455 |
'wcap_fb_settings_section',
|
456 |
+
array( __( '<i>Enter your Facebook Page Token</i>', 'woocommerce-abandoned-cart' ), 'wcap_fb_page_token' ) // phpcs:ignore
|
457 |
);
|
458 |
|
459 |
add_settings_field(
|
462 |
array( 'WCAP_Pro_Settings_Callbacks', 'wcap_fb_text_callback' ),
|
463 |
'woocommerce_ac_fb_page',
|
464 |
'wcap_fb_settings_section',
|
465 |
+
array( __( '<i>Enter your Verify Token</i>', 'woocommerce-abandoned-cart' ), 'wcap_fb_verify_token' ) // phpcs:ignore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
);
|
467 |
|
468 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
|
470 |
+
/**
|
471 |
+
* Callback Pro Settings section.
|
472 |
+
*
|
473 |
+
* @since 5.12.0
|
474 |
+
*/
|
475 |
+
public static function ac_lite_pro_callback() {
|
476 |
+
$purchase_link = 'https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite';
|
477 |
+
?>
|
478 |
+
<p style='font-size:16px;'>
|
479 |
+
<strong><i>
|
480 |
+
<?php
|
481 |
+
// translators: Link to purchase Pro version.
|
482 |
+
printf( wp_kses_post( __( "Upgrade to <a href='%s' target='_blank'>Abandoned Cart Pro for WooCommerce</a> to enable the settings shown below.", 'woocommerce-abandoned-cart' ) ), esc_url( $purchase_link ) );
|
483 |
+
?>
|
484 |
+
</i></strong>
|
485 |
+
</p>
|
486 |
+
<?php
|
487 |
}
|
488 |
|
489 |
} // end of class.
|
includes/class-wcal-common.php
CHANGED
@@ -999,6 +999,7 @@ class wcal_common { // phpcs:ignore
|
|
999 |
switch ( $active->day_or_hour ) {
|
1000 |
case 'Minutes':
|
1001 |
$template_freq = $active->frequency * 60;
|
|
|
1002 |
case 'Days':
|
1003 |
$template_freq = $active->frequency * $day_seconds;
|
1004 |
break;
|
@@ -1010,7 +1011,7 @@ class wcal_common { // phpcs:ignore
|
|
1010 |
if ( ! isset( $template_freq ) ) {
|
1011 |
continue;
|
1012 |
}
|
1013 |
-
|
1014 |
$list_frequencies[ $active->id ] = (int) $template_freq;
|
1015 |
}
|
1016 |
|
@@ -1433,4 +1434,131 @@ class wcal_common { // phpcs:ignore
|
|
1433 |
}
|
1434 |
}
|
1435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1436 |
}
|
999 |
switch ( $active->day_or_hour ) {
|
1000 |
case 'Minutes':
|
1001 |
$template_freq = $active->frequency * 60;
|
1002 |
+
break;
|
1003 |
case 'Days':
|
1004 |
$template_freq = $active->frequency * $day_seconds;
|
1005 |
break;
|
1011 |
if ( ! isset( $template_freq ) ) {
|
1012 |
continue;
|
1013 |
}
|
1014 |
+
|
1015 |
$list_frequencies[ $active->id ] = (int) $template_freq;
|
1016 |
}
|
1017 |
|
1434 |
}
|
1435 |
}
|
1436 |
|
1437 |
+
/**
|
1438 |
+
* Get the post meta data for AC Coupons.
|
1439 |
+
*
|
1440 |
+
* @param int $cart_id - Abandoned Cart ID.
|
1441 |
+
* @return array $return_coupons Return Coupon data.
|
1442 |
+
* @since 5.12.0
|
1443 |
+
*/
|
1444 |
+
public static function wcal_get_coupon_post_meta( $cart_id ) {
|
1445 |
+
|
1446 |
+
// Fetch the record from the DB.
|
1447 |
+
$get_coupons = get_post_meta( $cart_id, '_woocommerce_ac_coupon', true );
|
1448 |
+
|
1449 |
+
// Create a return array.
|
1450 |
+
$return_coupons = array();
|
1451 |
+
|
1452 |
+
// If any coupon have been applied, populate them in the return array.
|
1453 |
+
if ( is_array( $get_coupons ) && count( $get_coupons ) > 0 ) {
|
1454 |
+
foreach ( $get_coupons as $coupon_data ) {
|
1455 |
+
$coupon_msg = '';
|
1456 |
+
$coupon_code = '';
|
1457 |
+
if ( isset( $coupon_data['coupon_code'] ) ) {
|
1458 |
+
$coupon_code = $coupon_data['coupon_code'];
|
1459 |
+
}
|
1460 |
+
if ( isset( $coupon_data['coupon_message'] ) ) {
|
1461 |
+
$coupon_msg = $coupon_data['coupon_message'];
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
if ( '' !== $coupon_code && ! in_array( $coupon_code, $return_coupons, true ) ) {
|
1465 |
+
$return_coupons[ $coupon_code ] = $coupon_msg;
|
1466 |
+
}
|
1467 |
+
}
|
1468 |
+
}
|
1469 |
+
return $return_coupons;
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
/**
|
1473 |
+
* Add a scheduled action for the webhok to be delivered once the cart cut off is reached.
|
1474 |
+
*
|
1475 |
+
* @param int $cart_id - Abandoned Cart ID.
|
1476 |
+
* @since 5.12.0
|
1477 |
+
*/
|
1478 |
+
public static function wcal_run_webhook_after_cutoff( $cart_id ) {
|
1479 |
+
// check if the Webhook is present & active.
|
1480 |
+
global $wpdb;
|
1481 |
+
|
1482 |
+
$get_webhook_status = $wpdb->get_var( // phpcs:ignore
|
1483 |
+
$wpdb->prepare(
|
1484 |
+
'SELECT status FROM `' . $wpdb->prefix . 'wc_webhooks` WHERE topic = %s',
|
1485 |
+
'wcap_cart.cutoff'
|
1486 |
+
)
|
1487 |
+
);
|
1488 |
+
|
1489 |
+
if ( isset( $get_webhook_status ) && 'active' === $get_webhook_status ) {
|
1490 |
+
// Reconfirm that the cart is either a registered user cart or a guest cart. The webhook will not be run for visitor carts.
|
1491 |
+
$cart_data = $wpdb->get_results( // phpcs:ignore
|
1492 |
+
$wpdb->prepare(
|
1493 |
+
'SELECT user_id, user_type, cart_ignored, recovered_cart FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` WHERE id = %d',
|
1494 |
+
$cart_id
|
1495 |
+
)
|
1496 |
+
);
|
1497 |
+
|
1498 |
+
$user_id = isset( $cart_data[0]->user_id ) ? $cart_data[0]->user_id : 0;
|
1499 |
+
$user_type = isset( $cart_data[0]->user_type ) ? $cart_data[0]->user_type : '';
|
1500 |
+
|
1501 |
+
if ( $user_id > 0 && '' != $user_type && '0' == $cart_data[0]->cart_ignored && $cart_data[0]->recovered_cart <= 0 ) { // phpcs:ignore
|
1502 |
+
$cut_off = is_numeric( get_option( 'ac_lite_cart_abandoned_time', 10 ) ) ? get_option( 'ac_lite_cart_abandoned_time', 10 ) * 60 : 10 * 60;
|
1503 |
+
|
1504 |
+
if ( $cut_off > 0 && ! as_has_scheduled_action( 'wcap_webhook_after_cutoff', array( 'id' => (int) $cart_id ) ) ) {
|
1505 |
+
// run the hook.
|
1506 |
+
as_schedule_single_action( time() + $cut_off, 'wcap_webhook_after_cutoff', array( 'id' => (int) $cart_id ) );
|
1507 |
+
}
|
1508 |
+
}
|
1509 |
+
}
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
/**
|
1513 |
+
* Update Checkout Link in cart history table.
|
1514 |
+
*
|
1515 |
+
* @param int $cart_id - Cart ID.
|
1516 |
+
* @since 8.7.0
|
1517 |
+
*/
|
1518 |
+
public static function wcal_add_checkout_link( $cart_id ) {
|
1519 |
+
|
1520 |
+
global $wpdb;
|
1521 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.3' ) < 0 ) {
|
1522 |
+
global $woocommerce;
|
1523 |
+
$checkout_page_link = $woocommerce->cart->get_checkout_url();
|
1524 |
+
} else {
|
1525 |
+
$checkout_page_id = wc_get_page_id( 'checkout' );
|
1526 |
+
$checkout_page_link = $checkout_page_id ? get_permalink( $checkout_page_id ) : '';
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
// Force SSL if needed.
|
1530 |
+
$ssl_is_used = is_ssl() ? true : false;
|
1531 |
+
|
1532 |
+
if ( true === $ssl_is_used || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
|
1533 |
+
$checkout_page_link = str_ireplace( 'http:', 'https:', $checkout_page_link );
|
1534 |
+
}
|
1535 |
+
|
1536 |
+
$encoding_checkout = $cart_id . '&url=' . $checkout_page_link;
|
1537 |
+
$validate_checkout = Wcal_Common::wcal_encrypt_validate( $encoding_checkout );
|
1538 |
+
|
1539 |
+
$checkout_link = get_option( 'siteurl' ) . '/?wcal_action=checkout_link&validate=' . $validate_checkout;
|
1540 |
+
|
1541 |
+
$wpdb->update( // phpcs:ignore
|
1542 |
+
$wpdb->prefix . 'ac_abandoned_cart_history_lite',
|
1543 |
+
array(
|
1544 |
+
'checkout_link' => $checkout_link,
|
1545 |
+
),
|
1546 |
+
array(
|
1547 |
+
'id' => $cart_id,
|
1548 |
+
)
|
1549 |
+
);
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
/**
|
1553 |
+
* This function is used to encode the string.
|
1554 |
+
*
|
1555 |
+
* @param string $validate String need to encrypt.
|
1556 |
+
* @return string $validate_encoded Encrypted string.
|
1557 |
+
* @since 1.3
|
1558 |
+
*/
|
1559 |
+
public static function wcal_encrypt_validate( $validate ) {
|
1560 |
+
$crypt_key = get_option( 'wcal_security_key' );
|
1561 |
+
$validate_encoded = Wcal_Aes_Ctr::encrypt( $validate, $crypt_key, 256 );
|
1562 |
+
return( $validate_encoded );
|
1563 |
+
}
|
1564 |
}
|
includes/class-wcal-guest-ac.php
CHANGED
@@ -60,19 +60,28 @@ if ( ! class_exists( 'Wcal_Guest_Ac' ) ) {
|
|
60 |
WCAL_PLUGIN_VERSION,
|
61 |
true
|
62 |
);
|
63 |
-
|
64 |
-
$guest_msg
|
65 |
|
66 |
$session_gdpr = wcal_common::wcal_get_cart_session( 'wcal_cart_tracking_refused' );
|
67 |
$show_gdpr = isset( $session_gdpr ) && 'yes' == $session_gdpr ? false : true; // phpcs:ignore
|
68 |
|
69 |
$vars = array();
|
70 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
$vars = array(
|
72 |
'_show_gdpr_message' => $show_gdpr,
|
73 |
-
'_gdpr_message' => htmlspecialchars(
|
74 |
-
'_gdpr_nothanks_msg' => htmlspecialchars(
|
75 |
-
'_gdpr_after_no_thanks_msg' => htmlspecialchars(
|
76 |
'enable_ca_tracking' => true,
|
77 |
);
|
78 |
}
|
@@ -283,7 +292,8 @@ if ( ! class_exists( 'Wcal_Guest_Ac' ) ) {
|
|
283 |
|
284 |
$abandoned_cart_id = $wpdb->insert_id;
|
285 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
286 |
-
|
|
|
287 |
if ( is_multisite() ) {
|
288 |
// get main site's table prefix.
|
289 |
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
@@ -330,6 +340,8 @@ if ( ! class_exists( 'Wcal_Guest_Ac' ) ) {
|
|
330 |
if ( count( $get_abandoned_record ) > 0 ) {
|
331 |
$abandoned_cart_id = $get_abandoned_record[0]->id;
|
332 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
|
|
|
|
333 |
}
|
334 |
|
335 |
$wpdb->query( // phpcs:ignore
|
60 |
WCAL_PLUGIN_VERSION,
|
61 |
true
|
62 |
);
|
63 |
+
$enable_gdpr = get_option( 'wcal_enable_gdpr_consent', '' );
|
64 |
+
$guest_msg = get_option( 'wcal_guest_cart_capture_msg' );
|
65 |
|
66 |
$session_gdpr = wcal_common::wcal_get_cart_session( 'wcal_cart_tracking_refused' );
|
67 |
$show_gdpr = isset( $session_gdpr ) && 'yes' == $session_gdpr ? false : true; // phpcs:ignore
|
68 |
|
69 |
$vars = array();
|
70 |
+
if ( 'on' === $enable_gdpr ) {
|
71 |
+
$display_msg = isset( $guest_msg ) && '' !== $guest_msg ? $guest_msg : __( 'Saving your email and cart details helps us keep you up to date with this order.', 'woocommerce-abandoned-cart' );
|
72 |
+
$display_msg = apply_filters( 'wcal_gdpr_email_consent_guest_users', $display_msg );
|
73 |
+
|
74 |
+
$no_thanks = get_option( 'wcal_gdpr_allow_opt_out', '' );
|
75 |
+
$no_thanks = apply_filters( 'wcal_gdpr_opt_out_text', $no_thanks );
|
76 |
+
|
77 |
+
$opt_out_confirmation_msg = get_option( 'wcal_gdpr_opt_out_message', '' );
|
78 |
+
$opt_out_confirmation_msg = apply_filters( 'wcal_gdpr_opt_out_confirmation_text', $opt_out_confirmation_msg );
|
79 |
+
|
80 |
$vars = array(
|
81 |
'_show_gdpr_message' => $show_gdpr,
|
82 |
+
'_gdpr_message' => htmlspecialchars( $display_msg, ENT_QUOTES ),
|
83 |
+
'_gdpr_nothanks_msg' => htmlspecialchars( $no_thanks, ENT_QUOTES ),
|
84 |
+
'_gdpr_after_no_thanks_msg' => htmlspecialchars( $opt_out_confirmation_msg, ENT_QUOTES ),
|
85 |
'enable_ca_tracking' => true,
|
86 |
);
|
87 |
}
|
292 |
|
293 |
$abandoned_cart_id = $wpdb->insert_id;
|
294 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
295 |
+
wcal_common::wcal_add_checkout_link( $abandoned_cart_id );
|
296 |
+
wcal_common::wcal_run_webhook_after_cutoff( $abandoned_cart_id );
|
297 |
if ( is_multisite() ) {
|
298 |
// get main site's table prefix.
|
299 |
$main_prefix = $wpdb->get_blog_prefix( 1 );
|
340 |
if ( count( $get_abandoned_record ) > 0 ) {
|
341 |
$abandoned_cart_id = $get_abandoned_record[0]->id;
|
342 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
343 |
+
wcal_common::wcal_add_checkout_link( $abandoned_cart_id );
|
344 |
+
wcal_common::wcal_run_webhook_after_cutoff( $abandoned_cart_id );
|
345 |
}
|
346 |
|
347 |
$wpdb->query( // phpcs:ignore
|
includes/class-wcal-tracking-msg.php
CHANGED
@@ -41,12 +41,12 @@ if ( ! class_exists( 'Wcal_Tracking_Msg' ) ) {
|
|
41 |
|
42 |
$registered_msg = get_option( 'wcal_logged_cart_capture_msg', '' );
|
43 |
$gdpr_consent = get_user_meta( get_current_user_id(), 'wcal_gdpr_tracking_choice', true );
|
44 |
-
|
45 |
if ( '' === $gdpr_consent ) {
|
46 |
$gdpr_consent = true;
|
47 |
}
|
48 |
|
49 |
-
if (
|
50 |
wp_enqueue_script(
|
51 |
'wcal_registered_capture',
|
52 |
plugins_url( '../assets/js/wcal_registered_user_capture.js', __FILE__ ),
|
@@ -54,9 +54,11 @@ if ( ! class_exists( 'Wcal_Tracking_Msg' ) ) {
|
|
54 |
WCAL_PLUGIN_VERSION,
|
55 |
true
|
56 |
);
|
|
|
|
|
57 |
|
58 |
$vars = array(
|
59 |
-
'_gdpr_after_no_thanks_msg' => htmlspecialchars(
|
60 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
61 |
);
|
62 |
|
@@ -66,8 +68,13 @@ if ( ! class_exists( 'Wcal_Tracking_Msg' ) ) {
|
|
66 |
$vars
|
67 |
);
|
68 |
|
69 |
-
$registered_msg
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
}
|
41 |
|
42 |
$registered_msg = get_option( 'wcal_logged_cart_capture_msg', '' );
|
43 |
$gdpr_consent = get_user_meta( get_current_user_id(), 'wcal_gdpr_tracking_choice', true );
|
44 |
+
$enable_gdpr = get_option( 'wcal_enable_gdpr_consent', '' );
|
45 |
if ( '' === $gdpr_consent ) {
|
46 |
$gdpr_consent = true;
|
47 |
}
|
48 |
|
49 |
+
if ( 'on' === $enable_gdpr && $gdpr_consent ) {
|
50 |
wp_enqueue_script(
|
51 |
'wcal_registered_capture',
|
52 |
plugins_url( '../assets/js/wcal_registered_user_capture.js', __FILE__ ),
|
54 |
WCAL_PLUGIN_VERSION,
|
55 |
true
|
56 |
);
|
57 |
+
$opt_out_confirmation_msg = get_option( 'wcal_gdpr_opt_out_message', '' );
|
58 |
+
$opt_out_confirmation_msg = apply_filters( 'wcal_gdpr_opt_out_confirmation_text', $opt_out_confirmation_msg );
|
59 |
|
60 |
$vars = array(
|
61 |
+
'_gdpr_after_no_thanks_msg' => htmlspecialchars( $opt_out_confirmation_msg, ENT_QUOTES ),
|
62 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
63 |
);
|
64 |
|
68 |
$vars
|
69 |
);
|
70 |
|
71 |
+
$display_msg = isset( $registered_msg ) && '' !== $registered_msg ? $registered_msg : __( 'Saving your email and cart details helps us keep you up to date with this order.', 'woocommerce-abandoned-cart' );
|
72 |
+
$display_msg = apply_filters( 'wcal_gdpr_email_consent_registered_users', $display_msg );
|
73 |
+
|
74 |
+
$no_thanks = get_option( 'wcal_gdpr_allow_opt_out', '' );
|
75 |
+
$no_thanks = apply_filters( 'wcal_gdpr_opt_out_text', $no_thanks );
|
76 |
+
$display_msg .= " <span id='wcal_gdpr_no_thanks'><a style='cursor: pointer; text-decoration:none;' id='wcal_gdpr_no_thanks'>" . htmlspecialchars( $no_thanks, ENT_QUOTES ) . '</a></span>';
|
77 |
+
echo "<span id='wcal_gdpr_message_block'><p><small>" . wp_kses_post( $display_msg ) . '</small></p></span>';
|
78 |
}
|
79 |
}
|
80 |
}
|
includes/class-wcal-webhooks.php
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Abandoned Cart Lite for WooCommerce
|
4 |
+
*
|
5 |
+
* Class for abandon cart webhooks.
|
6 |
+
*
|
7 |
+
* @author Tyche Softwares
|
8 |
+
* @package WCAL/webhooks
|
9 |
+
* @category Classes
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* WCAL Webhooks
|
14 |
+
*
|
15 |
+
* @since 8.7.0
|
16 |
+
*/
|
17 |
+
class Wcal_Webhooks {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Plugin hooks & functions.
|
21 |
+
*
|
22 |
+
* @since 5.12.0
|
23 |
+
*/
|
24 |
+
public static function init() {
|
25 |
+
|
26 |
+
// Setup webhooks.
|
27 |
+
add_filter( 'woocommerce_webhook_topics', array( __CLASS__, 'wcal_add_new_webhook_topics' ), 10, 1 );
|
28 |
+
add_filter( 'woocommerce_webhook_topic_hooks', array( __CLASS__, 'wcal_add_topic_hooks' ), 10, 1 );
|
29 |
+
add_filter( 'woocommerce_valid_webhook_resources', array( __CLASS__, 'wcal_add_cart_resources' ), 10, 1 );
|
30 |
+
add_filter( 'woocommerce_valid_webhook_events', array( __CLASS__, 'wcal_add_cart_events' ), 10, 1 );
|
31 |
+
add_filter( 'woocommerce_webhook_payload', array( __CLASS__, 'wcal_generate_payload' ), 10, 4 );
|
32 |
+
add_filter( 'woocommerce_webhook_deliver_async', array( __CLASS__, 'wcal_deliver_sync' ), 10, 3 );
|
33 |
+
// Process Webhook actions.
|
34 |
+
add_action( 'wcal_cart_recovered', array( __CLASS__, 'wcal_cart_recovered' ), 10, 2 );
|
35 |
+
add_action( 'wcap_webhook_after_cutoff', array( __CLASS__, 'wcal_cart_cutoff_reached' ), 10, 1 );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Add new list of events for webhooks in WC->Settings->Advanced->Webhooks.
|
40 |
+
*
|
41 |
+
* @param array $topics - Topic Hooks.
|
42 |
+
* @return array $topics - Topic Hooks including the ones from our plugin.
|
43 |
+
* @since 8.7.0
|
44 |
+
*/
|
45 |
+
public static function wcal_add_new_webhook_topics( $topics ) {
|
46 |
+
|
47 |
+
$new_topics = array(
|
48 |
+
// Cut off reached.
|
49 |
+
'wcap_cart.cutoff' => __( 'Cart Abandoned after cut-off time', 'woocommerce-ac' ),
|
50 |
+
// Order Recovered.
|
51 |
+
'wcap_cart.recovered' => __( 'Abandoned Order Recovered', 'woocommerce-ac' ),
|
52 |
+
);
|
53 |
+
return array_merge( $topics, $new_topics );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Trigger hooks for the plugin topics.
|
58 |
+
*
|
59 |
+
* @param array $topic_hooks - Topic Hooks.
|
60 |
+
* @return array $topic_hooks - Topic Hooks including the ones from our plugin.
|
61 |
+
* @since 8.7.0
|
62 |
+
*/
|
63 |
+
public static function wcal_add_topic_hooks( $topic_hooks ) {
|
64 |
+
|
65 |
+
$new_hooks = array(
|
66 |
+
'wcap_cart.cutoff' => array( 'wcap_abandoned_cart_cutoff' ),
|
67 |
+
'wcap_cart.recovered' => array( 'wcap_abandoned_cart_recovered' ),
|
68 |
+
);
|
69 |
+
|
70 |
+
return array_merge( $new_hooks, $topic_hooks );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Add webhook resources.
|
75 |
+
*
|
76 |
+
* @param array $topic_resources - Webhook Resources.
|
77 |
+
* @return array $topic_resources - Webhook Resources including the ones from our plugin.
|
78 |
+
* @since 8.7.0
|
79 |
+
*/
|
80 |
+
public static function wcal_add_cart_resources( $topic_resources ) {
|
81 |
+
|
82 |
+
// Webhook resources for wcap.
|
83 |
+
$new_resources = array(
|
84 |
+
'wcap_cart',
|
85 |
+
);
|
86 |
+
|
87 |
+
return array_merge( $new_resources, $topic_resources );
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Add webhook events.
|
92 |
+
*
|
93 |
+
* @param array $topic_events - List of events.
|
94 |
+
* @return array $topic_events - List of events including the ones from the plugin.
|
95 |
+
* @since 8.7.0
|
96 |
+
*/
|
97 |
+
public static function wcal_add_cart_events( $topic_events ) {
|
98 |
+
|
99 |
+
// Webhook events for wcap.
|
100 |
+
$new_events = array(
|
101 |
+
'cutoff',
|
102 |
+
'recovered',
|
103 |
+
);
|
104 |
+
|
105 |
+
return array_merge( $new_events, $topic_events );
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Deliver the webhooks in background or realtime.
|
111 |
+
*
|
112 |
+
* @param bool $value - true|false - deliver the webhook in background|deliver in realtime.
|
113 |
+
* @param object $webhook - WC Webhook object.
|
114 |
+
* @param array $arg - Arguments.
|
115 |
+
* @return bool $value - Return false causes the webhook to be delivered immediately.
|
116 |
+
*
|
117 |
+
* @since 8.7.0
|
118 |
+
*/
|
119 |
+
public static function wcal_deliver_sync( $value, $webhook, $arg ) {
|
120 |
+
$wcal_webhook_topics = array(
|
121 |
+
'wcap_cart.cutoff',
|
122 |
+
'wcap_cart.recovered',
|
123 |
+
);
|
124 |
+
|
125 |
+
if ( in_array( $webhook->get_topic(), $wcal_webhook_topics, true ) ) {
|
126 |
+
return false;
|
127 |
+
}
|
128 |
+
|
129 |
+
return $value;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Generate data for webhook delivery.
|
134 |
+
*
|
135 |
+
* @param array $payload - Array of Data.
|
136 |
+
* @param string $resource - Resource.
|
137 |
+
* @param array $resource_data - Resource Data.
|
138 |
+
* @param int $id - Webhook ID.
|
139 |
+
* @return array $payload - Array of Data.
|
140 |
+
*
|
141 |
+
* @since 8.7.0
|
142 |
+
*/
|
143 |
+
public static function wcal_generate_payload( $payload, $resource, $resource_data, $id ) {
|
144 |
+
|
145 |
+
switch ( $resource_data['action'] ) {
|
146 |
+
case 'cutoff':
|
147 |
+
case 'recovered':
|
148 |
+
$webhook_meta = array(
|
149 |
+
'webhook_id' => $id,
|
150 |
+
'webhook_action' => $resource_data['action'],
|
151 |
+
'webhook_resource' => $resource,
|
152 |
+
'webhook_resource_id' => $resource_data['id'],
|
153 |
+
);
|
154 |
+
|
155 |
+
$payload = array_merge( $webhook_meta, $resource_data['data'] );
|
156 |
+
break;
|
157 |
+
}
|
158 |
+
|
159 |
+
return $payload;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Triggers a webhook when a cart is marked as recovered.
|
164 |
+
*
|
165 |
+
* @param int $abandoned_id - Abandoned Cart ID.
|
166 |
+
* @param int $order_id - Order ID.
|
167 |
+
* @since 8.7.0
|
168 |
+
*/
|
169 |
+
public static function wcal_cart_recovered( $abandoned_id, $order_id ) {
|
170 |
+
|
171 |
+
if ( $abandoned_id > 0 && $order_id > 0 ) {
|
172 |
+
|
173 |
+
// Setup the data.
|
174 |
+
$send_data = self::wcal_reminders_webhook_data( $abandoned_id );
|
175 |
+
|
176 |
+
if ( is_array( $send_data ) ) {
|
177 |
+
|
178 |
+
$order = wc_get_order( $order_id );
|
179 |
+
|
180 |
+
$send_data['order_id'] = $order_id;
|
181 |
+
$send_data['total'] = $order->get_total();
|
182 |
+
$send_data['tax_total'] = $order->get_total_tax();
|
183 |
+
$data = array(
|
184 |
+
'id' => $abandoned_id,
|
185 |
+
'data' => $send_data,
|
186 |
+
'action' => 'recovered',
|
187 |
+
);
|
188 |
+
|
189 |
+
do_action( 'wcap_abandoned_cart_recovered', $data );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Triggers a webhook once cart cutoff is reached.
|
196 |
+
*
|
197 |
+
* @param int $abandoned_cart_id - Abandoned Cart ID.
|
198 |
+
* @since 8.7.0
|
199 |
+
*/
|
200 |
+
public static function wcal_cart_cutoff_reached( $abandoned_cart_id ) {
|
201 |
+
if ( $abandoned_cart_id > 0 ) {
|
202 |
+
|
203 |
+
$cart_data = wcal_get_data_cart_history( $abandoned_cart_id );
|
204 |
+
|
205 |
+
if ( $cart_data ) {
|
206 |
+
$user_id = $cart_data->user_id;
|
207 |
+
$user_type = $cart_data->user_type;
|
208 |
+
|
209 |
+
$billing_first_name = '';
|
210 |
+
$billing_last_name = '';
|
211 |
+
$email_id = '';
|
212 |
+
$phone = '';
|
213 |
+
$billing_country = '';
|
214 |
+
$billing_zipcode = '';
|
215 |
+
$coupon_code = '';
|
216 |
+
$checkout_link = '';
|
217 |
+
|
218 |
+
if ( 'GUEST' == $user_type && $user_id >= 63000000 ) { //phpcs:ignore
|
219 |
+
$guest_data = wcal_get_data_guest_history( $user_id );
|
220 |
+
|
221 |
+
if ( $guest_data ) {
|
222 |
+
$billing_first_name = $guest_data->billing_first_name;
|
223 |
+
$billing_last_name = $guest_data->billing_last_name;
|
224 |
+
$email_id = $guest_data->email_id;
|
225 |
+
$phone = $guest_data->phone;
|
226 |
+
$billing_zipcode = $guest_data->billing_zipcode;
|
227 |
+
}
|
228 |
+
} elseif ( 'REGISTERED' == $user_type && $user_id > 0 ) { // phpcs:ignore
|
229 |
+
$billing_first_name = get_user_meta( $user_id, 'billing_first_name', true );
|
230 |
+
$billing_last_name = get_user_meta( $user_id, 'billing_last_name', true );
|
231 |
+
$email_id = get_user_meta( $user_id, 'billing_email', true );
|
232 |
+
$phone = get_user_meta( $user_id, 'billing_phone', true );
|
233 |
+
$billing_country = get_user_meta( $user_id, 'billing_country', true );
|
234 |
+
$billing_zipcode = get_user_meta( $user_id, 'billing_zipcode', true );
|
235 |
+
}
|
236 |
+
|
237 |
+
$product_details = wcal_get_product_details( $cart_data->abandoned_cart_info );
|
238 |
+
|
239 |
+
$total = 0;
|
240 |
+
$total_tax = 0;
|
241 |
+
$cart_value = json_decode( stripslashes( $cart_data->abandoned_cart_info ) );
|
242 |
+
|
243 |
+
if ( isset( $cart_value->cart ) && count( get_object_vars( $cart_value->cart ) ) > 0 ) {
|
244 |
+
foreach ( $cart_value->cart as $product_data ) {
|
245 |
+
$total += $product_data->line_subtotal;
|
246 |
+
$total_tax += $product_data->line_tax;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
$coupon_meta = wcal_common::wcal_get_coupon_post_meta( $abandoned_cart_id );
|
251 |
+
|
252 |
+
if ( is_array( $coupon_meta ) && count( $coupon_meta ) > 0 ) {
|
253 |
+
$coupon_code = '';
|
254 |
+
foreach ( $coupon_meta as $code => $msg ) {
|
255 |
+
$coupon_code .= "$code,";
|
256 |
+
}
|
257 |
+
// Remove the last extra delimiter.
|
258 |
+
$coupon_code = substr( $coupon_code, 0, -1 );
|
259 |
+
}
|
260 |
+
$checkout_link = $cart_data->checkout_link;
|
261 |
+
|
262 |
+
$send_data = array(
|
263 |
+
'id' => $abandoned_cart_id,
|
264 |
+
'user_id' => $user_id,
|
265 |
+
'product_details' => $product_details,
|
266 |
+
'total' => $total,
|
267 |
+
'total_tax' => $total_tax,
|
268 |
+
'timestamp' => $cart_data->abandoned_cart_time,
|
269 |
+
'billing_first_name' => $billing_first_name,
|
270 |
+
'billing_last_name' => $billing_last_name,
|
271 |
+
'billing_country' => $billing_country,
|
272 |
+
'billing_zipcode' => $billing_zipcode,
|
273 |
+
'email_id' => $email_id,
|
274 |
+
'phone' => $phone,
|
275 |
+
'user_type' => $user_type,
|
276 |
+
'coupon_code' => $coupon_code,
|
277 |
+
'checkout_link' => $checkout_link,
|
278 |
+
);
|
279 |
+
|
280 |
+
$data = array(
|
281 |
+
'id' => $abandoned_cart_id,
|
282 |
+
'data' => $send_data,
|
283 |
+
'action' => 'cutoff',
|
284 |
+
);
|
285 |
+
|
286 |
+
do_action( 'wcap_abandoned_cart_cutoff', $data );
|
287 |
+
}
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Returns an array of cart data.
|
293 |
+
*
|
294 |
+
* @param int $abandoned_id - Abandoned Cart ID.
|
295 |
+
* @return array $send_data - Array of Cart Data.
|
296 |
+
* @since 8.7.0
|
297 |
+
*/
|
298 |
+
public static function wcal_reminders_webhook_data( $abandoned_id ) {
|
299 |
+
|
300 |
+
$cart_history = wcal_get_data_cart_history( $abandoned_id );
|
301 |
+
|
302 |
+
if ( $cart_history ) {
|
303 |
+
$user_id = $cart_history->user_id;
|
304 |
+
$user_type = $cart_history->user_type;
|
305 |
+
|
306 |
+
$billing_first_name = '';
|
307 |
+
$billing_last_name = '';
|
308 |
+
$email_id = '';
|
309 |
+
$phone = '';
|
310 |
+
|
311 |
+
if ( $user_id >= 63000000 && 'GUEST' == $user_type ) { // phpcs:ignore
|
312 |
+
$guest_data = wcal_get_data_guest_history( $user_id );
|
313 |
+
|
314 |
+
if ( $guest_data ) {
|
315 |
+
$billing_first_name = $guest_data->billing_first_name;
|
316 |
+
$billing_last_name = $guest_data->billing_last_name;
|
317 |
+
$email_id = $guest_data->email_id;
|
318 |
+
}
|
319 |
+
} elseif ( 'REGISTERED' == $user_type ) { // phpcs:ignore
|
320 |
+
|
321 |
+
$billing_first_name = get_user_meta( $user_id, 'billing_first_name', true );
|
322 |
+
$billing_last_name = get_user_meta( $user_id, 'billing_last_name', true );
|
323 |
+
$email_id = get_user_meta( $user_id, 'billing_email', true );
|
324 |
+
$phone = get_user_meta( $user_id, 'billing_phone', true );
|
325 |
+
}
|
326 |
+
|
327 |
+
$product_details = wcal_get_product_details( $cart_history->abandoned_cart_info );
|
328 |
+
|
329 |
+
$send_data = array(
|
330 |
+
'id' => $abandoned_id,
|
331 |
+
'product_details' => $product_details,
|
332 |
+
'timestamp' => $cart_history->abandoned_cart_time,
|
333 |
+
'billing_first_name' => $billing_first_name,
|
334 |
+
'billing_last_name' => $billing_last_name,
|
335 |
+
'email_id' => $email_id,
|
336 |
+
'phone' => $phone,
|
337 |
+
'user_type' => $user_type,
|
338 |
+
);
|
339 |
+
|
340 |
+
return $send_data;
|
341 |
+
}
|
342 |
+
return false;
|
343 |
+
}
|
344 |
+
|
345 |
+
}
|
346 |
+
Wcal_Webhooks::init();
|
includes/class-wcap-integrations.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Connectors Main File.
|
4 |
+
*
|
5 |
+
* @package Includes/Connectors
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Integrations class file.
|
10 |
+
*/
|
11 |
+
class Wcap_Integrations {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Construct.
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
add_action( 'init', array( &$this, 'wcap_load_connectors' ), 5 );
|
18 |
+
add_action( 'wp_ajax_wcap_display_connectors', array( &$this, 'wcap_get_connectors_display' ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Load all the connector files.
|
23 |
+
*
|
24 |
+
* @since 8.15.0
|
25 |
+
*/
|
26 |
+
public function wcap_load_connectors() {
|
27 |
+
$get_connectors = Wcap_Connectors_Common::wcap_get_connectors();
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Connector page settings.
|
32 |
+
*
|
33 |
+
* @since 8.15.0
|
34 |
+
*/
|
35 |
+
public static function wcap_integrations_main() {
|
36 |
+
|
37 |
+
$wcap_all_integrators = '';
|
38 |
+
$wcap_active_integrators = '';
|
39 |
+
$wcap_inactive_integrators = '';
|
40 |
+
$wcap_section_view = isset( $_GET['wcap_section_view'] ) ? sanitize_text_field( wp_unslash( $_GET['wcap_section_view'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
41 |
+
switch ( $wcap_section_view ) {
|
42 |
+
case 'all':
|
43 |
+
case '':
|
44 |
+
default:
|
45 |
+
$wcap_all_integrators = 'current';
|
46 |
+
$type = '';
|
47 |
+
break;
|
48 |
+
case 'active':
|
49 |
+
$wcap_active_integrators = 'current';
|
50 |
+
$type = 'active';
|
51 |
+
break;
|
52 |
+
case 'inactive':
|
53 |
+
$wcap_inactive_integrators = 'current';
|
54 |
+
$type = 'inactive';
|
55 |
+
break;
|
56 |
+
}
|
57 |
+
$inactive_count = Wcap_Connectors_Common::wcap_get_inactive_connectors_count();
|
58 |
+
$active_count = Wcap_Connectors_Common::wcap_get_active_connectors_count();
|
59 |
+
$all_count = $inactive_count + $active_count;
|
60 |
+
|
61 |
+
$active_link = 0 === $active_count ? 'no_link' : '';
|
62 |
+
$inactive_link = 0 === $inactive_count ? 'no_link' : '';
|
63 |
+
|
64 |
+
?>
|
65 |
+
<h2><?php esc_html_e( 'Connectors', 'woocommerce-ac' ); ?></h2>
|
66 |
+
<p style='font-size:15px;'>
|
67 |
+
<?php
|
68 |
+
$upgrade_pro_msg = '<b><i>Upgrade to <a href="https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=acupgradetopro&utm_medium=link&utm_campaign=AbandonCartLite" target="_blank">Abandoned Cart Pro for WooCommerce</a> to enable any of the connectors and send the contact details and abandoned cart data to email marketing tools & CRMs.</i></b>';
|
69 |
+
echo wp_kses_post( $upgrade_pro_msg );
|
70 |
+
?>
|
71 |
+
</p>
|
72 |
+
<ul class='subsubsub' id='wcap_integrators_list'>
|
73 |
+
<li>
|
74 |
+
<a href='javascript:void(0)' id='wcap_all' class='wcap_integrators_view <?php echo esc_attr( $wcap_all_integrators ); ?>'><?php esc_html_e( 'All', 'woocommerce-ac' ); ?> (<?php echo esc_html( $all_count ); ?>)</a> |
|
75 |
+
</li>
|
76 |
+
<li>
|
77 |
+
<a data-wcap-count='<?php echo esc_html( $active_count ); ?>' id='wcap_active' class='wcap_integrators_view <?php echo esc_attr( $wcap_active_integrators . $active_link ); ?>'><?php esc_html_e( 'Active', 'woocommerce-ac' ); ?>(<span id='wcap_active_count'><?php echo esc_html( $active_count ); ?></span>)</a> |
|
78 |
+
</li>
|
79 |
+
<li>
|
80 |
+
<a data-wcap-count='<?php echo esc_html( $inactive_count ); ?>' id='wcap_inactive' class='wcap_integrators_view <?php echo esc_attr( $wcap_inactive_integrators . $inactive_link ); ?>'><?php esc_html_e( 'Inactive', 'woocommerce-ac' ); ?>(<span id='wcap_inactive_count'><?php echo esc_html( $inactive_count ); ?></span>)</a>
|
81 |
+
</li>
|
82 |
+
</ul>
|
83 |
+
<hr id='wcap_integrators_break'>
|
84 |
+
<div id="wcap_connectors_list">
|
85 |
+
<?php
|
86 |
+
self::wcap_display_connectors( $type );
|
87 |
+
?>
|
88 |
+
</div>
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Ajax to display the list of connectors in admin.
|
94 |
+
*/
|
95 |
+
public function wcap_get_connectors_display() {
|
96 |
+
$type = isset( $_POST['type'] ) && '' !== $_POST['type'] ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
97 |
+
$type = 'all' === $type ? '' : $type;
|
98 |
+
self::wcap_display_connectors( $type );
|
99 |
+
die();
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Display the connectors based on type.
|
104 |
+
*
|
105 |
+
* @param string $type - all | active | inactive.
|
106 |
+
*
|
107 |
+
* @since 8.15.0
|
108 |
+
*/
|
109 |
+
public static function wcap_display_connectors( $type = '' ) {
|
110 |
+
$get_connectors = Wcap_Connectors_Common::wcap_get_connectors( $type );
|
111 |
+
|
112 |
+
if ( ! is_array( $get_connectors ) || 0 === count( $get_connectors ) ) {
|
113 |
+
printf(
|
114 |
+
/* translators: %1$s is replaced with connector type */
|
115 |
+
esc_html__( 'No %1$s connector found', 'woocommerce-ac' ),
|
116 |
+
esc_html( $type )
|
117 |
+
);
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
echo '<div class="wcap-col-group">';
|
121 |
+
foreach ( $get_connectors as $source_slug => $connector ) {
|
122 |
+
$wcap_display_connectors = new Wcap_Display_Connectors( $source_slug, $connector );
|
123 |
+
$wcap_display_connectors->print_card();
|
124 |
+
}
|
125 |
+
echo '</div>';
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Load connector cards & settings.
|
130 |
+
*
|
131 |
+
* @since 8.15.0
|
132 |
+
*/
|
133 |
+
public static function wcap_load_connector_settings() {
|
134 |
+
$name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
135 |
+
$connector_name = ucwords( $name );
|
136 |
+
if ( '' !== $connector_name ) {
|
137 |
+
$type = '';
|
138 |
+
$get_connectors = Wcap_Connectors_Common::wcap_get_connectors( $type );
|
139 |
+
|
140 |
+
if ( ! is_array( $get_connectors ) || 0 === count( $get_connectors ) ) {
|
141 |
+
return;
|
142 |
+
}
|
143 |
+
$connector = $get_connectors[ 'wcap_' . $name ];
|
144 |
+
$connector->get_settings_view();
|
145 |
+
}
|
146 |
+
|
147 |
+
die();
|
148 |
+
}
|
149 |
+
}
|
150 |
+
new Wcap_Integrations();
|
includes/connectors/activecampaign/connector.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* AC insert and update file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/ActiveCampaign
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for ActiveCapmaign Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Activecampaign extends Wcap_Connector {
|
12 |
+
/**
|
13 |
+
* Connector Name
|
14 |
+
*
|
15 |
+
* @var $connector_name
|
16 |
+
*/
|
17 |
+
public $connector_name = 'activecampaign';
|
18 |
+
/**
|
19 |
+
* Slug Name
|
20 |
+
*
|
21 |
+
* @var $slug
|
22 |
+
*/
|
23 |
+
public $slug = 'wcap_activecampaign';
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var $name
|
28 |
+
*/
|
29 |
+
public $name = 'ActiveCampaign';
|
30 |
+
/**
|
31 |
+
* Description
|
32 |
+
*
|
33 |
+
* @var $desc
|
34 |
+
*/
|
35 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to ActiveCampaign.';
|
36 |
+
/**
|
37 |
+
* Signle instance of the class
|
38 |
+
*
|
39 |
+
* @var $ins
|
40 |
+
*/
|
41 |
+
private static $ins = null;
|
42 |
+
/**
|
43 |
+
* Headers for Curl calls
|
44 |
+
*
|
45 |
+
* @var $headers
|
46 |
+
*/
|
47 |
+
public static $headers = null;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of registered calls for function
|
51 |
+
*
|
52 |
+
* @var array All calls with object
|
53 |
+
*/
|
54 |
+
public $registered_calls = array();
|
55 |
+
/**
|
56 |
+
* Array containing values for default connection
|
57 |
+
*
|
58 |
+
* @var array All calls with object
|
59 |
+
*/
|
60 |
+
public $default_connection = array(
|
61 |
+
'name' => 'Abandoned Cart Pro',
|
62 |
+
'service' => 'Abandoned Cart Pro',
|
63 |
+
'logoUrl' => 'https://cdn2.tychesoftwares.com/wp-content/uploads/2020/05/23112723/mascot-cart-1.png',
|
64 |
+
);
|
65 |
+
/**
|
66 |
+
* Construct. Add hooks and filters.
|
67 |
+
*
|
68 |
+
* @var array All calls with object.
|
69 |
+
*/
|
70 |
+
public function __construct() {
|
71 |
+
$this->wcap_define_plugin_properties();
|
72 |
+
$this->connector_url = WCAP_ACTIVECAMPAIGN_PLUGIN_URL;
|
73 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Function to define constans
|
78 |
+
*/
|
79 |
+
public function wcap_define_plugin_properties() {
|
80 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_VERSION' ) ) {
|
81 |
+
define( 'WCAP_ACTIVECAMPAIGN_VERSION', '1.0.0' );
|
82 |
+
}
|
83 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_FULL_NAME' ) ) {
|
84 |
+
define( 'WCAP_ACTIVECAMPAIGN_FULL_NAME', 'Abandoned Carts Automations Connectors: Activecampaign' );
|
85 |
+
}
|
86 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_PLUGIN_FILE' ) ) {
|
87 |
+
define( 'WCAP_ACTIVECAMPAIGN_PLUGIN_FILE', __FILE__ );
|
88 |
+
}
|
89 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_PLUGIN_DIR' ) ) {
|
90 |
+
define( 'WCAP_ACTIVECAMPAIGN_PLUGIN_DIR', __DIR__ );
|
91 |
+
}
|
92 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_PLUGIN_URL' ) ) {
|
93 |
+
define( 'WCAP_ACTIVECAMPAIGN_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_ACTIVECAMPAIGN_PLUGIN_FILE ) ) );
|
94 |
+
}
|
95 |
+
if ( ! defined( 'WCAP_ACTIVECAMPAIGN_PLUGIN_BASENAME' ) ) {
|
96 |
+
define( 'WCAP_ACTIVECAMPAIGN_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Function to Add card in connector's main page.
|
102 |
+
*
|
103 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
104 |
+
*/
|
105 |
+
public function add_card( $available_connectors ) {
|
106 |
+
$available_connectors['wcap']['connectors']['wcap_activecampaign'] = array(
|
107 |
+
'name' => $this->name,
|
108 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
109 |
+
'connector_class' => 'Wcap_Activecampaign',
|
110 |
+
'image' => $this->get_image(),
|
111 |
+
'source' => '',
|
112 |
+
'file' => '',
|
113 |
+
);
|
114 |
+
|
115 |
+
return $available_connectors;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Function to get instance.
|
120 |
+
*/
|
121 |
+
public static function get_instance() {
|
122 |
+
if ( null === self::$ins ) {
|
123 |
+
self::$ins = new self();
|
124 |
+
}
|
125 |
+
|
126 |
+
return self::$ins;
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
includes/connectors/activecampaign/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/activecampaign/views/icon.png
ADDED
Binary file
|
includes/connectors/activecampaign/views/logo.png
ADDED
Binary file
|
includes/connectors/class-wcap-connector.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main Connector File. All connectors inherit this class.
|
4 |
+
*
|
5 |
+
* @package Includes/Connectors
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Connector Class for Wcap.
|
10 |
+
*/
|
11 |
+
class Wcap_Connector {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Connector URL.
|
15 |
+
*
|
16 |
+
* @var $connector_url
|
17 |
+
*/
|
18 |
+
protected $connector_url = '';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Connector DIR.
|
22 |
+
*
|
23 |
+
* @var $dir
|
24 |
+
*/
|
25 |
+
public $dir = __DIR__;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Get Connector Image.
|
29 |
+
*/
|
30 |
+
public function get_image() {
|
31 |
+
return $this->connector_url . '/views/logo.png';
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get connector slug.
|
36 |
+
*/
|
37 |
+
public function get_slug() {
|
38 |
+
return sanitize_title( get_class( $this ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get connector folder name.
|
43 |
+
*/
|
44 |
+
public function get_folder_name() {
|
45 |
+
return $this->folder_name;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get Settings card.
|
50 |
+
*/
|
51 |
+
public function get_settings_view() {
|
52 |
+
|
53 |
+
$connector_name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
54 |
+
if ( '' === $connector_name ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
$file_path = trailingslashit( $this->dir ) . $connector_name . '/views/settings.php';
|
59 |
+
ob_start();
|
60 |
+
if ( file_exists( "$file_path" ) ) {
|
61 |
+
include "$file_path";
|
62 |
+
}
|
63 |
+
$settings_display = ob_get_clean();
|
64 |
+
echo $settings_display; // phpcs:ignore
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
new Wcap_Connector();
|
includes/connectors/class-wcap-connectors-common.php
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for common functions for connectors.
|
4 |
+
*
|
5 |
+
* @package Includes/Connectors
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Connectors common class.
|
10 |
+
*/
|
11 |
+
class Wcap_Connectors_Common {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class instance.
|
15 |
+
*
|
16 |
+
* @var $ins
|
17 |
+
*/
|
18 |
+
public static $ins = null;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Connectors saved settings.
|
22 |
+
*
|
23 |
+
* @var $connectors_saved_data
|
24 |
+
*/
|
25 |
+
public static $connectors_saved_data = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Saved Data.
|
29 |
+
*
|
30 |
+
* @var $saved_data
|
31 |
+
*/
|
32 |
+
public static $saved_data = false;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Connectors List.
|
36 |
+
*
|
37 |
+
* @var array $connectors_list
|
38 |
+
*/
|
39 |
+
public static $connectors_list = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Active connectors count.
|
43 |
+
*
|
44 |
+
* @var int $active_count
|
45 |
+
*/
|
46 |
+
public static $active_count = false;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Inactive connectors count.
|
50 |
+
*
|
51 |
+
* @var int $inactive_count
|
52 |
+
*/
|
53 |
+
public static $inactive_count = false;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Construct.
|
57 |
+
*/
|
58 |
+
public function __construct() {
|
59 |
+
add_action( 'wp_loaded', array( __CLASS__, 'wcap_get_connectors_data' ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Get instance of the class.
|
64 |
+
*/
|
65 |
+
public static function get_instance() {
|
66 |
+
if ( null === self::$ins ) {
|
67 |
+
self::$ins = new self; // phpcs:ignore
|
68 |
+
}
|
69 |
+
|
70 |
+
return self::$ins;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get connector settings data from DB.
|
75 |
+
*
|
76 |
+
* @param string $connector_name - Connector slug.
|
77 |
+
* @return array containing the data. By default all connector data is sent.
|
78 |
+
*
|
79 |
+
* @since 8.15.0
|
80 |
+
*/
|
81 |
+
public static function wcap_get_connectors_data( $connector_name = '' ) {
|
82 |
+
|
83 |
+
$temp_arr = array();
|
84 |
+
$fetch_from_db = false;
|
85 |
+
$slug = '' !== $connector_name && 'wcap' !== substr( $connector_name, 0, 4 ) ? "wcap_$connector_name" : $connector_name;
|
86 |
+
if ( false === self::$saved_data ) {
|
87 |
+
$fetch_from_db = true;
|
88 |
+
} else {
|
89 |
+
if ( '' !== $slug && array_key_exists( $slug, self::$saved_data ) ) {
|
90 |
+
$temp_arr[ $slug ] = self::$saved_data[ $slug ];
|
91 |
+
} else {
|
92 |
+
// get the single record from wp_options & add it to the saved_data.
|
93 |
+
$fetch_from_db = true;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( $fetch_from_db ) {
|
98 |
+
if ( '' === $slug ) {
|
99 |
+
// get all the records from wp_options.
|
100 |
+
foreach ( self::$connectors_list as $slug_name => $class ) {
|
101 |
+
$details = json_decode( get_option( $slug_name . '_connector', '' ), true );
|
102 |
+
if ( is_array( $details ) && count( $details ) > 0 ) {
|
103 |
+
$temp_arr[ $slug_name ] = $details;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
} else {
|
107 |
+
// get the single record from wp_options & add it to the saved_data.
|
108 |
+
$details = json_decode( get_option( $slug . '_connector', '' ), true );
|
109 |
+
if ( is_array( $details ) && count( $details ) > 0 ) {
|
110 |
+
$temp_arr[ $slug ] = $details;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
self::$saved_data = $temp_arr;
|
114 |
+
}
|
115 |
+
self::$connectors_saved_data = $temp_arr;
|
116 |
+
|
117 |
+
if ( $connector_name !=='' ) { //phpcs:ignore
|
118 |
+
return isset( self::$connectors_saved_data[ $slug ] ) ? self::$connectors_saved_data[ $slug ] : false;
|
119 |
+
}
|
120 |
+
|
121 |
+
return self::$connectors_saved_data;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get list of connectors.
|
126 |
+
*
|
127 |
+
* @param string $type - Connector type - active|inactive.
|
128 |
+
* @return array - connector list.
|
129 |
+
*
|
130 |
+
* @since 8.15.0
|
131 |
+
*/
|
132 |
+
public static function wcap_get_connectors( $type = '' ) {
|
133 |
+
|
134 |
+
if ( empty( self::$connectors_list ) ) {
|
135 |
+
$resource_dir = WCAL_PLUGIN_PATH . '/includes/connectors';
|
136 |
+
foreach ( glob( $resource_dir . '/*' ) as $connector ) {
|
137 |
+
|
138 |
+
if ( strpos( $connector, 'index.php' ) !== false ) {
|
139 |
+
continue;
|
140 |
+
}
|
141 |
+
|
142 |
+
$_field_filename = $connector;
|
143 |
+
// If file does not end in .php, then it is a folder.
|
144 |
+
$is_folder = substr( $connector, -4 ) !== '.php';
|
145 |
+
// Append connector.php if it is a folder.
|
146 |
+
if ( $is_folder ) {
|
147 |
+
$_field_filename = $connector . '/connector.php';
|
148 |
+
if ( file_exists( $_field_filename ) ) {
|
149 |
+
require_once $_field_filename;
|
150 |
+
// Load class if file checked is a folder.
|
151 |
+
$path = explode( '/', $connector );
|
152 |
+
$folder_name = array_pop( $path );
|
153 |
+
$class_name = 'Wcap_' . ucwords( $folder_name );
|
154 |
+
$class_object = $class_name::get_instance();
|
155 |
+
$slug = $class_object->slug;
|
156 |
+
$connector_list[ $slug ] = $class_object;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
$connector_list = apply_filters( 'wcap_basic_connectors_loaded', $connector_list );
|
162 |
+
self::$connectors_list = $connector_list;
|
163 |
+
}
|
164 |
+
if ( '' === $type ) {
|
165 |
+
return self::$connectors_list;
|
166 |
+
} else {
|
167 |
+
$return_list = array();
|
168 |
+
// Identify the type i.e. active/inactive and only return those.
|
169 |
+
foreach ( self::$connectors_list as $slug => $c_class ) {
|
170 |
+
$details = self::wcap_get_connectors_data( $slug );
|
171 |
+
switch ( $type ) {
|
172 |
+
case 'active':
|
173 |
+
if ( isset( $details['status'] ) && $type === $details['status'] ) {
|
174 |
+
$return_list[ $slug ] = $c_class;
|
175 |
+
}
|
176 |
+
break;
|
177 |
+
case 'inactive':
|
178 |
+
if ( ( isset( $details['status'] ) && 'active' !== $details['status'] ) || ! isset( $details['status'] ) ) {
|
179 |
+
$return_list[ $slug ] = $c_class;
|
180 |
+
}
|
181 |
+
break;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
return $return_list;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Get count of active connectors.
|
190 |
+
*/
|
191 |
+
public static function wcap_get_active_connectors_count() {
|
192 |
+
|
193 |
+
if ( false === self::$active_count ) {
|
194 |
+
$total_active = 0;
|
195 |
+
$get_connectors = self::wcap_get_connectors();
|
196 |
+
foreach ( $get_connectors as $connector_name => $connector_obj ) {
|
197 |
+
$connector_settings = json_decode( get_option( $connector_name . '_connector', '' ), true );
|
198 |
+
if ( is_array( $connector_settings ) && count( $connector_settings ) > 0 ) {
|
199 |
+
$status = isset( $connector_settings['status'] ) ? $connector_settings['status'] : '';
|
200 |
+
if ( 'active' === $status ) {
|
201 |
+
$total_active++;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
205 |
+
self::$active_count = $total_active;
|
206 |
+
}
|
207 |
+
return self::$active_count;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Get inactive connectors count.
|
212 |
+
*/
|
213 |
+
public static function wcap_get_inactive_connectors_count() {
|
214 |
+
|
215 |
+
if ( false === self::$inactive_count ) {
|
216 |
+
$total_inactive = 0;
|
217 |
+
$get_connectors = self::wcap_get_connectors();
|
218 |
+
foreach ( $get_connectors as $connector_name => $connector_obj ) {
|
219 |
+
$connector_settings = json_decode( get_option( $connector_name . '_connector', '' ), true );
|
220 |
+
if ( is_array( $connector_settings ) && count( $connector_settings ) > 0 ) {
|
221 |
+
$status = isset( $connector_settings['status'] ) ? $connector_settings['status'] : '';
|
222 |
+
if ( 'active' !== $status ) {
|
223 |
+
$total_inactive++;
|
224 |
+
}
|
225 |
+
} else { // Settings have not yet been saved.
|
226 |
+
$total_inactive++;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
self::$inactive_count = $total_inactive;
|
230 |
+
}
|
231 |
+
return self::$inactive_count;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get active connectors list.
|
236 |
+
*
|
237 |
+
* @since 8.16.0
|
238 |
+
*/
|
239 |
+
public function wcap_get_active_connectors_list() {
|
240 |
+
$connectors_list = self::wcap_get_connectors_data();
|
241 |
+
$active_list = array();
|
242 |
+
if ( is_array( $connectors_list ) && count( $connectors_list ) > 0 ) {
|
243 |
+
foreach ( $connectors_list as $slug => $settings ) {
|
244 |
+
$connector_status = $settings['status'];
|
245 |
+
if ( 'active' === $connector_status ) {
|
246 |
+
array_push( $active_list, $slug );
|
247 |
+
}
|
248 |
+
}
|
249 |
+
return $active_list;
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
}
|
254 |
+
$wcap_connectors_common = new Wcap_Connectors_Common();
|
includes/connectors/class-wcap-display-connectors.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Display connector cards in admin.
|
4 |
+
*
|
5 |
+
* @package Includes/Connectors.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for display connectors.
|
10 |
+
*/
|
11 |
+
class Wcap_Display_Connectors {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Construct.
|
15 |
+
*
|
16 |
+
* @param string $slug - Slug.
|
17 |
+
* @param string $connector - Connector.
|
18 |
+
*/
|
19 |
+
public function __construct( $slug, $connector ) {
|
20 |
+
|
21 |
+
$this->type = '';
|
22 |
+
$this->image = $connector->get_image();
|
23 |
+
$this->name = $connector->name;
|
24 |
+
$this->desc = $connector->desc;
|
25 |
+
$this->slug = $slug;
|
26 |
+
$this->connector = $connector;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get Type.
|
31 |
+
*/
|
32 |
+
public function get_type() {
|
33 |
+
return $this->type;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get connector name.
|
38 |
+
*/
|
39 |
+
public function get_name() {
|
40 |
+
return $this->name;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get connector description.
|
45 |
+
*/
|
46 |
+
public function get_desc() {
|
47 |
+
return $this->desc;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get connector slug.
|
52 |
+
*/
|
53 |
+
public function get_slug() {
|
54 |
+
return $this->slug;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Buttons in card for connected integrations.
|
59 |
+
*
|
60 |
+
* @param string $connector_slug - Connector slug.
|
61 |
+
*/
|
62 |
+
public function wcap_connected_buttons( $connector_slug = '' ) {
|
63 |
+
|
64 |
+
$connector_slug = '' === $connector_slug ? $this->get_slug() : $connector_slug;
|
65 |
+
$buttons_html = '<button class="wcap_button_disconnect" data-wcap-title="' . $this->name . '" data-wcap-name="' . $connector_slug . '"><span id="span_disconnect" class="dashicon dashicons dashicons-no-alt"></span>' . __( 'Disconnect', 'woocommerce-ac' ) . '</button>';
|
66 |
+
if ( ! isset( $this->connector->disable_sync ) ) {
|
67 |
+
$buttons_html .= '<button class="wcap_button_sync" data-wcap-name="' . $connector_slug . '">' . __( 'Sync', 'woocommerce-ac' ) . '</button>';
|
68 |
+
}
|
69 |
+
$buttons_html .= '<button class="wcap_settings wcap_button_connect" data-wcap-title="' . $this->name . '" data-wcap-name="' . $connector_slug . '">' . __( 'Settings', 'woocommerce-ac' ) . '</button>';
|
70 |
+
return $buttons_html;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Connect buttons.
|
76 |
+
*
|
77 |
+
* @param string $connector_slug - Connector Slug.
|
78 |
+
*/
|
79 |
+
public function wcap_connect_button( $connector_slug = '' ) {
|
80 |
+
$connector_slug = '' === $connector_slug ? $this->get_slug() : $connector_slug;
|
81 |
+
return '<button class="button-primary wcap_main_connect wcap_button_connect" disabled data-wcap-title="' . $this->name . '" data-wcap-name="' . $connector_slug . '" >' . __( 'Connect', 'woocommerce-ac' ) . '</button>';
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Display buttons in card.
|
86 |
+
*/
|
87 |
+
public function button() {
|
88 |
+
$connector_details = Wcap_Connectors_Common::wcap_get_connectors_data( $this->get_slug() );
|
89 |
+
$connected_buttons = $this->wcap_connected_buttons( $this->get_slug() );
|
90 |
+
$connect_buttons = $this->wcap_connect_button( $this->get_slug() );
|
91 |
+
$connector_status = isset( $connector_details['status'] ) ? $connector_details['status'] : '';
|
92 |
+
$display_connected = 'active' === $connector_status ? 'display:block;' : 'display:none;';
|
93 |
+
$display_connect = 'active' === $connector_status ? 'display:none;' : 'display:block;';
|
94 |
+
echo "<div id='" . $this->get_slug() . "_connect_div' class='wcap_connect_buttons' style='$display_connect'>$connect_buttons</div>"; // phpcs:ignore
|
95 |
+
echo "<div id='" . $this->get_slug() . "_connected_div' class='wcap_connected_buttons' style='$display_connected'>$connected_buttons</div>"; // phpcS:ignore
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Print connector card.
|
100 |
+
*/
|
101 |
+
public function print_card() {
|
102 |
+
?>
|
103 |
+
<div class="wcap-col-md-4">
|
104 |
+
<div class="wcap-connector-wrap" data-type="<?php echo esc_attr( $this->get_type() ); ?>">
|
105 |
+
<div class="wcap-connector_card_outer" style='padding: 20px 15px;'>
|
106 |
+
<div class="wcap-connector-img-outer">
|
107 |
+
<div class="wcap-connector-img">
|
108 |
+
<div class="wcap-connector-img-section">
|
109 |
+
<img class='wcap_connector_icon' src="<?php echo esc_url( $this->image ); ?>"/>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
<div class="clear"></div>
|
113 |
+
</div>
|
114 |
+
<div class="wcap_connector_info">
|
115 |
+
<div class="wcap_connector_info_head"><?php echo esc_html( $this->get_name() ); ?></div>
|
116 |
+
<div class="wcap_connector_info_details"><?php echo esc_html__( $this->get_desc(), 'woocommerce-ac' ); // phpcs:ignore ?></div>
|
117 |
+
</div>
|
118 |
+
<div class="clear"></div>
|
119 |
+
</div>
|
120 |
+
<div class="wcap-connector-action">
|
121 |
+
<div class="wcap-connector-btns">
|
122 |
+
<?php $this->button(); ?>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
<?php
|
128 |
+
}
|
129 |
+
|
130 |
+
}
|
includes/connectors/custom_smtp/connector.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CustomSMTP Connector file *
|
4 |
+
* Icon from https://www.iconpacks.net/icons/1/free-mail-icon-142-thumb.png.
|
5 |
+
*
|
6 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/CustomSMTP
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class for CustomSMTP Connector
|
11 |
+
*/
|
12 |
+
class Wcap_Custom_SMTP extends Wcap_Connector {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Connector Name
|
16 |
+
*
|
17 |
+
* @var $connector_name
|
18 |
+
*/
|
19 |
+
public $connector_name = 'Custom SMTP';
|
20 |
+
/**
|
21 |
+
* Slug Name
|
22 |
+
*
|
23 |
+
* @var $slug
|
24 |
+
*/
|
25 |
+
public $slug = 'wcap_custom_smtp';
|
26 |
+
/**
|
27 |
+
* Name
|
28 |
+
*
|
29 |
+
* @var $name
|
30 |
+
*/
|
31 |
+
public $name = 'Custom SMTP server';
|
32 |
+
/**
|
33 |
+
* Description
|
34 |
+
*
|
35 |
+
* @var $desc
|
36 |
+
*/
|
37 |
+
public $desc = 'Use a custom SMTP server to send emails to recover abandoned carts.';
|
38 |
+
/**
|
39 |
+
* Sync Disabled
|
40 |
+
*
|
41 |
+
* @var $sync_disabled
|
42 |
+
*/
|
43 |
+
public $disable_sync = true;
|
44 |
+
/**
|
45 |
+
* Signle instance of the class
|
46 |
+
*
|
47 |
+
* @var $ins
|
48 |
+
*/
|
49 |
+
private static $ins = null;
|
50 |
+
/**
|
51 |
+
* Custom SMTP Connection.
|
52 |
+
*
|
53 |
+
* @var $wcap_custom_smtp_settings.
|
54 |
+
*/
|
55 |
+
public static $wcap_custom_smtp_settings = false;
|
56 |
+
/**
|
57 |
+
* Construct. Add hooks and filters.
|
58 |
+
*
|
59 |
+
* @var array All calls with object.
|
60 |
+
*/
|
61 |
+
public function __construct() {
|
62 |
+
$this->wcap_define_plugin_properties();
|
63 |
+
$this->connector_url = WCAP_CUSTOMSMTP_PLUGIN_URL;
|
64 |
+
add_action( 'wp_ajax_wcap_save_connector_settings', array( &$this, 'wcap_save_connector_settings' ), 9 );
|
65 |
+
add_filter( 'wcap_basic_connectors_loaded', array( &$this, 'wcap_basic_connectors_loaded' ), 9, 1 );
|
66 |
+
}
|
67 |
+
/**
|
68 |
+
* Function to define constans
|
69 |
+
*/
|
70 |
+
public function wcap_define_plugin_properties() {
|
71 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_VERSION' ) ) {
|
72 |
+
define( 'WCAP_CUSTOMSMTP_VERSION', '1.0.0' );
|
73 |
+
}
|
74 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_FULL_NAME' ) ) {
|
75 |
+
define( 'WCAP_CUSTOMSMTP_FULL_NAME', 'Abandoned Carts Automations Connectors: CustomSMTP' );
|
76 |
+
}
|
77 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_PLUGIN_FILE' ) ) {
|
78 |
+
define( 'WCAP_CUSTOMSMTP_PLUGIN_FILE', __FILE__ );
|
79 |
+
}
|
80 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_PLUGIN_DIR' ) ) {
|
81 |
+
define( 'WCAP_CUSTOMSMTP_PLUGIN_DIR', __DIR__ );
|
82 |
+
}
|
83 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_PLUGIN_URL' ) ) {
|
84 |
+
define( 'WCAP_CUSTOMSMTP_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_CUSTOMSMTP_PLUGIN_FILE ) ) );
|
85 |
+
}
|
86 |
+
if ( ! defined( 'WCAP_CUSTOMSMTP_PLUGIN_BASENAME' ) ) {
|
87 |
+
define( 'WCAP_CUSTOMSMTP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Function to re-arrange connectors list
|
93 |
+
*
|
94 |
+
* @param array $connector_list - list of connectors.
|
95 |
+
*/
|
96 |
+
public function wcap_basic_connectors_loaded( $connector_list ) {
|
97 |
+
$custom_smtp = $connector_list['wcap_custom_smtp'];
|
98 |
+
unset( $connector_list['wcap_custom_smtp'] );
|
99 |
+
$connector_list = array_merge( array( 'wcap_custom_smtp' => $custom_smtp ), $connector_list );
|
100 |
+
return $connector_list;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Function to Add card in connector's main page.
|
105 |
+
*
|
106 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
107 |
+
*/
|
108 |
+
public function add_card( $available_connectors ) {
|
109 |
+
$available_connectors['wcap']['connectors'][ $this->slug ] = array(
|
110 |
+
'name' => $this->name,
|
111 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
112 |
+
'connector_class' => 'Wcap_CustomSMTP',
|
113 |
+
'image' => $this->get_image(),
|
114 |
+
'source' => '',
|
115 |
+
'file' => '',
|
116 |
+
);
|
117 |
+
|
118 |
+
return $available_connectors;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Function to get instance.
|
123 |
+
*/
|
124 |
+
public static function get_instance() {
|
125 |
+
if ( null === self::$ins ) {
|
126 |
+
self::$ins = new self();
|
127 |
+
}
|
128 |
+
return self::$ins;
|
129 |
+
}
|
130 |
+
}
|
includes/connectors/custom_smtp/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/custom_smtp/views/logo.png
ADDED
Binary file
|
includes/connectors/drip/connector.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Drip Connector file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/Drip
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for Drip Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Drip extends Wcap_Connector {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Connector Name
|
15 |
+
*
|
16 |
+
* @var $connector_name
|
17 |
+
*/
|
18 |
+
public $connector_name = 'drip';
|
19 |
+
/**
|
20 |
+
* Slug Name
|
21 |
+
*
|
22 |
+
* @var $slug
|
23 |
+
*/
|
24 |
+
public $slug = 'wcap_drip';
|
25 |
+
/**
|
26 |
+
* Name
|
27 |
+
*
|
28 |
+
* @var $name
|
29 |
+
*/
|
30 |
+
public $name = 'Drip';
|
31 |
+
/**
|
32 |
+
* Description
|
33 |
+
*
|
34 |
+
* @var $desc
|
35 |
+
*/
|
36 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to Drip.';
|
37 |
+
/**
|
38 |
+
* Single instance of the class
|
39 |
+
*
|
40 |
+
* @var $ins
|
41 |
+
*/
|
42 |
+
private static $ins = null;
|
43 |
+
/**
|
44 |
+
* API Endpoint.
|
45 |
+
*
|
46 |
+
* @var $api_end_point
|
47 |
+
*/
|
48 |
+
public static $api_end_point = 'https://api.getdrip.com/';
|
49 |
+
/**
|
50 |
+
* API Call Headers.
|
51 |
+
*
|
52 |
+
* @var $headers
|
53 |
+
*/
|
54 |
+
public static $headers = null;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* All calls with object
|
58 |
+
*
|
59 |
+
* @var array Call files.
|
60 |
+
*/
|
61 |
+
public $registered_calls = array();
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Construct.
|
65 |
+
*/
|
66 |
+
public function __construct() {
|
67 |
+
$this->wcap_define_plugin_properties();
|
68 |
+
$this->connector_url = WCAP_DRIP_PLUGIN_URL;
|
69 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Function to define constants.
|
74 |
+
*/
|
75 |
+
public function wcap_define_plugin_properties() {
|
76 |
+
if ( ! defined( 'WCAP_DRIP_VERSION' ) ) {
|
77 |
+
define( 'WCAP_DRIP_VERSION', '1.0.0' );
|
78 |
+
}
|
79 |
+
if ( ! defined( 'WCAP_DRIP_FULL_NAME' ) ) {
|
80 |
+
define( 'WCAP_DRIP_FULL_NAME', 'Abandoned Carts Automations Connectors: DRIP' );
|
81 |
+
}
|
82 |
+
if ( ! defined( 'WCAP_DRIP_PLUGIN_FILE' ) ) {
|
83 |
+
define( 'WCAP_DRIP_PLUGIN_FILE', __FILE__ );
|
84 |
+
}
|
85 |
+
if ( ! defined( 'WCAP_DRIP_PLUGIN_DIR' ) ) {
|
86 |
+
define( 'WCAP_DRIP_PLUGIN_DIR', __DIR__ );
|
87 |
+
}
|
88 |
+
if ( ! defined( 'WCAP_DRIP_PLUGIN_URL' ) ) {
|
89 |
+
define( 'WCAP_DRIP_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_DRIP_PLUGIN_FILE ) ) );
|
90 |
+
}
|
91 |
+
if ( ! defined( 'WCAP_DRIP_PLUGIN_BASENAME' ) ) {
|
92 |
+
define( 'WCAP_DRIP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Function to Add card in connector's main page.
|
98 |
+
*
|
99 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
100 |
+
*/
|
101 |
+
public function add_card( $available_connectors ) {
|
102 |
+
$available_connectors['wcap']['connectors']['wcap_drip'] = array(
|
103 |
+
'name' => $this->name,
|
104 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), // phpcs:ignore
|
105 |
+
'connector_class' => 'Wcap_Drip',
|
106 |
+
'image' => $this->get_image(),
|
107 |
+
'source' => '',
|
108 |
+
'file' => '',
|
109 |
+
);
|
110 |
+
|
111 |
+
return $available_connectors;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Function to get instance.
|
116 |
+
*/
|
117 |
+
public static function get_instance() {
|
118 |
+
if ( null === self::$ins ) {
|
119 |
+
self::$ins = new self();
|
120 |
+
}
|
121 |
+
|
122 |
+
return self::$ins;
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
includes/connectors/drip/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
includes/connectors/drip/views/icon.png
ADDED
Binary file
|
includes/connectors/drip/views/logo.png
ADDED
Binary file
|
includes/connectors/fluentcrm/connector.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FluentCRM connector class
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/fluentcrm
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for FluenctCRM Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Fluentcrm extends Wcap_Connector {
|
12 |
+
/**
|
13 |
+
* Connector Name
|
14 |
+
*
|
15 |
+
* @var $connector_name
|
16 |
+
*/
|
17 |
+
public $connector_name = 'fluentcrm';
|
18 |
+
/**
|
19 |
+
* Slug Name
|
20 |
+
*
|
21 |
+
* @var $slug
|
22 |
+
*/
|
23 |
+
public $slug = 'wcap_fluentcrm';
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var $name
|
28 |
+
*/
|
29 |
+
public $name = 'Fluentcrm';
|
30 |
+
/**
|
31 |
+
* Description
|
32 |
+
*
|
33 |
+
* @var $desc
|
34 |
+
*/
|
35 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to Fluentcrm.';
|
36 |
+
/**
|
37 |
+
* Signle instance of the class
|
38 |
+
*
|
39 |
+
* @var $ins
|
40 |
+
*/
|
41 |
+
private static $ins = null;
|
42 |
+
/**
|
43 |
+
* Headers for Curl calls
|
44 |
+
*
|
45 |
+
* @var $headers
|
46 |
+
*/
|
47 |
+
public static $headers = null;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of events
|
51 |
+
*
|
52 |
+
* @var array All calls with object
|
53 |
+
*/
|
54 |
+
public $events = array( 'Created Cart', 'Modifed Cart', 'Ignored Cart', 'Recovered Cart', 'Order Placed' );
|
55 |
+
/**
|
56 |
+
* Array of registered calls for function
|
57 |
+
*
|
58 |
+
* @var array All calls with object
|
59 |
+
*/
|
60 |
+
public $registered_calls = array();
|
61 |
+
/**
|
62 |
+
* Construct. Add hooks and filters.
|
63 |
+
*
|
64 |
+
* @var array All calls with object.
|
65 |
+
*/
|
66 |
+
public function __construct() {
|
67 |
+
|
68 |
+
if ( strstr( $_SERVER['REQUEST_URI'], 'wp-json' ) ) { //phpcs:ignore
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
$this->wcap_define_plugin_properties();
|
72 |
+
$this->connector_url = WCAP_FLUENTCRM_PLUGIN_URL;
|
73 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Function to define constans
|
78 |
+
*/
|
79 |
+
public function wcap_define_plugin_properties() {
|
80 |
+
if ( ! defined( 'WCAP_FLUENTCRM_VERSION' ) ) {
|
81 |
+
define( 'WCAP_FLUENTCRM_VERSION', '1.0.0' );
|
82 |
+
}
|
83 |
+
if ( ! defined( 'WCAP_FLUENTCRM_FULL_NAME' ) ) {
|
84 |
+
define( 'WCAP_FLUENTCRM_FULL_NAME', 'Abandoned Carts Automations Connectors: FLUENTCRM' );
|
85 |
+
}
|
86 |
+
if ( ! defined( 'WCAP_FLUENTCRM_PLUGIN_FILE' ) ) {
|
87 |
+
define( 'WCAP_FLUENTCRM_PLUGIN_FILE', __FILE__ );
|
88 |
+
}
|
89 |
+
if ( ! defined( 'WCAP_FLUENTCRM_PLUGIN_DIR' ) ) {
|
90 |
+
define( 'WCAP_FLUENTCRM_PLUGIN_DIR', __DIR__ );
|
91 |
+
}
|
92 |
+
if ( ! defined( 'WCAP_FLUENTCRM_PLUGIN_URL' ) ) {
|
93 |
+
define( 'WCAP_FLUENTCRM_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_FLUENTCRM_PLUGIN_FILE ) ) );
|
94 |
+
}
|
95 |
+
if ( ! defined( 'WCAP_FLUENTCRM_PLUGIN_BASENAME' ) ) {
|
96 |
+
define( 'WCAP_FLUENTCRM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Function to Add card in connector's main page.
|
102 |
+
*
|
103 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
104 |
+
*/
|
105 |
+
public function add_card( $available_connectors ) {
|
106 |
+
$available_connectors['wcap']['connectors']['wcap_fluentcrm'] = array(
|
107 |
+
'name' => $this->name,
|
108 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
109 |
+
'connector_class' => 'Wcap_Fluentcrm',
|
110 |
+
'image' => $this->get_image(),
|
111 |
+
'source' => '',
|
112 |
+
'file' => '',
|
113 |
+
);
|
114 |
+
|
115 |
+
return $available_connectors;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Function to get instance.
|
120 |
+
*/
|
121 |
+
public static function get_instance() {
|
122 |
+
if ( null === self::$ins ) {
|
123 |
+
self::$ins = new self();
|
124 |
+
}
|
125 |
+
|
126 |
+
return self::$ins;
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
includes/connectors/fluentcrm/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/fluentcrm/views/icon.png
ADDED
Binary file
|
includes/connectors/fluentcrm/views/logo.png
ADDED
Binary file
|
includes/connectors/hubspot/connector.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Hubspot Connector file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/Hubspot
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for Hubspot Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Hubspot extends Wcap_Connector {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Connector Name
|
15 |
+
*
|
16 |
+
* @var $connector_name
|
17 |
+
*/
|
18 |
+
public $connector_name = 'hubspot';
|
19 |
+
/**
|
20 |
+
* Slug Name
|
21 |
+
*
|
22 |
+
* @var $slug
|
23 |
+
*/
|
24 |
+
public $slug = 'wcap_hubspot';
|
25 |
+
/**
|
26 |
+
* Name
|
27 |
+
*
|
28 |
+
* @var $name
|
29 |
+
*/
|
30 |
+
public $name = 'HubSpot';
|
31 |
+
/**
|
32 |
+
* Description
|
33 |
+
*
|
34 |
+
* @var $desc
|
35 |
+
*/
|
36 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to HubSpot.';
|
37 |
+
/**
|
38 |
+
* Single instance of the class
|
39 |
+
*
|
40 |
+
* @var $ins
|
41 |
+
*/
|
42 |
+
private static $ins = null;
|
43 |
+
/**
|
44 |
+
* API Endpoint.
|
45 |
+
*
|
46 |
+
* @var $api_end_point
|
47 |
+
*/
|
48 |
+
public static $api_end_point = 'https://api.hubapi.com/';
|
49 |
+
/**
|
50 |
+
* API Call Headers.
|
51 |
+
*
|
52 |
+
* @var $headers
|
53 |
+
*/
|
54 |
+
public static $headers = null;
|
55 |
+
/**
|
56 |
+
* Property Group ID.
|
57 |
+
*
|
58 |
+
* @var $property_grp_id
|
59 |
+
*/
|
60 |
+
public $property_grp_id = null;
|
61 |
+
/**
|
62 |
+
* Properties.
|
63 |
+
*
|
64 |
+
* @var $properties.
|
65 |
+
*/
|
66 |
+
public $properties = null;
|
67 |
+
/**
|
68 |
+
* Lists.
|
69 |
+
*
|
70 |
+
* @var $lists
|
71 |
+
*/
|
72 |
+
public $lists = null;
|
73 |
+
/**
|
74 |
+
* Workflows.
|
75 |
+
*
|
76 |
+
* @var $workflows
|
77 |
+
*/
|
78 |
+
public $workflows = null;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* All calls with object
|
82 |
+
*
|
83 |
+
* @var $registered_calls
|
84 |
+
*/
|
85 |
+
public $registered_calls = array();
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Construct.
|
89 |
+
*/
|
90 |
+
public function __construct() {
|
91 |
+
$this->wcap_define_plugin_properties();
|
92 |
+
$this->connector_url = WCAP_HUBSPOT_PLUGIN_URL;
|
93 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Function to define constants.
|
98 |
+
*/
|
99 |
+
public function wcap_define_plugin_properties() {
|
100 |
+
if ( ! defined( 'WCAP_HUBSPOT_VERSION' ) ) {
|
101 |
+
define( 'WCAP_HUBSPOT_VERSION', '1.0.0' );
|
102 |
+
}
|
103 |
+
if ( ! defined( 'WCAP_HUBSPOT_FULL_NAME' ) ) {
|
104 |
+
define( 'WCAP_HUBSPOT_FULL_NAME', 'Abandoned Carts Automations Connectors: Hubspot' );
|
105 |
+
}
|
106 |
+
if ( ! defined( 'WCAP_HUBSPOT_PLUGIN_FILE' ) ) {
|
107 |
+
define( 'WCAP_HUBSPOT_PLUGIN_FILE', __FILE__ );
|
108 |
+
}
|
109 |
+
if ( ! defined( 'WCAP_HUBSPOT_PLUGIN_DIR' ) ) {
|
110 |
+
define( 'WCAP_HUBSPOT_PLUGIN_DIR', __DIR__ );
|
111 |
+
}
|
112 |
+
if ( ! defined( 'WCAP_HUBSPOT_PLUGIN_URL' ) ) {
|
113 |
+
define( 'WCAP_HUBSPOT_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_HUBSPOT_PLUGIN_FILE ) ) );
|
114 |
+
}
|
115 |
+
if ( ! defined( 'WCAP_HUBSPOT_PLUGIN_BASENAME' ) ) {
|
116 |
+
define( 'WCAP_HUBSPOT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Function to Add card in connector's main page.
|
122 |
+
*
|
123 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
124 |
+
*/
|
125 |
+
public function add_card( $available_connectors ) {
|
126 |
+
$available_connectors['wcap']['connectors']['wcap_hubspot'] = array(
|
127 |
+
'name' => $this->name,
|
128 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), // phpcs:ignore
|
129 |
+
'connector_class' => 'Wcap_Hubspot',
|
130 |
+
'image' => $this->get_image(),
|
131 |
+
'source' => '',
|
132 |
+
'file' => '',
|
133 |
+
);
|
134 |
+
|
135 |
+
return $available_connectors;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Function to get instance.
|
140 |
+
*/
|
141 |
+
public static function get_instance() {
|
142 |
+
if ( null === self::$ins ) {
|
143 |
+
self::$ins = new self();
|
144 |
+
}
|
145 |
+
|
146 |
+
return self::$ins;
|
147 |
+
}
|
148 |
+
}
|
includes/connectors/hubspot/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
includes/connectors/hubspot/views/icon.png
ADDED
Binary file
|
includes/connectors/hubspot/views/logo.png
ADDED
Binary file
|
includes/connectors/klaviyo/connector.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* AC insert and update file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/klaviyo
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for ActiveCapmaign Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Klaviyo extends Wcap_Connector {
|
12 |
+
/**
|
13 |
+
* Connector Name
|
14 |
+
*
|
15 |
+
* @var $connector_name
|
16 |
+
*/
|
17 |
+
public $connector_name = 'klaviyo';
|
18 |
+
/**
|
19 |
+
* Slug Name
|
20 |
+
*
|
21 |
+
* @var $slug
|
22 |
+
*/
|
23 |
+
public $slug = 'wcap_klaviyo';
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var $name
|
28 |
+
*/
|
29 |
+
public $name = 'Klaviyo';
|
30 |
+
/**
|
31 |
+
* Description
|
32 |
+
*
|
33 |
+
* @var $desc
|
34 |
+
*/
|
35 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to Klaviyo.';
|
36 |
+
/**
|
37 |
+
* Signle instance of the class
|
38 |
+
*
|
39 |
+
* @var $ins
|
40 |
+
*/
|
41 |
+
private static $ins = null;
|
42 |
+
/**
|
43 |
+
* Headers for Curl calls
|
44 |
+
*
|
45 |
+
* @var $headers
|
46 |
+
*/
|
47 |
+
public static $headers = null;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of events
|
51 |
+
*
|
52 |
+
* @var array All calls with object
|
53 |
+
*/
|
54 |
+
public $events = array( 'Created Cart', 'Modifed Cart', 'Ignored Cart', 'Recovered Cart', 'Deleted Cart' );
|
55 |
+
/**
|
56 |
+
* Array of registered calls for function
|
57 |
+
*
|
58 |
+
* @var array All calls with object
|
59 |
+
*/
|
60 |
+
public $registered_calls = array();
|
61 |
+
/**
|
62 |
+
* Construct. Add hooks and filters.
|
63 |
+
*
|
64 |
+
* @var array All calls with object.
|
65 |
+
*/
|
66 |
+
public function __construct() {
|
67 |
+
$this->wcap_define_plugin_properties();
|
68 |
+
$this->connector_url = WCAP_KLAVIYO_PLUGIN_URL;
|
69 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Function to define constans
|
74 |
+
*/
|
75 |
+
public function wcap_define_plugin_properties() {
|
76 |
+
if ( ! defined( 'WCAP_KLAVIYO_VERSION' ) ) {
|
77 |
+
define( 'WCAP_KLAVIYO_VERSION', '1.0.0' );
|
78 |
+
}
|
79 |
+
if ( ! defined( 'WCAP_KLAVIYO_FULL_NAME' ) ) {
|
80 |
+
define( 'WCAP_KLAVIYO_FULL_NAME', 'Abandoned Carts Automations Connectors: KLAVIYO' );
|
81 |
+
}
|
82 |
+
if ( ! defined( 'WCAP_KLAVIYO_PLUGIN_FILE' ) ) {
|
83 |
+
define( 'WCAP_KLAVIYO_PLUGIN_FILE', __FILE__ );
|
84 |
+
}
|
85 |
+
if ( ! defined( 'WCAP_KLAVIYO_PLUGIN_DIR' ) ) {
|
86 |
+
define( 'WCAP_KLAVIYO_PLUGIN_DIR', __DIR__ );
|
87 |
+
}
|
88 |
+
if ( ! defined( 'WCAP_KLAVIYO_PLUGIN_URL' ) ) {
|
89 |
+
define( 'WCAP_KLAVIYO_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_KLAVIYO_PLUGIN_FILE ) ) );
|
90 |
+
}
|
91 |
+
if ( ! defined( 'WCAP_KLAVIYO_PLUGIN_BASENAME' ) ) {
|
92 |
+
define( 'WCAP_KLAVIYO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Function to Add card in connector's main page.
|
98 |
+
*
|
99 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
100 |
+
*/
|
101 |
+
public function add_card( $available_connectors ) {
|
102 |
+
$available_connectors['wcap']['connectors']['wcap_klaviyo'] = array(
|
103 |
+
'name' => $this->name,
|
104 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
105 |
+
'connector_class' => 'Wcap_Klaviyo',
|
106 |
+
'image' => $this->get_image(),
|
107 |
+
'source' => '',
|
108 |
+
'file' => '',
|
109 |
+
);
|
110 |
+
|
111 |
+
return $available_connectors;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Function to get instance.
|
116 |
+
*/
|
117 |
+
public static function get_instance() {
|
118 |
+
if ( null === self::$ins ) {
|
119 |
+
self::$ins = new self();
|
120 |
+
}
|
121 |
+
|
122 |
+
return self::$ins;
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
includes/connectors/klaviyo/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/klaviyo/views/icon.png
ADDED
Binary file
|
includes/connectors/klaviyo/views/logo.png
ADDED
Binary file
|
includes/connectors/mailchimp/connector.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Mailchimp Connector file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/Hubspot
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for Mailchimp Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Mailchimp extends Wcap_Connector {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Connector Name
|
15 |
+
*
|
16 |
+
* @var $connector_name
|
17 |
+
*/
|
18 |
+
public $connector_name = 'mailchimp';
|
19 |
+
/**
|
20 |
+
* Slug Name
|
21 |
+
*
|
22 |
+
* @var $slug
|
23 |
+
*/
|
24 |
+
public $slug = 'wcap_mailchimp';
|
25 |
+
/**
|
26 |
+
* Name
|
27 |
+
*
|
28 |
+
* @var $name
|
29 |
+
*/
|
30 |
+
public $name = 'Mailchimp';
|
31 |
+
/**
|
32 |
+
* Description
|
33 |
+
*
|
34 |
+
* @var $desc
|
35 |
+
*/
|
36 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to Mailchimp.';
|
37 |
+
/**
|
38 |
+
* Single instance of the class
|
39 |
+
*
|
40 |
+
* @var $ins
|
41 |
+
*/
|
42 |
+
private static $ins = null;
|
43 |
+
/**
|
44 |
+
* API Endpoint.
|
45 |
+
*
|
46 |
+
* @var $api_end_point
|
47 |
+
*/
|
48 |
+
public static $api_end_point = 'https://<dc>.api.mailchimp.com/';
|
49 |
+
/**
|
50 |
+
* API Call Headers.
|
51 |
+
*
|
52 |
+
* @var $headers
|
53 |
+
*/
|
54 |
+
public static $headers = null;
|
55 |
+
/**
|
56 |
+
* All calls with object
|
57 |
+
*
|
58 |
+
* @var $registered_calls
|
59 |
+
*/
|
60 |
+
public $registered_calls = array();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Construct.
|
64 |
+
*/
|
65 |
+
public function __construct() {
|
66 |
+
$this->wcap_define_plugin_properties();
|
67 |
+
$this->connector_url = WCAP_MAILCHIMP_PLUGIN_URL;
|
68 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Function to define constants.
|
73 |
+
*/
|
74 |
+
public function wcap_define_plugin_properties() {
|
75 |
+
if ( ! defined( 'WCAP_MAILCHIMP_VERSION' ) ) {
|
76 |
+
define( 'WCAP_MAILCHIMP_VERSION', '1.0.0' );
|
77 |
+
}
|
78 |
+
if ( ! defined( 'WCAP_MAILCHIMP_FULL_NAME' ) ) {
|
79 |
+
define( 'WCAP_MAILCHIMP_FULL_NAME', 'Abandoned Carts Automations Connectors: Mailchimp' );
|
80 |
+
}
|
81 |
+
if ( ! defined( 'WCAP_MAILCHIMP_PLUGIN_FILE' ) ) {
|
82 |
+
define( 'WCAP_MAILCHIMP_PLUGIN_FILE', __FILE__ );
|
83 |
+
}
|
84 |
+
if ( ! defined( 'WCAP_MAILCHIMP_PLUGIN_DIR' ) ) {
|
85 |
+
define( 'WCAP_MAILCHIMP_PLUGIN_DIR', __DIR__ );
|
86 |
+
}
|
87 |
+
if ( ! defined( 'WCAP_MAILCHIMP_PLUGIN_URL' ) ) {
|
88 |
+
define( 'WCAP_MAILCHIMP_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_MAILCHIMP_PLUGIN_FILE ) ) );
|
89 |
+
}
|
90 |
+
if ( ! defined( 'WCAP_MAILCHIMP_PLUGIN_BASENAME' ) ) {
|
91 |
+
define( 'WCAP_MAILCHIMP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Function to Add card in connector's main page.
|
97 |
+
*
|
98 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
99 |
+
*/
|
100 |
+
public function add_card( $available_connectors ) {
|
101 |
+
$available_connectors['wcap']['connectors']['wcap_mailchimp'] = array(
|
102 |
+
'name' => $this->name,
|
103 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), // phpcs:ignore
|
104 |
+
'connector_class' => 'Wcap_Mailchimp',
|
105 |
+
'image' => $this->get_image(),
|
106 |
+
'source' => '',
|
107 |
+
'file' => '',
|
108 |
+
);
|
109 |
+
|
110 |
+
return $available_connectors;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Function to get instance.
|
115 |
+
*/
|
116 |
+
public static function get_instance() {
|
117 |
+
if ( null === self::$ins ) {
|
118 |
+
self::$ins = new self();
|
119 |
+
}
|
120 |
+
|
121 |
+
return self::$ins;
|
122 |
+
}
|
123 |
+
|
124 |
+
}
|
includes/connectors/mailchimp/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/mailchimp/views/icon.png
ADDED
Binary file
|
includes/connectors/mailchimp/views/logo.png
ADDED
Binary file
|
includes/connectors/mailjet/connector.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* MAiljet Connector file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/Mailjet
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for Mailjet Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Mailjet extends Wcap_Connector {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Connector Name
|
15 |
+
*
|
16 |
+
* @var $connector_name
|
17 |
+
*/
|
18 |
+
public $connector_name = 'mailjet';
|
19 |
+
/**
|
20 |
+
* Slug Name
|
21 |
+
*
|
22 |
+
* @var $slug
|
23 |
+
*/
|
24 |
+
public $slug = 'wcap_mailjet';
|
25 |
+
/**
|
26 |
+
* Name
|
27 |
+
*
|
28 |
+
* @var $name
|
29 |
+
*/
|
30 |
+
public $name = 'Mailjet';
|
31 |
+
/**
|
32 |
+
* Description
|
33 |
+
*
|
34 |
+
* @var $desc
|
35 |
+
*/
|
36 |
+
public $desc = 'Send emails collected from the plugin and add them to contacts list on Mailjet.';
|
37 |
+
/**
|
38 |
+
* Signle instance of the class
|
39 |
+
*
|
40 |
+
* @var $ins
|
41 |
+
*/
|
42 |
+
private static $ins = null;
|
43 |
+
/**
|
44 |
+
* Headers for Curl calls
|
45 |
+
*
|
46 |
+
* @var $headers
|
47 |
+
*/
|
48 |
+
public static $headers = null;
|
49 |
+
/**
|
50 |
+
* Array of registered calls for function
|
51 |
+
*
|
52 |
+
* @var array All calls with object
|
53 |
+
*/
|
54 |
+
public $registered_calls = array();
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Construct. Add hooks and filters.
|
58 |
+
*
|
59 |
+
* @var array All calls with object.
|
60 |
+
*/
|
61 |
+
public function __construct() {
|
62 |
+
$this->wcap_define_plugin_properties();
|
63 |
+
$this->connector_url = WCAP_MAILJET_PLUGIN_URL;
|
64 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
65 |
+
}
|
66 |
+
/**
|
67 |
+
* Function to define constans
|
68 |
+
*/
|
69 |
+
public function wcap_define_plugin_properties() {
|
70 |
+
if ( ! defined( 'WCAP_MAILJET_VERSION' ) ) {
|
71 |
+
define( 'WCAP_MAILJET_VERSION', '1.0.0' );
|
72 |
+
}
|
73 |
+
if ( ! defined( 'WCAP_MAILJET_FULL_NAME' ) ) {
|
74 |
+
define( 'WCAP_MAILJET_FULL_NAME', 'Abandoned Carts Automations Connectors: Mailjet' );
|
75 |
+
}
|
76 |
+
if ( ! defined( 'WCAP_MAILJET_PLUGIN_FILE' ) ) {
|
77 |
+
define( 'WCAP_MAILJET_PLUGIN_FILE', __FILE__ );
|
78 |
+
}
|
79 |
+
if ( ! defined( 'WCAP_MAILJET_PLUGIN_DIR' ) ) {
|
80 |
+
define( 'WCAP_MAILJET_PLUGIN_DIR', __DIR__ );
|
81 |
+
}
|
82 |
+
if ( ! defined( 'WCAP_MAILJET_PLUGIN_URL' ) ) {
|
83 |
+
define( 'WCAP_MAILJET_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_MAILJET_PLUGIN_FILE ) ) );
|
84 |
+
}
|
85 |
+
if ( ! defined( 'WCAP_MAILJET_PLUGIN_BASENAME' ) ) {
|
86 |
+
define( 'WCAP_MAILJET_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
87 |
+
}
|
88 |
+
}
|
89 |
+
/**
|
90 |
+
* Function to Add card in connector's main page.
|
91 |
+
*
|
92 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
93 |
+
*/
|
94 |
+
public function add_card( $available_connectors ) {
|
95 |
+
$available_connectors['wcap']['connectors']['wcap_mailjet'] = array(
|
96 |
+
'name' => $this->name,
|
97 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
98 |
+
'connector_class' => 'Wcap_Mailjet',
|
99 |
+
'image' => $this->get_image(),
|
100 |
+
'source' => '',
|
101 |
+
'file' => '',
|
102 |
+
);
|
103 |
+
|
104 |
+
return $available_connectors;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Function to get instance.
|
109 |
+
*/
|
110 |
+
public static function get_instance() {
|
111 |
+
if ( null === self::$ins ) {
|
112 |
+
self::$ins = new self();
|
113 |
+
}
|
114 |
+
|
115 |
+
return self::$ins;
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
includes/connectors/mailjet/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/mailjet/views/icon.png
ADDED
Binary file
|
includes/connectors/mailjet/views/logo.png
ADDED
Binary file
|
includes/connectors/sendinblue/connector.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* AC insert and update file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/sendinblue
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for Sendinblue Connector
|
10 |
+
*/
|
11 |
+
class Wcap_Sendinblue extends Wcap_Connector {
|
12 |
+
/**
|
13 |
+
* Connector Name
|
14 |
+
*
|
15 |
+
* @var $connector_name
|
16 |
+
*/
|
17 |
+
public $connector_name = 'sendinblue';
|
18 |
+
/**
|
19 |
+
* Slug Name
|
20 |
+
*
|
21 |
+
* @var $slug
|
22 |
+
*/
|
23 |
+
public $slug = 'wcap_sendinblue';
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var $name
|
28 |
+
*/
|
29 |
+
public $name = 'Sendinblue';
|
30 |
+
/**
|
31 |
+
* Description
|
32 |
+
*
|
33 |
+
* @var $desc
|
34 |
+
*/
|
35 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to Sendinblue.';
|
36 |
+
/**
|
37 |
+
* Signle instance of the class
|
38 |
+
*
|
39 |
+
* @var $ins
|
40 |
+
*/
|
41 |
+
private static $ins = null;
|
42 |
+
/**
|
43 |
+
* Headers for Curl calls
|
44 |
+
*
|
45 |
+
* @var $headers
|
46 |
+
*/
|
47 |
+
public static $headers = null;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of events
|
51 |
+
*
|
52 |
+
* @var array All calls with object
|
53 |
+
*/
|
54 |
+
public $events = array( 'cart_updated', 'cart_updated', 'cart_deleted', 'order_completed', 'order_completed' );
|
55 |
+
/**
|
56 |
+
* Array of registered calls for function
|
57 |
+
*
|
58 |
+
* @var array All calls with object
|
59 |
+
*/
|
60 |
+
public $registered_calls = array();
|
61 |
+
/**
|
62 |
+
* Construct. Add hooks and filters.
|
63 |
+
*
|
64 |
+
* @var array All calls with object.
|
65 |
+
*/
|
66 |
+
public function __construct() {
|
67 |
+
$this->wcap_define_plugin_properties();
|
68 |
+
$this->connector_url = WCAP_SENDINBLUE_PLUGIN_URL;
|
69 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Function to define constans
|
74 |
+
*/
|
75 |
+
public function wcap_define_plugin_properties() {
|
76 |
+
if ( ! defined( 'WCAP_SENDINBLUE_VERSION' ) ) {
|
77 |
+
define( 'WCAP_SENDINBLUE_VERSION', '1.0.0' );
|
78 |
+
}
|
79 |
+
if ( ! defined( 'WCAP_SENDINBLUE_FULL_NAME' ) ) {
|
80 |
+
define( 'WCAP_SENDINBLUE_FULL_NAME', 'Abandoned Carts Automations Connectors: SENDINBLUE' );
|
81 |
+
}
|
82 |
+
if ( ! defined( 'WCAP_SENDINBLUE_PLUGIN_FILE' ) ) {
|
83 |
+
define( 'WCAP_SENDINBLUE_PLUGIN_FILE', __FILE__ );
|
84 |
+
}
|
85 |
+
if ( ! defined( 'WCAP_SENDINBLUE_PLUGIN_DIR' ) ) {
|
86 |
+
define( 'WCAP_SENDINBLUE_PLUGIN_DIR', __DIR__ );
|
87 |
+
}
|
88 |
+
if ( ! defined( 'WCAP_SENDINBLUE_PLUGIN_URL' ) ) {
|
89 |
+
define( 'WCAP_SENDINBLUE_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_SENDINBLUE_PLUGIN_FILE ) ) );
|
90 |
+
}
|
91 |
+
if ( ! defined( 'WCAP_SENDINBLUE_PLUGIN_BASENAME' ) ) {
|
92 |
+
define( 'WCAP_SENDINBLUE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Function to Add card in connector's main page.
|
98 |
+
*
|
99 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
100 |
+
*/
|
101 |
+
public function add_card( $available_connectors ) {
|
102 |
+
$available_connectors['wcap']['connectors']['wcap_sendinblue'] = array(
|
103 |
+
'name' => $this->name,
|
104 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
105 |
+
'connector_class' => 'Wcap_Sendinblue',
|
106 |
+
'image' => $this->get_image(),
|
107 |
+
'source' => '',
|
108 |
+
'file' => '',
|
109 |
+
);
|
110 |
+
|
111 |
+
return $available_connectors;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Function to get instance.
|
116 |
+
*/
|
117 |
+
public static function get_instance() {
|
118 |
+
if ( null === self::$ins ) {
|
119 |
+
self::$ins = new self();
|
120 |
+
}
|
121 |
+
|
122 |
+
return self::$ins;
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
includes/connectors/sendinblue/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/sendinblue/views/icon.png
ADDED
Binary file
|
includes/connectors/sendinblue/views/logo.png
ADDED
Binary file
|
includes/connectors/wp_fusion/connector.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* AC insert and update file
|
4 |
+
*
|
5 |
+
* @package Abandoned-Cart-Pro-for-WooCommerce/Connectors/wp_fusion
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class for ActiveCapmaign Connector
|
10 |
+
*/
|
11 |
+
class Wcap_WP_Fusion extends Wcap_Connector {
|
12 |
+
/**
|
13 |
+
* Connector Name
|
14 |
+
*
|
15 |
+
* @var $connector_name
|
16 |
+
*/
|
17 |
+
public $connector_name = 'wp_fusion';
|
18 |
+
/**
|
19 |
+
* Slug Name
|
20 |
+
*
|
21 |
+
* @var $slug
|
22 |
+
*/
|
23 |
+
public $slug = 'wcap_wp_fusion';
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var $name
|
28 |
+
*/
|
29 |
+
public $name = 'WP Fusion';
|
30 |
+
/**
|
31 |
+
* Description
|
32 |
+
*
|
33 |
+
* @var $desc
|
34 |
+
*/
|
35 |
+
public $desc = 'Send emails and abandoned carts collected from the plugin to WP Fusion.';
|
36 |
+
/**
|
37 |
+
* Signle instance of the class
|
38 |
+
*
|
39 |
+
* @var $ins
|
40 |
+
*/
|
41 |
+
private static $ins = null;
|
42 |
+
/**
|
43 |
+
* Headers for Curl calls
|
44 |
+
*
|
45 |
+
* @var $headers
|
46 |
+
*/
|
47 |
+
public static $headers = null;
|
48 |
+
/**
|
49 |
+
* Array of events
|
50 |
+
*
|
51 |
+
* @var array All calls with object
|
52 |
+
*/
|
53 |
+
public $events = array( 'Created Cart', 'Modifed Cart', 'Ignored Cart', 'Recovered Cart', 'Deleted Cart' );
|
54 |
+
/**
|
55 |
+
* Construct. Add hooks and filters.
|
56 |
+
*
|
57 |
+
* @var array All calls with object.
|
58 |
+
*/
|
59 |
+
public function __construct() {
|
60 |
+
$this->wcap_define_plugin_properties();
|
61 |
+
$this->connector_url = WCAP_WP_FUSION_PLUGIN_URL;
|
62 |
+
add_filter( 'wcap_connectors_loaded', array( $this, 'add_card' ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Function to define constans
|
67 |
+
*/
|
68 |
+
public function wcap_define_plugin_properties() {
|
69 |
+
if ( ! defined( 'WCAP_WP_FUSION_VERSION' ) ) {
|
70 |
+
define( 'WCAP_WP_FUSION_VERSION', '1.0.0' );
|
71 |
+
}
|
72 |
+
if ( ! defined( 'WCAP_WP_FUSION_FULL_NAME' ) ) {
|
73 |
+
define( 'WCAP_WP_FUSION_FULL_NAME', 'Abandoned Carts Automations Connectors: WP_FUSION' );
|
74 |
+
}
|
75 |
+
if ( ! defined( 'WCAP_WP_FUSION_PLUGIN_FILE' ) ) {
|
76 |
+
define( 'WCAP_WP_FUSION_PLUGIN_FILE', __FILE__ );
|
77 |
+
}
|
78 |
+
if ( ! defined( 'WCAP_WP_FUSION_PLUGIN_DIR' ) ) {
|
79 |
+
define( 'WCAP_WP_FUSION_PLUGIN_DIR', __DIR__ );
|
80 |
+
}
|
81 |
+
if ( ! defined( 'WCAP_WP_FUSION_PLUGIN_URL' ) ) {
|
82 |
+
define( 'WCAP_WP_FUSION_PLUGIN_URL', untrailingslashit( plugin_dir_url( WCAP_WP_FUSION_PLUGIN_FILE ) ) );
|
83 |
+
}
|
84 |
+
if ( ! defined( 'WCAP_WP_FUSION_PLUGIN_BASENAME' ) ) {
|
85 |
+
define( 'WCAP_WP_FUSION_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Function to Add card in connector's main page.
|
91 |
+
*
|
92 |
+
* @param array $available_connectors - Avaialble connector for display in main connector page.
|
93 |
+
*/
|
94 |
+
public function add_card( $available_connectors ) {
|
95 |
+
$available_connectors['wcap']['connectors']['wcap_wp_fusion'] = array(
|
96 |
+
'name' => $this->name,
|
97 |
+
'desc' => __( $this->desc, 'woocommerce-ac' ), //phpcs:ignore
|
98 |
+
'connector_class' => 'Wcap_WP_Fusion',
|
99 |
+
'image' => $this->get_image(),
|
100 |
+
'source' => '',
|
101 |
+
'file' => '',
|
102 |
+
);
|
103 |
+
|
104 |
+
return $available_connectors;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Function to get instance.
|
109 |
+
*/
|
110 |
+
public static function get_instance() {
|
111 |
+
if ( null === self::$ins ) {
|
112 |
+
self::$ins = new self();
|
113 |
+
}
|
114 |
+
|
115 |
+
return self::$ins;
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
includes/connectors/wp_fusion/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is gloden.
|
includes/connectors/wp_fusion/views/icon.png
ADDED
Binary file
|
includes/connectors/wp_fusion/views/logo.png
ADDED
Binary file
|
includes/frontend/class-wcal-checkout-process.php
CHANGED
@@ -51,11 +51,11 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
51 |
|
52 |
$get_abandoned_id_of_order = get_post_meta( $order_id, 'wcal_recover_order_placed', true );
|
53 |
$get_sent_email_id_of_order = get_post_meta( $order_id, 'wcal_recover_order_placed_sent_id', true );
|
54 |
-
|
55 |
-
if ( isset( $get_sent_email_id_of_order ) && '' !== $get_sent_email_id_of_order ) {
|
56 |
|
57 |
// When Placed order button is clicked, we create post meta for that order, If that meta is found then update our plugin table for recovered cart.
|
58 |
-
$this->
|
59 |
} elseif ( '' !== $get_abandoned_id_of_order && isset( $get_abandoned_id_of_order ) ) {
|
60 |
|
61 |
// If order status is not pending or failed then, we will delete the abandoned cart record. Post meta will be created only if the cut off time has been reached.
|
@@ -125,9 +125,9 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
125 |
* @param integer $wcal_check_email_sent_to_cart - ID of the record in the Email Sent History table.
|
126 |
* @param WC_Order $order - Order Details.
|
127 |
*
|
128 |
-
* @since
|
129 |
*/
|
130 |
-
public function
|
131 |
|
132 |
global $wpdb;
|
133 |
|
@@ -161,15 +161,15 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
161 |
}
|
162 |
|
163 |
// check if more than one reminder email has been sent.
|
164 |
-
$get_old_cart_id = $wpdb->
|
165 |
$wpdb->prepare(
|
166 |
-
'SELECT abandoned_order_id FROM
|
167 |
$wcal_check_email_sent_to_cart
|
168 |
)
|
169 |
);
|
170 |
|
171 |
$get_ids = array();
|
172 |
-
if ( isset( $get_old_cart_id ) ) {
|
173 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
174 |
$get_ids = $wpdb->get_col(
|
175 |
$wpdb->prepare(
|
@@ -182,11 +182,26 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
182 |
$update_sent_history = array();
|
183 |
|
184 |
if ( '' !== get_post_meta( $order_id, 'wcal_abandoned_timestamp', true ) ) {
|
185 |
-
$update_details['abandoned_cart_time']
|
186 |
-
|
187 |
$update_sent_history['abandoned_order_id'] = $cart_id;
|
188 |
|
189 |
delete_post_meta( $order_id, 'wcal_abandoned_timestamp', $update_details['abandoned_cart_time'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
192 |
$wpdb->update(
|
@@ -197,31 +212,13 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
197 |
)
|
198 |
);
|
199 |
|
200 |
-
// update the email sent history table.
|
201 |
-
if ( is_array( $get_ids ) && count( $get_ids ) > 1 ) {
|
202 |
-
$list_ids = implode( ',', $get_ids );
|
203 |
-
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
204 |
-
$wpdb->query(
|
205 |
-
'UPDATE `' . $wcal_sent_email_table_name . '` SET abandoned_order_id = %d WHERE id IN (%s)', // phpcs:ignore
|
206 |
-
(int) $cart_id,
|
207 |
-
$list_ids
|
208 |
-
);
|
209 |
-
} elseif ( isset( $update_sent_history['abandoned_order_id'] ) ) {
|
210 |
-
$wpdb->update( // phpcs:ignore
|
211 |
-
$wcal_sent_email_table_name,
|
212 |
-
$update_sent_history,
|
213 |
-
array(
|
214 |
-
'id' => $wcal_check_email_sent_to_cart,
|
215 |
-
)
|
216 |
-
);
|
217 |
-
}
|
218 |
-
|
219 |
// Add Order Note.
|
220 |
$order->add_order_note( __( 'This order was abandoned & subsequently recovered.', 'woocommerce-abandoned-cart' ) );
|
221 |
delete_post_meta( $order_id, 'wcal_abandoned_cart_id' );
|
222 |
delete_post_meta( $order_id, 'wcal_recover_order_placed' );
|
223 |
delete_post_meta( $order_id, 'wcal_recover_order_placed_sent_id' );
|
224 |
delete_post_meta( $order_id, 'wcal_recovered_email_sent' );
|
|
|
225 |
}
|
226 |
}
|
227 |
|
@@ -439,9 +436,9 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
439 |
}
|
440 |
}
|
441 |
}
|
442 |
-
// in admin, return if status is not processing or completed without updating further.
|
443 |
-
if ( is_admin() && isset
|
444 |
-
$woo_order_status = sanitize_text_field( wp_unslash( $_POST['order_status'] ) );
|
445 |
if ( ! in_array( $woo_order_status, array( 'wc-processing', 'wc-completed' ) ) ) {
|
446 |
return $woo_order_status;
|
447 |
}
|
@@ -458,110 +455,6 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
458 |
return $woo_order_status;
|
459 |
}
|
460 |
|
461 |
-
/**
|
462 |
-
* Updates the Abandoned Cart History table as well as the
|
463 |
-
* Email Sent History table to indicate the order has been
|
464 |
-
* recovered
|
465 |
-
*
|
466 |
-
* @param integer $cart_id - ID of the Abandoned Cart.
|
467 |
-
* @param integer $order_id - Recovered Order ID.
|
468 |
-
* @param integer $wcal_check_email_sent_to_cart - ID of the record in the Email Sent History table.
|
469 |
-
* @param WC_Order $order - Order Details.
|
470 |
-
*
|
471 |
-
* @since 5.3.0
|
472 |
-
*/
|
473 |
-
public function wcal_updated_recovered_cart( $cart_id, $order_id, $wcal_check_email_sent_to_cart, $order ) {
|
474 |
-
|
475 |
-
global $wpdb;
|
476 |
-
|
477 |
-
$wcal_ac_table_name = $wpdb->prefix . 'ac_abandoned_cart_history_lite';
|
478 |
-
$wcal_email_sent_table = $wpdb->prefix . 'ac_sent_history_lite';
|
479 |
-
$wcal_guest_ac_table = $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite';
|
480 |
-
|
481 |
-
// check & make sure that the recovered cart details are not already updated.
|
482 |
-
$get_status = $wpdb->get_col( // phpcs:ignore
|
483 |
-
$wpdb->prepare(
|
484 |
-
'SELECT recovered_cart FROM `' . $wcal_ac_table_name . '` WHERE id = %d', // phpcs:ignore
|
485 |
-
$cart_id
|
486 |
-
)
|
487 |
-
);
|
488 |
-
|
489 |
-
$recovered_status = isset( $get_status[0] ) ? $get_status[0] : '';
|
490 |
-
|
491 |
-
if ( 0 == $recovered_status ) { // phpcs:ignore
|
492 |
-
// Update the cart history table.
|
493 |
-
$update_details = array(
|
494 |
-
'recovered_cart' => $order_id,
|
495 |
-
'cart_ignored' => '1',
|
496 |
-
);
|
497 |
-
|
498 |
-
$current_user_id = get_current_user_id();
|
499 |
-
|
500 |
-
if ( wcal_common::wcal_get_cart_session( 'user_id' ) != $current_user_id && 0 != $current_user_id ) { // phpcs:ignore
|
501 |
-
$update_details['user_id'] = $current_user_id;
|
502 |
-
}
|
503 |
-
|
504 |
-
// check if more than one reminder email has been sent.
|
505 |
-
$get_old_cart_id = $wpdb->get_col( // phpcs:ignore
|
506 |
-
$wpdb->prepare(
|
507 |
-
'SELECT abandoned_order_id FROM `' . $wcal_email_sent_table . '` WHERE id = %d', // phpcs:ignore
|
508 |
-
$wcal_check_email_sent_to_cart
|
509 |
-
)
|
510 |
-
);
|
511 |
-
|
512 |
-
$get_ids = array();
|
513 |
-
if ( isset( $get_old_cart_id ) ) {
|
514 |
-
$get_ids = $wpdb->get_col( // phpcs:ignore
|
515 |
-
$wpdb->prepare(
|
516 |
-
'SELECT id FROM `' . $wcal_email_sent_table . '` WHERE abandoned_order_id = %d', // phpcs:ignore
|
517 |
-
$get_old_cart_id
|
518 |
-
)
|
519 |
-
);
|
520 |
-
}
|
521 |
-
|
522 |
-
$update_sent_history = array();
|
523 |
-
|
524 |
-
if ( '' !== get_post_meta( $order_id, 'wcal_abandoned_timestamp', true ) ) {
|
525 |
-
$update_details['abandoned_cart_time'] = get_post_meta( $order_id, 'wcal_abandoned_timestamp', true );
|
526 |
-
|
527 |
-
$update_sent_history['abandoned_order_id'] = $cart_id;
|
528 |
-
|
529 |
-
delete_post_meta( $order_id, 'wcal_abandoned_timestamp', $update_details['abandoned_cart_time'] );
|
530 |
-
}
|
531 |
-
|
532 |
-
$wpdb->update( // phpcs:ignore
|
533 |
-
$wcal_ac_table_name,
|
534 |
-
$update_details,
|
535 |
-
array( 'id' => $cart_id )
|
536 |
-
);
|
537 |
-
|
538 |
-
// update the email sent history table.
|
539 |
-
if ( is_array( $get_ids ) && count( $get_ids ) > 1 ) {
|
540 |
-
$list_ids = implode( ',', $get_ids );
|
541 |
-
$wpdb->query( // phpcs:ignore
|
542 |
-
$wpdb->prepare(
|
543 |
-
'UPDATE `' . $wcal_email_sent_table . '` SET abandoned_order_id = %d WHERE id IN (%s)', // phpcs:ignore
|
544 |
-
$cart_id,
|
545 |
-
$list_ids
|
546 |
-
)
|
547 |
-
);
|
548 |
-
} elseif ( isset( $update_sent_history['abandoned_order_id'] ) ) {
|
549 |
-
$wpdb->update( // phpcs:ignore
|
550 |
-
$wcal_email_sent_table,
|
551 |
-
$update_sent_history,
|
552 |
-
array( 'id' => $wcal_check_email_sent_to_cart )
|
553 |
-
);
|
554 |
-
}
|
555 |
-
|
556 |
-
// Add Order Note.
|
557 |
-
$order->add_order_note( __( 'This order was abandoned & subsequently recovered.', 'woocommerce-abandoned-cart' ) );
|
558 |
-
delete_post_meta( $order_id, 'wcal_abandoned_cart_id' );
|
559 |
-
delete_post_meta( $order_id, 'wcal_recover_order_placed' );
|
560 |
-
delete_post_meta( $order_id, 'wcal_recover_order_placed_sent_id' );
|
561 |
-
delete_post_meta( $order_id, 'wcal_recovered_email_sent' );
|
562 |
-
}
|
563 |
-
}
|
564 |
-
|
565 |
/**
|
566 |
* When customer clicks on the "Place Order" button on the checkout page, it will identify if we need to keep that cart or
|
567 |
* delete it.
|
@@ -579,13 +472,14 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
579 |
$email_sent_id = wcal_common::wcal_get_cart_session( 'email_sent_id' );
|
580 |
$abandoned_order_id = wcal_common::wcal_get_cart_session( 'abandoned_cart_id_lite' );
|
581 |
$wcal_user_id_of_guest = wcal_common::wcal_get_cart_session( 'user_id' );
|
|
|
582 |
|
583 |
$wcal_history_table_name = $wpdb->prefix . 'ac_abandoned_cart_history_lite';
|
584 |
$wcal_guest_table_name = $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite';
|
585 |
$wcal_sent_email_table_name = $wpdb->prefix . 'ac_sent_history_lite';
|
586 |
|
587 |
$abandoned_order_id_to_save = $abandoned_order_id;
|
588 |
-
if ( (int) $email_sent_id > 0 ) { // recovered cart.
|
589 |
|
590 |
if ( '' == $abandoned_order_id || $abandoned_order_id == false ) { // phpcs:ignore
|
591 |
|
51 |
|
52 |
$get_abandoned_id_of_order = get_post_meta( $order_id, 'wcal_recover_order_placed', true );
|
53 |
$get_sent_email_id_of_order = get_post_meta( $order_id, 'wcal_recover_order_placed_sent_id', true );
|
54 |
+
$recovered = wcal_common::wcal_get_cart_session( 'wcal_recovered_cart' );
|
55 |
+
if ( ( isset( $get_sent_email_id_of_order ) && '' !== $get_sent_email_id_of_order ) || $recovered ) {
|
56 |
|
57 |
// When Placed order button is clicked, we create post meta for that order, If that meta is found then update our plugin table for recovered cart.
|
58 |
+
$this->wcal_updated_recovered_cart( $get_abandoned_id_of_order, $order_id, $get_sent_email_id_of_order, $order );
|
59 |
} elseif ( '' !== $get_abandoned_id_of_order && isset( $get_abandoned_id_of_order ) ) {
|
60 |
|
61 |
// If order status is not pending or failed then, we will delete the abandoned cart record. Post meta will be created only if the cut off time has been reached.
|
125 |
* @param integer $wcal_check_email_sent_to_cart - ID of the record in the Email Sent History table.
|
126 |
* @param WC_Order $order - Order Details.
|
127 |
*
|
128 |
+
* @since 5.3.0
|
129 |
*/
|
130 |
+
public function wcal_updated_recovered_cart( $cart_id, $order_id, $wcal_check_email_sent_to_cart, $order ) {
|
131 |
|
132 |
global $wpdb;
|
133 |
|
161 |
}
|
162 |
|
163 |
// check if more than one reminder email has been sent.
|
164 |
+
$get_old_cart_id = $wpdb->get_var( // phpcs:ignore
|
165 |
$wpdb->prepare(
|
166 |
+
'SELECT abandoned_order_id FROM `' . $wcal_sent_email_table_name . '` WHERE id = %d', // phpcs:ignore
|
167 |
$wcal_check_email_sent_to_cart
|
168 |
)
|
169 |
);
|
170 |
|
171 |
$get_ids = array();
|
172 |
+
if ( isset( $get_old_cart_id ) && $get_old_cart_id > 0 ) {
|
173 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
174 |
$get_ids = $wpdb->get_col(
|
175 |
$wpdb->prepare(
|
182 |
$update_sent_history = array();
|
183 |
|
184 |
if ( '' !== get_post_meta( $order_id, 'wcal_abandoned_timestamp', true ) ) {
|
185 |
+
$update_details['abandoned_cart_time'] = get_post_meta( $order_id, 'wcal_abandoned_timestamp', true );
|
|
|
186 |
$update_sent_history['abandoned_order_id'] = $cart_id;
|
187 |
|
188 |
delete_post_meta( $order_id, 'wcal_abandoned_timestamp', $update_details['abandoned_cart_time'] );
|
189 |
+
// update the email sent history table.
|
190 |
+
if ( is_array( $get_ids ) && count( $get_ids ) > 1 ) {
|
191 |
+
$list_ids = implode( ',', $get_ids );
|
192 |
+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
193 |
+
$wpdb->query(
|
194 |
+
'UPDATE `' . $wcal_sent_email_table_name . "` SET abandoned_order_id = '" . (int) $cart_id . "' WHERE id IN (" . $list_ids . ")" // phpcs:ignore
|
195 |
+
);
|
196 |
+
} else {
|
197 |
+
$wpdb->update( // phpcs:ignore
|
198 |
+
$wcal_sent_email_table_name,
|
199 |
+
$update_sent_history,
|
200 |
+
array(
|
201 |
+
'id' => $wcal_check_email_sent_to_cart,
|
202 |
+
)
|
203 |
+
);
|
204 |
+
}
|
205 |
}
|
206 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
207 |
$wpdb->update(
|
212 |
)
|
213 |
);
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
// Add Order Note.
|
216 |
$order->add_order_note( __( 'This order was abandoned & subsequently recovered.', 'woocommerce-abandoned-cart' ) );
|
217 |
delete_post_meta( $order_id, 'wcal_abandoned_cart_id' );
|
218 |
delete_post_meta( $order_id, 'wcal_recover_order_placed' );
|
219 |
delete_post_meta( $order_id, 'wcal_recover_order_placed_sent_id' );
|
220 |
delete_post_meta( $order_id, 'wcal_recovered_email_sent' );
|
221 |
+
do_action( 'wcal_cart_recovered', $cart_id, $order_id );
|
222 |
}
|
223 |
}
|
224 |
|
436 |
}
|
437 |
}
|
438 |
}
|
439 |
+
// in admin, return if status is not processing or completed without updating further.
|
440 |
+
if ( is_admin() && isset( $_POST['order_status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
441 |
+
$woo_order_status = sanitize_text_field( wp_unslash( $_POST['order_status'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
442 |
if ( ! in_array( $woo_order_status, array( 'wc-processing', 'wc-completed' ) ) ) {
|
443 |
return $woo_order_status;
|
444 |
}
|
455 |
return $woo_order_status;
|
456 |
}
|
457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
/**
|
459 |
* When customer clicks on the "Place Order" button on the checkout page, it will identify if we need to keep that cart or
|
460 |
* delete it.
|
472 |
$email_sent_id = wcal_common::wcal_get_cart_session( 'email_sent_id' );
|
473 |
$abandoned_order_id = wcal_common::wcal_get_cart_session( 'abandoned_cart_id_lite' );
|
474 |
$wcal_user_id_of_guest = wcal_common::wcal_get_cart_session( 'user_id' );
|
475 |
+
$recovered = wcal_common::wcal_get_cart_session( 'wcal_recovered_cart' );
|
476 |
|
477 |
$wcal_history_table_name = $wpdb->prefix . 'ac_abandoned_cart_history_lite';
|
478 |
$wcal_guest_table_name = $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite';
|
479 |
$wcal_sent_email_table_name = $wpdb->prefix . 'ac_sent_history_lite';
|
480 |
|
481 |
$abandoned_order_id_to_save = $abandoned_order_id;
|
482 |
+
if ( (int) $email_sent_id > 0 || $recovered ) { // recovered cart.
|
483 |
|
484 |
if ( '' == $abandoned_order_id || $abandoned_order_id == false ) { // phpcs:ignore
|
485 |
|
includes/templates/template_1.php
CHANGED
@@ -12,7 +12,7 @@ $uid = $admin_usr[0]->id;
|
|
12 |
$admin_phone = get_user_meta( $uid, 'billing_phone', true );
|
13 |
?>
|
14 |
|
15 |
-
<
|
16 |
* {
|
17 |
-webkit-font-smoothing: antialiased;
|
18 |
}
|
@@ -23,17 +23,19 @@ $admin_phone = get_user_meta( $uid, 'billing_phone', true );
|
|
23 |
padding: 0;
|
24 |
}
|
25 |
html {
|
26 |
-
|
|
|
27 |
}
|
28 |
body {
|
29 |
margin: 0;
|
30 |
padding: 0;
|
31 |
color: #808080;
|
32 |
-
width: 100% !important;
|
33 |
font-family: Arial, Helvetica, sans-serif;
|
34 |
-webkit-text-size-adjust: 100%!important;
|
35 |
-ms-text-size-adjust: 100%!important;
|
36 |
-webkit-font-smoothing: antialiased!important;
|
|
|
|
|
37 |
}
|
38 |
img {
|
39 |
outline: none;
|
@@ -116,11 +118,11 @@ $admin_phone = get_user_meta( $uid, 'billing_phone', true );
|
|
116 |
width: 100% !important;
|
117 |
}
|
118 |
}
|
119 |
-
</style></p><p><style type="text/css">
|
120 |
@import url(https://fonts.googleapis.com/css?family=Lato);
|
121 |
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);
|
122 |
@import url(https://fonts.googleapis.com/css?family=Cabin);
|
123 |
-
</style
|
|
|
124 |
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;">
|
125 |
<tr>
|
126 |
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
|
12 |
$admin_phone = get_user_meta( $uid, 'billing_phone', true );
|
13 |
?>
|
14 |
|
15 |
+
<style rel="stylesheet" type="text/css">
|
16 |
* {
|
17 |
-webkit-font-smoothing: antialiased;
|
18 |
}
|
23 |
padding: 0;
|
24 |
}
|
25 |
html {
|
26 |
+
margin: auto;
|
27 |
+
display: table;
|
28 |
}
|
29 |
body {
|
30 |
margin: 0;
|
31 |
padding: 0;
|
32 |
color: #808080;
|
|
|
33 |
font-family: Arial, Helvetica, sans-serif;
|
34 |
-webkit-text-size-adjust: 100%!important;
|
35 |
-ms-text-size-adjust: 100%!important;
|
36 |
-webkit-font-smoothing: antialiased!important;
|
37 |
+
display: table-cell;
|
38 |
+
vertical-align: middle;
|
39 |
}
|
40 |
img {
|
41 |
outline: none;
|
118 |
width: 100% !important;
|
119 |
}
|
120 |
}
|
|
|
121 |
@import url(https://fonts.googleapis.com/css?family=Lato);
|
122 |
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);
|
123 |
@import url(https://fonts.googleapis.com/css?family=Cabin);
|
124 |
+
</style>
|
125 |
+
<table style="background-color: #f6f3f3; font-size: 15px; line-height: 20px; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f6f3f3"><tbody><tr><td align="center" valign="top" width="100%"><!-- [if mso | IE]>
|
126 |
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;">
|
127 |
<tr>
|
128 |
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
|
includes/wcal-functions.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Abandoned Cart Lite for WooCommerce
|
4 |
+
*
|
5 |
+
* Reuseable functions
|
6 |
+
*
|
7 |
+
* @author Tyche Softwares
|
8 |
+
* @package abandoned-cart-lite
|
9 |
+
* @since 5.12.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Returns the Cart History Data.
|
14 |
+
*
|
15 |
+
* @param int $cart_id - Abandoned Cart ID.
|
16 |
+
* @return object $cart_history - From the Abandoned Cart History table.
|
17 |
+
* @since 8.7.0
|
18 |
+
*/
|
19 |
+
function wcal_get_data_cart_history( $cart_id ) {
|
20 |
+
global $wpdb;
|
21 |
+
|
22 |
+
$cart_history = $wpdb->get_results( // phpcs:ignore
|
23 |
+
$wpdb->prepare(
|
24 |
+
'SELECT id, user_id, abandoned_cart_info, abandoned_cart_time, cart_ignored, recovered_cart, user_type, checkout_link FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` WHERE id = %d', // phpcs:ignore
|
25 |
+
$cart_id
|
26 |
+
)
|
27 |
+
);
|
28 |
+
|
29 |
+
if ( is_array( $cart_history ) && count( $cart_history ) > 0 ) {
|
30 |
+
return $cart_history[0];
|
31 |
+
} else {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Returns the Guest Data.
|
38 |
+
*
|
39 |
+
* @param int $user_id - Guest User ID.
|
40 |
+
* @return object $guest_data - From the Guest History table.
|
41 |
+
* @since 8.7.0
|
42 |
+
*/
|
43 |
+
function wcal_get_data_guest_history( $user_id ) {
|
44 |
+
|
45 |
+
global $wpdb;
|
46 |
+
|
47 |
+
$guest_data = $wpdb->get_results( // phpcs:ignore
|
48 |
+
$wpdb->prepare(
|
49 |
+
'SELECT billing_first_name, billing_last_name, billing_zipcode, email_id, phone, shipping_zipcode, shipping_charges FROM `' . $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite` WHERE id = %d', // phpcs:ignore
|
50 |
+
$user_id
|
51 |
+
)
|
52 |
+
);
|
53 |
+
|
54 |
+
if ( is_array( $guest_data ) && count( $guest_data ) > 0 ) {
|
55 |
+
return $guest_data[0];
|
56 |
+
} else {
|
57 |
+
return false;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Return an array of product details.
|
63 |
+
*
|
64 |
+
* @param string $cart_data - Abandoned Cart Data frm the Cart History table.
|
65 |
+
* @return array $product_details - Product Details.
|
66 |
+
* @since 8.7.0
|
67 |
+
*/
|
68 |
+
function wcal_get_product_details( $cart_data ) {
|
69 |
+
|
70 |
+
$product_details = array();
|
71 |
+
$cart_value = json_decode( stripslashes( $cart_data ) );
|
72 |
+
|
73 |
+
if ( isset( $cart_value->cart ) && count( get_object_vars( $cart_value->cart ) ) > 0 ) {
|
74 |
+
foreach ( $cart_value->cart as $product_data ) {
|
75 |
+
$product_id = $product_data->variation_id > 0 ? $product_data->variation_id : $product_data->product_id;
|
76 |
+
$details = (object) array(
|
77 |
+
'product_id' => $product_data->product_id,
|
78 |
+
'variation_id' => $product_data->variation_id,
|
79 |
+
'product_name' => get_the_title( $product_id ),
|
80 |
+
'line_subtotal' => $product_data->line_subtotal,
|
81 |
+
);
|
82 |
+
array_push( $product_details, $details );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
return $product_details;
|
87 |
+
}
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
|
2 |
=== Abandoned Cart Lite for WooCommerce ===
|
3 |
-
Contributors: ashokrane, pinal.shah,
|
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
|
@@ -222,6 +222,13 @@ The admin can use the merge code `{{cart.unsubscribe}}' in the email templates.
|
|
222 |
6. Product Report Tab.
|
223 |
|
224 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
= 5.11.1 ( 18.11.2021 ) =
|
226 |
* Fix - Email templates cannot be inserted/updated for updating users as DB changed are not being reflected correctly.
|
227 |
|
1 |
|
2 |
=== Abandoned Cart Lite for WooCommerce ===
|
3 |
+
Contributors: ashokrane, pinal.shah, 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.9
|
8 |
Stable tag: trunk
|
9 |
Requires PHP: 5.6
|
10 |
License: GPLv2 or late
|
222 |
6. Product Report Tab.
|
223 |
|
224 |
== Changelog ==
|
225 |
+
= 5.12.0 ( 08.02.2022 ) =
|
226 |
+
* Enhancement - Introduced 2 new webhooks that allows the admin to send cart abandonment and recovery data to delivery URLs.
|
227 |
+
* Tweak - Introduced the ability to enable/disable GDPR consent.
|
228 |
+
* Tweak - Introduced new Pro version features & settings.
|
229 |
+
* Fix - Fixed compatibility with WP Better Emails plugin.
|
230 |
+
* Fix - Made the default email template responsive.
|
231 |
+
|
232 |
= 5.11.1 ( 18.11.2021 ) =
|
233 |
* Fix - Email templates cannot be inserted/updated for updating users as DB changed are not being reflected correctly.
|
234 |
|
uninstall.php
CHANGED
@@ -71,6 +71,8 @@ if ( is_multisite() ) { // Multisite.
|
|
71 |
delete_blog_option( $blog_id_number, 'wcal_add_email_status_col' );
|
72 |
delete_blog_option( $blog_id_number, 'wcal_db_version' );
|
73 |
delete_blog_option( $blog_id_number, 'wcal_previous_version' );
|
|
|
|
|
74 |
} else {
|
75 |
|
76 |
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
@@ -146,3 +148,6 @@ delete_option( 'wcal_scheduler_update_dismiss' );
|
|
146 |
delete_option( 'wcal_add_email_status_col' );
|
147 |
delete_option( 'wcal_db_version' );
|
148 |
delete_option( 'wcal_previous_version' );
|
|
|
|
|
|
71 |
delete_blog_option( $blog_id_number, 'wcal_add_email_status_col' );
|
72 |
delete_blog_option( $blog_id_number, 'wcal_db_version' );
|
73 |
delete_blog_option( $blog_id_number, 'wcal_previous_version' );
|
74 |
+
delete_blog_option( $blog_id_number, 'wcal_gdpr_consent_migrated' );
|
75 |
+
delete_blog_option( $blog_id_number, 'wcal_enable_gdpr_consent' );
|
76 |
} else {
|
77 |
|
78 |
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
148 |
delete_option( 'wcal_add_email_status_col' );
|
149 |
delete_option( 'wcal_db_version' );
|
150 |
delete_option( 'wcal_previous_version' );
|
151 |
+
|
152 |
+
delete_option( 'wcal_gdpr_consent_migrated' );
|
153 |
+
delete_option( 'wcal_enable_gdpr_consent' );
|
woocommerce-ac.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* Plugin Name: Abandoned Cart Lite for WooCommerce
|
4 |
* Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
|
5 |
* Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
|
6 |
-
* Version: 5.
|
7 |
* Author: Tyche Softwares
|
8 |
* Author URI: http://www.tychesoftwares.com/
|
9 |
* Text Domain: woocommerce-abandoned-cart
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* Requires PHP: 5.6
|
12 |
* WC requires at least: 4.0.0
|
13 |
-
* WC tested up to:
|
14 |
*
|
15 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
16 |
*/
|
@@ -32,6 +32,12 @@ require_once 'includes/admin/class-wcal-abandoned-cart-details.php';
|
|
32 |
require_once 'includes/admin/class-wcap-pro-settings.php';
|
33 |
require_once 'includes/admin/class-wcap-pro-settings-callbacks.php';
|
34 |
require_once 'includes/admin/class-wcap-add-cart-popup-modal.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
load_plugin_textdomain( 'woocommerce-abandoned-cart', false, basename( dirname( __FILE__ ) ) . '/i18n/languages' );
|
37 |
|
@@ -118,7 +124,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
118 |
}
|
119 |
|
120 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
121 |
-
define( 'WCAL_PLUGIN_VERSION', '5.
|
122 |
}
|
123 |
|
124 |
if ( ! defined( 'WCAL_PLUGIN_PATH' ) ) {
|
@@ -613,7 +619,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
613 |
`individual_use` enum('0','1') NOT NULL,
|
614 |
`generate_unique_coupon_code` enum('0','1') NOT NULL,
|
615 |
PRIMARY KEY (`id`)
|
616 |
-
) $wcap_collate AUTO_INCREMENT=1"
|
617 |
);
|
618 |
|
619 |
$sent_table_name = $db_prefix . 'ac_sent_history_lite';
|
@@ -625,7 +631,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
625 |
`sent_time` datetime NOT NULL,
|
626 |
`sent_email_id` text COLLATE utf8_unicode_ci NOT NULL,
|
627 |
PRIMARY KEY (`id`)
|
628 |
-
) $wcap_collate AUTO_INCREMENT=1 "
|
629 |
);
|
630 |
|
631 |
$ac_history_table_name = $db_prefix . 'ac_abandoned_cart_history_lite';
|
@@ -641,13 +647,14 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
641 |
`unsubscribe_link` enum('0','1') COLLATE utf8_unicode_ci NOT NULL,
|
642 |
`session_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
643 |
`email_reminder_status` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
644 |
PRIMARY KEY (`id`)
|
645 |
-
) $wcap_collate"
|
646 |
);
|
647 |
|
648 |
$guest_table = $db_prefix . 'ac_guest_abandoned_cart_history_lite';
|
649 |
$result_guest_table = $wpdb->get_results( // phpcs:ignore
|
650 |
-
"SHOW TABLES LIKE '$guest_table'"
|
651 |
);
|
652 |
|
653 |
if ( 0 === count( $result_guest_table ) ) {
|
@@ -677,7 +684,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
677 |
`shipping_zipcode` double,
|
678 |
`shipping_charges` double,
|
679 |
PRIMARY KEY (`id`)
|
680 |
-
) $wcap_collate AUTO_INCREMENT=63000000"
|
681 |
);
|
682 |
}
|
683 |
|
@@ -751,7 +758,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
751 |
// First, we register a section. This is necessary since all future options must belong to a section.
|
752 |
add_settings_section(
|
753 |
'ac_lite_general_settings_section', // ID used to identify this section and with which to register options.
|
754 |
-
__( 'Settings', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
755 |
array( $this, 'ac_lite_general_options_callback' ), // Callback used to render the description of the section.
|
756 |
'woocommerce_ac_page' // Page on which to add this section of options.
|
757 |
);
|
@@ -801,12 +808,28 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
801 |
array( __( '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.', 'woocommerce-abandoned-cart' ) )
|
802 |
);
|
803 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
add_settings_field(
|
805 |
'wcal_guest_cart_capture_msg',
|
806 |
__( 'Message to be displayed for Guest users when tracking their carts', 'woocommerce-abandoned-cart' ),
|
807 |
array( $this, 'wcal_guest_cart_capture_msg_callback' ),
|
808 |
'woocommerce_ac_page',
|
809 |
-
'
|
810 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
811 |
);
|
812 |
|
@@ -815,7 +838,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
815 |
__( 'Message to be displayed for registered users when tracking their carts.', 'woocommerce-abandoned-cart' ),
|
816 |
array( $this, 'wcal_logged_cart_capture_msg_callback' ),
|
817 |
'woocommerce_ac_page',
|
818 |
-
'
|
819 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
820 |
);
|
821 |
|
@@ -824,7 +847,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
824 |
__( 'Allow the visitor to opt out of cart tracking.', 'woocommerce-abandoned-cart' ),
|
825 |
array( $this, 'wcal_gdpr_allow_opt_out_callback' ),
|
826 |
'woocommerce_ac_page',
|
827 |
-
'
|
828 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
829 |
);
|
830 |
|
@@ -833,15 +856,21 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
833 |
__( 'Message to be displayed when the user chooses to opt out of cart tracking.', 'woocommerce-abandoned-cart' ),
|
834 |
array( $this, 'wcal_gdpr_opt_out_msg_callback' ),
|
835 |
'woocommerce_ac_page',
|
836 |
-
'
|
837 |
array( __( '<br>Message to be displayed when the user chooses to opt out of cart tracking.</i>', 'woocommerce-abandoned-cart' ) )
|
838 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
add_settings_field(
|
840 |
'wcal_delete_coupon_data',
|
841 |
__( 'Delete Coupons Automatically', 'woocommerce-abandoned-cart' ),
|
842 |
array( $this, 'wcal_deleting_coupon_data' ),
|
843 |
'woocommerce_ac_page',
|
844 |
-
'
|
845 |
array( __( 'Enable this setting if you want to completely remove the expired and used coupon code automatically every 15 days.', 'woocommerce-abandoned-cart' ) )
|
846 |
);
|
847 |
add_settings_field(
|
@@ -849,7 +878,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
849 |
__( 'Delete Coupons Manually', 'woocommerce-abandoned-cart' ),
|
850 |
array( $this, 'wcal_deleting_coupon_data_manually' ),
|
851 |
'woocommerce_ac_page',
|
852 |
-
'
|
853 |
array( __( 'If you want to completely remove the expired and used coupon code now then click on "Delete" button.', 'woocommerce-abandoned-cart' ) )
|
854 |
);
|
855 |
/**
|
@@ -928,6 +957,11 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
928 |
'ac_lite_track_guest_cart_from_cart_page'
|
929 |
);
|
930 |
|
|
|
|
|
|
|
|
|
|
|
931 |
register_setting(
|
932 |
'woocommerce_ac_settings',
|
933 |
'wcal_guest_cart_capture_msg'
|
@@ -1130,6 +1164,21 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1130 |
echo wp_kses_post( $html );
|
1131 |
}
|
1132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1133 |
/**
|
1134 |
* Call back function for guest user cart capture message
|
1135 |
*
|
@@ -1384,6 +1433,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1384 |
);
|
1385 |
$abandoned_cart_id = $wpdb->insert_id;
|
1386 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
|
|
|
|
1387 |
}
|
1388 |
} elseif ( isset( $results[0]->abandoned_cart_time ) && $compare_time > $results[0]->abandoned_cart_time ) {
|
1389 |
$updated_cart_info = array();
|
@@ -1414,6 +1465,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1414 |
|
1415 |
$abandoned_cart_id = $wpdb->insert_id;
|
1416 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
|
|
|
|
1417 |
} else {
|
1418 |
update_user_meta( $user_id, '_woocommerce_ac_modified_cart', md5( 'no' ) );
|
1419 |
}
|
@@ -1443,6 +1496,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1443 |
if ( count( $get_abandoned_record ) > 0 ) {
|
1444 |
$abandoned_cart_id = $get_abandoned_record[0]->id;
|
1445 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
|
|
|
|
1446 |
}
|
1447 |
}
|
1448 |
}
|
@@ -1493,12 +1548,14 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1493 |
$user_type = 'GUEST';
|
1494 |
$wpdb->query( //phpcs:ignore
|
1495 |
$wpdb->prepare(
|
1496 |
-
'INSERT INTO `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` (user_id, abandoned_cart_info, abandoned_cart_time, cart_ignored, user_type) VALUES (%d, %s, %d, %s, %s)',
|
1497 |
$user_id,
|
1498 |
$updated_cart_info,
|
1499 |
$current_time,
|
1500 |
$cart_ignored,
|
1501 |
-
$user_type
|
|
|
|
|
1502 |
)
|
1503 |
);
|
1504 |
update_user_meta( $user_id, '_woocommerce_ac_modified_cart', md5( 'yes' ) );
|
@@ -1728,7 +1785,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1728 |
|
1729 |
$track_link = isset( $_GET['wcal_action'] ) ? sanitize_text_field( wp_unslash( $_GET['wcal_action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
1730 |
|
1731 |
-
if ( 'track_links' === $track_link ) {
|
1732 |
if ( '' === session_id() ) {
|
1733 |
// session has not started.
|
1734 |
session_start();
|
@@ -1753,28 +1810,41 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
1753 |
$decode_coupon_code = '';
|
1754 |
}
|
1755 |
|
1756 |
-
|
1757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1758 |
|
1759 |
$url_pos = strpos( $link_decode, '=' );
|
1760 |
++$url_pos;
|
1761 |
$url = substr( $link_decode, $url_pos );
|
1762 |
-
$get_ac_id_results = $wpdb->get_results( //phpcs:ignore
|
1763 |
-
$wpdb->prepare(
|
1764 |
-
'SELECT abandoned_order_id FROM `' . $wpdb->prefix . 'ac_sent_history_lite` WHERE id = %d',
|
1765 |
-
$email_sent_id
|
1766 |
-
)
|
1767 |
-
);
|
1768 |
|
1769 |
-
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $
|
1770 |
-
set_transient( 'wcal_abandoned_id', $
|
1771 |
|
1772 |
$get_user_results = array();
|
1773 |
-
if (
|
1774 |
$get_user_results = $wpdb->get_results( //phpcs:ignore
|
1775 |
$wpdb->prepare(
|
1776 |
'SELECT user_id FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` WHERE id = %d',
|
1777 |
-
$
|
1778 |
)
|
1779 |
);
|
1780 |
}
|
@@ -2384,9 +2454,9 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2384 |
|
2385 |
global $pagenow;
|
2386 |
|
2387 |
-
$page
|
2388 |
-
$action
|
2389 |
-
|
2390 |
if ( 'woocommerce_ac_page' !== $page ) {
|
2391 |
return;
|
2392 |
} elseif ( 'woocommerce_ac_page' === $page && ( 'dashboard' === $action || '' === $action ) ) {
|
@@ -2404,6 +2474,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2404 |
wp_enqueue_style( 'jquery-ui-style', plugins_url( '/assets/css/admin/jquery-ui-smoothness.css', __FILE__ ), '', WCAL_PLUGIN_VERSION );
|
2405 |
wp_enqueue_style( 'wcal-reports', plugins_url( '/assets/css/admin/wcal_reports.min.css', __FILE__ ), '', WCAL_PLUGIN_VERSION );
|
2406 |
|
|
|
|
|
2407 |
} elseif ( 'woocommerce_ac_page' === $page ) {
|
2408 |
|
2409 |
wp_enqueue_style( 'jquery-ui', plugins_url( '/assets/css/admin/jquery-ui.css', __FILE__ ), '', WCAL_PLUGIN_VERSION, false );
|
@@ -2544,7 +2616,6 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2544 |
if ( 'emailsettings' === $action ) {
|
2545 |
// Save the field values.
|
2546 |
?>
|
2547 |
-
<p><?php esc_html_e( 'Change settings for sending email notifications to Customers, to Admin etc.', 'woocommerce-abandoned-cart' ); ?></p>
|
2548 |
<div id="content">
|
2549 |
<?php
|
2550 |
$wcal_general_settings_class = '';
|
@@ -2552,6 +2623,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2552 |
$wcap_sms_settings = '';
|
2553 |
$wcap_atc_settings = '';
|
2554 |
$wcap_fb_settings = '';
|
|
|
2555 |
|
2556 |
$section = isset( $_GET['wcal_section'] ) ? sanitize_text_field( wp_unslash( $_GET['wcal_section'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
2557 |
switch ( $section ) {
|
@@ -2571,6 +2643,9 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2571 |
case 'wcap_fb_settings':
|
2572 |
$wcap_fb_settings = 'current';
|
2573 |
break;
|
|
|
|
|
|
|
2574 |
default:
|
2575 |
$wcal_general_settings_class = 'current';
|
2576 |
break;
|
@@ -2590,7 +2665,10 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2590 |
<a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_fb_settings" class="<?php echo esc_attr( $wcap_fb_settings ); ?>"><?php esc_html_e( 'Facebook Messenger', 'woocommerce-ac' ); ?> </a> |
|
2591 |
</li>
|
2592 |
<li>
|
2593 |
-
<a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_sms_settings" class="<?php echo esc_attr( $wcap_sms_settings ); ?>"><?php esc_html_e( 'SMS', 'woocommerce-ac' ); ?> </a>
|
|
|
|
|
|
|
2594 |
</li>
|
2595 |
<?php do_action( 'wcal_add_custom_settings_tab', $section ); ?>
|
2596 |
</ul>
|
@@ -2598,6 +2676,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2598 |
<?php
|
2599 |
if ( 'wcal_general_settings' === $section || '' === $section ) {
|
2600 |
?>
|
|
|
2601 |
<form method="post" action="options.php">
|
2602 |
<?php settings_fields( 'woocommerce_ac_settings' ); ?>
|
2603 |
<?php do_settings_sections( 'woocommerce_ac_page' ); ?>
|
@@ -2607,6 +2686,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2607 |
<?php
|
2608 |
} elseif ( 'wcal_email_settings' === $section ) {
|
2609 |
?>
|
|
|
2610 |
<form method="post" action="options.php">
|
2611 |
<?php settings_fields( 'woocommerce_ac_email_settings' ); ?>
|
2612 |
<?php do_settings_sections( 'woocommerce_ac_email_page' ); ?>
|
@@ -2620,6 +2700,8 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
2620 |
WCAP_Pro_Settings::wcap_fb_settings();
|
2621 |
} elseif ( 'wcap_sms_settings' === $section ) {
|
2622 |
WCAP_Pro_Settings::wcap_sms_settings();
|
|
|
|
|
2623 |
}
|
2624 |
do_action( 'wcal_add_custom_settings_tab_content', $section );
|
2625 |
?>
|
@@ -3710,11 +3792,11 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
3710 |
emailVal = jQuery( '#send_test_email' ).val();
|
3711 |
const re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
3712 |
if ( !re.test( emailVal ) ) {
|
3713 |
-
jQuery( '#preview_email_sent_msg' ).html( '<?php echo
|
3714 |
jQuery( '#preview_email_sent_msg' ).show();
|
3715 |
return false;
|
3716 |
}
|
3717 |
-
|
3718 |
jQuery( '#preview_email_sent_msg' ).hide();
|
3719 |
|
3720 |
$( '.ajax_img' ).show();
|
@@ -3883,7 +3965,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
3883 |
$wcal_total_price = wc_price( '200' );
|
3884 |
if ( class_exists( 'WP_Better_Emails' ) ) {
|
3885 |
$headers = 'From: ' . $from_email_name . ' <' . $from_email_preview . '>' . "\r\n";
|
3886 |
-
$headers .= 'Content-Type: text/
|
3887 |
$headers .= 'Reply-To: ' . $reply_name_preview . ' ' . "\r\n";
|
3888 |
$var = '<table width = 100%>
|
3889 |
<tr> <td colspan="5"> <h3 style="text-align:center">' . __( 'Your Shopping Cart', 'woocommerce-abandoned-cart' ) . '</h3> </td></tr>
|
@@ -4105,6 +4187,11 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
4105 |
die();
|
4106 |
}
|
4107 |
|
|
|
|
|
|
|
|
|
|
|
4108 |
/**
|
4109 |
* Option for deleting the plugin data upon uninstall.
|
4110 |
*
|
@@ -4307,6 +4394,10 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
4307 |
public static function wcal_coupon_callback() {
|
4308 |
}
|
4309 |
|
|
|
|
|
|
|
|
|
4310 |
}
|
4311 |
}
|
4312 |
$woocommerce_abandon_cart = new woocommerce_abandon_cart_lite();
|
3 |
* Plugin Name: Abandoned Cart Lite for WooCommerce
|
4 |
* Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
|
5 |
* Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
|
6 |
+
* Version: 5.12.0
|
7 |
* Author: Tyche Softwares
|
8 |
* Author URI: http://www.tychesoftwares.com/
|
9 |
* Text Domain: woocommerce-abandoned-cart
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* Requires PHP: 5.6
|
12 |
* WC requires at least: 4.0.0
|
13 |
+
* WC tested up to: 6.1.1
|
14 |
*
|
15 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
16 |
*/
|
32 |
require_once 'includes/admin/class-wcap-pro-settings.php';
|
33 |
require_once 'includes/admin/class-wcap-pro-settings-callbacks.php';
|
34 |
require_once 'includes/admin/class-wcap-add-cart-popup-modal.php';
|
35 |
+
require_once 'includes/connectors/class-wcap-connectors-common.php';
|
36 |
+
require_once 'includes/connectors/class-wcap-connector.php';
|
37 |
+
require_once 'includes/connectors/class-wcap-display-connectors.php';
|
38 |
+
require_once 'includes/class-wcap-integrations.php';
|
39 |
+
require_once 'includes/wcal-functions.php';
|
40 |
+
require_once 'includes/class-wcal-webhooks.php';
|
41 |
|
42 |
load_plugin_textdomain( 'woocommerce-abandoned-cart', false, basename( dirname( __FILE__ ) ) . '/i18n/languages' );
|
43 |
|
124 |
}
|
125 |
|
126 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
127 |
+
define( 'WCAL_PLUGIN_VERSION', '5.12.0' );
|
128 |
}
|
129 |
|
130 |
if ( ! defined( 'WCAL_PLUGIN_PATH' ) ) {
|
619 |
`individual_use` enum('0','1') NOT NULL,
|
620 |
`generate_unique_coupon_code` enum('0','1') NOT NULL,
|
621 |
PRIMARY KEY (`id`)
|
622 |
+
) $wcap_collate AUTO_INCREMENT=1" // phpcs:ignore
|
623 |
);
|
624 |
|
625 |
$sent_table_name = $db_prefix . 'ac_sent_history_lite';
|
631 |
`sent_time` datetime NOT NULL,
|
632 |
`sent_email_id` text COLLATE utf8_unicode_ci NOT NULL,
|
633 |
PRIMARY KEY (`id`)
|
634 |
+
) $wcap_collate AUTO_INCREMENT=1 " // phpcs:ignore
|
635 |
);
|
636 |
|
637 |
$ac_history_table_name = $db_prefix . 'ac_abandoned_cart_history_lite';
|
647 |
`unsubscribe_link` enum('0','1') COLLATE utf8_unicode_ci NOT NULL,
|
648 |
`session_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
649 |
`email_reminder_status` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
650 |
+
`checkout_link` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
|
651 |
PRIMARY KEY (`id`)
|
652 |
+
) $wcap_collate" // phpcs:ignore
|
653 |
);
|
654 |
|
655 |
$guest_table = $db_prefix . 'ac_guest_abandoned_cart_history_lite';
|
656 |
$result_guest_table = $wpdb->get_results( // phpcs:ignore
|
657 |
+
"SHOW TABLES LIKE '$guest_table'" // phpcs:ignore
|
658 |
);
|
659 |
|
660 |
if ( 0 === count( $result_guest_table ) ) {
|
684 |
`shipping_zipcode` double,
|
685 |
`shipping_charges` double,
|
686 |
PRIMARY KEY (`id`)
|
687 |
+
) $wcap_collate AUTO_INCREMENT=63000000" // phpcs:ignore
|
688 |
);
|
689 |
}
|
690 |
|
758 |
// First, we register a section. This is necessary since all future options must belong to a section.
|
759 |
add_settings_section(
|
760 |
'ac_lite_general_settings_section', // ID used to identify this section and with which to register options.
|
761 |
+
__( 'Cart Abandonment Settings', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
762 |
array( $this, 'ac_lite_general_options_callback' ), // Callback used to render the description of the section.
|
763 |
'woocommerce_ac_page' // Page on which to add this section of options.
|
764 |
);
|
808 |
array( __( '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.', 'woocommerce-abandoned-cart' ) )
|
809 |
);
|
810 |
|
811 |
+
add_settings_section(
|
812 |
+
'ac_lite_gdpr_settings', // ID used to identify this section and with which to register options.
|
813 |
+
__( 'GDPR Settings', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
814 |
+
array( $this, 'ac_lite_gdpr_callback' ), // Callback used to render the description of the section.
|
815 |
+
'woocommerce_ac_page' // Page on which to add this section of options.
|
816 |
+
);
|
817 |
+
|
818 |
+
add_settings_field(
|
819 |
+
'wcal_enable_gdpr_consent',
|
820 |
+
__( 'Enable GDPR Notice', 'woocommerce-abandoned-cart' ),
|
821 |
+
array( $this, 'wcal_enable_gdpr_callback' ),
|
822 |
+
'woocommerce_ac_page',
|
823 |
+
'ac_lite_gdpr_settings',
|
824 |
+
array( __( 'Enable this setting to display a notice informing customers that their email and cart data are saved to send abandonment reminders.', 'woocommerce-abandoned-cart' ) )
|
825 |
+
);
|
826 |
+
|
827 |
add_settings_field(
|
828 |
'wcal_guest_cart_capture_msg',
|
829 |
__( 'Message to be displayed for Guest users when tracking their carts', 'woocommerce-abandoned-cart' ),
|
830 |
array( $this, 'wcal_guest_cart_capture_msg_callback' ),
|
831 |
'woocommerce_ac_page',
|
832 |
+
'ac_lite_gdpr_settings',
|
833 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
834 |
);
|
835 |
|
838 |
__( 'Message to be displayed for registered users when tracking their carts.', 'woocommerce-abandoned-cart' ),
|
839 |
array( $this, 'wcal_logged_cart_capture_msg_callback' ),
|
840 |
'woocommerce_ac_page',
|
841 |
+
'ac_lite_gdpr_settings',
|
842 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
843 |
);
|
844 |
|
847 |
__( 'Allow the visitor to opt out of cart tracking.', 'woocommerce-abandoned-cart' ),
|
848 |
array( $this, 'wcal_gdpr_allow_opt_out_callback' ),
|
849 |
'woocommerce_ac_page',
|
850 |
+
'ac_lite_gdpr_settings',
|
851 |
array( __( '<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>', 'woocommerce-abandoned-cart' ) )
|
852 |
);
|
853 |
|
856 |
__( 'Message to be displayed when the user chooses to opt out of cart tracking.', 'woocommerce-abandoned-cart' ),
|
857 |
array( $this, 'wcal_gdpr_opt_out_msg_callback' ),
|
858 |
'woocommerce_ac_page',
|
859 |
+
'ac_lite_gdpr_settings',
|
860 |
array( __( '<br>Message to be displayed when the user chooses to opt out of cart tracking.</i>', 'woocommerce-abandoned-cart' ) )
|
861 |
);
|
862 |
+
add_settings_section(
|
863 |
+
'ac_lite_coupon_settings', // ID used to identify this section and with which to register options.
|
864 |
+
__( 'Coupon Settings', 'woocommerce-abandoned-cart' ), // Title to be displayed on the administration page.
|
865 |
+
array( $this, 'ac_lite_coupon_callback' ), // Callback used to render the description of the section.
|
866 |
+
'woocommerce_ac_page' // Page on which to add this section of options.
|
867 |
+
);
|
868 |
add_settings_field(
|
869 |
'wcal_delete_coupon_data',
|
870 |
__( 'Delete Coupons Automatically', 'woocommerce-abandoned-cart' ),
|
871 |
array( $this, 'wcal_deleting_coupon_data' ),
|
872 |
'woocommerce_ac_page',
|
873 |
+
'ac_lite_coupon_settings',
|
874 |
array( __( 'Enable this setting if you want to completely remove the expired and used coupon code automatically every 15 days.', 'woocommerce-abandoned-cart' ) )
|
875 |
);
|
876 |
add_settings_field(
|
878 |
__( 'Delete Coupons Manually', 'woocommerce-abandoned-cart' ),
|
879 |
array( $this, 'wcal_deleting_coupon_data_manually' ),
|
880 |
'woocommerce_ac_page',
|
881 |
+
'ac_lite_coupon_settings',
|
882 |
array( __( 'If you want to completely remove the expired and used coupon code now then click on "Delete" button.', 'woocommerce-abandoned-cart' ) )
|
883 |
);
|
884 |
/**
|
957 |
'ac_lite_track_guest_cart_from_cart_page'
|
958 |
);
|
959 |
|
960 |
+
register_setting(
|
961 |
+
'woocommerce_ac_settings',
|
962 |
+
'wcal_enable_gdpr_consent'
|
963 |
+
);
|
964 |
+
|
965 |
register_setting(
|
966 |
'woocommerce_ac_settings',
|
967 |
'wcal_guest_cart_capture_msg'
|
1164 |
echo wp_kses_post( $html );
|
1165 |
}
|
1166 |
|
1167 |
+
/**
|
1168 |
+
* Callback - Enable GDPR consent.
|
1169 |
+
*
|
1170 |
+
* @param array $args - Arguments.
|
1171 |
+
* @since 5.12.0
|
1172 |
+
*/
|
1173 |
+
public static function wcal_enable_gdpr_callback( $args ) {
|
1174 |
+
$wcal_enable_gdpr = get_option( 'wcal_enable_gdpr_consent', '' );
|
1175 |
+
$wcal_gdpr_status = isset( $wcal_enable_gdpr ) && '' === $wcal_enable_gdpr ? 'off' : 'on';
|
1176 |
+
?>
|
1177 |
+
<input type="checkbox" id="wcal_enable_gdpr_consent" name="wcal_enable_gdpr_consent" value="on" <?php echo checked( 'on', $wcal_gdpr_status, false ); ?> />
|
1178 |
+
<label for="wcal_enable_gdpr_consent"> <?php echo esc_attr( $args[0] ); ?></label>
|
1179 |
+
<a >
|
1180 |
+
<?php
|
1181 |
+
}
|
1182 |
/**
|
1183 |
* Call back function for guest user cart capture message
|
1184 |
*
|
1433 |
);
|
1434 |
$abandoned_cart_id = $wpdb->insert_id;
|
1435 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
1436 |
+
wcal_common::wcal_add_checkout_link( $abandoned_cart_id );
|
1437 |
+
wcal_common::wcal_run_webhook_after_cutoff( $abandoned_cart_id );
|
1438 |
}
|
1439 |
} elseif ( isset( $results[0]->abandoned_cart_time ) && $compare_time > $results[0]->abandoned_cart_time ) {
|
1440 |
$updated_cart_info = array();
|
1465 |
|
1466 |
$abandoned_cart_id = $wpdb->insert_id;
|
1467 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
1468 |
+
wcal_common::wcal_add_checkout_link( $abandoned_cart_id );
|
1469 |
+
wcal_common::wcal_run_webhook_after_cutoff( $abandoned_cart_id );
|
1470 |
} else {
|
1471 |
update_user_meta( $user_id, '_woocommerce_ac_modified_cart', md5( 'no' ) );
|
1472 |
}
|
1496 |
if ( count( $get_abandoned_record ) > 0 ) {
|
1497 |
$abandoned_cart_id = $get_abandoned_record[0]->id;
|
1498 |
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
|
1499 |
+
wcal_common::wcal_add_checkout_link( $abandoned_cart_id );
|
1500 |
+
wcal_common::wcal_run_webhook_after_cutoff( $abandoned_cart_id );
|
1501 |
}
|
1502 |
}
|
1503 |
}
|
1548 |
$user_type = 'GUEST';
|
1549 |
$wpdb->query( //phpcs:ignore
|
1550 |
$wpdb->prepare(
|
1551 |
+
'INSERT INTO `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` (user_id, abandoned_cart_info, abandoned_cart_time, cart_ignored, user_type, session_id, checkout_link) VALUES (%d, %s, %d, %s, %s, %s, %s)',
|
1552 |
$user_id,
|
1553 |
$updated_cart_info,
|
1554 |
$current_time,
|
1555 |
$cart_ignored,
|
1556 |
+
$user_type,
|
1557 |
+
$get_cookie,
|
1558 |
+
$results[0]->checkout_link
|
1559 |
)
|
1560 |
);
|
1561 |
update_user_meta( $user_id, '_woocommerce_ac_modified_cart', md5( 'yes' ) );
|
1785 |
|
1786 |
$track_link = isset( $_GET['wcal_action'] ) ? sanitize_text_field( wp_unslash( $_GET['wcal_action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
1787 |
|
1788 |
+
if ( 'track_links' === $track_link || $track_link === 'checkout_link' ) {
|
1789 |
if ( '' === session_id() ) {
|
1790 |
// session has not started.
|
1791 |
session_start();
|
1810 |
$decode_coupon_code = '';
|
1811 |
}
|
1812 |
|
1813 |
+
if ( 'track_links' === $track_link ) {
|
1814 |
+
$email_sent_id = 0;
|
1815 |
+
$sent_email_id_pos = strpos( $link_decode, '&' );
|
1816 |
+
$email_sent_id = substr( $link_decode, 0, $sent_email_id_pos );
|
1817 |
+
|
1818 |
+
wcal_common::wcal_set_cart_session( 'email_sent_id', $email_sent_id );
|
1819 |
+
set_transient( 'wcal_email_sent_id', $email_sent_id, 5 );
|
1820 |
+
|
1821 |
+
$get_ac_id_results = $wpdb->get_results( // phpcs:ignore
|
1822 |
+
$wpdb->prepare(
|
1823 |
+
'SELECT abandoned_order_id FROM `' . $wpdb->prefix . 'ac_sent_history_lite` WHERE id = %d',
|
1824 |
+
$email_sent_id
|
1825 |
+
)
|
1826 |
+
);
|
1827 |
+
$abandoned_id = $get_ac_id_results[0]->abandoned_order_id;
|
1828 |
+
} elseif ( 'checkout_link' === $track_link ) {
|
1829 |
+
$abandoned_id = 0;
|
1830 |
+
$abandoned_id_pos = strpos( $link_decode, '&' );
|
1831 |
+
$abandoned_id = substr( $link_decode, 0, $abandoned_id_pos );
|
1832 |
+
wcal_common::wcal_set_cart_session( 'wcal_recovered_cart', true );
|
1833 |
+
}
|
1834 |
|
1835 |
$url_pos = strpos( $link_decode, '=' );
|
1836 |
++$url_pos;
|
1837 |
$url = substr( $link_decode, $url_pos );
|
|
|
|
|
|
|
|
|
|
|
|
|
1838 |
|
1839 |
+
wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_id );
|
1840 |
+
set_transient( 'wcal_abandoned_id', $abandoned_id, 5 );
|
1841 |
|
1842 |
$get_user_results = array();
|
1843 |
+
if ( $abandoned_id > 0 ) {
|
1844 |
$get_user_results = $wpdb->get_results( //phpcs:ignore
|
1845 |
$wpdb->prepare(
|
1846 |
'SELECT user_id FROM `' . $wpdb->prefix . 'ac_abandoned_cart_history_lite` WHERE id = %d',
|
1847 |
+
$abandoned_id
|
1848 |
)
|
1849 |
);
|
1850 |
}
|
2454 |
|
2455 |
global $pagenow;
|
2456 |
|
2457 |
+
$page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
2458 |
+
$action = isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
2459 |
+
$section = isset( $_GET['wcal_section'] ) ? sanitize_text_field( wp_unslash( $_GET['wcal_section'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
2460 |
if ( 'woocommerce_ac_page' !== $page ) {
|
2461 |
return;
|
2462 |
} elseif ( 'woocommerce_ac_page' === $page && ( 'dashboard' === $action || '' === $action ) ) {
|
2474 |
wp_enqueue_style( 'jquery-ui-style', plugins_url( '/assets/css/admin/jquery-ui-smoothness.css', __FILE__ ), '', WCAL_PLUGIN_VERSION );
|
2475 |
wp_enqueue_style( 'wcal-reports', plugins_url( '/assets/css/admin/wcal_reports.min.css', __FILE__ ), '', WCAL_PLUGIN_VERSION );
|
2476 |
|
2477 |
+
} elseif ( 'woocommerce_ac_page' === $page && 'emailsettings' === $action && 'wcap_connectors' === $section ) {
|
2478 |
+
wp_enqueue_style( 'wcap-connectors', plugins_url( 'assets/css/admin/wcap_integrations_main.min.css', __FILE__ ), '', WCAL_PLUGIN_VERSION );
|
2479 |
} elseif ( 'woocommerce_ac_page' === $page ) {
|
2480 |
|
2481 |
wp_enqueue_style( 'jquery-ui', plugins_url( '/assets/css/admin/jquery-ui.css', __FILE__ ), '', WCAL_PLUGIN_VERSION, false );
|
2616 |
if ( 'emailsettings' === $action ) {
|
2617 |
// Save the field values.
|
2618 |
?>
|
|
|
2619 |
<div id="content">
|
2620 |
<?php
|
2621 |
$wcal_general_settings_class = '';
|
2623 |
$wcap_sms_settings = '';
|
2624 |
$wcap_atc_settings = '';
|
2625 |
$wcap_fb_settings = '';
|
2626 |
+
$wcap_connectors = '';
|
2627 |
|
2628 |
$section = isset( $_GET['wcal_section'] ) ? sanitize_text_field( wp_unslash( $_GET['wcal_section'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
2629 |
switch ( $section ) {
|
2643 |
case 'wcap_fb_settings':
|
2644 |
$wcap_fb_settings = 'current';
|
2645 |
break;
|
2646 |
+
case 'wcap_connectors':
|
2647 |
+
$wcap_connectors = 'current';
|
2648 |
+
break;
|
2649 |
default:
|
2650 |
$wcal_general_settings_class = 'current';
|
2651 |
break;
|
2665 |
<a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_fb_settings" class="<?php echo esc_attr( $wcap_fb_settings ); ?>"><?php esc_html_e( 'Facebook Messenger', 'woocommerce-ac' ); ?> </a> |
|
2666 |
</li>
|
2667 |
<li>
|
2668 |
+
<a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_sms_settings" class="<?php echo esc_attr( $wcap_sms_settings ); ?>"><?php esc_html_e( 'SMS', 'woocommerce-ac' ); ?> </a> |
|
2669 |
+
</li>
|
2670 |
+
<li>
|
2671 |
+
<a href="admin.php?page=woocommerce_ac_page&action=emailsettings&wcal_section=wcap_connectors" class="<?php echo esc_attr( $wcap_connectors ); ?>"><?php esc_html_e( 'Connectors', 'woocommerce-ac' ); ?> </a>
|
2672 |
</li>
|
2673 |
<?php do_action( 'wcal_add_custom_settings_tab', $section ); ?>
|
2674 |
</ul>
|
2676 |
<?php
|
2677 |
if ( 'wcal_general_settings' === $section || '' === $section ) {
|
2678 |
?>
|
2679 |
+
<p><?php esc_html_e( 'Change settings for sending email notifications to Customers, to Admin etc.', 'woocommerce-abandoned-cart' ); ?></p>
|
2680 |
<form method="post" action="options.php">
|
2681 |
<?php settings_fields( 'woocommerce_ac_settings' ); ?>
|
2682 |
<?php do_settings_sections( 'woocommerce_ac_page' ); ?>
|
2686 |
<?php
|
2687 |
} elseif ( 'wcal_email_settings' === $section ) {
|
2688 |
?>
|
2689 |
+
<p><?php esc_html_e( 'Change settings for sending email notifications to Customers, to Admin etc.', 'woocommerce-abandoned-cart' ); ?></p>
|
2690 |
<form method="post" action="options.php">
|
2691 |
<?php settings_fields( 'woocommerce_ac_email_settings' ); ?>
|
2692 |
<?php do_settings_sections( 'woocommerce_ac_email_page' ); ?>
|
2700 |
WCAP_Pro_Settings::wcap_fb_settings();
|
2701 |
} elseif ( 'wcap_sms_settings' === $section ) {
|
2702 |
WCAP_Pro_Settings::wcap_sms_settings();
|
2703 |
+
} elseif ( 'wcap_connectors' === $section ) {
|
2704 |
+
WCAP_Pro_Settings::wcap_connectors();
|
2705 |
}
|
2706 |
do_action( 'wcal_add_custom_settings_tab_content', $section );
|
2707 |
?>
|
3792 |
emailVal = jQuery( '#send_test_email' ).val();
|
3793 |
const re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
3794 |
if ( !re.test( emailVal ) ) {
|
3795 |
+
jQuery( '#preview_email_sent_msg' ).html( '<?php echo esc_html__( 'Please enter a valid email.', 'woocommerce-abandoned-cart' ); ?>' );
|
3796 |
jQuery( '#preview_email_sent_msg' ).show();
|
3797 |
return false;
|
3798 |
}
|
3799 |
+
|
3800 |
jQuery( '#preview_email_sent_msg' ).hide();
|
3801 |
|
3802 |
$( '.ajax_img' ).show();
|
3965 |
$wcal_total_price = wc_price( '200' );
|
3966 |
if ( class_exists( 'WP_Better_Emails' ) ) {
|
3967 |
$headers = 'From: ' . $from_email_name . ' <' . $from_email_preview . '>' . "\r\n";
|
3968 |
+
$headers .= 'Content-Type: text/html' . "\r\n";
|
3969 |
$headers .= 'Reply-To: ' . $reply_name_preview . ' ' . "\r\n";
|
3970 |
$var = '<table width = 100%>
|
3971 |
<tr> <td colspan="5"> <h3 style="text-align:center">' . __( 'Your Shopping Cart', 'woocommerce-abandoned-cart' ) . '</h3> </td></tr>
|
4187 |
die();
|
4188 |
}
|
4189 |
|
4190 |
+
/**
|
4191 |
+
* Callback for Coupon settings section.
|
4192 |
+
*/
|
4193 |
+
public static function ac_lite_coupon_callback() {}
|
4194 |
+
|
4195 |
/**
|
4196 |
* Option for deleting the plugin data upon uninstall.
|
4197 |
*
|
4394 |
public static function wcal_coupon_callback() {
|
4395 |
}
|
4396 |
|
4397 |
+
/**
|
4398 |
+
* Callback for GDPR settings section.
|
4399 |
+
*/
|
4400 |
+
public static function ac_lite_gdpr_callback() {}
|
4401 |
}
|
4402 |
}
|
4403 |
$woocommerce_abandon_cart = new woocommerce_abandon_cart_lite();
|