Version Description
Download this release
Release Info
Developer | sandesh055 |
Plugin | Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress |
Version | 1.5.15 |
Comparing to | |
See all releases |
Code changes from version 1.5.14 to 1.5.15
- admin/assets/css/admin-embed-header-rtl.css +65 -0
- admin/assets/css/admin-embed-header.css +65 -0
- admin/assets/css/admin-menu-settings-rtl.css +31 -0
- admin/assets/css/admin-menu-settings.css +31 -0
- admin/assets/css/flow-admin-edit-rtl.css +215 -0
- admin/assets/css/flow-admin-edit.css +215 -0
- admin/assets/css/global-admin-rtl.css +53 -5
- admin/assets/css/global-admin.css +53 -5
- admin/assets/css/setup-wizard-rtl.css +6 -2
- admin/assets/css/setup-wizard.css +6 -2
- admin/assets/icons/wcf-loader.svg +1 -0
- admin/assets/js/admin-menu-settings.js +32 -2
- admin/assets/js/flow-admin-edit.js +109 -4
- admin/assets/js/setup-wizard.js +19 -1
- admin/bsf-analytics/class-bsf-analytics-loader.php +118 -115
- admin/bsf-analytics/class-bsf-analytics.php +503 -560
- admin/bsf-analytics/version.json +4 -1
- assets/css/import-rtl.css +1 -0
- assets/css/import.css +1 -0
- assets/js/frontend.js +3 -3
- assets/min-css/import-rtl.min.css +1 -1
- assets/min-css/import.min.css +1 -1
- assets/min-js/frontend.min.js +1 -1
- cartflows.php +24 -24
- changelog.txt +6 -0
- classes/class-cartflows-admin.php +713 -657
- classes/class-cartflows-cloning.php +30 -26
- classes/class-cartflows-flow-frontend.php +214 -247
- classes/class-cartflows-frontend.php +672 -654
- classes/class-cartflows-functions.php +555 -539
- classes/class-cartflows-loader.php +599 -583
- classes/class-cartflows-meta-fields.php +1046 -1039
- classes/class-cartflows-stats.php +87 -0
- classes/class-cartflows-step-factory.php +250 -0
- classes/class-cartflows-update.php +0 -22
- classes/class-cartflows-utils.php +581 -591
- classes/class-cartflows-wizard.php +8 -2
- includes/admin/cartflows-admin-header.php +21 -0
- includes/admin/cartflows-admin.php +1 -1
- includes/admin/cartflows-general-bck.php +0 -47
- includes/admin/cartflows-general.php +507 -525
- includes/admin/cartflows-home.php +92 -0
- languages/cartflows.pot +2158 -2118
- modules/checkout/classes/class-cartflows-checkout-markup.php +2 -1
- modules/flow/classes/class-cartflows-flow-meta.php +866 -760
- modules/flow/classes/class-cartflows-flow-post-type.php +373 -383
- modules/flow/view/meta-flow-steps.php +158 -210
- modules/flow/view/view-flow-inner-step.php +129 -0
- modules/flow/view/view-remote-importer.php +78 -0
- modules/optin/classes/class-cartflows-optin-markup.php +17 -0
- readme.txt +9 -3
admin/assets/css/admin-embed-header-rtl.css
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.notice:not(.wcf-notice) {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
.wcf-flex {
|
5 |
+
-js-display: flex;
|
6 |
+
display: -webkit-box;
|
7 |
+
display: -webkit-flex;
|
8 |
+
display: -moz-box;
|
9 |
+
display: -ms-flexbox;
|
10 |
+
display: flex;
|
11 |
+
-webkit-box-align: center;
|
12 |
+
-webkit-align-items: center;
|
13 |
+
-moz-box-align: center;
|
14 |
+
-ms-flex-align: center;
|
15 |
+
align-items: center;
|
16 |
+
-webkit-flex-wrap: wrap;
|
17 |
+
-ms-flex-wrap: wrap;
|
18 |
+
flex-wrap: wrap;
|
19 |
+
-webkit-align-content: center;
|
20 |
+
-ms-flex-line-pack: center;
|
21 |
+
align-content: center;
|
22 |
+
}
|
23 |
+
|
24 |
+
/* Header */
|
25 |
+
.wcf-menu-page-header {
|
26 |
+
background-color: #fff;
|
27 |
+
text-align: center;
|
28 |
+
padding: 20px 0;
|
29 |
+
/* margin-bottom: 20px; */
|
30 |
+
margin: 0;
|
31 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
32 |
+
right: -20px;
|
33 |
+
position: relative;
|
34 |
+
width: calc( 100% + 20px);
|
35 |
+
}
|
36 |
+
|
37 |
+
.wcf-container {
|
38 |
+
/* max-width: 930px; */
|
39 |
+
margin: 0 auto;
|
40 |
+
padding: 0 20px;
|
41 |
+
box-sizing: border-box;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wcf-title {
|
45 |
+
flex: auto;
|
46 |
+
align-content: flex-start;
|
47 |
+
text-align: right;
|
48 |
+
}
|
49 |
+
.wcf-title a,
|
50 |
+
.wcf-title span {
|
51 |
+
display: block;
|
52 |
+
outline: none;
|
53 |
+
box-shadow: none;
|
54 |
+
font-size: 1.5rem;
|
55 |
+
color: #333333;
|
56 |
+
font-weight: 500;
|
57 |
+
}
|
58 |
+
.wcf-logo {
|
59 |
+
max-width: 170px;
|
60 |
+
}
|
61 |
+
.wcf-top-links {
|
62 |
+
flex: auto;
|
63 |
+
text-align: left;
|
64 |
+
font-weight: 500;
|
65 |
+
}
|
admin/assets/css/admin-embed-header.css
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.notice:not(.wcf-notice) {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
.wcf-flex {
|
5 |
+
-js-display: flex;
|
6 |
+
display: -webkit-box;
|
7 |
+
display: -webkit-flex;
|
8 |
+
display: -moz-box;
|
9 |
+
display: -ms-flexbox;
|
10 |
+
display: flex;
|
11 |
+
-webkit-box-align: center;
|
12 |
+
-webkit-align-items: center;
|
13 |
+
-moz-box-align: center;
|
14 |
+
-ms-flex-align: center;
|
15 |
+
align-items: center;
|
16 |
+
-webkit-flex-wrap: wrap;
|
17 |
+
-ms-flex-wrap: wrap;
|
18 |
+
flex-wrap: wrap;
|
19 |
+
-webkit-align-content: center;
|
20 |
+
-ms-flex-line-pack: center;
|
21 |
+
align-content: center;
|
22 |
+
}
|
23 |
+
|
24 |
+
/* Header */
|
25 |
+
.wcf-menu-page-header {
|
26 |
+
background-color: #fff;
|
27 |
+
text-align: center;
|
28 |
+
padding: 20px 0;
|
29 |
+
/* margin-bottom: 20px; */
|
30 |
+
margin: 0;
|
31 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
32 |
+
left: -20px;
|
33 |
+
position: relative;
|
34 |
+
width: calc( 100% + 20px);
|
35 |
+
}
|
36 |
+
|
37 |
+
.wcf-container {
|
38 |
+
/* max-width: 930px; */
|
39 |
+
margin: 0 auto;
|
40 |
+
padding: 0 20px;
|
41 |
+
box-sizing: border-box;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wcf-title {
|
45 |
+
flex: auto;
|
46 |
+
align-content: flex-start;
|
47 |
+
text-align: left;
|
48 |
+
}
|
49 |
+
.wcf-title a,
|
50 |
+
.wcf-title span {
|
51 |
+
display: block;
|
52 |
+
outline: none;
|
53 |
+
box-shadow: none;
|
54 |
+
font-size: 1.5rem;
|
55 |
+
color: #333333;
|
56 |
+
font-weight: 500;
|
57 |
+
}
|
58 |
+
.wcf-logo {
|
59 |
+
max-width: 170px;
|
60 |
+
}
|
61 |
+
.wcf-top-links {
|
62 |
+
flex: auto;
|
63 |
+
text-align: right;
|
64 |
+
font-weight: 500;
|
65 |
+
}
|
admin/assets/css/admin-menu-settings-rtl.css
CHANGED
@@ -315,4 +315,35 @@
|
|
315 |
|
316 |
.wcf_permalink_settings .form-field-desc p{
|
317 |
word-break: break-all;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
315 |
|
316 |
.wcf_permalink_settings .form-field-desc p{
|
317 |
word-break: break-all;
|
318 |
+
}
|
319 |
+
|
320 |
+
/***************************************************************
|
321 |
+
* CartFlows Home
|
322 |
+
****************************************************************/
|
323 |
+
|
324 |
+
/* Stat box */
|
325 |
+
.wcf-col-33 {
|
326 |
+
width: 33.33%;
|
327 |
+
}
|
328 |
+
.wcf-col-50 {
|
329 |
+
width: 50%;
|
330 |
+
}
|
331 |
+
.wcf-stats-grid-container {
|
332 |
+
align-content: space-between;
|
333 |
+
border-top: 1px solid #dfdfdf;
|
334 |
+
border-bottom: 1px solid #dfdfdf;
|
335 |
+
}
|
336 |
+
.wcf-stats-box {
|
337 |
+
padding: 15px;
|
338 |
+
box-sizing: border-box;
|
339 |
+
border-left: 1px solid #dfdfdf;
|
340 |
+
}
|
341 |
+
.wcf-stats-box:last-child {
|
342 |
+
border: 0;
|
343 |
+
}
|
344 |
+
/*.wcf-stats-grid-container:last-of-type {
|
345 |
+
border-top: 0;
|
346 |
+
}*/
|
347 |
+
.wcf-stats-buttons {
|
348 |
+
padding: 15px 0;
|
349 |
}
|
admin/assets/css/admin-menu-settings.css
CHANGED
@@ -315,4 +315,35 @@
|
|
315 |
|
316 |
.wcf_permalink_settings .form-field-desc p{
|
317 |
word-break: break-all;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
315 |
|
316 |
.wcf_permalink_settings .form-field-desc p{
|
317 |
word-break: break-all;
|
318 |
+
}
|
319 |
+
|
320 |
+
/***************************************************************
|
321 |
+
* CartFlows Home
|
322 |
+
****************************************************************/
|
323 |
+
|
324 |
+
/* Stat box */
|
325 |
+
.wcf-col-33 {
|
326 |
+
width: 33.33%;
|
327 |
+
}
|
328 |
+
.wcf-col-50 {
|
329 |
+
width: 50%;
|
330 |
+
}
|
331 |
+
.wcf-stats-grid-container {
|
332 |
+
align-content: space-between;
|
333 |
+
border-top: 1px solid #dfdfdf;
|
334 |
+
border-bottom: 1px solid #dfdfdf;
|
335 |
+
}
|
336 |
+
.wcf-stats-box {
|
337 |
+
padding: 15px;
|
338 |
+
box-sizing: border-box;
|
339 |
+
border-right: 1px solid #dfdfdf;
|
340 |
+
}
|
341 |
+
.wcf-stats-box:last-child {
|
342 |
+
border: 0;
|
343 |
+
}
|
344 |
+
/*.wcf-stats-grid-container:last-of-type {
|
345 |
+
border-top: 0;
|
346 |
+
}*/
|
347 |
+
.wcf-stats-buttons {
|
348 |
+
padding: 15px 0;
|
349 |
}
|
admin/assets/css/flow-admin-edit-rtl.css
CHANGED
@@ -102,3 +102,218 @@
|
|
102 |
border-right: 3px solid #f16334;
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
border-right: 3px solid #f16334;
|
103 |
}
|
104 |
|
105 |
+
#wcf-edit-dropdown .wcf-question-icon {
|
106 |
+
margin-left: 3px;
|
107 |
+
}
|
108 |
+
|
109 |
+
.wcf-edit-above:after {
|
110 |
+
bottom: -7px;
|
111 |
+
}
|
112 |
+
|
113 |
+
.wcf-edit-below:after {
|
114 |
+
top: -7px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wcf-edit-content {
|
118 |
+
visibility: hidden;
|
119 |
+
opacity: 0;
|
120 |
+
background: #fafafa;
|
121 |
+
border-top: none;
|
122 |
+
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
|
123 |
+
position: fixed;
|
124 |
+
left: -1px;
|
125 |
+
width: 175px;
|
126 |
+
z-index: 999999;
|
127 |
+
border-radius: 3px;
|
128 |
+
}
|
129 |
+
|
130 |
+
.wcf-edit-content a {
|
131 |
+
padding: 9px 12px;
|
132 |
+
background: #fafafa;
|
133 |
+
text-align: right;
|
134 |
+
text-decoration: none;
|
135 |
+
display: block;
|
136 |
+
border-top: 1px solid rgba(230, 230, 230, 0.5);
|
137 |
+
height: auto;
|
138 |
+
color: #666;
|
139 |
+
font-size: 13px;
|
140 |
+
-webkit-transition: all linear 200ms;
|
141 |
+
transition: all linear 200ms;
|
142 |
+
}
|
143 |
+
.wcf-edit-content a:hover {
|
144 |
+
background: #f2f2f2;
|
145 |
+
}
|
146 |
+
|
147 |
+
.wcf-edit-content a i {
|
148 |
+
color: #444;
|
149 |
+
}
|
150 |
+
|
151 |
+
.wcf-edit-show {
|
152 |
+
visibility: visible;
|
153 |
+
opacity: 1;
|
154 |
+
}
|
155 |
+
|
156 |
+
.wcf-edit-action-modal select {
|
157 |
+
height: 34px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.wcf-edit-settings:after {
|
161 |
+
content: '\2807';
|
162 |
+
font-size: 25px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.wcf-edit-settings {
|
166 |
+
position: relative;
|
167 |
+
color: #ccc;
|
168 |
+
cursor: pointer;
|
169 |
+
display: inline-block;
|
170 |
+
top:7px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.wcf-edit-settings:hover {
|
174 |
+
color: #333;
|
175 |
+
}
|
176 |
+
|
177 |
+
#wcf-edit-dropdown a{
|
178 |
+
display: block;
|
179 |
+
text-align: right;
|
180 |
+
}
|
181 |
+
|
182 |
+
|
183 |
+
#wcf-edit-dropdown .wcf-delete-action span {
|
184 |
+
width: 100%;
|
185 |
+
}
|
186 |
+
|
187 |
+
#wcf-edit-dropdown:after {
|
188 |
+
background: #fafafa;
|
189 |
+
height: 14px;
|
190 |
+
position: absolute;
|
191 |
+
-webkit-transform: rotate(-45deg);
|
192 |
+
transform: rotate(-45deg);
|
193 |
+
width: 14px;
|
194 |
+
content: "";
|
195 |
+
position: absolute;
|
196 |
+
left: 5%;
|
197 |
+
z-index: -7;
|
198 |
+
box-shadow: 0px 0 7px rgba(0, 0, 0, 0.07);
|
199 |
+
border: 1px solid rgba(0, 0, 0, 0.14);
|
200 |
+
}
|
201 |
+
|
202 |
+
.wcf-basic-action-buttons {
|
203 |
+
display: inline-block;
|
204 |
+
text-decoration: none;
|
205 |
+
}
|
206 |
+
|
207 |
+
.wcf-basic-action-buttons a{
|
208 |
+
margin-left: 15px;
|
209 |
+
}
|
210 |
+
|
211 |
+
#wcf-edit-dropdown a:hover{
|
212 |
+
color: #1e8cbe;
|
213 |
+
}
|
214 |
+
|
215 |
+
.wcf-step{
|
216 |
+
position: relative;
|
217 |
+
}
|
218 |
+
|
219 |
+
#wcf-edit-dropdown {
|
220 |
+
position: absolute;
|
221 |
+
z-index: 1;
|
222 |
+
/* top: 0;
|
223 |
+
right:0;*/
|
224 |
+
}
|
225 |
+
|
226 |
+
.wcf-edit-above{
|
227 |
+
left:10px;
|
228 |
+
top: 10px;
|
229 |
+
transform: translate(0, -100%);
|
230 |
+
}
|
231 |
+
.wcf-edit-below{
|
232 |
+
left:10px;
|
233 |
+
bottom: 5px;
|
234 |
+
transform: translate(0, 100%);
|
235 |
+
}
|
236 |
+
|
237 |
+
/*Tooltip*/
|
238 |
+
#wcf-tooltip {
|
239 |
+
position: relative;
|
240 |
+
display: inline-block;
|
241 |
+
cursor: pointer;
|
242 |
+
margin-right: 5px;
|
243 |
+
}
|
244 |
+
|
245 |
+
#wcf-tooltip .wcf-ab-test-note-badge {
|
246 |
+
visibility: hidden;
|
247 |
+
width: 110px;
|
248 |
+
background-color: #555;
|
249 |
+
color: #fff;
|
250 |
+
padding: 3px 0 3px 0;
|
251 |
+
position: absolute;
|
252 |
+
z-index: 1;
|
253 |
+
bottom: 125%;
|
254 |
+
right: 50%;
|
255 |
+
margin-right: -60px;
|
256 |
+
opacity: 0;
|
257 |
+
transition: opacity 0.3s;
|
258 |
+
font-size: 13px;
|
259 |
+
}
|
260 |
+
|
261 |
+
#wcf-tooltip .wcf-ab-test-note-badge::after {
|
262 |
+
content: "";
|
263 |
+
position: absolute;
|
264 |
+
top: 100%;
|
265 |
+
right: 50%;
|
266 |
+
transform: translate(50%, 0);
|
267 |
+
margin-right: -5px;
|
268 |
+
border-width: 5px;
|
269 |
+
border-style: solid;
|
270 |
+
border-color: #555 transparent transparent transparent;
|
271 |
+
}
|
272 |
+
|
273 |
+
#wcf-tooltip:hover .wcf-ab-test-note-badge {
|
274 |
+
visibility: visible;
|
275 |
+
opacity: 1;
|
276 |
+
padding: 6px 10px;
|
277 |
+
text-align: right;
|
278 |
+
font-size: 12px;
|
279 |
+
font-family: apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
280 |
+
}
|
281 |
+
|
282 |
+
|
283 |
+
.wcf-loader{
|
284 |
+
position:relative;
|
285 |
+
}
|
286 |
+
.wcf-step.wcf-loader:before{
|
287 |
+
content: '';
|
288 |
+
position: absolute;
|
289 |
+
width: 100%;
|
290 |
+
height: 100%;
|
291 |
+
top: 0;
|
292 |
+
background-color: #ffffff;
|
293 |
+
right: 0;
|
294 |
+
opacity: 0.70;
|
295 |
+
}
|
296 |
+
.wcf-step.wcf-loader:after{
|
297 |
+
content: '';
|
298 |
+
background-image: url(../icons/wcf-loader.svg);
|
299 |
+
right: 50%;
|
300 |
+
top: 40%;
|
301 |
+
top: calc( 50% - 10px);
|
302 |
+
background-repeat: no-repeat;
|
303 |
+
width: 20px;
|
304 |
+
height: 20px;
|
305 |
+
position: absolute;
|
306 |
+
align-items: center;
|
307 |
+
animation: rotate 0.8s infinite linear;
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
|
312 |
+
@keyframes rotate {
|
313 |
+
0% {
|
314 |
+
transform: rotate(0deg);
|
315 |
+
}
|
316 |
+
100% {
|
317 |
+
transform: rotate(-360deg);
|
318 |
+
}
|
319 |
+
}
|
admin/assets/css/flow-admin-edit.css
CHANGED
@@ -102,3 +102,218 @@
|
|
102 |
border-left: 3px solid #f16334;
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
border-left: 3px solid #f16334;
|
103 |
}
|
104 |
|
105 |
+
#wcf-edit-dropdown .wcf-question-icon {
|
106 |
+
margin-right: 3px;
|
107 |
+
}
|
108 |
+
|
109 |
+
.wcf-edit-above:after {
|
110 |
+
bottom: -7px;
|
111 |
+
}
|
112 |
+
|
113 |
+
.wcf-edit-below:after {
|
114 |
+
top: -7px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wcf-edit-content {
|
118 |
+
visibility: hidden;
|
119 |
+
opacity: 0;
|
120 |
+
background: #fafafa;
|
121 |
+
border-top: none;
|
122 |
+
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
|
123 |
+
position: fixed;
|
124 |
+
right: -1px;
|
125 |
+
width: 175px;
|
126 |
+
z-index: 999999;
|
127 |
+
border-radius: 3px;
|
128 |
+
}
|
129 |
+
|
130 |
+
.wcf-edit-content a {
|
131 |
+
padding: 9px 12px;
|
132 |
+
background: #fafafa;
|
133 |
+
text-align: left;
|
134 |
+
text-decoration: none;
|
135 |
+
display: block;
|
136 |
+
border-top: 1px solid rgba(230, 230, 230, 0.5);
|
137 |
+
height: auto;
|
138 |
+
color: #666;
|
139 |
+
font-size: 13px;
|
140 |
+
-webkit-transition: all linear 200ms;
|
141 |
+
transition: all linear 200ms;
|
142 |
+
}
|
143 |
+
.wcf-edit-content a:hover {
|
144 |
+
background: #f2f2f2;
|
145 |
+
}
|
146 |
+
|
147 |
+
.wcf-edit-content a i {
|
148 |
+
color: #444;
|
149 |
+
}
|
150 |
+
|
151 |
+
.wcf-edit-show {
|
152 |
+
visibility: visible;
|
153 |
+
opacity: 1;
|
154 |
+
}
|
155 |
+
|
156 |
+
.wcf-edit-action-modal select {
|
157 |
+
height: 34px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.wcf-edit-settings:after {
|
161 |
+
content: '\2807';
|
162 |
+
font-size: 25px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.wcf-edit-settings {
|
166 |
+
position: relative;
|
167 |
+
color: #ccc;
|
168 |
+
cursor: pointer;
|
169 |
+
display: inline-block;
|
170 |
+
top:7px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.wcf-edit-settings:hover {
|
174 |
+
color: #333;
|
175 |
+
}
|
176 |
+
|
177 |
+
#wcf-edit-dropdown a{
|
178 |
+
display: block;
|
179 |
+
text-align: left;
|
180 |
+
}
|
181 |
+
|
182 |
+
|
183 |
+
#wcf-edit-dropdown .wcf-delete-action span {
|
184 |
+
width: 100%;
|
185 |
+
}
|
186 |
+
|
187 |
+
#wcf-edit-dropdown:after {
|
188 |
+
background: #fafafa;
|
189 |
+
height: 14px;
|
190 |
+
position: absolute;
|
191 |
+
-webkit-transform: rotate(45deg);
|
192 |
+
transform: rotate(45deg);
|
193 |
+
width: 14px;
|
194 |
+
content: "";
|
195 |
+
position: absolute;
|
196 |
+
right: 5%;
|
197 |
+
z-index: -7;
|
198 |
+
box-shadow: 0px 0 7px rgba(0, 0, 0, 0.07);
|
199 |
+
border: 1px solid rgba(0, 0, 0, 0.14);
|
200 |
+
}
|
201 |
+
|
202 |
+
.wcf-basic-action-buttons {
|
203 |
+
display: inline-block;
|
204 |
+
text-decoration: none;
|
205 |
+
}
|
206 |
+
|
207 |
+
.wcf-basic-action-buttons a{
|
208 |
+
margin-right: 15px;
|
209 |
+
}
|
210 |
+
|
211 |
+
#wcf-edit-dropdown a:hover{
|
212 |
+
color: #1e8cbe;
|
213 |
+
}
|
214 |
+
|
215 |
+
.wcf-step{
|
216 |
+
position: relative;
|
217 |
+
}
|
218 |
+
|
219 |
+
#wcf-edit-dropdown {
|
220 |
+
position: absolute;
|
221 |
+
z-index: 1;
|
222 |
+
/* top: 0;
|
223 |
+
right:0;*/
|
224 |
+
}
|
225 |
+
|
226 |
+
.wcf-edit-above{
|
227 |
+
right:10px;
|
228 |
+
top: 10px;
|
229 |
+
transform: translate(0, -100%);
|
230 |
+
}
|
231 |
+
.wcf-edit-below{
|
232 |
+
right:10px;
|
233 |
+
bottom: 5px;
|
234 |
+
transform: translate(0, 100%);
|
235 |
+
}
|
236 |
+
|
237 |
+
/*Tooltip*/
|
238 |
+
#wcf-tooltip {
|
239 |
+
position: relative;
|
240 |
+
display: inline-block;
|
241 |
+
cursor: pointer;
|
242 |
+
margin-left: 5px;
|
243 |
+
}
|
244 |
+
|
245 |
+
#wcf-tooltip .wcf-ab-test-note-badge {
|
246 |
+
visibility: hidden;
|
247 |
+
width: 110px;
|
248 |
+
background-color: #555;
|
249 |
+
color: #fff;
|
250 |
+
padding: 3px 0 3px 0;
|
251 |
+
position: absolute;
|
252 |
+
z-index: 1;
|
253 |
+
bottom: 125%;
|
254 |
+
left: 50%;
|
255 |
+
margin-left: -60px;
|
256 |
+
opacity: 0;
|
257 |
+
transition: opacity 0.3s;
|
258 |
+
font-size: 13px;
|
259 |
+
}
|
260 |
+
|
261 |
+
#wcf-tooltip .wcf-ab-test-note-badge::after {
|
262 |
+
content: "";
|
263 |
+
position: absolute;
|
264 |
+
top: 100%;
|
265 |
+
left: 50%;
|
266 |
+
transform: translate(-50%, 0);
|
267 |
+
margin-left: -5px;
|
268 |
+
border-width: 5px;
|
269 |
+
border-style: solid;
|
270 |
+
border-color: #555 transparent transparent transparent;
|
271 |
+
}
|
272 |
+
|
273 |
+
#wcf-tooltip:hover .wcf-ab-test-note-badge {
|
274 |
+
visibility: visible;
|
275 |
+
opacity: 1;
|
276 |
+
padding: 6px 10px;
|
277 |
+
text-align: left;
|
278 |
+
font-size: 12px;
|
279 |
+
font-family: apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
280 |
+
}
|
281 |
+
|
282 |
+
|
283 |
+
.wcf-loader{
|
284 |
+
position:relative;
|
285 |
+
}
|
286 |
+
.wcf-step.wcf-loader:before{
|
287 |
+
content: '';
|
288 |
+
position: absolute;
|
289 |
+
width: 100%;
|
290 |
+
height: 100%;
|
291 |
+
top: 0;
|
292 |
+
background-color: #ffffff;
|
293 |
+
left: 0;
|
294 |
+
opacity: 0.70;
|
295 |
+
}
|
296 |
+
.wcf-step.wcf-loader:after{
|
297 |
+
content: '';
|
298 |
+
background-image: url(../icons/wcf-loader.svg);
|
299 |
+
left: 50%;
|
300 |
+
top: 40%;
|
301 |
+
top: calc( 50% - 10px);
|
302 |
+
background-repeat: no-repeat;
|
303 |
+
width: 20px;
|
304 |
+
height: 20px;
|
305 |
+
position: absolute;
|
306 |
+
align-items: center;
|
307 |
+
animation: rotate 0.8s infinite linear;
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
|
312 |
+
@keyframes rotate {
|
313 |
+
0% {
|
314 |
+
transform: rotate(0deg);
|
315 |
+
}
|
316 |
+
100% {
|
317 |
+
transform: rotate(360deg);
|
318 |
+
}
|
319 |
+
}
|
admin/assets/css/global-admin-rtl.css
CHANGED
@@ -51,6 +51,10 @@
|
|
51 |
* Step Meta - All Page Css
|
52 |
*/
|
53 |
|
|
|
|
|
|
|
|
|
54 |
.post-type-cartflows_step #delete-action {
|
55 |
display: none;
|
56 |
}
|
@@ -359,6 +363,7 @@
|
|
359 |
color: #fff;
|
360 |
}
|
361 |
|
|
|
362 |
.wcf-flow-steps-meta-box .wcf-new-step-badge,
|
363 |
.wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
|
364 |
.wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
|
@@ -374,6 +379,15 @@
|
|
374 |
vertical-align: middle;
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
#wcf-flow-settings .inside{
|
378 |
margin: 10px 0 0;
|
379 |
}
|
@@ -414,13 +428,13 @@
|
|
414 |
}
|
415 |
|
416 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
|
417 |
-
display: inline-block
|
418 |
font-size: 1em;
|
419 |
-
line-height:
|
420 |
vertical-align: middle;
|
421 |
text-align: center;
|
422 |
-
margin-
|
423 |
-
text-decoration: none;
|
424 |
}
|
425 |
|
426 |
.wcf-flow-settings .wcf-action-button .dashicons{
|
@@ -432,7 +446,8 @@
|
|
432 |
}
|
433 |
|
434 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
|
435 |
-
|
|
|
436 |
line-height: 1.5em;
|
437 |
}
|
438 |
|
@@ -460,6 +475,7 @@
|
|
460 |
}
|
461 |
|
462 |
.wcf-step-wrap {
|
|
|
463 |
margin-bottom: 15px;
|
464 |
}
|
465 |
|
@@ -558,6 +574,11 @@ input[type="text"].error:focus{
|
|
558 |
* 5. Upsell Meta Box (#wcf-upsell-settings)
|
559 |
* ************************************************
|
560 |
*/
|
|
|
|
|
|
|
|
|
|
|
561 |
.wcf-repeat-notice,
|
562 |
#wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
|
563 |
border-top: 1px #ddd solid;
|
@@ -1173,8 +1194,35 @@ input[type="text"].error:focus{
|
|
1173 |
padding:10px;
|
1174 |
}
|
1175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
|
1177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1178 |
/**
|
1179 |
* ******************************
|
1180 |
* Media Query for 768 Devices
|
51 |
* Step Meta - All Page Css
|
52 |
*/
|
53 |
|
54 |
+
.edit-post-layout .interface-interface-skeleton__content{
|
55 |
+
background-color: #fff;
|
56 |
+
}
|
57 |
+
|
58 |
.post-type-cartflows_step #delete-action {
|
59 |
display: none;
|
60 |
}
|
363 |
color: #fff;
|
364 |
}
|
365 |
|
366 |
+
.wcf-flow-steps-meta-box .wcf-step-badge,
|
367 |
.wcf-flow-steps-meta-box .wcf-new-step-badge,
|
368 |
.wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
|
369 |
.wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
|
379 |
vertical-align: middle;
|
380 |
}
|
381 |
|
382 |
+
.wcf-flow-steps-meta-box .wcf-abtest-control-badge {
|
383 |
+
background: #f16334;
|
384 |
+
color: #fff;
|
385 |
+
}
|
386 |
+
.wcf-flow-steps-meta-box .wcf-abtest-variation-badge {
|
387 |
+
background: #1e8cbe;
|
388 |
+
color: #fff;
|
389 |
+
}
|
390 |
+
|
391 |
#wcf-flow-settings .inside{
|
392 |
margin: 10px 0 0;
|
393 |
}
|
428 |
}
|
429 |
|
430 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
|
431 |
+
/*display: inline-block;*/
|
432 |
font-size: 1em;
|
433 |
+
line-height: 0.9em;
|
434 |
vertical-align: middle;
|
435 |
text-align: center;
|
436 |
+
/* margin-left: 15px;
|
437 |
+
*/ text-decoration: none;
|
438 |
}
|
439 |
|
440 |
.wcf-flow-settings .wcf-action-button .dashicons{
|
446 |
}
|
447 |
|
448 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
|
449 |
+
/* display: inline-block;
|
450 |
+
display: none !important;*/
|
451 |
line-height: 1.5em;
|
452 |
}
|
453 |
|
475 |
}
|
476 |
|
477 |
.wcf-step-wrap {
|
478 |
+
background: #ffffff;
|
479 |
margin-bottom: 15px;
|
480 |
}
|
481 |
|
574 |
* 5. Upsell Meta Box (#wcf-upsell-settings)
|
575 |
* ************************************************
|
576 |
*/
|
577 |
+
|
578 |
+
.edit-post-meta-boxes-area #poststuff #wcf-checkout-settings h2.hndle{
|
579 |
+
border-bottom: 0px;
|
580 |
+
}
|
581 |
+
|
582 |
.wcf-repeat-notice,
|
583 |
#wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
|
584 |
border-top: 1px #ddd solid;
|
1194 |
padding:10px;
|
1195 |
}
|
1196 |
|
1197 |
+
/**
|
1198 |
+
* *******************************
|
1199 |
+
* A/B testing CSS Start
|
1200 |
+
* *******************************
|
1201 |
+
*/
|
1202 |
+
|
1203 |
+
/* Dropdown menu Buttons */
|
1204 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button{
|
1205 |
+
padding: 10px 15px;
|
1206 |
+
border-right: 1px solid rgba(230, 230, 230, 0.5);
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button:hover{
|
1210 |
+
background: #ffffff;
|
1211 |
+
border-right: 1px solid #1e8cbe;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button .wcf-step-act-btn-text{
|
1215 |
+
margin-right: 5px;
|
1216 |
+
}
|
1217 |
+
/* Dropdown menu Buttons */
|
1218 |
|
1219 |
|
1220 |
+
/**
|
1221 |
+
* *******************************
|
1222 |
+
* A/B testing CSS End
|
1223 |
+
* *******************************
|
1224 |
+
*/
|
1225 |
+
|
1226 |
/**
|
1227 |
* ******************************
|
1228 |
* Media Query for 768 Devices
|
admin/assets/css/global-admin.css
CHANGED
@@ -51,6 +51,10 @@
|
|
51 |
* Step Meta - All Page Css
|
52 |
*/
|
53 |
|
|
|
|
|
|
|
|
|
54 |
.post-type-cartflows_step #delete-action {
|
55 |
display: none;
|
56 |
}
|
@@ -359,6 +363,7 @@
|
|
359 |
color: #fff;
|
360 |
}
|
361 |
|
|
|
362 |
.wcf-flow-steps-meta-box .wcf-new-step-badge,
|
363 |
.wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
|
364 |
.wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
|
@@ -374,6 +379,15 @@
|
|
374 |
vertical-align: middle;
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
#wcf-flow-settings .inside{
|
378 |
margin: 10px 0 0;
|
379 |
}
|
@@ -414,13 +428,13 @@
|
|
414 |
}
|
415 |
|
416 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
|
417 |
-
display: inline-block
|
418 |
font-size: 1em;
|
419 |
-
line-height:
|
420 |
vertical-align: middle;
|
421 |
text-align: center;
|
422 |
-
margin-left: 15px;
|
423 |
-
text-decoration: none;
|
424 |
}
|
425 |
|
426 |
.wcf-flow-settings .wcf-action-button .dashicons{
|
@@ -432,7 +446,8 @@
|
|
432 |
}
|
433 |
|
434 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
|
435 |
-
|
|
|
436 |
line-height: 1.5em;
|
437 |
}
|
438 |
|
@@ -460,6 +475,7 @@
|
|
460 |
}
|
461 |
|
462 |
.wcf-step-wrap {
|
|
|
463 |
margin-bottom: 15px;
|
464 |
}
|
465 |
|
@@ -558,6 +574,11 @@ input[type="text"].error:focus{
|
|
558 |
* 5. Upsell Meta Box (#wcf-upsell-settings)
|
559 |
* ************************************************
|
560 |
*/
|
|
|
|
|
|
|
|
|
|
|
561 |
.wcf-repeat-notice,
|
562 |
#wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
|
563 |
border-top: 1px #ddd solid;
|
@@ -1173,8 +1194,35 @@ input[type="text"].error:focus{
|
|
1173 |
padding:10px;
|
1174 |
}
|
1175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
|
1177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1178 |
/**
|
1179 |
* ******************************
|
1180 |
* Media Query for 768 Devices
|
51 |
* Step Meta - All Page Css
|
52 |
*/
|
53 |
|
54 |
+
.edit-post-layout .interface-interface-skeleton__content{
|
55 |
+
background-color: #fff;
|
56 |
+
}
|
57 |
+
|
58 |
.post-type-cartflows_step #delete-action {
|
59 |
display: none;
|
60 |
}
|
363 |
color: #fff;
|
364 |
}
|
365 |
|
366 |
+
.wcf-flow-steps-meta-box .wcf-step-badge,
|
367 |
.wcf-flow-steps-meta-box .wcf-new-step-badge,
|
368 |
.wcf-flow-steps-meta-box .wcf-step-wrap .wcf-step .wcf-flow-badge,
|
369 |
.wcf-flow-steps-meta-box .wcf-step-wrap.active .wcf-step .wcf-flow-badge{
|
379 |
vertical-align: middle;
|
380 |
}
|
381 |
|
382 |
+
.wcf-flow-steps-meta-box .wcf-abtest-control-badge {
|
383 |
+
background: #f16334;
|
384 |
+
color: #fff;
|
385 |
+
}
|
386 |
+
.wcf-flow-steps-meta-box .wcf-abtest-variation-badge {
|
387 |
+
background: #1e8cbe;
|
388 |
+
color: #fff;
|
389 |
+
}
|
390 |
+
|
391 |
#wcf-flow-settings .inside{
|
392 |
margin: 10px 0 0;
|
393 |
}
|
428 |
}
|
429 |
|
430 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button{
|
431 |
+
/*display: inline-block;*/
|
432 |
font-size: 1em;
|
433 |
+
line-height: 0.9em;
|
434 |
vertical-align: middle;
|
435 |
text-align: center;
|
436 |
+
/* margin-left: 15px;
|
437 |
+
*/ text-decoration: none;
|
438 |
}
|
439 |
|
440 |
.wcf-flow-settings .wcf-action-button .dashicons{
|
446 |
}
|
447 |
|
448 |
.wcf-flow-settings .wcf-flow-steps-wrap .wcf-action-button .wcf-step-act-btn-text {
|
449 |
+
/* display: inline-block;
|
450 |
+
display: none !important;*/
|
451 |
line-height: 1.5em;
|
452 |
}
|
453 |
|
475 |
}
|
476 |
|
477 |
.wcf-step-wrap {
|
478 |
+
background: #ffffff;
|
479 |
margin-bottom: 15px;
|
480 |
}
|
481 |
|
574 |
* 5. Upsell Meta Box (#wcf-upsell-settings)
|
575 |
* ************************************************
|
576 |
*/
|
577 |
+
|
578 |
+
.edit-post-meta-boxes-area #poststuff #wcf-checkout-settings h2.hndle{
|
579 |
+
border-bottom: 0px;
|
580 |
+
}
|
581 |
+
|
582 |
.wcf-repeat-notice,
|
583 |
#wcf-checkout-settings .wcf-checkout-table .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field .field-wcf-advance-options-fields{
|
584 |
border-top: 1px #ddd solid;
|
1194 |
padding:10px;
|
1195 |
}
|
1196 |
|
1197 |
+
/**
|
1198 |
+
* *******************************
|
1199 |
+
* A/B testing CSS Start
|
1200 |
+
* *******************************
|
1201 |
+
*/
|
1202 |
+
|
1203 |
+
/* Dropdown menu Buttons */
|
1204 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button{
|
1205 |
+
padding: 10px 15px;
|
1206 |
+
border-left: 1px solid rgba(230, 230, 230, 0.5);
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button:hover{
|
1210 |
+
background: #ffffff;
|
1211 |
+
border-left: 1px solid #1e8cbe;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
#wcf-edit-dropdown.wcf-edit-content a.wcf-action-button .wcf-step-act-btn-text{
|
1215 |
+
margin-left: 5px;
|
1216 |
+
}
|
1217 |
+
/* Dropdown menu Buttons */
|
1218 |
|
1219 |
|
1220 |
+
/**
|
1221 |
+
* *******************************
|
1222 |
+
* A/B testing CSS End
|
1223 |
+
* *******************************
|
1224 |
+
*/
|
1225 |
+
|
1226 |
/**
|
1227 |
* ******************************
|
1228 |
* Media Query for 768 Devices
|
admin/assets/css/setup-wizard-rtl.css
CHANGED
@@ -303,7 +303,7 @@
|
|
303 |
|
304 |
.cartflows-setup-wizard-content p,
|
305 |
.cartflows-setup-content p {
|
306 |
-
margin: 0 0
|
307 |
}
|
308 |
|
309 |
.cartflows-setup-wizard-content p,
|
@@ -1248,4 +1248,8 @@
|
|
1248 |
.cartflows-usage-tracking .usage-tracking-wrap p,
|
1249 |
.cartflows-usage-tracking .usage-tracking-wrap label{
|
1250 |
font-size: 14px;
|
1251 |
-
}
|
|
|
|
|
|
|
|
303 |
|
304 |
.cartflows-setup-wizard-content p,
|
305 |
.cartflows-setup-content p {
|
306 |
+
margin: 0 0 10px
|
307 |
}
|
308 |
|
309 |
.cartflows-setup-wizard-content p,
|
1248 |
.cartflows-usage-tracking .usage-tracking-wrap p,
|
1249 |
.cartflows-usage-tracking .usage-tracking-wrap label{
|
1250 |
font-size: 14px;
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
#wcf-page-builder{
|
1254 |
+
text-transform: capitalize;
|
1255 |
+
}
|
admin/assets/css/setup-wizard.css
CHANGED
@@ -303,7 +303,7 @@
|
|
303 |
|
304 |
.cartflows-setup-wizard-content p,
|
305 |
.cartflows-setup-content p {
|
306 |
-
margin: 0 0
|
307 |
}
|
308 |
|
309 |
.cartflows-setup-wizard-content p,
|
@@ -1248,4 +1248,8 @@
|
|
1248 |
.cartflows-usage-tracking .usage-tracking-wrap p,
|
1249 |
.cartflows-usage-tracking .usage-tracking-wrap label{
|
1250 |
font-size: 14px;
|
1251 |
-
}
|
|
|
|
|
|
|
|
303 |
|
304 |
.cartflows-setup-wizard-content p,
|
305 |
.cartflows-setup-content p {
|
306 |
+
margin: 0 0 10px
|
307 |
}
|
308 |
|
309 |
.cartflows-setup-wizard-content p,
|
1248 |
.cartflows-usage-tracking .usage-tracking-wrap p,
|
1249 |
.cartflows-usage-tracking .usage-tracking-wrap label{
|
1250 |
font-size: 14px;
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
#wcf-page-builder{
|
1254 |
+
text-transform: capitalize;
|
1255 |
+
}
|
admin/assets/icons/wcf-loader.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 91.3 91.1"><circle cx="45.7" cy="45.7" r="45.7"/><circle fill="#FFF" cx="45.7" cy="24.4" r="12.5"/></svg>
|
admin/assets/js/admin-menu-settings.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
jQuery("#wcf_wcf_facebook_pixel_tracking").click(function () {
|
8 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
9 |
});
|
10 |
-
}
|
11 |
/* Disable/Enable Facebook Pixel Field section*/
|
12 |
|
13 |
/* Disable/Enable Google Analytics Field section */
|
@@ -19,9 +19,39 @@
|
|
19 |
jQuery("#wcf_enable_google-analytics-id").click(function () {
|
20 |
jQuery(google_analytics_fields).toggle(jQuery("#wcf_enable_google-analytics-id").is(":checked"));
|
21 |
});
|
22 |
-
}
|
23 |
/* Disable/Enable Google Analytics Field section */
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$(document).ready(function () {
|
26 |
wcf_toggle_fields_facebook_pixel();
|
27 |
wcf_toggle_fields_google_analytics();
|
7 |
jQuery("#wcf_wcf_facebook_pixel_tracking").click(function () {
|
8 |
jQuery(fb_pixel_fields).toggle(jQuery("#wcf_wcf_facebook_pixel_tracking").is(":checked"));
|
9 |
});
|
10 |
+
};
|
11 |
/* Disable/Enable Facebook Pixel Field section*/
|
12 |
|
13 |
/* Disable/Enable Google Analytics Field section */
|
19 |
jQuery("#wcf_enable_google-analytics-id").click(function () {
|
20 |
jQuery(google_analytics_fields).toggle(jQuery("#wcf_enable_google-analytics-id").is(":checked"));
|
21 |
});
|
22 |
+
};
|
23 |
/* Disable/Enable Google Analytics Field section */
|
24 |
|
25 |
+
var wcf_fetch_stats_overview = function() {
|
26 |
+
|
27 |
+
$('.wcf-stats-buttons button').on('click', function(e) {
|
28 |
+
|
29 |
+
e.preventDefault();
|
30 |
+
|
31 |
+
var $this = $(this),
|
32 |
+
wrap = $this.closest('.wcf-stats-buttons'),
|
33 |
+
filter = $this.data('filter');
|
34 |
+
|
35 |
+
wrap.find('.button').removeClass('button-primary').addClass('button-secondary');
|
36 |
+
$this.addClass('button-primary').removeClass('button-secondary');
|
37 |
+
|
38 |
+
$.ajax({
|
39 |
+
url: ajaxurl,
|
40 |
+
data: {
|
41 |
+
action: "cartflows_fetch_stats",
|
42 |
+
filter: filter,
|
43 |
+
security: cartflows_admin.wcf_fetch_stats_nonce
|
44 |
+
},
|
45 |
+
dataType: 'json',
|
46 |
+
type: 'POST',
|
47 |
+
success: function ( data ) {
|
48 |
+
|
49 |
+
console.log( data );
|
50 |
+
}
|
51 |
+
});
|
52 |
+
});
|
53 |
+
};
|
54 |
+
|
55 |
$(document).ready(function () {
|
56 |
wcf_toggle_fields_facebook_pixel();
|
57 |
wcf_toggle_fields_google_analytics();
|
admin/assets/js/flow-admin-edit.js
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
step_id = $this.data('id'),
|
12 |
icon_span = $this.find('.dashicons-trash'),
|
13 |
text_span = $this.find('.wcf-step-act-btn-text'),
|
|
|
14 |
parent = $this.parents('.wcf-step-wrap');
|
15 |
|
16 |
var delete_status = confirm( "This action will delete this flow step. Are you sure?" );
|
@@ -23,6 +24,7 @@
|
|
23 |
|
24 |
var post_id = $( 'form#post #post_ID').val();
|
25 |
|
|
|
26 |
$.ajax({
|
27 |
url: ajaxurl,
|
28 |
data: {
|
@@ -34,9 +36,14 @@
|
|
34 |
dataType: 'json',
|
35 |
type: 'POST',
|
36 |
success: function ( data ) {
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
setTimeout(function() {
|
42 |
$('.wcf-flow-steps-container').trigger('wcf-step-deleted',[step_id]);
|
@@ -48,6 +55,53 @@
|
|
48 |
}
|
49 |
});
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
var wcf_flow_steps_sortbale = function() {
|
53 |
|
@@ -69,7 +123,6 @@
|
|
69 |
});
|
70 |
|
71 |
$this.sortable('disable');
|
72 |
-
|
73 |
$.ajax({
|
74 |
url: ajaxurl,
|
75 |
data: {
|
@@ -95,10 +148,62 @@
|
|
95 |
});
|
96 |
|
97 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
$(document).ready(function($) {
|
99 |
|
100 |
wcf_steps_hide_show_delete();
|
101 |
|
102 |
wcf_flow_steps_sortbale();
|
|
|
|
|
|
|
|
|
103 |
});
|
104 |
})(jQuery);
|
11 |
step_id = $this.data('id'),
|
12 |
icon_span = $this.find('.dashicons-trash'),
|
13 |
text_span = $this.find('.wcf-step-act-btn-text'),
|
14 |
+
wcf_step = $this.closest('.wcf-step'),
|
15 |
parent = $this.parents('.wcf-step-wrap');
|
16 |
|
17 |
var delete_status = confirm( "This action will delete this flow step. Are you sure?" );
|
24 |
|
25 |
var post_id = $( 'form#post #post_ID').val();
|
26 |
|
27 |
+
wcf_step.addClass('wcf-loader');
|
28 |
$.ajax({
|
29 |
url: ajaxurl,
|
30 |
data: {
|
36 |
dataType: 'json',
|
37 |
type: 'POST',
|
38 |
success: function ( data ) {
|
39 |
+
|
40 |
+
if ( data.reload ) {
|
41 |
+
location.reload();
|
42 |
+
}else{
|
43 |
+
parent.slideUp(400, 'swing', function() {
|
44 |
+
parent.remove();
|
45 |
+
});
|
46 |
+
}
|
47 |
|
48 |
setTimeout(function() {
|
49 |
$('.wcf-flow-steps-container').trigger('wcf-step-deleted',[step_id]);
|
55 |
}
|
56 |
});
|
57 |
}
|
58 |
+
|
59 |
+
var wcf_flow_step_clone = function() {
|
60 |
+
|
61 |
+
$('.wcf-flow-settings .wcf-step-clone').on('click', function (e) {
|
62 |
+
|
63 |
+
e.preventDefault();
|
64 |
+
|
65 |
+
if( $(this).hasClass('wcf-pro') ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
var $this = $(this),
|
70 |
+
step_id = $this.data('id'),
|
71 |
+
icon_span = $this.find('.dashicons-trash'),
|
72 |
+
text_span = $this.find('.wcf-step-act-btn-text'),
|
73 |
+
wcf_step = $this.closest('.wcf-step');
|
74 |
+
|
75 |
+
var clone_status = confirm("Do you want to clone this step? Are you sure?");
|
76 |
+
|
77 |
+
if (true == clone_status) {
|
78 |
+
|
79 |
+
console.log('Clonning Step');
|
80 |
+
icon_span.addClass('wp-ui-text-notification');
|
81 |
+
text_span.addClass('wp-ui-text-notification').text('Clonning...');
|
82 |
+
|
83 |
+
var post_id = $('form#post #post_ID').val();
|
84 |
+
|
85 |
+
wcf_step.addClass('wcf-loader');
|
86 |
+
|
87 |
+
$.ajax({
|
88 |
+
url: ajaxurl,
|
89 |
+
data: {
|
90 |
+
action: "cartflows_clone_flow_step",
|
91 |
+
post_id: post_id,
|
92 |
+
step_id: step_id,
|
93 |
+
security: cartflows_admin.wcf_clone_flow_step_nonce
|
94 |
+
},
|
95 |
+
dataType: 'json',
|
96 |
+
type: 'POST',
|
97 |
+
success: function (data) {
|
98 |
+
location.reload();
|
99 |
+
}
|
100 |
+
});
|
101 |
+
}
|
102 |
+
});
|
103 |
+
|
104 |
+
}
|
105 |
|
106 |
var wcf_flow_steps_sortbale = function() {
|
107 |
|
123 |
});
|
124 |
|
125 |
$this.sortable('disable');
|
|
|
126 |
$.ajax({
|
127 |
url: ajaxurl,
|
128 |
data: {
|
148 |
});
|
149 |
|
150 |
}
|
151 |
+
|
152 |
+
var wcf_handle_flow_options = function (){
|
153 |
+
|
154 |
+
$(document).on("click", ".wcf-edit-settings", function (e) {
|
155 |
+
|
156 |
+
var setting_button = $(this),
|
157 |
+
$window = $(window),
|
158 |
+
step_wrap = setting_button.closest('.wcf-step-wrap');
|
159 |
+
|
160 |
+
if( step_wrap.hasClass('wcf-ab-test')){
|
161 |
+
step_wrap = setting_button.closest('.wcf-step');
|
162 |
+
}
|
163 |
+
|
164 |
+
var setting_menu = step_wrap.find('#wcf-edit-dropdown'),
|
165 |
+
step_wrap_height = step_wrap.height(),
|
166 |
+
step_wrap_top = step_wrap.offset().top - $window.scrollTop(),
|
167 |
+
el_parent_bottom = step_wrap_top + step_wrap.outerHeight(),
|
168 |
+
el_dropdown_height = setting_menu.outerHeight(true),
|
169 |
+
class_css = '';
|
170 |
+
|
171 |
+
|
172 |
+
if ( setting_button.hasClass('active') ) {
|
173 |
+
setting_button.removeClass('active');
|
174 |
+
setting_menu.removeClass('wcf-edit-show wcf-edit-above wcf-edit-below');
|
175 |
+
return false;
|
176 |
+
}
|
177 |
+
|
178 |
+
setting_button.addClass('active');
|
179 |
+
|
180 |
+
setting_menu.addClass('wcf-edit-show');
|
181 |
+
|
182 |
+
if (step_wrap_top > el_dropdown_height) {
|
183 |
+
class_css = 'wcf-edit-above';
|
184 |
+
}else{
|
185 |
+
class_css = 'wcf-edit-below';
|
186 |
+
}
|
187 |
+
|
188 |
+
setting_menu.addClass(class_css);
|
189 |
+
});
|
190 |
+
|
191 |
+
|
192 |
+
$('body').click(function(){
|
193 |
+
$('.wcf-edit-settings').removeClass('active');
|
194 |
+
$('.wcf-flow-steps-container').find('.wcf-step-wrap #wcf-edit-dropdown').removeClass('wcf-edit-above wcf-edit-below wcf-edit-show');
|
195 |
+
});
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
$(document).ready(function($) {
|
200 |
|
201 |
wcf_steps_hide_show_delete();
|
202 |
|
203 |
wcf_flow_steps_sortbale();
|
204 |
+
|
205 |
+
wcf_handle_flow_options();
|
206 |
+
|
207 |
+
wcf_flow_step_clone();
|
208 |
});
|
209 |
})(jQuery);
|
admin/assets/js/setup-wizard.js
CHANGED
@@ -11,14 +11,32 @@
|
|
11 |
*/
|
12 |
_bind: function() {
|
13 |
$( document ).on('click', '.wcf-install-plugins', CartFlowsWizard._installNow );
|
14 |
-
$( document ).on('click', '.
|
15 |
$( document ).on('click', '.wcf-install-wc', CartFlowsWizard._installWc );
|
16 |
$( document ).on('wp-plugin-installing' , CartFlowsWizard._pluginInstalling);
|
17 |
$( document ).on('wp-plugin-install-error' , CartFlowsWizard._installError);
|
18 |
$( document ).on('wp-plugin-install-success' , CartFlowsWizard._installSuccess);
|
19 |
$( document ).on('click', '.mautic-form-submit', CartFlowsWizard._onMauticSubmit );
|
|
|
20 |
},
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
_usage_tracking: function( event ){
|
24 |
|
11 |
*/
|
12 |
_bind: function() {
|
13 |
$( document ).on('click', '.wcf-install-plugins', CartFlowsWizard._installNow );
|
14 |
+
$( document ).on('click', '.wcf-usage-tracking', CartFlowsWizard._usage_tracking );
|
15 |
$( document ).on('click', '.wcf-install-wc', CartFlowsWizard._installWc );
|
16 |
$( document ).on('wp-plugin-installing' , CartFlowsWizard._pluginInstalling);
|
17 |
$( document ).on('wp-plugin-install-error' , CartFlowsWizard._installError);
|
18 |
$( document ).on('wp-plugin-install-success' , CartFlowsWizard._installSuccess);
|
19 |
$( document ).on('click', '.mautic-form-submit', CartFlowsWizard._onMauticSubmit );
|
20 |
+
$( document ).on('change', '.page-builder-list', CartFlowsWizard._onChangePagebuilder );
|
21 |
},
|
22 |
|
23 |
+
_onChangePagebuilder: function ( event ){
|
24 |
+
|
25 |
+
|
26 |
+
var page_builder = $(this).val(),
|
27 |
+
plugin_slug = $( '.page-builder-list option:selected' ).data( 'slug' ) || '',
|
28 |
+
new_url = 'https://wordpress.org/plugins/'+plugin_slug;
|
29 |
+
|
30 |
+
$('.cartflows-setup-extra-notice').show();
|
31 |
+
if( 'other' === plugin_slug || 'divi' === plugin_slug ){
|
32 |
+
$('.cartflows-setup-extra-notice').hide();
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
plugin_slug = plugin_slug.replace(/-/gi," ");
|
37 |
+
$('#wcf-page-builder').attr("href", new_url);
|
38 |
+
$('#wcf-page-builder').html( plugin_slug );
|
39 |
+
},
|
40 |
|
41 |
_usage_tracking: function( event ){
|
42 |
|
admin/bsf-analytics/class-bsf-analytics-loader.php
CHANGED
@@ -1,115 +1,118 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BSF analytics loader file.
|
4 |
-
*
|
5 |
-
* @version 1.0.0
|
6 |
-
*
|
7 |
-
* @package bsf-analytics
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit();
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class BSF_Analytics_Loader.
|
16 |
-
*/
|
17 |
-
class BSF_Analytics_Loader {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Analytics Entities.
|
21 |
-
*
|
22 |
-
* @access private
|
23 |
-
* @var array Entities array.
|
24 |
-
*/
|
25 |
-
private $entities = array();
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Analytics Version.
|
29 |
-
*
|
30 |
-
* @access private
|
31 |
-
* @var float analytics version.
|
32 |
-
*/
|
33 |
-
private $analytics_version = '';
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Analytics path.
|
37 |
-
*
|
38 |
-
* @access private
|
39 |
-
* @var string path array.
|
40 |
-
*/
|
41 |
-
private $analytics_path = '';
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Instance
|
45 |
-
*
|
46 |
-
* @access private
|
47 |
-
* @var object Class object.
|
48 |
-
*/
|
49 |
-
private static $instance = null;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get instace of class.
|
53 |
-
*
|
54 |
-
* @return object
|
55 |
-
*/
|
56 |
-
public static function get_instance() {
|
57 |
-
if ( null === self::$instance ) {
|
58 |
-
self::$instance = new self();
|
59 |
-
}
|
60 |
-
|
61 |
-
return self::$instance;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Constructor
|
66 |
-
*/
|
67 |
-
public function __construct() {
|
68 |
-
add_action( 'init', array( $this, 'load_analytics' ) );
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Set entity for analytics.
|
73 |
-
*
|
74 |
-
* @param string $data Entity attributes data.
|
75 |
-
* @return void
|
76 |
-
*/
|
77 |
-
public function set_entity( $data ) {
|
78 |
-
array_push( $this->entities, $data );
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Load Analytics library.
|
83 |
-
*
|
84 |
-
* @return void
|
85 |
-
*/
|
86 |
-
public function load_analytics() {
|
87 |
-
$unique_entities = array();
|
88 |
-
|
89 |
-
if ( ! empty( $this->entities ) ) {
|
90 |
-
foreach ( $this->entities as $entity ) {
|
91 |
-
foreach ( $entity as $key => $data ) {
|
92 |
-
|
93 |
-
if ( isset( $data['path'] ) ) {
|
94 |
-
if ( file_exists( $data['path'] . '/version.json' ) ) {
|
95 |
-
$
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
}
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BSF analytics loader file.
|
4 |
+
*
|
5 |
+
* @version 1.0.0
|
6 |
+
*
|
7 |
+
* @package bsf-analytics
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit();
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class BSF_Analytics_Loader.
|
16 |
+
*/
|
17 |
+
class BSF_Analytics_Loader {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Analytics Entities.
|
21 |
+
*
|
22 |
+
* @access private
|
23 |
+
* @var array Entities array.
|
24 |
+
*/
|
25 |
+
private $entities = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Analytics Version.
|
29 |
+
*
|
30 |
+
* @access private
|
31 |
+
* @var float analytics version.
|
32 |
+
*/
|
33 |
+
private $analytics_version = '';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Analytics path.
|
37 |
+
*
|
38 |
+
* @access private
|
39 |
+
* @var string path array.
|
40 |
+
*/
|
41 |
+
private $analytics_path = '';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Instance
|
45 |
+
*
|
46 |
+
* @access private
|
47 |
+
* @var object Class object.
|
48 |
+
*/
|
49 |
+
private static $instance = null;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get instace of class.
|
53 |
+
*
|
54 |
+
* @return object
|
55 |
+
*/
|
56 |
+
public static function get_instance() {
|
57 |
+
if ( null === self::$instance ) {
|
58 |
+
self::$instance = new self();
|
59 |
+
}
|
60 |
+
|
61 |
+
return self::$instance;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Constructor
|
66 |
+
*/
|
67 |
+
public function __construct() {
|
68 |
+
add_action( 'init', array( $this, 'load_analytics' ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Set entity for analytics.
|
73 |
+
*
|
74 |
+
* @param string $data Entity attributes data.
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function set_entity( $data ) {
|
78 |
+
array_push( $this->entities, $data );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Load Analytics library.
|
83 |
+
*
|
84 |
+
* @return void
|
85 |
+
*/
|
86 |
+
public function load_analytics() {
|
87 |
+
$unique_entities = array();
|
88 |
+
|
89 |
+
if ( ! empty( $this->entities ) ) {
|
90 |
+
foreach ( $this->entities as $entity ) {
|
91 |
+
foreach ( $entity as $key => $data ) {
|
92 |
+
|
93 |
+
if ( isset( $data['path'] ) ) {
|
94 |
+
if ( file_exists( $data['path'] . '/version.json' ) ) {
|
95 |
+
$file_contents = file_get_contents( $data['path'] . '/version.json' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
96 |
+
$analytics_version = json_decode( $file_contents, 1 );
|
97 |
+
$analytics_version = $analytics_version['bsf-analytics-ver'];
|
98 |
+
|
99 |
+
if ( version_compare( $analytics_version, $this->analytics_version, '>' ) ) {
|
100 |
+
$this->analytics_version = $analytics_version;
|
101 |
+
$this->analytics_path = $data['path'];
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( ! isset( $unique_entities[ $key ] ) ) {
|
107 |
+
$unique_entities[ $key ] = $data;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
if ( file_exists( $this->analytics_path ) && ! class_exists( 'BSF_Analytics' ) ) {
|
113 |
+
require_once $this->analytics_path . '/class-bsf-analytics.php';
|
114 |
+
new BSF_Analytics( $unique_entities, $this->analytics_path, $this->analytics_version );
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
admin/bsf-analytics/class-bsf-analytics.php
CHANGED
@@ -1,560 +1,503 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BSF analytics class file.
|
4 |
-
*
|
5 |
-
* @version 1.0.0
|
6 |
-
*
|
7 |
-
* @package bsf-analytics
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit; // Exit if accessed directly.
|
12 |
-
}
|
13 |
-
|
14 |
-
if ( ! class_exists( 'BSF_Analytics' ) ) {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* BSF analytics
|
18 |
-
*/
|
19 |
-
class BSF_Analytics {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Member Variable
|
23 |
-
*
|
24 |
-
* @var
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Member Variable
|
30 |
-
*
|
31 |
-
* @var
|
32 |
-
*/
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
*
|
37 |
-
*
|
38 |
-
* @
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$this
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
add_action( '
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
$this->
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
*
|
93 |
-
*
|
94 |
-
* @
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
*
|
143 |
-
*
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
*
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
}
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
*
|
328 |
-
*
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
*
|
337 |
-
*
|
338 |
-
* @since 1.0.0
|
339 |
-
*/
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
*
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
}
|
501 |
-
}
|
502 |
-
|
503 |
-
|
504 |
-
* Analytics option add callback.
|
505 |
-
*
|
506 |
-
* @param string $option Option name.
|
507 |
-
* @param string $value value of option.
|
508 |
-
* @since 1.0.0
|
509 |
-
*/
|
510 |
-
public function add_analytics_option_callback( $option, $value ) {
|
511 |
-
if ( is_multisite() ) {
|
512 |
-
$this->add_option_to_network( $option, $value );
|
513 |
-
}
|
514 |
-
}
|
515 |
-
|
516 |
-
/**
|
517 |
-
* Schedule or unschedule event based on analytics option value.
|
518 |
-
*
|
519 |
-
* @since 1.0.0
|
520 |
-
*/
|
521 |
-
public function schedule_unschedule_event() {
|
522 |
-
|
523 |
-
foreach ( $this->entities as $key => $source ) {
|
524 |
-
|
525 |
-
if ( true === $this->is_white_label_enabled( $key ) ) {
|
526 |
-
$this->unschedule_event();
|
527 |
-
return;
|
528 |
-
}
|
529 |
-
|
530 |
-
$analytics_option = get_site_option( $key . '_analytics_optin' );
|
531 |
-
|
532 |
-
if ( 'yes' === $analytics_option ) {
|
533 |
-
$this->schedule_event();
|
534 |
-
} else {
|
535 |
-
$this->unschedule_event();
|
536 |
-
}
|
537 |
-
}
|
538 |
-
}
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Save analytics option to network.
|
542 |
-
*
|
543 |
-
* @param string $option name of option.
|
544 |
-
* @param string $value value of option.
|
545 |
-
* @since 1.0.0
|
546 |
-
*/
|
547 |
-
public function add_option_to_network( $option, $value ) {
|
548 |
-
|
549 |
-
// If action coming from general settings page.
|
550 |
-
if ( isset( $_POST['option_page'] ) && 'general' === $_POST['option_page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
551 |
-
|
552 |
-
if ( get_site_option( $option ) ) {
|
553 |
-
update_site_option( $option, $value );
|
554 |
-
} else {
|
555 |
-
add_site_option( $option, $value );
|
556 |
-
}
|
557 |
-
}
|
558 |
-
}
|
559 |
-
}
|
560 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BSF analytics class file.
|
4 |
+
*
|
5 |
+
* @version 1.0.0
|
6 |
+
*
|
7 |
+
* @package bsf-analytics
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit; // Exit if accessed directly.
|
12 |
+
}
|
13 |
+
|
14 |
+
if ( ! class_exists( 'BSF_Analytics' ) ) {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* BSF analytics
|
18 |
+
*/
|
19 |
+
class BSF_Analytics {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Member Variable
|
23 |
+
*
|
24 |
+
* @var array Entities data.
|
25 |
+
*/
|
26 |
+
private $entities;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Member Variable
|
30 |
+
*
|
31 |
+
* @var string Usage tracking document URL
|
32 |
+
*/
|
33 |
+
public $usage_doc_link = 'https://store.brainstormforce.com/usage-tracking/?utm_source=wp_dashboard&utm_medium=general_settings&utm_campaign=usage_tracking';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Setup actions, load files.
|
37 |
+
*
|
38 |
+
* @param array $args entity data for analytics.
|
39 |
+
* @param string $analytics_path directory path to analytics library.
|
40 |
+
* @param float $analytics_version analytics library version.
|
41 |
+
* @since 1.0.0
|
42 |
+
*/
|
43 |
+
public function __construct( $args, $analytics_path, $analytics_version ) {
|
44 |
+
|
45 |
+
// Bail when no analytics entities are registered.
|
46 |
+
if ( empty( $args ) ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$this->entities = $args;
|
51 |
+
|
52 |
+
define( 'BSF_ANALYTICS_VERSION', $analytics_version );
|
53 |
+
define( 'BSF_ANALYTICS_URI', $this->get_analytics_url( $analytics_path ) );
|
54 |
+
|
55 |
+
add_action( 'admin_init', array( $this, 'handle_optin_optout' ) );
|
56 |
+
add_action( 'admin_notices', array( $this, 'option_notice' ) );
|
57 |
+
add_action( 'init', array( $this, 'maybe_track_analytics' ), 99 );
|
58 |
+
|
59 |
+
$this->set_actions();
|
60 |
+
|
61 |
+
add_action( 'admin_init', array( $this, 'register_usage_tracking_setting' ) );
|
62 |
+
|
63 |
+
$this->includes();
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Setup actions for admin notice style and analytics cron event.
|
68 |
+
*
|
69 |
+
* @since 1.0.4
|
70 |
+
*/
|
71 |
+
public function set_actions() {
|
72 |
+
|
73 |
+
foreach ( $this->entities as $key => $data ) {
|
74 |
+
add_action( 'astra_notice_before_markup_' . $key . '-optin-notice', array( $this, 'enqueue_assets' ) );
|
75 |
+
add_action( 'update_option_' . $key . '_analytics_optin', array( $this, 'update_analytics_option_callback' ), 10, 3 );
|
76 |
+
add_action( 'add_option_' . $key . '_analytics_optin', array( $this, 'add_analytics_option_callback' ), 10, 2 );
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* BSF Analytics URL
|
82 |
+
*
|
83 |
+
* @param string $analytics_path directory path to analytics library.
|
84 |
+
* @return String URL of bsf-analytics directory.
|
85 |
+
* @since 1.0.0
|
86 |
+
*/
|
87 |
+
public function get_analytics_url( $analytics_path ) {
|
88 |
+
return str_replace( WP_CONTENT_DIR, content_url(), $analytics_path );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get API URL for sending analytics.
|
93 |
+
*
|
94 |
+
* @return string API URL.
|
95 |
+
* @since 1.0.0
|
96 |
+
*/
|
97 |
+
private function get_api_url() {
|
98 |
+
return defined( 'BSF_API_URL' ) ? BSF_API_URL : 'https://support.brainstormforce.com/';
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Enqueue Scripts.
|
103 |
+
*
|
104 |
+
* @since 1.0.0
|
105 |
+
* @return void
|
106 |
+
*/
|
107 |
+
public function enqueue_assets() {
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Load unminified if SCRIPT_DEBUG is true.
|
111 |
+
*
|
112 |
+
* Directory and Extensions.
|
113 |
+
*/
|
114 |
+
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
|
115 |
+
$file_rtl = ( is_rtl() ) ? '-rtl' : '';
|
116 |
+
$css_ext = ( SCRIPT_DEBUG ) ? '.css' : '.min.css';
|
117 |
+
|
118 |
+
$css_uri = BSF_ANALYTICS_URI . '/assets/css/' . $dir_name . '/style' . $file_rtl . $css_ext;
|
119 |
+
|
120 |
+
wp_enqueue_style( 'bsf-analytics-admin-style', $css_uri, false, BSF_ANALYTICS_VERSION, 'all' );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Send analytics API call.
|
125 |
+
*
|
126 |
+
* @since 1.0.0
|
127 |
+
*/
|
128 |
+
public function send() {
|
129 |
+
wp_remote_post(
|
130 |
+
$this->get_api_url() . 'wp-json/bsf-core/v1/analytics/',
|
131 |
+
array(
|
132 |
+
'body' => BSF_Analytics_Stats::instance()->get_stats(),
|
133 |
+
'timeout' => 5,
|
134 |
+
'blocking' => false,
|
135 |
+
)
|
136 |
+
);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Check if usage tracking is enabled.
|
141 |
+
*
|
142 |
+
* @return bool
|
143 |
+
* @since 1.0.0
|
144 |
+
*/
|
145 |
+
public function is_tracking_enabled() {
|
146 |
+
|
147 |
+
foreach ( $this->entities as $key => $data ) {
|
148 |
+
|
149 |
+
$is_enabled = get_site_option( $key . '_analytics_optin' ) === 'yes' ? true : false;
|
150 |
+
$is_enabled = $this->is_white_label_enabled( $key ) ? false : $is_enabled;
|
151 |
+
|
152 |
+
if ( apply_filters( $key . '_tracking_enabled', $is_enabled ) ) {
|
153 |
+
return true;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Check if WHITE label is enabled for BSF products.
|
162 |
+
*
|
163 |
+
* @param string $source source of analytics.
|
164 |
+
* @return bool
|
165 |
+
* @since 1.0.0
|
166 |
+
*/
|
167 |
+
public function is_white_label_enabled( $source ) {
|
168 |
+
|
169 |
+
$options = apply_filters( $source . '_white_label_options', array() );
|
170 |
+
$is_enabled = false;
|
171 |
+
|
172 |
+
if ( is_array( $options ) ) {
|
173 |
+
foreach ( $options as $option ) {
|
174 |
+
if ( true === $option ) {
|
175 |
+
$is_enabled = true;
|
176 |
+
break;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
return $is_enabled;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Display admin notice for usage tracking.
|
186 |
+
*
|
187 |
+
* @since 1.0.0
|
188 |
+
*/
|
189 |
+
public function option_notice() {
|
190 |
+
|
191 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
192 |
+
return;
|
193 |
+
}
|
194 |
+
|
195 |
+
foreach ( $this->entities as $key => $data ) {
|
196 |
+
|
197 |
+
$time_to_display = isset( $data['time_to_display'] ) ? $data['time_to_display'] : '+24 hours';
|
198 |
+
$usage_doc_link = isset( $data['usage_doc_link'] ) ? $data['usage_doc_link'] : $this->usage_doc_link;
|
199 |
+
|
200 |
+
// Don't display the notice if tracking is disabled or White Label is enabled for any of our plugins.
|
201 |
+
if ( false !== get_site_option( $key . '_analytics_optin', false ) || $this->is_white_label_enabled( $key ) ) {
|
202 |
+
continue;
|
203 |
+
}
|
204 |
+
|
205 |
+
// Show tracker consent notice after 24 hours from installed time.
|
206 |
+
if ( strtotime( $time_to_display, $this->get_analytics_install_time( $key ) ) > time() ) {
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
|
210 |
+
/* translators: %s product name */
|
211 |
+
$notice_string = __( 'Want to help make <strong>%1s</strong> even more awesome? Allow us to collect non-sensitive diagnostic data and usage information. ', 'cartflows' );
|
212 |
+
|
213 |
+
if ( is_multisite() ) {
|
214 |
+
$notice_string .= __( 'This will be applicable for all sites from the network.', 'cartflows' );
|
215 |
+
}
|
216 |
+
|
217 |
+
$language_dir = is_rtl() ? 'rtl' : 'ltr';
|
218 |
+
|
219 |
+
Astra_Notices::add_notice(
|
220 |
+
array(
|
221 |
+
'id' => $key . '-optin-notice',
|
222 |
+
'type' => '',
|
223 |
+
'message' => sprintf(
|
224 |
+
'<div class="notice-content">
|
225 |
+
<div class="notice-heading">
|
226 |
+
%1$s
|
227 |
+
</div>
|
228 |
+
<div class="astra-notices-container">
|
229 |
+
<a href="%2$s" class="astra-notices button-primary">
|
230 |
+
%3$s
|
231 |
+
</a>
|
232 |
+
<a href="%4$s" data-repeat-notice-after="%5$s" class="astra-notices button-secondary">
|
233 |
+
%6$s
|
234 |
+
</a>
|
235 |
+
</div>
|
236 |
+
</div>',
|
237 |
+
/* translators: %s usage doc link */
|
238 |
+
sprintf( $notice_string . '<span dir="%2s"><a href="%3s" target="_blank" rel="noreferrer noopener">%4s</a><span>', esc_html( $data['product_name'] ), $language_dir, esc_url( $usage_doc_link ), __( ' Know More.', 'cartflows' ) ),
|
239 |
+
add_query_arg(
|
240 |
+
array(
|
241 |
+
$key . '_analytics_optin' => 'yes',
|
242 |
+
$key . '_analytics_nonce' => wp_create_nonce( $key . '_analytics_optin' ),
|
243 |
+
'bsf_analytics_source' => $key,
|
244 |
+
)
|
245 |
+
),
|
246 |
+
__( 'Yes! Allow it', 'cartflows' ),
|
247 |
+
add_query_arg(
|
248 |
+
array(
|
249 |
+
$key . '_analytics_optin' => 'no',
|
250 |
+
$key . '_analytics_nonce' => wp_create_nonce( $key . '_analytics_optin' ),
|
251 |
+
'bsf_analytics_source' => $key,
|
252 |
+
)
|
253 |
+
),
|
254 |
+
MONTH_IN_SECONDS,
|
255 |
+
__( 'No Thanks', 'cartflows' )
|
256 |
+
),
|
257 |
+
'show_if' => true,
|
258 |
+
'repeat-notice-after' => false,
|
259 |
+
'priority' => 18,
|
260 |
+
'display-with-other-notices' => true,
|
261 |
+
)
|
262 |
+
);
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Process usage tracking opt out.
|
268 |
+
*
|
269 |
+
* @since 1.0.0
|
270 |
+
*/
|
271 |
+
public function handle_optin_optout() {
|
272 |
+
|
273 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
274 |
+
return;
|
275 |
+
}
|
276 |
+
|
277 |
+
$source = isset( $_GET['bsf_analytics_source'] ) ? sanitize_text_field( wp_unslash( $_GET['bsf_analytics_source'] ) ) : '';
|
278 |
+
|
279 |
+
if ( ! isset( $_GET[ $source . '_analytics_nonce' ] ) ) {
|
280 |
+
return;
|
281 |
+
}
|
282 |
+
|
283 |
+
if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ $source . '_analytics_nonce' ] ) ), $source . '_analytics_optin' ) ) {
|
284 |
+
return;
|
285 |
+
}
|
286 |
+
|
287 |
+
$optin_status = isset( $_GET[ $source . '_analytics_optin' ] ) ? sanitize_text_field( wp_unslash( $_GET[ $source . '_analytics_optin' ] ) ) : '';
|
288 |
+
|
289 |
+
if ( 'yes' === $optin_status ) {
|
290 |
+
$this->optin( $source );
|
291 |
+
} elseif ( 'no' === $optin_status ) {
|
292 |
+
$this->optout( $source );
|
293 |
+
}
|
294 |
+
|
295 |
+
wp_safe_redirect(
|
296 |
+
remove_query_arg(
|
297 |
+
array(
|
298 |
+
$source . '_analytics_optin',
|
299 |
+
$source . '_analytics_nonce',
|
300 |
+
'bsf_analytics_source',
|
301 |
+
)
|
302 |
+
)
|
303 |
+
);
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Opt in to usage tracking.
|
308 |
+
*
|
309 |
+
* @param string $source source of analytics.
|
310 |
+
* @since 1.0.0
|
311 |
+
*/
|
312 |
+
private function optin( $source ) {
|
313 |
+
update_site_option( $source . '_analytics_optin', 'yes' );
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Opt out to usage tracking.
|
318 |
+
*
|
319 |
+
* @param string $source source of analytics.
|
320 |
+
* @since 1.0.0
|
321 |
+
*/
|
322 |
+
private function optout( $source ) {
|
323 |
+
update_site_option( $source . '_analytics_optin', 'no' );
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Load analytics stat class.
|
328 |
+
*
|
329 |
+
* @since 1.0.0
|
330 |
+
*/
|
331 |
+
private function includes() {
|
332 |
+
require_once __DIR__ . '/class-bsf-analytics-stats.php';
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Register usage tracking option in General settings page.
|
337 |
+
*
|
338 |
+
* @since 1.0.0
|
339 |
+
*/
|
340 |
+
public function register_usage_tracking_setting() {
|
341 |
+
|
342 |
+
foreach ( $this->entities as $key => $data ) {
|
343 |
+
|
344 |
+
if ( ! apply_filters( $key . '_tracking_enabled', true ) || $this->is_white_label_enabled( $key ) ) {
|
345 |
+
return;
|
346 |
+
}
|
347 |
+
|
348 |
+
$usage_doc_link = isset( $data['usage_doc_link'] ) ? $data['usage_doc_link'] : $this->usage_doc_link;
|
349 |
+
$author = isset( $data['author'] ) ? $data['author'] : 'Brainstorm Force';
|
350 |
+
|
351 |
+
register_setting(
|
352 |
+
'general', // Options group.
|
353 |
+
$key . '_analytics_optin', // Option name/database.
|
354 |
+
array( 'sanitize_callback' => array( $this, 'sanitize_option' ) ) // sanitize callback function.
|
355 |
+
);
|
356 |
+
|
357 |
+
add_settings_field(
|
358 |
+
$key . '-analytics-optin', // Field ID.
|
359 |
+
__( 'Usage Tracking', 'cartflows' ), // Field title.
|
360 |
+
array( $this, 'render_settings_field_html' ), // Field callback function.
|
361 |
+
'general',
|
362 |
+
'default', // Settings page slug.
|
363 |
+
array(
|
364 |
+
'type' => 'checkbox',
|
365 |
+
'title' => $author,
|
366 |
+
'name' => $key . '_analytics_optin',
|
367 |
+
'label_for' => $key . '-analytics-optin',
|
368 |
+
'id' => $key . '-analytics-optin',
|
369 |
+
'usage_doc_link' => $usage_doc_link,
|
370 |
+
)
|
371 |
+
);
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Sanitize Callback Function
|
377 |
+
*
|
378 |
+
* @param bool $input Option value.
|
379 |
+
* @since 1.0.0
|
380 |
+
*/
|
381 |
+
public function sanitize_option( $input ) {
|
382 |
+
|
383 |
+
if ( ! $input || 'no' === $input ) {
|
384 |
+
return 'no';
|
385 |
+
}
|
386 |
+
|
387 |
+
return 'yes';
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Print settings field HTML.
|
392 |
+
*
|
393 |
+
* @param array $args arguments to field.
|
394 |
+
* @since 1.0.0
|
395 |
+
*/
|
396 |
+
public function render_settings_field_html( $args ) {
|
397 |
+
?>
|
398 |
+
<fieldset>
|
399 |
+
<label for="<?php echo esc_attr( $args['label_for'] ); ?>">
|
400 |
+
<input id="<?php echo esc_attr( $args['id'] ); ?>" type="checkbox" value="1" name="<?php echo esc_attr( $args['name'] ); ?>" <?php checked( get_site_option( $args['name'], 'no' ), 'yes' ); ?>>
|
401 |
+
<?php
|
402 |
+
/* translators: %s Product title */
|
403 |
+
echo esc_html( sprintf( __( 'Allow %s products to track non-sensitive usage tracking data.', 'cartflows' ), $args['title'] ) );// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
|
404 |
+
|
405 |
+
if ( is_multisite() ) {
|
406 |
+
esc_html_e( ' This will be applicable for all sites from the network.', 'cartflows' );
|
407 |
+
}
|
408 |
+
?>
|
409 |
+
</label>
|
410 |
+
<?php
|
411 |
+
echo wp_kses_post( sprintf( '<a href="%1s" target="_blank" rel="noreferrer noopener">%2s</a>', esc_url( $args['usage_doc_link'] ), __( 'Learn More.', 'cartflows' ) ) );
|
412 |
+
?>
|
413 |
+
</fieldset>
|
414 |
+
<?php
|
415 |
+
}
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Set analytics installed time in option.
|
419 |
+
*
|
420 |
+
* @param string $source source of analytics.
|
421 |
+
* @return string $time analytics installed time.
|
422 |
+
* @since 1.0.0
|
423 |
+
*/
|
424 |
+
private function get_analytics_install_time( $source ) {
|
425 |
+
|
426 |
+
$time = get_site_option( $source . '_analytics_installed_time' );
|
427 |
+
|
428 |
+
if ( ! $time ) {
|
429 |
+
$time = time();
|
430 |
+
update_site_option( $source . '_analytics_installed_time', time() );
|
431 |
+
}
|
432 |
+
|
433 |
+
return $time;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Schedule/unschedule cron event on updation of option.
|
438 |
+
*
|
439 |
+
* @param string $old_value old value of option.
|
440 |
+
* @param string $value value of option.
|
441 |
+
* @param string $option Option name.
|
442 |
+
* @since 1.0.0
|
443 |
+
*/
|
444 |
+
public function update_analytics_option_callback( $old_value, $value, $option ) {
|
445 |
+
if ( is_multisite() ) {
|
446 |
+
$this->add_option_to_network( $option, $value );
|
447 |
+
}
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Analytics option add callback.
|
452 |
+
*
|
453 |
+
* @param string $option Option name.
|
454 |
+
* @param string $value value of option.
|
455 |
+
* @since 1.0.0
|
456 |
+
*/
|
457 |
+
public function add_analytics_option_callback( $option, $value ) {
|
458 |
+
if ( is_multisite() ) {
|
459 |
+
$this->add_option_to_network( $option, $value );
|
460 |
+
}
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Send analaytics track event if tracking is enabled.
|
465 |
+
*
|
466 |
+
* @since 1.0.0
|
467 |
+
*/
|
468 |
+
public function maybe_track_analytics() {
|
469 |
+
|
470 |
+
if ( ! $this->is_tracking_enabled() ) {
|
471 |
+
return;
|
472 |
+
}
|
473 |
+
|
474 |
+
$analytics_track = get_site_transient( 'bsf_analytics_track' );
|
475 |
+
|
476 |
+
// If the last data sent is 2 days old i.e. transient is expired.
|
477 |
+
if ( ! $analytics_track ) {
|
478 |
+
$this->send();
|
479 |
+
set_site_transient( 'bsf_analytics_track', true, 2 * DAY_IN_SECONDS );
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Save analytics option to network.
|
485 |
+
*
|
486 |
+
* @param string $option name of option.
|
487 |
+
* @param string $value value of option.
|
488 |
+
* @since 1.0.0
|
489 |
+
*/
|
490 |
+
public function add_option_to_network( $option, $value ) {
|
491 |
+
|
492 |
+
// If action coming from general settings page.
|
493 |
+
if ( isset( $_POST['option_page'] ) && 'general' === $_POST['option_page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
494 |
+
|
495 |
+
if ( get_site_option( $option ) ) {
|
496 |
+
update_site_option( $option, $value );
|
497 |
+
} else {
|
498 |
+
add_site_option( $option, $value );
|
499 |
+
}
|
500 |
+
}
|
501 |
+
}
|
502 |
+
}
|
503 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/bsf-analytics/version.json
CHANGED
@@ -1 +1,4 @@
|
|
1 |
-
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bsf-analytics-ver": "1.1.0"
|
3 |
+
}
|
4 |
+
|
assets/css/import-rtl.css
CHANGED
@@ -903,6 +903,7 @@ html.wcf-popup-open{
|
|
903 |
|
904 |
.wcf-popup-close-wrap .close-icon{
|
905 |
cursor: pointer;
|
|
|
906 |
}
|
907 |
|
908 |
.wcf-popup-close-wrap .wcf-cartflow-icons{
|
903 |
|
904 |
.wcf-popup-close-wrap .close-icon{
|
905 |
cursor: pointer;
|
906 |
+
margin: 0 12px;
|
907 |
}
|
908 |
|
909 |
.wcf-popup-close-wrap .wcf-cartflow-icons{
|
assets/css/import.css
CHANGED
@@ -903,6 +903,7 @@ html.wcf-popup-open{
|
|
903 |
|
904 |
.wcf-popup-close-wrap .close-icon{
|
905 |
cursor: pointer;
|
|
|
906 |
}
|
907 |
|
908 |
.wcf-popup-close-wrap .wcf-cartflow-icons{
|
903 |
|
904 |
.wcf-popup-close-wrap .close-icon{
|
905 |
cursor: pointer;
|
906 |
+
margin: 0 12px;
|
907 |
}
|
908 |
|
909 |
.wcf-popup-close-wrap .wcf-cartflow-icons{
|
assets/js/frontend.js
CHANGED
@@ -85,7 +85,7 @@
|
|
85 |
var ga_add_payment_info = cartflows.wcf_ga_active['enable_add_payment_info'];
|
86 |
var ga_purchase_event = cartflows.wcf_ga_active['enable_purchase_event'];
|
87 |
var ga_add_to_cart = cartflows.wcf_ga_active['enable_add_to_cart'];
|
88 |
-
var
|
89 |
var is_checkout_page = cartflows.is_checkout_page;
|
90 |
|
91 |
if( 'disable' === ga_for_other_page ){
|
@@ -117,8 +117,8 @@
|
|
117 |
}
|
118 |
}
|
119 |
|
120 |
-
if( typeof
|
121 |
-
var ga_order_details = jQuery.parseJSON(
|
122 |
|
123 |
var purchase_data = {
|
124 |
send_to: google_a_id,
|
85 |
var ga_add_payment_info = cartflows.wcf_ga_active['enable_add_payment_info'];
|
86 |
var ga_purchase_event = cartflows.wcf_ga_active['enable_purchase_event'];
|
87 |
var ga_add_to_cart = cartflows.wcf_ga_active['enable_add_to_cart'];
|
88 |
+
var ga_cookies = $.cookie('wcf_ga_trans_data');
|
89 |
var is_checkout_page = cartflows.is_checkout_page;
|
90 |
|
91 |
if( 'disable' === ga_for_other_page ){
|
117 |
}
|
118 |
}
|
119 |
|
120 |
+
if( typeof ga_cookies !== 'undefined' && ga_cookies != null ){
|
121 |
+
var ga_order_details = jQuery.parseJSON(ga_cookies);
|
122 |
|
123 |
var purchase_data = {
|
124 |
send_to: google_a_id,
|
assets/min-css/import-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.no-elementor-notice{border-right:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-right:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;right:0;left:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);left:0;right:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);left:22%;right:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:right}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;right:0;left:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 0 0 5px;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;right:0!important;left:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;left:0;bottom:50px;right:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:left}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:right;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1.5em 1em 1em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-left:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;right:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(50%,-40%);-ms-transform:translate(50%,-40%);transform:translate(50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-left:2em;padding-left:0;text-align:left;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 6px 2px 2px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;left:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;right:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;right:50%;-webkit-transform:translate(50%,-35%);-ms-transform:translate(50%,-35%);transform:translate(50%,-35%);width:70%;min-height:85%;max-height:85%;height:85%;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:right;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}.wcf-templates-popup-content .wcf-templates-wrap{height:100%}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;left:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;right:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-flow-actions{min-height:52px;max-height:55px}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:-webkit-calc(100% - 55px);height:calc(100% - 55px);min-height:-webkit-calc(100% - 55px);min-height:calc(100% - 55px);max-height:-webkit-calc(100% - 55px);max-height:calc(100% - 55px);padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:right;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;left:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-right:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;right:50%;bottom:0;left:0;max-width:100%;max-height:100%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-right:0}#wcf-remote-filters .filter-links li:last-child a{margin-left:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 3px 0 0}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-left:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
1 |
+
.no-elementor-notice{border-right:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-right:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;right:0;left:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);left:0;right:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);left:22%;right:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:right}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;right:0;left:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 0 0 5px;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;right:0!important;left:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;left:0;bottom:50px;right:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:left}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:right;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1.5em 1em 1em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-left:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;right:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(50%,-40%);-ms-transform:translate(50%,-40%);transform:translate(50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-left:2em;padding-left:0;text-align:left;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 6px 2px 2px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;left:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;right:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;right:50%;-webkit-transform:translate(50%,-35%);-ms-transform:translate(50%,-35%);transform:translate(50%,-35%);width:70%;min-height:85%;max-height:85%;height:85%;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:right;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}.wcf-templates-popup-content .wcf-templates-wrap{height:100%}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;left:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;right:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-flow-actions{min-height:52px;max-height:55px}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:-webkit-calc(100% - 55px);height:calc(100% - 55px);min-height:-webkit-calc(100% - 55px);min-height:calc(100% - 55px);max-height:-webkit-calc(100% - 55px);max-height:calc(100% - 55px);padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:right;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;left:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-right:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer;margin:0 12px}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;right:50%;bottom:0;left:0;max-width:100%;max-height:100%;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-right:0}#wcf-remote-filters .filter-links li:last-child a{margin-left:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 3px 0 0}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-left:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
assets/min-css/import.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.no-elementor-notice{border-left:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-left:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;left:0;right:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);right:0;left:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);right:22%;left:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:left}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 5px 0 0;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;right:0;bottom:50px;left:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:right}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:left;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1em 1em 1.5em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-right:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;left:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(-50%,-40%);-ms-transform:translate(-50%,-40%);transform:translate(-50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-right:2em;padding-right:0;text-align:right;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 6px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;right:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;left:50%;-webkit-transform:translate(-50%,-35%);-ms-transform:translate(-50%,-35%);transform:translate(-50%,-35%);width:70%;min-height:85%;max-height:85%;height:85%;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:left;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}.wcf-templates-popup-content .wcf-templates-wrap{height:100%}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;right:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;left:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-flow-actions{min-height:52px;max-height:55px}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:-webkit-calc(100% - 55px);height:calc(100% - 55px);min-height:-webkit-calc(100% - 55px);min-height:calc(100% - 55px);max-height:-webkit-calc(100% - 55px);max-height:calc(100% - 55px);padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:left;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-left:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;left:50%;bottom:0;right:0;max-width:100%;max-height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-left:0}#wcf-remote-filters .filter-links li:last-child a{margin-right:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 0 0 3px}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-right:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
1 |
+
.no-elementor-notice{border-left:none;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding-left:0}.no-elementor-notice span{color:#f16334;font-size:18px;vertical-align:middle}.site-preview{background:#c5c5c5;display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden}.template.importing .site-preview:after,.template:hover .site-preview:after{opacity:.3}.template.importing .site-preview,.template:hover .site-preview{background:#fff;cursor:pointer}.template .site-preview:after{content:"";background:#fff;opacity:0;top:0;content:"";display:block;top:0;position:absolute;padding-top:66.66666%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;left:0;right:0;bottom:0}.template .notice{padding:.6em;background:rgba(0,0,0,.8);color:#fff;font-weight:400;border:none;font-size:13px;text-decoration:none;position:absolute;width:100%;vertical-align:middle;bottom:0;margin:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);right:0;left:0;z-index:4;text-align:center;-webkit-border-radius:3px;border-radius:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;-webkit-font-smoothing:antialiased}.template .notice a{color:#f16334}.template .notice p{padding:0;margin:0}#wcf_create_notice{display:none}.preview:focus,.preview:hover{color:#fff;-webkit-box-shadow:none;box-shadow:none}.preview{text-decoration:none;opacity:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);right:22%;left:22%;z-index:4;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:13px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:10px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.template-id-container{font-size:15px;font-weight:600;margin:0;padding:10px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65);position:relative}.template-actions{opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;top:0;padding:5px 5px 0 5px;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.template.importing .preview,.template.importing .template-actions,.template:hover .preview,.template:hover .template-actions,.wcf-step-content .template-actions{opacity:1}.wcf-remote-list .template{position:relative;overflow:hidden}.wcf-remote-list h3{margin-bottom:1em;margin-top:0;font-size:15px;font-weight:600;margin:0;padding:0;text-align:left}.wcf-remote-list img{max-width:100%;vertical-align:middle}.wcf-remote-list *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cartflows-steps-list img{width:100%}#cartflows-steps-list .title{font-weight:700;color:#474747;line-height:2;background:#f7f7f7;padding:.5em 1em}#cartflows-steps-list .image-wrap{-webkit-background-size:cover;background-size:cover;overflow:hidden}#cartflows-steps .close{display:inline-block;padding:2em;cursor:pointer}.template-message-block{text-align:center;margin:0 auto;padding:4em 0}.templator #TB_ajaxContent{width:100%!important}.template-message-block .description{font-style:normal}.template-message-block .spinner{float:none;margin:0}.cartflows-steps-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:99999;background:#fff;overflow-y:scroll}.cartflows-steps-popup .notice{max-width:700px;margin:0 auto}.cartflows-load-steps-library .dashicons{height:auto;width:auto;line-height:normal;margin:0 5px 0 0;vertical-align:initial;font-size:100%}.cartflows-load-steps .dashicons{vertical-align:text-bottom}#TB_window{width:100%!important;margin:0 auto!important;text-align:center!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important}#TB_iframeContent{width:100%!important;height:100%!important}@media only screen and (min-device-width :320px) and (max-device-width :1024px){#TB_iframeContent-wrapper{position:fixed;right:0;bottom:50px;left:0;top:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}}#TB_window #TB_ajaxWindowTitle{font-size:1.2rem;display:inline-block;width:auto;padding:0}#TB_window #TB_closeWindowButton{position:relative}.tb-close-icon:before{vertical-align:middle}#TB_window{text-align:center}#TB_iframeContent.tablet{width:768px!important;height:1024px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.tablet.landscape{width:1024px!important}#TB_iframeContent.mobile{width:360px!important;height:640px!important;background:#111;padding:40px 10px 70px;-webkit-border-radius:30px;border-radius:30px}#TB_iframeContent.mobile.landscape{width:360px!important}#TB_closeAjaxWindow{float:right}#TB_window.thickbox-loading{margin:0!important}div#TB_window{background-color:#fff}#TB_window #TB_title{color:#0a0c0d;text-align:left;bottom:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:1em 1em 1em 1.5em}@media all and (min-width:769px){#TB_window #TB_title{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}#TB_window.mobile,#TB_window.tablet{overflow-y:scroll}.top #TB_iframeContent-wrapper{bottom:0;top:80px}#TB_window.top #TB_title{top:0}#TB_window #TB_closeWindowButton:focus .tb-close-icon{-webkit-box-shadow:none;box-shadow:none;color:#666}@media all and (max-width:768px){#TB_closeAjaxWindow{padding-right:0}#TB_window #TB_closeWindowButton,#TB_window .tb-close-icon{width:80px}}.responsive-view .dashicons{color:#ddd}.responsive-view .active{color:#111}.responsive-view a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#TB_window.mobile #TB_iframeContent,#TB_window.tablet #TB_iframeContent{margin-bottom:50px;margin-top:50px}.responsive-view a{color:#666;cursor:pointer;display:inline-block;padding:1em;vertical-align:middle;text-decoration:none}#TB_closeAjaxWindow .tb-close-icon{position:relative}.site-loading{display:none;position:absolute;left:50%;top:50%;text-align:center;color:#555;-webkit-transform:translate(-50%,-40%);-ms-transform:translate(-50%,-40%);transform:translate(-50%,-40%)}.top .site-loading{top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.site-loading h3{font-size:33px;font-weight:600;margin:0 0 .8em 0}.site-loading p{margin:0}.cartflows-thickbox-loading .site-loading{display:block}.cartflows-thickbox-loading #TB_iframeContent,.cartflows-thickbox-loading #TB_iframeContent-wrapper{display:none}.wcf-remote-list:after,.wcf-remote-list:before{content:"";display:table}.wcf-remote-list::after{content:"";display:table;clear:both}.wcf-template-header .filter-count{line-height:normal}#wcf-page-builders{display:none}#wcf-remote-flow-filters>div,#wcf-remote-step-filters>div{display:inline-block}.wcf-template-header .filter-links{margin:0;padding:0}.wcf-template-header li:focus{outline:0}.wcf-template-header .filter-links li{margin:0;display:inline-block}.wcf-template-header .filter-links li a:focus,.wcf-template-header .filter-links li a:hove{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-template-header .filter-links li .current{color:#000;border-bottom:2px solid #f16334;font-weight:600}.wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8}.wcf-search-form{margin-right:2em;padding-right:0;text-align:right;margin-top:1em;margin-bottom:1em;position:relative}.wcf-template-notice{display:none}#wcf-start-from-scratch{text-align:center}#wcf-start-from-scratch .inner{background:0 0;-webkit-box-shadow:none;box-shadow:none;width:94%;margin:0 auto;float:none;position:absolute;top:40%}#wcf-scratch-steps-categories{display:inline-block}#wcf-scratch-steps-categories select{-webkit-border-radius:0;border-radius:0;height:29px;border:1px solid;border-color:#9e9e9e;border-width:1px;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 6px;line-height:25px;width:155px}#wcf-start-from-scratch .description{margin-bottom:2em}#wcf-remote-step-importer .wcf-search-form{display:none}.wcf-search-form .wcf-flow-search-input{border:none;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid #eee;line-height:1.8;background:0 0;border-bottom:1px solid #ccc;font-size:1em}.wcf-search-form .wcf-flow-search-input:focus{-webkit-box-shadow:none;box-shadow:none;border-color:#ccc}.cartflows-preview-flow-steps li{display:inline-block;margin:0 1em;position:relative}.cartflows-flow-import-blank.updating-message:before{vertical-align:text-bottom}#wpwrap .cartflows-step-loading h2,#wpwrap .template-message-block h2{font-size:1.5em;margin:0 0 .5em 0;padding:8px 12px;line-height:1.4}#wpwrap .cartflows-step-loading p,#wpwrap .template-message-block p{font-size:1.2em}#wpwrap .cartflows-step-loading .spinner{vertical-align:initial}.wcf-flow-type{position:absolute;right:0;top:0;padding:3px 10px;color:#fff}.wcf-flow-type.pro{background:#f06262}.wcf-templates-popup-overlay{position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.7);-webkit-transition:opacity .5s;transition:opacity .5s;visibility:hidden;opacity:0;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.wcf-templates-popup-overlay.open{visibility:visible;opacity:1;z-index:9999}.wcf-templates-popup-content{max-width:1200px;background-color:#fff;position:absolute;-webkit-border-radius:3px;border-radius:3px;top:40%;left:50%;-webkit-transform:translate(-50%,-35%);-ms-transform:translate(-50%,-35%);transform:translate(-50%,-35%);width:70%;min-height:85%;max-height:85%;height:85%;overflow:hidden}.wcf-templates-popup-content .inner{background:#fff;position:relative;padding:8px 8px 0 8px;display:block;float:left;margin:15px;text-align:center;-webkit-box-shadow:0 0 5px 1px rgba(204,204,204,.3);box-shadow:0 0 5px 1px rgba(204,204,204,.3)}.wcf-templates-popup-content .wcf-templates-wrap{height:100%}@media only screen and (max-width:480px){.wcf-templates-popup-content{width:90%}.wcf-template-header{display:block!important;padding:15px 15px 0 15px!important}.wcf-popup-close-wrap{position:absolute;top:10px;right:5px}}@media only screen and (min-width:768px){.wcf-templates-popup-content .inner{width:-webkit-calc(25% - 30px);width:calc(25% - 30px)}}html.wcf-popup-open{overflow:hidden}.wcf-button-wrap{margin-top:0;position:absolute;top:10px;left:110px}.wcf-steps-loading #wcf-remote-step-list{display:none!important}#wcf-remote-flow-actions{min-height:52px;max-height:55px}#wcf-remote-content{background-color:#f5f5f5;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:-webkit-calc(100% - 55px);height:calc(100% - 55px);min-height:-webkit-calc(100% - 55px);min-height:calc(100% - 55px);max-height:-webkit-calc(100% - 55px);max-height:calc(100% - 55px);padding:20px 20px 20px 20px;clear:both}#wcf-remote-content #wcf-start-from-scratch h1{font-size:23px;font-weight:400;margin:0 0 1em 0;padding:9px 0 4px;line-height:29px}.wcf-template-list-wrap .template-name{margin:0;text-align:left;font-size:13px}.wcf-template-list-wrap img{width:100%;vertical-align:middle}.wcf-templates-popup-content .template{margin:0;position:relative;overflow:hidden}.wcf-tab.nav-tabs{overflow:hidden;margin:0}.wcf-template-header{-moz-box-align:center;align-items:center;background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2);-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;-moz-box-pack:justify;justify-content:space-between;padding:0 15px;min-height:50px}.wcf-search-form:after{content:"\f179";display:inline-block;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:.5em;top:.5em;color:#81868a}.wcf-template-logo-wrap{font-size:16px;font-weight:600;text-align:center}.wcf-template-logo-wrap .wcf-cartflows-logo-img{vertical-align:middle}.wcf-tab.nav-tabs:before{display:table;content:""}.wcf-tab.nav-tabs:after{clear:both}.wcf-tab.nav-tabs>li{display:inline-block;padding:15px 0;margin:0;font-weight:400}.wcf-tab.nav-tabs>li.active{border-bottom:3px solid #f16334;font-weight:600}.wcf-template-header .filter-links li>a{border-color:transparent;margin:0}.wcf-tab.nav-tabs>li:active,.wcf-tab.nav-tabs>li:focus,.wcf-tab.nav-tabs>li>a:focus,.wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li:focus .wcf-template-header .filter-links>li:active,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{outline:0;-webkit-box-shadow:none;box-shadow:none}.wcf-tab.nav-tabs>li>a,.wcf-template-header .filter-links>li>a,.wcf-template-header .filter-links>li>a:focus,.wcf-template-header .filter-links>li>a:hover{padding:15px;color:#555;text-decoration:none}.wcf-nav-section-content{display:none}.wcf-nav-section-content.active{display:block;overflow:hidden}.wcf-popup-close-wrap{width:35px;text-align:center;border-left:1px #eee solid}.wcf-popup-close-wrap .close-icon{cursor:pointer;margin:0 12px}.wcf-popup-close-wrap .wcf-cartflow-icons{pointer-events:none;font-size:20px;height:20px;width:20px;line-height:20px;opacity:.7}.wcf-popup-close-wrap .close-icon:hover .wcf-cartflow-icons{opacity:1}.wcf-templates-popup-content .spinner{position:absolute;top:50%;left:50%;bottom:0;right:0;max-width:100%;max-height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:99999}.wcf-templates-popup-content .wcf-template-header .wcf-tab-wrapper{margin:0 auto}#wcf-upcoming-page-builders .description{font-size:1rem;margin:4em 0 0 0;text-align:center}.flow-type-filter-links{display:none}#wcf-remote-filters{padding:0 15px}#wcf-remote-filters a{text-decoration:none}#wcf-remote-filters .filter-links li:focus,#wcf-remote-filters a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-filters .filter-links li a{border-bottom:none}#wcf-remote-filters .filter-links li:first-child a{margin-left:0}#wcf-remote-filters .filter-links li:last-child a{margin-right:0}#wcf-remote-filters .filter-links li .current,#wcf-remote-filters .filter-links li a:focus,#wcf-remote-filters .filter-links li a:hover{color:#f16334}.wrap .wcf-page-builder-notice .notice{margin:5px 15px}#wcf-api-notice-block{text-align:center;margin-top:5em}.wcf-templates-popup-overlay a{-webkit-transition:none;transition:none}.wcf-notice-wrap .notice{display:inline-block}.wcf-learn-how i{font-size:1rem;vertical-align:middle}.wcf-learn-how a{text-decoration:none}#wcf-remote-content .wcf-install-plugin::focus{border-color:none;-webkit-box-shadow:none;box-shadow:none}#wcf-remote-content .wcf-install-plugin.updating-message{background:0 0;padding:0;font-size:1rem;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0 0 0 3px}.wcf-page-builder-message{margin:5em auto 0 auto;width:700px}.wcf-page-builder-message p{font-size:1rem}.wcf-page-builder-message i{font-size:1rem;vertical-align:middle}.wcf-page-builder-message a{text-decoration:none;margin:1.5em 0 0 0}.cartflows-ie .postbox{padding:1em}.cartflows-ie{padding-top:2em;padding-right:2em}.admin_page_flow_exporter .notice,.admin_page_flow_importer .notice{margin:1em 0 0 0}.cartflows-website-unreachable{padding:1em 2em}.wcf-notice-wrap{margin-top:20px;font-size:15px;color:red}.wcf-activate-wc{text-decoration:none}.wcf-activate-wc.button{border:none;-webkit-box-shadow:none;box-shadow:none}.wcf-hidden{display:none}
|
assets/min-js/frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(w){w(document).on("click",'a[href*="wcf-next-step"]',function(e){if(e.preventDefault(),void 0===cartflows.is_pb_preview||"1"!=cartflows.is_pb_preview)return window.location.href=cartflows.next_step,!1;e.stopPropagation()}),w(document).on("click",".wcf-next-step-link",function(e){if(void 0!==cartflows.is_pb_preview&&"1"==cartflows.is_pb_preview)return e.preventDefault(),e.stopPropagation(),!1});w(document).ready(function(e){var a=e('a[href*="wcf-next-step"]');0<a.length&&void 0!==cartflows.next_step&&(a.addClass("wcf-next-step-link"),a.attr("href",cartflows.next_step)),function(){if("OceanWP"===cartflows.current_theme&&"default"!==cartflows.page_template){var e=document.getElementById("oceanwp-style-css");null!=e&&e.remove()}}(),"1"!==cartflows.is_pb_preview&&(function(){if("enable"===cartflows.fb_active.facebook_pixel_tracking&&""!=cartflows.fb_active.facebook_pixel_id){var e=cartflows.fb_active.facebook_pixel_id,a=cartflows.fb_active.facebook_pixel_initiate_checkout,t=cartflows.fb_active.facebook_pixel_purchase_complete,c=cartflows.fb_active.facebook_pixel_add_payment_info,o=(cartflows.fb_active.facebook_pixel_tracking_for_site,cartflows.is_checkout_page);if(fbq("init",e),fbq("track","PageView",{plugin:"CartFlows"}),"enable"===a&&"1"===o&&(fbq("track","AddToCart",cartflows.params),fbq("track","InitiateCheckout",cartflows.params)),"enable"===t){var n=w.cookie("wcf_order_details");void 0!==n&&(fbq("track","Purchase",jQuery.parseJSON(n)),w.removeCookie("wcf_order_details",{path:"/"}))}"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){var e=cartflows.params;fbq("track","AddPaymentInfo",e)})}}(),function(){if("enable"===cartflows.wcf_ga_active.enable_google_analytics){var e=cartflows.wcf_ga_active.google_analytics_id,a=cartflows.wcf_ga_active.enable_google_analytics_for_site,t=cartflows.wcf_ga_active.enable_begin_checkout,c=cartflows.wcf_ga_active.enable_add_payment_info,o=cartflows.wcf_ga_active.enable_purchase_event,n=cartflows.wcf_ga_active.enable_add_to_cart,i=w.cookie("wcf_ga_trans_data"),r=cartflows.is_checkout_page;if("disable"===a&>ag("event","page_view",{send_to:e,non_interaction:!0}),"1"===r){var _=cartflows.ga_param,f={send_to:e,event_category:"ecommerce",items:_,non_interaction:!0};"enable"===t&>ag("event","begin_checkout",f),"enable"===n&>ag("event","add_to_cart",f),"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){gtag("event","add_payment_info",{send_to:e,non_interaction:!0})})}if(void 0!==i){var s=jQuery.parseJSON(i),l={send_to:e,event_category:"ecommerce",transaction_id:s.transaction_id,value:s.value,currency:s.currency,shipping:s.shipping,tax:s.tax,items:s.items,non_interaction:!0};"enable"===o&&(gtag("event","purchase",l),w.removeCookie("wcf_ga_trans_data",{path:"/"}))}}}())})}(jQuery);
|
1 |
+
!function(w){w(document).on("click",'a[href*="wcf-next-step"]',function(e){if(e.preventDefault(),void 0===cartflows.is_pb_preview||"1"!=cartflows.is_pb_preview)return window.location.href=cartflows.next_step,!1;e.stopPropagation()}),w(document).on("click",".wcf-next-step-link",function(e){if(void 0!==cartflows.is_pb_preview&&"1"==cartflows.is_pb_preview)return e.preventDefault(),e.stopPropagation(),!1});w(document).ready(function(e){var a=e('a[href*="wcf-next-step"]');0<a.length&&void 0!==cartflows.next_step&&(a.addClass("wcf-next-step-link"),a.attr("href",cartflows.next_step)),function(){if("OceanWP"===cartflows.current_theme&&"default"!==cartflows.page_template){var e=document.getElementById("oceanwp-style-css");null!=e&&e.remove()}}(),"1"!==cartflows.is_pb_preview&&(function(){if("enable"===cartflows.fb_active.facebook_pixel_tracking&&""!=cartflows.fb_active.facebook_pixel_id){var e=cartflows.fb_active.facebook_pixel_id,a=cartflows.fb_active.facebook_pixel_initiate_checkout,t=cartflows.fb_active.facebook_pixel_purchase_complete,c=cartflows.fb_active.facebook_pixel_add_payment_info,o=(cartflows.fb_active.facebook_pixel_tracking_for_site,cartflows.is_checkout_page);if(fbq("init",e),fbq("track","PageView",{plugin:"CartFlows"}),"enable"===a&&"1"===o&&(fbq("track","AddToCart",cartflows.params),fbq("track","InitiateCheckout",cartflows.params)),"enable"===t){var n=w.cookie("wcf_order_details");void 0!==n&&(fbq("track","Purchase",jQuery.parseJSON(n)),w.removeCookie("wcf_order_details",{path:"/"}))}"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){var e=cartflows.params;fbq("track","AddPaymentInfo",e)})}}(),function(){if("enable"===cartflows.wcf_ga_active.enable_google_analytics){var e=cartflows.wcf_ga_active.google_analytics_id,a=cartflows.wcf_ga_active.enable_google_analytics_for_site,t=cartflows.wcf_ga_active.enable_begin_checkout,c=cartflows.wcf_ga_active.enable_add_payment_info,o=cartflows.wcf_ga_active.enable_purchase_event,n=cartflows.wcf_ga_active.enable_add_to_cart,i=w.cookie("wcf_ga_trans_data"),r=cartflows.is_checkout_page;if("disable"===a&>ag("event","page_view",{send_to:e,non_interaction:!0}),"1"===r){var _=cartflows.ga_param,f={send_to:e,event_category:"ecommerce",items:_,non_interaction:!0};"enable"===t&>ag("event","begin_checkout",f),"enable"===n&>ag("event","add_to_cart",f),"enable"===c&&jQuery("form.woocommerce-checkout").on("submit",function(){gtag("event","add_payment_info",{send_to:e,non_interaction:!0})})}if(void 0!==i&&null!=i){var s=jQuery.parseJSON(i),l={send_to:e,event_category:"ecommerce",transaction_id:s.transaction_id,value:s.value,currency:s.currency,shipping:s.shipping,tax:s.tax,items:s.items,non_interaction:!0};"enable"===o&&(gtag("event","purchase",l),w.removeCookie("wcf_ga_trans_data",{path:"/"}))}}}())})}(jQuery);
|
cartflows.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: CartFlows
|
4 |
-
* Plugin URI: https://cartflows.com/
|
5 |
-
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
-
* Version: 1.5.
|
7 |
-
* Author: CartFlows Inc
|
8 |
-
* Author URI: https://cartflows.com/
|
9 |
-
* Text Domain: cartflows
|
10 |
-
* WC requires at least: 3.0
|
11 |
-
* WC tested up to: 4.3
|
12 |
-
*
|
13 |
-
* @package CartFlows
|
14 |
-
*/
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Set constants.
|
18 |
-
*/
|
19 |
-
define( 'CARTFLOWS_FILE', __FILE__ );
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Loader
|
23 |
-
*/
|
24 |
-
require_once 'classes/class-cartflows-loader.php';
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: CartFlows
|
4 |
+
* Plugin URI: https://cartflows.com/
|
5 |
+
* Description: Create beautiful checkout pages & sales flows for WooCommerce.
|
6 |
+
* Version: 1.5.15
|
7 |
+
* Author: CartFlows Inc
|
8 |
+
* Author URI: https://cartflows.com/
|
9 |
+
* Text Domain: cartflows
|
10 |
+
* WC requires at least: 3.0
|
11 |
+
* WC tested up to: 4.3
|
12 |
+
*
|
13 |
+
* @package CartFlows
|
14 |
+
*/
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Set constants.
|
18 |
+
*/
|
19 |
+
define( 'CARTFLOWS_FILE', __FILE__ );
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Loader
|
23 |
+
*/
|
24 |
+
require_once 'classes/class-cartflows-loader.php';
|
changelog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
Version 1.5.14 - Thursday, 30th July 2020
|
2 |
- Fix: Not able to search & select the course type of product.
|
3 |
|
1 |
+
Version 1.5.15 - Wednesday, 12th August 2020
|
2 |
+
- Improvement: Added Split Testing compatibility for a future release of CartFlows Pro.
|
3 |
+
- Improvement: Added WordPress 5.5 Compatibility.
|
4 |
+
- Fix: Product discount price & percentage options were not working if the full discount is applied.
|
5 |
+
- Fix: Account already exists error message on the Optin step.
|
6 |
+
|
7 |
Version 1.5.14 - Thursday, 30th July 2020
|
8 |
- Fix: Not able to search & select the course type of product.
|
9 |
|
classes/class-cartflows-admin.php
CHANGED
@@ -1,657 +1,713 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows Admin.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Cartflows_Admin.
|
10 |
-
*/
|
11 |
-
class Cartflows_Admin {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Calls on initialization
|
15 |
-
*
|
16 |
-
* @since 1.0.0
|
17 |
-
*/
|
18 |
-
public static function init() {
|
19 |
-
|
20 |
-
self::initialise_plugin();
|
21 |
-
self::init_hooks();
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Init Hooks.
|
26 |
-
*
|
27 |
-
* @since 1.0.0
|
28 |
-
* @return void
|
29 |
-
*/
|
30 |
-
public static function init_hooks() {
|
31 |
-
|
32 |
-
if ( ! is_admin() ) {
|
33 |
-
return;
|
34 |
-
}
|
35 |
-
|
36 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin-fields.php';
|
37 |
-
|
38 |
-
/*
|
39 |
-
Add CARTFLOWS menu option to admin.
|
40 |
-
add_action( 'network_admin_menu', __CLASS__ . '::menu' );
|
41 |
-
*/
|
42 |
-
add_action( 'admin_menu', __CLASS__ . '::menu' );
|
43 |
-
add_action( 'admin_menu', __CLASS__ . '::submenu', 999 );
|
44 |
-
|
45 |
-
add_action( 'cartflows_render_admin_content', __CLASS__ . '::render_content' );
|
46 |
-
|
47 |
-
add_action( 'admin_init', __CLASS__ . '::settings_admin_scripts' );
|
48 |
-
|
49 |
-
/* Global Addmin Script */
|
50 |
-
add_action( 'admin_enqueue_scripts', __CLASS__ . '::global_admin_scripts', 20 );
|
51 |
-
|
52 |
-
add_action( 'admin_footer', __CLASS__ . '::global_admin_data', 9555 );
|
53 |
-
|
54 |
-
/* Add lite version class to body */
|
55 |
-
add_action( 'admin_body_class', __CLASS__ . '::add_admin_body_class' );
|
56 |
-
|
57 |
-
add_filter( 'plugin_action_links_' . CARTFLOWS_BASE, __CLASS__ . '::add_action_links' );
|
58 |
-
|
59 |
-
add_action( 'admin_init', __CLASS__ . '::cartflows_after_save_permalinks' );
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
*
|
90 |
-
*
|
91 |
-
* @
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
'<a
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
*
|
109 |
-
*
|
110 |
-
* @
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
$
|
116 |
-
|
117 |
-
|
118 |
-
define( '
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
*
|
124 |
-
*
|
125 |
-
* @
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
'CartFlows',
|
136 |
-
'
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
*
|
148 |
-
*
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
$
|
154 |
-
|
155 |
-
$
|
156 |
-
$
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
$
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
*
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
|
181 |
-
|
182 |
-
$
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
*
|
192 |
-
*
|
193 |
-
* @
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
$action = '
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
$
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
$
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
'
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
$
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
);
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
<div
|
533 |
-
<
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
</
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
*
|
571 |
-
*/
|
572 |
-
public static function
|
573 |
-
|
574 |
-
//
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
do_action( '
|
588 |
-
}
|
589 |
-
|
590 |
-
/**
|
591 |
-
*
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
*
|
616 |
-
*
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Admin.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Cartflows_Admin.
|
10 |
+
*/
|
11 |
+
class Cartflows_Admin {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Calls on initialization
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
*/
|
18 |
+
public static function init() {
|
19 |
+
|
20 |
+
self::initialise_plugin();
|
21 |
+
self::init_hooks();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Init Hooks.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public static function init_hooks() {
|
31 |
+
|
32 |
+
if ( ! is_admin() ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin-fields.php';
|
37 |
+
|
38 |
+
/*
|
39 |
+
Add CARTFLOWS menu option to admin.
|
40 |
+
add_action( 'network_admin_menu', __CLASS__ . '::menu' );
|
41 |
+
*/
|
42 |
+
add_action( 'admin_menu', __CLASS__ . '::menu' );
|
43 |
+
add_action( 'admin_menu', __CLASS__ . '::submenu', 999 );
|
44 |
+
|
45 |
+
add_action( 'cartflows_render_admin_content', __CLASS__ . '::render_content' );
|
46 |
+
|
47 |
+
add_action( 'admin_init', __CLASS__ . '::settings_admin_scripts' );
|
48 |
+
|
49 |
+
/* Global Addmin Script */
|
50 |
+
add_action( 'admin_enqueue_scripts', __CLASS__ . '::global_admin_scripts', 20 );
|
51 |
+
|
52 |
+
add_action( 'admin_footer', __CLASS__ . '::global_admin_data', 9555 );
|
53 |
+
|
54 |
+
/* Add lite version class to body */
|
55 |
+
add_action( 'admin_body_class', __CLASS__ . '::add_admin_body_class' );
|
56 |
+
|
57 |
+
add_filter( 'plugin_action_links_' . CARTFLOWS_BASE, __CLASS__ . '::add_action_links' );
|
58 |
+
|
59 |
+
add_action( 'admin_init', __CLASS__ . '::cartflows_after_save_permalinks' );
|
60 |
+
|
61 |
+
add_action( 'in_admin_header', __CLASS__ . '::embed_page_header' );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* After save of permalinks.
|
66 |
+
*/
|
67 |
+
public static function cartflows_after_save_permalinks() {
|
68 |
+
|
69 |
+
$has_saved_permalinks = get_option( 'cartflows_permalink_saved' );
|
70 |
+
if ( $has_saved_permalinks ) {
|
71 |
+
flush_rewrite_rules();
|
72 |
+
delete_option( 'cartflows_permalink_saved' );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Initialize after Cartflows pro get loaded.
|
79 |
+
*/
|
80 |
+
public static function settings_admin_scripts() {
|
81 |
+
// Enqueue admin scripts.
|
82 |
+
if ( isset( $_GET['page'] ) && ( 'cartflows' === $_GET['page'] || false !== strpos( $_GET['page'], 'cartflows_' ) ) ) { //phpcs:ignore
|
83 |
+
add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
|
84 |
+
|
85 |
+
self::save_settings();
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Show action on plugin page.
|
90 |
+
*
|
91 |
+
* @param array $links links.
|
92 |
+
* @return array
|
93 |
+
*/
|
94 |
+
public static function add_action_links( $links ) {
|
95 |
+
$mylinks = array(
|
96 |
+
'<a href="' . admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS ) . '">Settings</a>',
|
97 |
+
'<a target="_blank" href="' . esc_url( 'https://cartflows.com/docs' ) . '">Docs</a>',
|
98 |
+
);
|
99 |
+
|
100 |
+
if ( ! _is_cartflows_pro() ) {
|
101 |
+
array_push( $mylinks, '<a style="color: #39b54a; font-weight: bold;" target="_blank" href="' . esc_url( 'https://cartflows.com/pricing/' ) . '"> Go Pro </a>' );
|
102 |
+
}
|
103 |
+
|
104 |
+
return array_merge( $links, $mylinks );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Initialises the Plugin Name.
|
109 |
+
*
|
110 |
+
* @since 1.0.0
|
111 |
+
* @return void
|
112 |
+
*/
|
113 |
+
public static function initialise_plugin() {
|
114 |
+
|
115 |
+
$name = 'Cartflows';
|
116 |
+
$short_name = 'Cflows';
|
117 |
+
|
118 |
+
define( 'CARTFLOWS_PLUGIN_NAME', $name );
|
119 |
+
define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Renders the admin settings menu.
|
124 |
+
*
|
125 |
+
* @since 1.0.0
|
126 |
+
* @return void
|
127 |
+
*/
|
128 |
+
public static function menu() {
|
129 |
+
|
130 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
|
134 |
+
add_menu_page(
|
135 |
+
'CartFlows',
|
136 |
+
'CartFlows',
|
137 |
+
'manage_options',
|
138 |
+
CARTFLOWS_SLUG,
|
139 |
+
__CLASS__ . '::render',
|
140 |
+
'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore
|
141 |
+
39.7
|
142 |
+
);
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Add submenu to admin menu.
|
148 |
+
*
|
149 |
+
* @since 1.0.0
|
150 |
+
*/
|
151 |
+
public static function submenu() {
|
152 |
+
|
153 |
+
global $submenu;
|
154 |
+
|
155 |
+
$parent_slug = CARTFLOWS_SLUG;
|
156 |
+
$capability = 'manage_options';
|
157 |
+
|
158 |
+
// Home menu.
|
159 |
+
$submenu[ $parent_slug ][0][0] = __( 'Home', 'cartflows' ); //phpcs:ignore
|
160 |
+
|
161 |
+
// Add settings menu.
|
162 |
+
add_submenu_page(
|
163 |
+
$parent_slug,
|
164 |
+
__( 'Settings', 'cartflows' ),
|
165 |
+
__( 'Settings', 'cartflows' ),
|
166 |
+
$capability,
|
167 |
+
'cartflows_settings',
|
168 |
+
__CLASS__ . '::render'
|
169 |
+
);
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Renders the admin settings.
|
174 |
+
*
|
175 |
+
* @since 1.0.0
|
176 |
+
* @return void
|
177 |
+
*/
|
178 |
+
public static function render() {
|
179 |
+
$menu_page_slug = ( isset( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : CARTFLOWS_SETTINGS; //phpcs:ignore
|
180 |
+
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
181 |
+
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
182 |
+
$action = str_replace( '_', '-', $action );
|
183 |
+
|
184 |
+
// Enable header icon filter below.
|
185 |
+
$header_wrapper_class = apply_filters( 'cartflows_admin_header_wrapper_class', array( $action, $menu_page_slug ) );
|
186 |
+
|
187 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Renders the admin settings content.
|
192 |
+
*
|
193 |
+
* @since 1.0.0
|
194 |
+
* @param sting $menu_page_slug current page name.
|
195 |
+
*
|
196 |
+
* @return void
|
197 |
+
*/
|
198 |
+
public static function render_content( $menu_page_slug ) {
|
199 |
+
|
200 |
+
if ( CARTFLOWS_SETTINGS === $menu_page_slug ) {
|
201 |
+
|
202 |
+
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
203 |
+
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
204 |
+
$action = str_replace( '_', '-', $action );
|
205 |
+
$action = 'general';
|
206 |
+
|
207 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( 'cartflows' === $menu_page_slug ) {
|
211 |
+
|
212 |
+
$action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
|
213 |
+
$action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
|
214 |
+
$action = str_replace( '_', '-', $action );
|
215 |
+
$action = 'general';
|
216 |
+
|
217 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-home.php';
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Save Global Setting options.
|
223 |
+
*
|
224 |
+
* @since 1.0.0
|
225 |
+
*/
|
226 |
+
public static function save_common_settings() {
|
227 |
+
|
228 |
+
if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-common-settings-nonce'] ) ), 'cartflows-common-settings' ) ) {
|
229 |
+
|
230 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
231 |
+
$new_settings = array();
|
232 |
+
|
233 |
+
if ( isset( $_POST['_cartflows_common'] ) ) {
|
234 |
+
// Loop through the input and sanitize each of the values.
|
235 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_common'] ) ); //phpcs:ignore
|
236 |
+
}
|
237 |
+
|
238 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, false );
|
239 |
+
|
240 |
+
$query = array(
|
241 |
+
'message' => 'saved',
|
242 |
+
);
|
243 |
+
|
244 |
+
$redirect_to = add_query_arg( $query, $url );
|
245 |
+
|
246 |
+
wp_safe_redirect( $redirect_to );
|
247 |
+
exit;
|
248 |
+
} // End if statement.
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Save Debug Setting options.
|
253 |
+
*
|
254 |
+
* @since 1.1.14
|
255 |
+
*/
|
256 |
+
public static function save_debug_settings() {
|
257 |
+
|
258 |
+
if ( isset( $_POST['cartflows-debug-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-debug-settings-nonce'] ) ), 'cartflows-debug-settings' ) ) {
|
259 |
+
|
260 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
261 |
+
$new_settings = array();
|
262 |
+
|
263 |
+
if ( isset( $_POST['_cartflows_debug_data'] ) ) {
|
264 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_debug_data'] ) ); //phpcs:ignore
|
265 |
+
}
|
266 |
+
|
267 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_debug_data', $new_settings, false );
|
268 |
+
|
269 |
+
$query = array(
|
270 |
+
'message' => 'saved',
|
271 |
+
);
|
272 |
+
|
273 |
+
$redirect_to = add_query_arg( $query, $url );
|
274 |
+
|
275 |
+
wp_safe_redirect( $redirect_to );
|
276 |
+
exit;
|
277 |
+
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Save permalink Setting options.
|
284 |
+
*
|
285 |
+
* @since 1.1.14
|
286 |
+
*/
|
287 |
+
public static function save_permalink_settings() {
|
288 |
+
|
289 |
+
if ( isset( $_POST['cartflows-permalink-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-permalink-settings-nonce'] ) ), 'cartflows-permalink-settings' ) ) {
|
290 |
+
|
291 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
292 |
+
$new_settings = array();
|
293 |
+
|
294 |
+
if ( isset( $_POST['reset'] ) ) {
|
295 |
+
$_POST['_cartflows_permalink'] = array(
|
296 |
+
'permalink' => CARTFLOWS_STEP_POST_TYPE,
|
297 |
+
'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
|
298 |
+
'permalink_structure' => '',
|
299 |
+
);
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
+
if ( isset( $_POST['_cartflows_permalink'] ) ) {
|
304 |
+
$cartflows_permalink_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_permalink'] ) ); //phpcs:ignore
|
305 |
+
|
306 |
+
if ( empty( $cartflows_permalink_settings['permalink'] ) ) {
|
307 |
+
$new_settings['permalink'] = CARTFLOWS_STEP_POST_TYPE;
|
308 |
+
} else {
|
309 |
+
$new_settings['permalink'] = $cartflows_permalink_settings['permalink'];
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( empty( $cartflows_permalink_settings['permalink_flow_base'] ) ) {
|
313 |
+
$new_settings['permalink_flow_base'] = CARTFLOWS_FLOW_POST_TYPE;
|
314 |
+
} else {
|
315 |
+
$new_settings['permalink_flow_base'] = $cartflows_permalink_settings['permalink_flow_base'];
|
316 |
+
}
|
317 |
+
|
318 |
+
$new_settings['permalink_structure'] = $cartflows_permalink_settings['permalink_structure'];
|
319 |
+
|
320 |
+
}
|
321 |
+
|
322 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_permalink', $new_settings, false );
|
323 |
+
|
324 |
+
$query = array(
|
325 |
+
'message' => 'saved',
|
326 |
+
);
|
327 |
+
|
328 |
+
$redirect_to = add_query_arg( $query, $url );
|
329 |
+
|
330 |
+
update_option( 'cartflows_permalink_saved', true );
|
331 |
+
|
332 |
+
wp_safe_redirect( $redirect_to );
|
333 |
+
exit;
|
334 |
+
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Save google analytics Setting options.
|
340 |
+
*
|
341 |
+
* @since 1.1.14
|
342 |
+
*/
|
343 |
+
public static function save_google_analytics_settings() {
|
344 |
+
|
345 |
+
if ( isset( $_POST['cartflows-google-analytics-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-google-analytics-settings-nonce'] ) ), 'cartflows-google-analytics-settings' ) ) {
|
346 |
+
|
347 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
348 |
+
$new_settings = array();
|
349 |
+
|
350 |
+
if ( isset( $_POST['_cartflows_google_analytics'] ) ) {
|
351 |
+
$new_settings = self::sanitize_form_inputs( $_POST['_cartflows_google_analytics'] ); //phpcs:ignore
|
352 |
+
|
353 |
+
}
|
354 |
+
|
355 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_google_analytics', $new_settings, true );
|
356 |
+
|
357 |
+
$query = array(
|
358 |
+
'message' => 'saved',
|
359 |
+
);
|
360 |
+
|
361 |
+
$redirect_to = add_query_arg( $query, $url );
|
362 |
+
|
363 |
+
wp_safe_redirect( $redirect_to );
|
364 |
+
exit;
|
365 |
+
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Loop through the input and sanitize each of the values.
|
371 |
+
*
|
372 |
+
* @param array $input_settings input settings.
|
373 |
+
* @return array
|
374 |
+
*/
|
375 |
+
public static function sanitize_form_inputs( $input_settings = array() ) {
|
376 |
+
$new_settings = array();
|
377 |
+
foreach ( $input_settings as $key => $val ) {
|
378 |
+
|
379 |
+
if ( is_array( $val ) ) {
|
380 |
+
foreach ( $val as $k => $v ) {
|
381 |
+
$new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
|
382 |
+
}
|
383 |
+
} else {
|
384 |
+
$new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
|
385 |
+
}
|
386 |
+
}
|
387 |
+
return $new_settings;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Check is cartflows admin.
|
392 |
+
*
|
393 |
+
* @since 1.0.0
|
394 |
+
* @return boolean
|
395 |
+
*/
|
396 |
+
public static function is_global_admin() {
|
397 |
+
|
398 |
+
$current_screen = get_current_screen();
|
399 |
+
|
400 |
+
if (
|
401 |
+
is_object( $current_screen ) &&
|
402 |
+
isset( $current_screen->post_type ) &&
|
403 |
+
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
|
404 |
+
CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
|
405 |
+
)
|
406 |
+
) {
|
407 |
+
return true;
|
408 |
+
}
|
409 |
+
return false;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Check is flow admin.
|
414 |
+
*
|
415 |
+
* @since 1.0.0
|
416 |
+
* @return boolean
|
417 |
+
*/
|
418 |
+
public static function is_flow_edit_admin() {
|
419 |
+
|
420 |
+
$current_screen = get_current_screen();
|
421 |
+
|
422 |
+
if (
|
423 |
+
is_object( $current_screen ) &&
|
424 |
+
isset( $current_screen->post_type ) &&
|
425 |
+
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
|
426 |
+
isset( $current_screen->base ) &&
|
427 |
+
( 'post' === $current_screen->base )
|
428 |
+
) {
|
429 |
+
return true;
|
430 |
+
}
|
431 |
+
return false;
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Global Admin Scripts.
|
436 |
+
*
|
437 |
+
* @since 1.0.0
|
438 |
+
*/
|
439 |
+
public static function global_admin_scripts() {
|
440 |
+
|
441 |
+
$installed_plugins = get_plugins();
|
442 |
+
$is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? true : false;
|
443 |
+
$edit_test_mode = filter_input( INPUT_GET, 'edit_test_mode', FILTER_SANITIZE_STRING );
|
444 |
+
$edit_test_mode = 'yes' === $edit_test_mode ? true : false;
|
445 |
+
|
446 |
+
$localize = array(
|
447 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
448 |
+
'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
|
449 |
+
'wc_status' => array(
|
450 |
+
'installed' => $is_wc_installed,
|
451 |
+
'active' => wcf()->is_woo_active,
|
452 |
+
),
|
453 |
+
'wc_activating_message' => __( 'Installing and activating..', 'cartflows' ),
|
454 |
+
'wc_install_error' => __( 'There was an error with the installation of plugin.', 'cartflows' ),
|
455 |
+
'wcf_edit_test_mode' => $edit_test_mode,
|
456 |
+
'wcf_fetch_stats_nonce' => wp_create_nonce( 'wcf-fetch-stats' ),
|
457 |
+
);
|
458 |
+
|
459 |
+
$localize = apply_filters( 'cartflows_admin_js_localize', $localize );
|
460 |
+
|
461 |
+
$localize_script = '<!-- script to print the admin localized variables -->';
|
462 |
+
$localize_script .= '<script type="text/javascript">';
|
463 |
+
$localize_script .= 'var cartflows_admin = ' . wp_json_encode( $localize ) . ';';
|
464 |
+
$localize_script .= '</script>';
|
465 |
+
|
466 |
+
echo $localize_script;
|
467 |
+
|
468 |
+
if ( self::is_global_admin() ) {
|
469 |
+
|
470 |
+
// Styles.
|
471 |
+
wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
|
472 |
+
wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
|
473 |
+
|
474 |
+
wp_enqueue_script(
|
475 |
+
'wcf-global-admin',
|
476 |
+
CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
|
477 |
+
array( 'jquery' ),
|
478 |
+
CARTFLOWS_VER,
|
479 |
+
true
|
480 |
+
);
|
481 |
+
|
482 |
+
do_action( 'cartflows_global_admin_scripts' );
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Global Admin Data.
|
488 |
+
*
|
489 |
+
* @since 1.0.0
|
490 |
+
*/
|
491 |
+
public static function global_admin_data() {
|
492 |
+
|
493 |
+
$current_screen = get_current_screen();
|
494 |
+
|
495 |
+
if ( ! $current_screen ) {
|
496 |
+
return;
|
497 |
+
}
|
498 |
+
|
499 |
+
if ( 'edit-' . CARTFLOWS_FLOW_POST_TYPE != $current_screen->id ) {
|
500 |
+
return;
|
501 |
+
}
|
502 |
+
|
503 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
504 |
+
?>
|
505 |
+
|
506 |
+
<div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
|
507 |
+
<div class="wcf-templates-popup-content">
|
508 |
+
<div class="spinner"></div>
|
509 |
+
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
510 |
+
|
511 |
+
<div id="wcf-remote-flow-actions" class="wcf-template-header">
|
512 |
+
<div class="wcf-template-logo-wrap">
|
513 |
+
<span class="wcf-cartflows-logo-img">
|
514 |
+
<span class="cartflows-logo-icon"></span>
|
515 |
+
</span>
|
516 |
+
<span class="wcf-cartflows-title"><?php esc_html_e( 'Flows Library', 'cartflows' ); ?></span>
|
517 |
+
</div>
|
518 |
+
<div class="wcf-tab-wrapper">
|
519 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
520 |
+
<div id="wcf-get-started-steps">
|
521 |
+
<ul class="filter-links ">
|
522 |
+
<li>
|
523 |
+
<a href="#" class="current" data-slug="ready-templates" data-title="<?php esc_html_e( 'Ready Templates', 'cartflows' ); ?>"><?php esc_html_e( 'Ready Templates', 'cartflows' ); ?></a>
|
524 |
+
</li>
|
525 |
+
<li>
|
526 |
+
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
527 |
+
</li>
|
528 |
+
</ul>
|
529 |
+
</div>
|
530 |
+
<?php } ?>
|
531 |
+
</div>
|
532 |
+
<div class="wcf-popup-close-wrap">
|
533 |
+
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
534 |
+
</div>
|
535 |
+
</div>
|
536 |
+
<!-- <div class="wcf-search-form">
|
537 |
+
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
538 |
+
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
539 |
+
</div> -->
|
540 |
+
|
541 |
+
<div id="wcf-remote-content">
|
542 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
543 |
+
<div id="wcf-ready-templates">
|
544 |
+
<div id="wcf-remote-filters">
|
545 |
+
<div id="wcf-page-builders"></div>
|
546 |
+
<div id="wcf-categories"></div>
|
547 |
+
</div>
|
548 |
+
<div class="wcf-page-builder-notice"></div>
|
549 |
+
<div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
550 |
+
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
551 |
+
</div>
|
552 |
+
<?php } ?>
|
553 |
+
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
554 |
+
<div class="inner">
|
555 |
+
<a href="#" class="button button-hero button-primary cartflows-flow-import-blank"><?php esc_html_e( 'Design Your Flow', 'cartflows' ); ?></a>
|
556 |
+
<p class="wcf-learn-how"><a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank"><?php esc_html_e( 'Learn How', 'cartflows' ); ?> <i class="dashicons dashicons-external"></i></a></p>
|
557 |
+
</div>
|
558 |
+
</div>
|
559 |
+
</div>
|
560 |
+
</div>
|
561 |
+
</div>
|
562 |
+
</div>
|
563 |
+
|
564 |
+
<?php
|
565 |
+
}
|
566 |
+
|
567 |
+
/**
|
568 |
+
* Enqueues the needed CSS/JS for the builder's admin settings page.
|
569 |
+
*
|
570 |
+
* @since 1.0.0
|
571 |
+
*/
|
572 |
+
public static function styles_scripts() {
|
573 |
+
|
574 |
+
// Styles.
|
575 |
+
wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
|
576 |
+
wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
|
577 |
+
|
578 |
+
// Script.
|
579 |
+
wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
|
580 |
+
|
581 |
+
$localize = array(
|
582 |
+
'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
|
583 |
+
);
|
584 |
+
|
585 |
+
wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
|
586 |
+
|
587 |
+
do_action( 'cartflows_admin_settings_after_enqueue_scripts' );
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Save All admin settings here
|
592 |
+
*/
|
593 |
+
public static function save_settings() {
|
594 |
+
|
595 |
+
// Only admins can save settings.
|
596 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
597 |
+
return;
|
598 |
+
}
|
599 |
+
|
600 |
+
self::save_common_settings();
|
601 |
+
self::save_debug_settings();
|
602 |
+
self::save_permalink_settings();
|
603 |
+
|
604 |
+
self::save_google_analytics_settings();
|
605 |
+
self::save_facebook_settings();
|
606 |
+
|
607 |
+
// Let extensions hook into saving.
|
608 |
+
do_action( 'cartflows_admin_settings_save' );
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Get and return page URL
|
613 |
+
*
|
614 |
+
* @param string $menu_slug Menu name.
|
615 |
+
* @since 1.0.0
|
616 |
+
* @return string page url
|
617 |
+
*/
|
618 |
+
public static function get_page_url( $menu_slug ) {
|
619 |
+
|
620 |
+
$parent_page = self::$default_menu_position;
|
621 |
+
|
622 |
+
if ( strpos( $parent_page, '?' ) !== false ) {
|
623 |
+
$query_var = '&page=' . self::$plugin_slug;
|
624 |
+
} else {
|
625 |
+
$query_var = '?page=' . self::$plugin_slug;
|
626 |
+
}
|
627 |
+
|
628 |
+
$parent_page_url = admin_url( $parent_page . $query_var );
|
629 |
+
|
630 |
+
$url = $parent_page_url . '&action=' . $menu_slug;
|
631 |
+
|
632 |
+
return esc_url( $url );
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Admin body classes.
|
637 |
+
*
|
638 |
+
* Body classes to be added to <body> tag in admin page
|
639 |
+
*
|
640 |
+
* @param String $classes body classes returned from the filter.
|
641 |
+
* @return String body classes to be added to <body> tag in admin page
|
642 |
+
*/
|
643 |
+
public static function add_admin_body_class( $classes ) {
|
644 |
+
|
645 |
+
$classes .= ' cartflows-' . CARTFLOWS_VER;
|
646 |
+
|
647 |
+
return $classes;
|
648 |
+
}
|
649 |
+
|
650 |
+
/**
|
651 |
+
* Save Global Setting options.
|
652 |
+
*
|
653 |
+
* @since 1.0.0
|
654 |
+
*/
|
655 |
+
public static function save_facebook_settings() {
|
656 |
+
|
657 |
+
if ( isset( $_POST['cartflows-facebook-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-facebook-settings-nonce'] ) ), 'cartflows-facebook-settings' ) ) {
|
658 |
+
|
659 |
+
$url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
660 |
+
$new_settings = array();
|
661 |
+
|
662 |
+
if ( isset( $_POST['_cartflows_facebook'] ) ) {
|
663 |
+
$new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_facebook'] ) ); //phpcs:ignore
|
664 |
+
}
|
665 |
+
|
666 |
+
Cartflows_Helper::update_admin_settings_option( '_cartflows_facebook', $new_settings, false );
|
667 |
+
$query = array(
|
668 |
+
'message' => 'saved',
|
669 |
+
);
|
670 |
+
$redirect_to = add_query_arg( $query, $url );
|
671 |
+
wp_safe_redirect( $redirect_to );
|
672 |
+
exit;
|
673 |
+
}
|
674 |
+
}
|
675 |
+
|
676 |
+
/**
|
677 |
+
* Show embed header.
|
678 |
+
*
|
679 |
+
* @since 1.0.0
|
680 |
+
*/
|
681 |
+
public static function show_embed_header() {
|
682 |
+
|
683 |
+
$current_screen = get_current_screen();
|
684 |
+
|
685 |
+
if (
|
686 |
+
is_object( $current_screen ) &&
|
687 |
+
isset( $current_screen->post_type ) &&
|
688 |
+
( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
|
689 |
+
isset( $current_screen->base ) &&
|
690 |
+
( 'post' === $current_screen->base || 'edit' === $current_screen->base )
|
691 |
+
) {
|
692 |
+
return true;
|
693 |
+
}
|
694 |
+
|
695 |
+
return false;
|
696 |
+
}
|
697 |
+
/**
|
698 |
+
* Set up a div for the header embed to render into.
|
699 |
+
* The initial contents here are meant as a place loader for when the PHP page initialy loads.
|
700 |
+
*/
|
701 |
+
public static function embed_page_header() {
|
702 |
+
|
703 |
+
if ( ! is_admin() || ! self::show_embed_header() ) {
|
704 |
+
return;
|
705 |
+
}
|
706 |
+
|
707 |
+
wp_enqueue_style( 'cartflows-admin-embed-header', CARTFLOWS_URL . 'admin/assets/css/admin-embed-header.css', array(), CARTFLOWS_VER );
|
708 |
+
|
709 |
+
include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin-header.php';
|
710 |
+
}
|
711 |
+
}
|
712 |
+
|
713 |
+
Cartflows_Admin::init();
|
classes/class-cartflows-cloning.php
CHANGED
@@ -37,7 +37,7 @@ class Cartflows_Cloning {
|
|
37 |
|
38 |
add_filter( 'post_row_actions', array( $this, 'clone_link' ), 99, 2 );
|
39 |
add_action( 'admin_action_cartflows_clone_flow', array( $this, 'clone_flow' ) );
|
40 |
-
add_action( '
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -266,26 +266,32 @@ class Cartflows_Cloning {
|
|
266 |
|
267 |
global $wpdb;
|
268 |
|
269 |
-
if ( ! (
|
270 |
-
|
271 |
}
|
272 |
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
}
|
279 |
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
/**
|
286 |
* And all the original post data then
|
287 |
*/
|
288 |
-
$post = get_post( $
|
289 |
|
290 |
/**
|
291 |
* Assign current user to be the new post author
|
@@ -330,7 +336,7 @@ class Cartflows_Cloning {
|
|
330 |
|
331 |
foreach ( $taxonomies as $taxonomy ) {
|
332 |
|
333 |
-
$post_terms = wp_get_object_terms( $
|
334 |
|
335 |
wp_set_object_terms( $new_step_id, $post_terms, $taxonomy, false );
|
336 |
}
|
@@ -340,7 +346,7 @@ class Cartflows_Cloning {
|
|
340 |
*/
|
341 |
// @codingStandardsIgnoreStart
|
342 |
$post_meta_infos = $wpdb->get_results(
|
343 |
-
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$
|
344 |
);
|
345 |
// @codingStandardsIgnoreEnd
|
346 |
|
@@ -370,9 +376,8 @@ class Cartflows_Cloning {
|
|
370 |
// @codingStandardsIgnoreEnd
|
371 |
}
|
372 |
|
373 |
-
$flow_id = get_post_meta( $post_id, 'wcf-flow-id', true );
|
374 |
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
375 |
-
$step_type = get_post_meta( $
|
376 |
|
377 |
if ( ! is_array( $flow_steps ) ) {
|
378 |
$flow_steps = array();
|
@@ -389,16 +394,15 @@ class Cartflows_Cloning {
|
|
389 |
/* Clear Page Builder Cache */
|
390 |
$this->clear_cache();
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
exit;
|
399 |
-
} else {
|
400 |
-
wp_die( 'Post creation failed, could not find original post: ' . $post_id );
|
401 |
}
|
|
|
|
|
402 |
}
|
403 |
|
404 |
/**
|
37 |
|
38 |
add_filter( 'post_row_actions', array( $this, 'clone_link' ), 99, 2 );
|
39 |
add_action( 'admin_action_cartflows_clone_flow', array( $this, 'clone_flow' ) );
|
40 |
+
add_action( 'wp_ajax_cartflows_clone_flow_step', array( $this, 'clone_step' ) );
|
41 |
}
|
42 |
|
43 |
/**
|
266 |
|
267 |
global $wpdb;
|
268 |
|
269 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
270 |
+
return;
|
271 |
}
|
272 |
|
273 |
+
check_ajax_referer( 'wcf-clone-flow-step', 'security' );
|
274 |
+
|
275 |
+
if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) ) {
|
276 |
+
$flow_id = intval( $_POST['post_id'] );
|
277 |
+
$step_id = intval( $_POST['step_id'] );
|
278 |
}
|
279 |
|
280 |
+
$result = array(
|
281 |
+
'status' => false,
|
282 |
+
'reload' => true,
|
283 |
+
/* translators: %s flow id */
|
284 |
+
'text' => sprintf( __( 'Can\'t clone this step - %1$s. Flow - %2$s', 'cartflows' ), $step_id, $flow_id ),
|
285 |
+
);
|
286 |
+
|
287 |
+
if ( ! $flow_id || ! $step_id ) {
|
288 |
+
wp_send_json( $result );
|
289 |
+
}
|
290 |
|
291 |
/**
|
292 |
* And all the original post data then
|
293 |
*/
|
294 |
+
$post = get_post( $step_id );
|
295 |
|
296 |
/**
|
297 |
* Assign current user to be the new post author
|
336 |
|
337 |
foreach ( $taxonomies as $taxonomy ) {
|
338 |
|
339 |
+
$post_terms = wp_get_object_terms( $step_id, $taxonomy, array( 'fields' => 'slugs' ) );
|
340 |
|
341 |
wp_set_object_terms( $new_step_id, $post_terms, $taxonomy, false );
|
342 |
}
|
346 |
*/
|
347 |
// @codingStandardsIgnoreStart
|
348 |
$post_meta_infos = $wpdb->get_results(
|
349 |
+
"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$step_id"
|
350 |
);
|
351 |
// @codingStandardsIgnoreEnd
|
352 |
|
376 |
// @codingStandardsIgnoreEnd
|
377 |
}
|
378 |
|
|
|
379 |
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
380 |
+
$step_type = get_post_meta( $step_id, 'wcf-step-type', true );
|
381 |
|
382 |
if ( ! is_array( $flow_steps ) ) {
|
383 |
$flow_steps = array();
|
394 |
/* Clear Page Builder Cache */
|
395 |
$this->clear_cache();
|
396 |
|
397 |
+
$result = array(
|
398 |
+
'status' => true,
|
399 |
+
'reload' => true,
|
400 |
+
/* translators: %s flow id */
|
401 |
+
'text' => sprintf( __( 'Step - %1$s cloned. Flow - %2$s', 'cartflows' ), $step_id, $flow_id ),
|
402 |
+
);
|
|
|
|
|
|
|
403 |
}
|
404 |
+
|
405 |
+
wp_send_json( $result );
|
406 |
}
|
407 |
|
408 |
/**
|
classes/class-cartflows-flow-frontend.php
CHANGED
@@ -1,247 +1,214 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Frontend & Markup
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Flow Markup
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*/
|
13 |
-
class Cartflows_Flow_Frontend {
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Member Variable
|
18 |
-
*
|
19 |
-
* @var object instance
|
20 |
-
*/
|
21 |
-
private static $instance;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Initiator
|
25 |
-
*/
|
26 |
-
public static function get_instance() {
|
27 |
-
if ( ! isset( self::$instance ) ) {
|
28 |
-
self::$instance = new self();
|
29 |
-
}
|
30 |
-
return self::$instance;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Constructor
|
35 |
-
*/
|
36 |
-
public function __construct() {
|
37 |
-
|
38 |
-
/* Analytics */
|
39 |
-
add_action( 'cartflows_wp_footer', array( $this, 'footer_markup' ) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Footer markup
|
44 |
-
*/
|
45 |
-
public function footer_markup() {
|
46 |
-
|
47 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
48 |
-
// @codingStandardsIgnoreStart
|
49 |
-
$flow_id = wcf()->utils->get_flow_id();
|
50 |
-
?>
|
51 |
-
<?php if( $this->is_flow_testmode( $flow_id ) ) { ?>
|
52 |
-
<div class="wcf-preview-mode">
|
53 |
-
<span><?php _e( 'Test mode is active — which displays random products for previewing. It can be deactivated from the flow settings in the admin dashboard.', 'cartflows' ); ?></span>
|
54 |
-
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
55 |
-
<?php
|
56 |
-
$flow_edit_link = add_query_arg( 'edit_test_mode', 'yes', get_edit_post_link( $flow_id ) );
|
57 |
-
?>
|
58 |
-
<a href="<?php echo $flow_edit_link; ?>"><?php _e( 'Click here to disable it', 'cartflows'); ?></a>
|
59 |
-
<?php } ?>
|
60 |
-
</div>
|
61 |
-
<?php } ?>
|
62 |
-
<?php
|
63 |
-
// @codingStandardsIgnoreEnd
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Check if flow test mode is enable.
|
69 |
-
*
|
70 |
-
* @since 1.0.0
|
71 |
-
* @param int $flow_id flow ID.
|
72 |
-
*
|
73 |
-
* @return boolean
|
74 |
-
*/
|
75 |
-
public function is_flow_testmode( $flow_id = '' ) {
|
76 |
-
|
77 |
-
if ( ! $flow_id ) {
|
78 |
-
$flow_id = wcf()->utils->get_flow_id();
|
79 |
-
}
|
80 |
-
|
81 |
-
$test_mode = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-testing' );
|
82 |
-
|
83 |
-
if ( 'no' === $test_mode ) {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
return true;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get steps data.
|
92 |
-
*
|
93 |
-
* @since 1.0.0
|
94 |
-
* @param int $flow_id flow ID.
|
95 |
-
*
|
96 |
-
* @return array
|
97 |
-
*/
|
98 |
-
public function get_steps( $flow_id ) {
|
99 |
-
|
100 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
101 |
-
|
102 |
-
if ( ! is_array( $steps ) ) {
|
103 |
-
|
104 |
-
$steps = array();
|
105 |
-
}
|
106 |
-
|
107 |
-
return $steps;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Check thank you page exists.
|
112 |
-
*
|
113 |
-
* @since 1.0.0
|
114 |
-
* @param array $order order data.
|
115 |
-
*
|
116 |
-
* @return bool
|
117 |
-
*/
|
118 |
-
public function is_thankyou_page_exists( $order ) {
|
119 |
-
|
120 |
-
$thankyou_step_exist = false;
|
121 |
-
|
122 |
-
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
123 |
-
|
124 |
-
if ( $flow_id ) {
|
125 |
-
|
126 |
-
$
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
*
|
162 |
-
*
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
if ( $flow_id ) {
|
217 |
-
|
218 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
219 |
-
$step_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
220 |
-
|
221 |
-
if ( is_array( $flow_steps ) ) {
|
222 |
-
|
223 |
-
foreach ( $flow_steps as $index => $data ) {
|
224 |
-
|
225 |
-
if ( intval( $data['id'] ) === $step_id ) {
|
226 |
-
|
227 |
-
$next_step_index = $index + 1;
|
228 |
-
|
229 |
-
if ( isset( $flow_steps[ $next_step_index ] ) ) {
|
230 |
-
|
231 |
-
$next_step_id = intval( $flow_steps[ $next_step_index ]['id'] );
|
232 |
-
}
|
233 |
-
|
234 |
-
break;
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
return $next_step_id;
|
241 |
-
}
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* Kicking this off by calling 'get_instance()' method
|
246 |
-
*/
|
247 |
-
Cartflows_Flow_Frontend::get_instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend & Markup
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Flow Markup
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Flow_Frontend {
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Member Variable
|
18 |
+
*
|
19 |
+
* @var object instance
|
20 |
+
*/
|
21 |
+
private static $instance;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initiator
|
25 |
+
*/
|
26 |
+
public static function get_instance() {
|
27 |
+
if ( ! isset( self::$instance ) ) {
|
28 |
+
self::$instance = new self();
|
29 |
+
}
|
30 |
+
return self::$instance;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
|
38 |
+
/* Analytics */
|
39 |
+
add_action( 'cartflows_wp_footer', array( $this, 'footer_markup' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Footer markup
|
44 |
+
*/
|
45 |
+
public function footer_markup() {
|
46 |
+
|
47 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
48 |
+
// @codingStandardsIgnoreStart
|
49 |
+
$flow_id = wcf()->utils->get_flow_id();
|
50 |
+
?>
|
51 |
+
<?php if( $this->is_flow_testmode( $flow_id ) ) { ?>
|
52 |
+
<div class="wcf-preview-mode">
|
53 |
+
<span><?php _e( 'Test mode is active — which displays random products for previewing. It can be deactivated from the flow settings in the admin dashboard.', 'cartflows' ); ?></span>
|
54 |
+
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
55 |
+
<?php
|
56 |
+
$flow_edit_link = add_query_arg( 'edit_test_mode', 'yes', get_edit_post_link( $flow_id ) );
|
57 |
+
?>
|
58 |
+
<a href="<?php echo $flow_edit_link; ?>"><?php _e( 'Click here to disable it', 'cartflows'); ?></a>
|
59 |
+
<?php } ?>
|
60 |
+
</div>
|
61 |
+
<?php } ?>
|
62 |
+
<?php
|
63 |
+
// @codingStandardsIgnoreEnd
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Check if flow test mode is enable.
|
69 |
+
*
|
70 |
+
* @since 1.0.0
|
71 |
+
* @param int $flow_id flow ID.
|
72 |
+
*
|
73 |
+
* @return boolean
|
74 |
+
*/
|
75 |
+
public function is_flow_testmode( $flow_id = '' ) {
|
76 |
+
|
77 |
+
if ( ! $flow_id ) {
|
78 |
+
$flow_id = wcf()->utils->get_flow_id();
|
79 |
+
}
|
80 |
+
|
81 |
+
$test_mode = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-testing' );
|
82 |
+
|
83 |
+
if ( 'no' === $test_mode ) {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get steps data.
|
92 |
+
*
|
93 |
+
* @since 1.0.0
|
94 |
+
* @param int $flow_id flow ID.
|
95 |
+
*
|
96 |
+
* @return array
|
97 |
+
*/
|
98 |
+
public function get_steps( $flow_id ) {
|
99 |
+
|
100 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
101 |
+
|
102 |
+
if ( ! is_array( $steps ) ) {
|
103 |
+
|
104 |
+
$steps = array();
|
105 |
+
}
|
106 |
+
|
107 |
+
return $steps;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check thank you page exists.
|
112 |
+
*
|
113 |
+
* @since 1.0.0
|
114 |
+
* @param array $order order data.
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
public function is_thankyou_page_exists( $order ) {
|
119 |
+
|
120 |
+
$thankyou_step_exist = false;
|
121 |
+
|
122 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
123 |
+
|
124 |
+
if ( $flow_id ) {
|
125 |
+
|
126 |
+
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
127 |
+
|
128 |
+
// Get control step and flow steps.
|
129 |
+
$wcf_step_obj = wcf_get_step( $step_id );
|
130 |
+
$flow_steps = $wcf_step_obj->get_flow_steps();
|
131 |
+
$control_step = $wcf_step_obj->get_control_step();
|
132 |
+
|
133 |
+
if ( is_array( $flow_steps ) ) {
|
134 |
+
|
135 |
+
$current_step_found = false;
|
136 |
+
|
137 |
+
foreach ( $flow_steps as $index => $data ) {
|
138 |
+
|
139 |
+
if ( $current_step_found ) {
|
140 |
+
|
141 |
+
if ( 'thankyou' === $data['type'] ) {
|
142 |
+
|
143 |
+
$thankyou_step_exist = true;
|
144 |
+
break;
|
145 |
+
}
|
146 |
+
} else {
|
147 |
+
|
148 |
+
if ( intval( $data['id'] ) === $control_step ) {
|
149 |
+
|
150 |
+
$current_step_found = true;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
return $thankyou_step_exist;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Check thank you page exists.
|
162 |
+
*
|
163 |
+
* @since 1.0.0
|
164 |
+
* @param array $order order data.
|
165 |
+
*
|
166 |
+
* @return bool
|
167 |
+
*/
|
168 |
+
public function get_thankyou_page_id( $order ) {
|
169 |
+
|
170 |
+
$thankyou_step_id = false;
|
171 |
+
|
172 |
+
$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );
|
173 |
+
|
174 |
+
if ( $flow_id ) {
|
175 |
+
|
176 |
+
$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
177 |
+
|
178 |
+
// Get control step and flow steps.
|
179 |
+
$wcf_step_obj = wcf_get_step( $step_id );
|
180 |
+
$flow_steps = $wcf_step_obj->get_flow_steps();
|
181 |
+
$control_step = $wcf_step_obj->get_control_step();
|
182 |
+
|
183 |
+
if ( is_array( $flow_steps ) ) {
|
184 |
+
|
185 |
+
$current_step_found = false;
|
186 |
+
|
187 |
+
foreach ( $flow_steps as $index => $data ) {
|
188 |
+
|
189 |
+
if ( $current_step_found ) {
|
190 |
+
|
191 |
+
if ( 'thankyou' === $data['type'] ) {
|
192 |
+
|
193 |
+
$thankyou_step_id = intval( $data['id'] );
|
194 |
+
break;
|
195 |
+
}
|
196 |
+
} else {
|
197 |
+
|
198 |
+
if ( intval( $data['id'] ) === $control_step ) {
|
199 |
+
|
200 |
+
$current_step_found = true;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
return $thankyou_step_id;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Kicking this off by calling 'get_instance()' method
|
213 |
+
*/
|
214 |
+
Cartflows_Flow_Frontend::get_instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class-cartflows-frontend.php
CHANGED
@@ -1,654 +1,672 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows Frontend.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Cartflows_Frontend.
|
10 |
-
*/
|
11 |
-
class Cartflows_Frontend {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Member Variable
|
15 |
-
*
|
16 |
-
* @var instance
|
17 |
-
*/
|
18 |
-
private static $instance;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Initiator
|
22 |
-
*/
|
23 |
-
public static function get_instance() {
|
24 |
-
if ( ! isset( self::$instance ) ) {
|
25 |
-
self::$instance = new self();
|
26 |
-
}
|
27 |
-
return self::$instance;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Constructor
|
32 |
-
*/
|
33 |
-
public function __construct() {
|
34 |
-
|
35 |
-
/* Set / Destroy Flow Sessions. Set data */
|
36 |
-
add_action( 'wp', array( $this, 'init_actions' ), 1 );
|
37 |
-
|
38 |
-
add_action( 'init', array( $this, 'debug_data_setting_actions' ) );
|
39 |
-
add_action( 'init', array( $this, 'setup_optin_checkout_filter' ) );
|
40 |
-
/* Enqueue global required scripts */
|
41 |
-
add_action( 'wp', array( $this, 'wp_actions' ), 55 );
|
42 |
-
|
43 |
-
/* Modify the checkout order received url to go thank you page in our flow */
|
44 |
-
add_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_to_thankyou_page' ), 10, 2 );
|
45 |
-
|
46 |
-
add_action( 'wp_head', array( $this, 'facebook_pixel_init' ) );
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Redirect to thank page if upsell not exists
|
52 |
-
*
|
53 |
-
* @param string $order_recieve_url url.
|
54 |
-
* @param object $order order object.
|
55 |
-
* @since 1.0.0
|
56 |
-
*/
|
57 |
-
public function redirect_to_thankyou_page( $order_recieve_url, $order ) {
|
58 |
-
|
59 |
-
/* Only for thank you page */
|
60 |
-
wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ );
|
61 |
-
wcf()->logger->log( 'Only for thank you page' );
|
62 |
-
|
63 |
-
if ( wcf()->flow->is_thankyou_page_exists( $order ) ) {
|
64 |
-
|
65 |
-
if ( _is_wcf_doing_checkout_ajax() ) {
|
66 |
-
|
67 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
68 |
-
|
69 |
-
if ( ! $checkout_id ) {
|
70 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
71 |
-
}
|
72 |
-
} else {
|
73 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
74 |
-
}
|
75 |
-
|
76 |
-
wcf()->logger->log( 'Checkout ID : ' . $checkout_id );
|
77 |
-
|
78 |
-
if ( $checkout_id ) {
|
79 |
-
|
80 |
-
$thankyou_step_id = wcf()->flow->get_thankyou_page_id( $order );
|
81 |
-
|
82 |
-
if ( $thankyou_step_id ) {
|
83 |
-
|
84 |
-
$order_recieve_url = get_permalink( $thankyou_step_id );
|
85 |
-
|
86 |
-
$order_recieve_url = add_query_arg(
|
87 |
-
array(
|
88 |
-
'wcf-key' => $order->get_order_key(),
|
89 |
-
'wcf-order' => $order->get_id(),
|
90 |
-
),
|
91 |
-
$order_recieve_url
|
92 |
-
);
|
93 |
-
}
|
94 |
-
}
|
95 |
-
}
|
96 |
-
|
97 |
-
wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ );
|
98 |
-
|
99 |
-
Cartflows_Helper::send_fb_response_if_enabled( $order->get_id() );
|
100 |
-
|
101 |
-
Cartflows_Tracking::send_ga_data_if_enabled( $order->get_id() );
|
102 |
-
|
103 |
-
return $order_recieve_url;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Cancel and redirect to checkout
|
108 |
-
*
|
109 |
-
* @param string $return_url url.
|
110 |
-
* @since 1.0.0
|
111 |
-
*/
|
112 |
-
public function redirect_to_checkout_on_cancel( $return_url ) {
|
113 |
-
|
114 |
-
if ( _is_wcf_doing_checkout_ajax() ) {
|
115 |
-
|
116 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
117 |
-
|
118 |
-
if ( ! $checkout_id ) {
|
119 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
120 |
-
}
|
121 |
-
} else {
|
122 |
-
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
123 |
-
}
|
124 |
-
|
125 |
-
if ( $checkout_id ) {
|
126 |
-
|
127 |
-
$return_url = add_query_arg(
|
128 |
-
array(
|
129 |
-
'cancel_order' => 'true',
|
130 |
-
'_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ),
|
131 |
-
),
|
132 |
-
get_permalink( $checkout_id )
|
133 |
-
);
|
134 |
-
}
|
135 |
-
|
136 |
-
return $return_url;
|
137 |
-
}
|
138 |
-
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Remove theme styles.
|
142 |
-
*
|
143 |
-
* @since 1.0.0
|
144 |
-
*/
|
145 |
-
public function remove_theme_styles() {
|
146 |
-
|
147 |
-
if ( Cartflows_Compatibility::get_instance()->is_compatibility_theme_enabled() ) {
|
148 |
-
return;
|
149 |
-
}
|
150 |
-
|
151 |
-
$page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true );
|
152 |
-
|
153 |
-
$page_template = apply_filters( 'cartflows_page_template', $page_template );
|
154 |
-
|
155 |
-
if ( ! _wcf_supported_template( $page_template ) ) {
|
156 |
-
return;
|
157 |
-
}
|
158 |
-
|
159 |
-
// get all styles data.
|
160 |
-
global $wp_styles;
|
161 |
-
global $wp_scripts;
|
162 |
-
|
163 |
-
$get_stylesheet = 'themes/' . get_stylesheet() . '/';
|
164 |
-
$get_template = 'themes/' . get_template() . '/';
|
165 |
-
|
166 |
-
$remove_styles = apply_filters( 'cartflows_remove_theme_styles', true );
|
167 |
-
|
168 |
-
if ( $remove_styles ) {
|
169 |
-
|
170 |
-
// loop over all of the registered scripts..
|
171 |
-
foreach ( $wp_styles->registered as $handle => $data ) {
|
172 |
-
|
173 |
-
if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
|
174 |
-
|
175 |
-
// remove it.
|
176 |
-
wp_deregister_style( $handle );
|
177 |
-
wp_dequeue_style( $handle );
|
178 |
-
}
|
179 |
-
}
|
180 |
-
}
|
181 |
-
|
182 |
-
$remove_scripts = apply_filters( 'cartflows_remove_theme_scripts', true );
|
183 |
-
|
184 |
-
if ( $remove_scripts ) {
|
185 |
-
|
186 |
-
// loop over all of the registered scripts.
|
187 |
-
foreach ( $wp_scripts->registered as $handle => $data ) {
|
188 |
-
|
189 |
-
if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
|
190 |
-
|
191 |
-
// remove it.
|
192 |
-
wp_deregister_script( $handle );
|
193 |
-
wp_dequeue_script( $handle );
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Update main order data in transient.
|
202 |
-
*
|
203 |
-
* @param array $woo_styles new styles array.
|
204 |
-
* @since 1.0.0
|
205 |
-
* @return array.
|
206 |
-
*/
|
207 |
-
public function woo_default_css( $woo_styles ) {
|
208 |
-
|
209 |
-
$woo_styles = array(
|
210 |
-
'woocommerce-layout' => array(
|
211 |
-
'src' => plugins_url( 'assets/css/woocommerce-layout.css', WC_PLUGIN_FILE ),
|
212 |
-
'deps' => '',
|
213 |
-
'version' => WC_VERSION,
|
214 |
-
'media' => 'all',
|
215 |
-
'has_rtl' => true,
|
216 |
-
),
|
217 |
-
'woocommerce-smallscreen' => array(
|
218 |
-
'src' => plugins_url( 'assets/css/woocommerce-smallscreen.css', WC_PLUGIN_FILE ),
|
219 |
-
'deps' => 'woocommerce-layout',
|
220 |
-
'version' => WC_VERSION,
|
221 |
-
'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', '768px' ) . ')',
|
222 |
-
'has_rtl' => true,
|
223 |
-
),
|
224 |
-
'woocommerce-general' => array(
|
225 |
-
'src' => plugins_url( 'assets/css/woocommerce.css', WC_PLUGIN_FILE ),
|
226 |
-
'deps' => '',
|
227 |
-
'version' => WC_VERSION,
|
228 |
-
'media' => 'all',
|
229 |
-
'has_rtl' => true,
|
230 |
-
),
|
231 |
-
);
|
232 |
-
|
233 |
-
return $woo_styles;
|
234 |
-
}
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Init Actions.
|
238 |
-
*
|
239 |
-
* @since 1.0.0
|
240 |
-
*/
|
241 |
-
public function init_actions() {
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
'
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
}
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
*
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
$
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
$
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
'
|
445 |
-
'
|
446 |
-
'
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
*
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
*
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
*
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
*
|
575 |
-
*
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Frontend.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Cartflows_Frontend.
|
10 |
+
*/
|
11 |
+
class Cartflows_Frontend {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Member Variable
|
15 |
+
*
|
16 |
+
* @var instance
|
17 |
+
*/
|
18 |
+
private static $instance;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Initiator
|
22 |
+
*/
|
23 |
+
public static function get_instance() {
|
24 |
+
if ( ! isset( self::$instance ) ) {
|
25 |
+
self::$instance = new self();
|
26 |
+
}
|
27 |
+
return self::$instance;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Constructor
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
|
35 |
+
/* Set / Destroy Flow Sessions. Set data */
|
36 |
+
add_action( 'wp', array( $this, 'init_actions' ), 1 );
|
37 |
+
|
38 |
+
add_action( 'init', array( $this, 'debug_data_setting_actions' ) );
|
39 |
+
add_action( 'init', array( $this, 'setup_optin_checkout_filter' ) );
|
40 |
+
/* Enqueue global required scripts */
|
41 |
+
add_action( 'wp', array( $this, 'wp_actions' ), 55 );
|
42 |
+
|
43 |
+
/* Modify the checkout order received url to go thank you page in our flow */
|
44 |
+
add_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_to_thankyou_page' ), 10, 2 );
|
45 |
+
|
46 |
+
add_action( 'wp_head', array( $this, 'facebook_pixel_init' ) );
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Redirect to thank page if upsell not exists
|
52 |
+
*
|
53 |
+
* @param string $order_recieve_url url.
|
54 |
+
* @param object $order order object.
|
55 |
+
* @since 1.0.0
|
56 |
+
*/
|
57 |
+
public function redirect_to_thankyou_page( $order_recieve_url, $order ) {
|
58 |
+
|
59 |
+
/* Only for thank you page */
|
60 |
+
wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ );
|
61 |
+
wcf()->logger->log( 'Only for thank you page' );
|
62 |
+
|
63 |
+
if ( wcf()->flow->is_thankyou_page_exists( $order ) ) {
|
64 |
+
|
65 |
+
if ( _is_wcf_doing_checkout_ajax() ) {
|
66 |
+
|
67 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
68 |
+
|
69 |
+
if ( ! $checkout_id ) {
|
70 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
71 |
+
}
|
72 |
+
} else {
|
73 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
74 |
+
}
|
75 |
+
|
76 |
+
wcf()->logger->log( 'Checkout ID : ' . $checkout_id );
|
77 |
+
|
78 |
+
if ( $checkout_id ) {
|
79 |
+
|
80 |
+
$thankyou_step_id = wcf()->flow->get_thankyou_page_id( $order );
|
81 |
+
|
82 |
+
if ( $thankyou_step_id ) {
|
83 |
+
|
84 |
+
$order_recieve_url = get_permalink( $thankyou_step_id );
|
85 |
+
|
86 |
+
$order_recieve_url = add_query_arg(
|
87 |
+
array(
|
88 |
+
'wcf-key' => $order->get_order_key(),
|
89 |
+
'wcf-order' => $order->get_id(),
|
90 |
+
),
|
91 |
+
$order_recieve_url
|
92 |
+
);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ );
|
98 |
+
|
99 |
+
Cartflows_Helper::send_fb_response_if_enabled( $order->get_id() );
|
100 |
+
|
101 |
+
Cartflows_Tracking::send_ga_data_if_enabled( $order->get_id() );
|
102 |
+
|
103 |
+
return $order_recieve_url;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Cancel and redirect to checkout
|
108 |
+
*
|
109 |
+
* @param string $return_url url.
|
110 |
+
* @since 1.0.0
|
111 |
+
*/
|
112 |
+
public function redirect_to_checkout_on_cancel( $return_url ) {
|
113 |
+
|
114 |
+
if ( _is_wcf_doing_checkout_ajax() ) {
|
115 |
+
|
116 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_post_data();
|
117 |
+
|
118 |
+
if ( ! $checkout_id ) {
|
119 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
120 |
+
}
|
121 |
+
} else {
|
122 |
+
$checkout_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( $checkout_id ) {
|
126 |
+
|
127 |
+
$return_url = add_query_arg(
|
128 |
+
array(
|
129 |
+
'cancel_order' => 'true',
|
130 |
+
'_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ),
|
131 |
+
),
|
132 |
+
get_permalink( $checkout_id )
|
133 |
+
);
|
134 |
+
}
|
135 |
+
|
136 |
+
return $return_url;
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Remove theme styles.
|
142 |
+
*
|
143 |
+
* @since 1.0.0
|
144 |
+
*/
|
145 |
+
public function remove_theme_styles() {
|
146 |
+
|
147 |
+
if ( Cartflows_Compatibility::get_instance()->is_compatibility_theme_enabled() ) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
|
151 |
+
$page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true );
|
152 |
+
|
153 |
+
$page_template = apply_filters( 'cartflows_page_template', $page_template );
|
154 |
+
|
155 |
+
if ( ! _wcf_supported_template( $page_template ) ) {
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
|
159 |
+
// get all styles data.
|
160 |
+
global $wp_styles;
|
161 |
+
global $wp_scripts;
|
162 |
+
|
163 |
+
$get_stylesheet = 'themes/' . get_stylesheet() . '/';
|
164 |
+
$get_template = 'themes/' . get_template() . '/';
|
165 |
+
|
166 |
+
$remove_styles = apply_filters( 'cartflows_remove_theme_styles', true );
|
167 |
+
|
168 |
+
if ( $remove_styles ) {
|
169 |
+
|
170 |
+
// loop over all of the registered scripts..
|
171 |
+
foreach ( $wp_styles->registered as $handle => $data ) {
|
172 |
+
|
173 |
+
if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
|
174 |
+
|
175 |
+
// remove it.
|
176 |
+
wp_deregister_style( $handle );
|
177 |
+
wp_dequeue_style( $handle );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
$remove_scripts = apply_filters( 'cartflows_remove_theme_scripts', true );
|
183 |
+
|
184 |
+
if ( $remove_scripts ) {
|
185 |
+
|
186 |
+
// loop over all of the registered scripts.
|
187 |
+
foreach ( $wp_scripts->registered as $handle => $data ) {
|
188 |
+
|
189 |
+
if ( strpos( $data->src, $get_template ) !== false || strpos( $data->src, $get_stylesheet ) !== false ) {
|
190 |
+
|
191 |
+
// remove it.
|
192 |
+
wp_deregister_script( $handle );
|
193 |
+
wp_dequeue_script( $handle );
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Update main order data in transient.
|
202 |
+
*
|
203 |
+
* @param array $woo_styles new styles array.
|
204 |
+
* @since 1.0.0
|
205 |
+
* @return array.
|
206 |
+
*/
|
207 |
+
public function woo_default_css( $woo_styles ) {
|
208 |
+
|
209 |
+
$woo_styles = array(
|
210 |
+
'woocommerce-layout' => array(
|
211 |
+
'src' => plugins_url( 'assets/css/woocommerce-layout.css', WC_PLUGIN_FILE ),
|
212 |
+
'deps' => '',
|
213 |
+
'version' => WC_VERSION,
|
214 |
+
'media' => 'all',
|
215 |
+
'has_rtl' => true,
|
216 |
+
),
|
217 |
+
'woocommerce-smallscreen' => array(
|
218 |
+
'src' => plugins_url( 'assets/css/woocommerce-smallscreen.css', WC_PLUGIN_FILE ),
|
219 |
+
'deps' => 'woocommerce-layout',
|
220 |
+
'version' => WC_VERSION,
|
221 |
+
'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', '768px' ) . ')',
|
222 |
+
'has_rtl' => true,
|
223 |
+
),
|
224 |
+
'woocommerce-general' => array(
|
225 |
+
'src' => plugins_url( 'assets/css/woocommerce.css', WC_PLUGIN_FILE ),
|
226 |
+
'deps' => '',
|
227 |
+
'version' => WC_VERSION,
|
228 |
+
'media' => 'all',
|
229 |
+
'has_rtl' => true,
|
230 |
+
),
|
231 |
+
);
|
232 |
+
|
233 |
+
return $woo_styles;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Init Actions.
|
238 |
+
*
|
239 |
+
* @since 1.0.0
|
240 |
+
*/
|
241 |
+
public function init_actions() {
|
242 |
+
|
243 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
244 |
+
|
245 |
+
global $post;
|
246 |
+
|
247 |
+
$GLOBALS['wcf_step'] = wcf_get_step( $post->ID );
|
248 |
+
|
249 |
+
do_action( 'cartflows_wp', $post->ID );
|
250 |
+
|
251 |
+
$this->set_flow_session();
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Set flow session.
|
257 |
+
*
|
258 |
+
* @since 1.0.0
|
259 |
+
*/
|
260 |
+
public function set_flow_session() {
|
261 |
+
|
262 |
+
global $wp;
|
263 |
+
|
264 |
+
add_action( 'wp_head', array( $this, 'noindex_flow' ) );
|
265 |
+
|
266 |
+
wcf()->utils->do_not_cache();
|
267 |
+
|
268 |
+
if ( _is_wcf_thankyou_type() ) {
|
269 |
+
/* Set key to support pixel */
|
270 |
+
if ( isset( $_GET['wcf-key'] ) ) { //phpcs:ignore
|
271 |
+
|
272 |
+
$wcf_key = sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ); //phpcs:ignore
|
273 |
+
|
274 |
+
$_GET['key'] = $wcf_key;
|
275 |
+
$_REQUEST['key'] = $wcf_key;
|
276 |
+
}
|
277 |
+
|
278 |
+
if ( isset( $_GET['wcf-order'] ) ) { //phpcs:ignore
|
279 |
+
|
280 |
+
$wcf_order = intval( wp_unslash( $_GET['wcf-order'] ) ); //phpcs:ignore
|
281 |
+
|
282 |
+
$_GET['order'] = $wcf_order;
|
283 |
+
$_REQUEST['order'] = $wcf_order;
|
284 |
+
$_GET['order-received'] = $wcf_order;
|
285 |
+
$_REQUEST['order-received'] = $wcf_order;
|
286 |
+
|
287 |
+
$wp->set_query_var( 'order-received', $wcf_order );
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Add noindex, nofollow.
|
294 |
+
*
|
295 |
+
* @since 1.0.0
|
296 |
+
*/
|
297 |
+
public function noindex_flow() {
|
298 |
+
|
299 |
+
$common = Cartflows_Helper::get_common_settings();
|
300 |
+
|
301 |
+
if ( 'enable' === $common['disallow_indexing'] ) {
|
302 |
+
echo '<meta name="robots" content="noindex,nofollow">';
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* WP Actions.
|
308 |
+
*
|
309 |
+
* @since 1.0.0
|
310 |
+
*/
|
311 |
+
public function wp_actions() {
|
312 |
+
|
313 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
314 |
+
|
315 |
+
if ( ! wcf()->is_woo_active && wcf()->utils->check_is_woo_required_page() ) {
|
316 |
+
wp_die( ' This page requires WooCommerce plugin installed and activated!', 'WooCommerce Required' );
|
317 |
+
}
|
318 |
+
|
319 |
+
/* CSS Compatibility for All theme */
|
320 |
+
add_filter( 'woocommerce_enqueue_styles', array( $this, 'woo_default_css' ), 9999 );
|
321 |
+
|
322 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'remove_theme_styles' ), 9999 );
|
323 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'global_flow_scripts' ), 20 );
|
324 |
+
|
325 |
+
/* Load woo templates from plugin */
|
326 |
+
add_filter( 'woocommerce_locate_template', array( $this, 'override_woo_template' ), 20, 3 );
|
327 |
+
|
328 |
+
/* Add version class to body in frontend. */
|
329 |
+
add_filter( 'body_class', array( $this, 'add_cartflows_lite_version_to_body' ) );
|
330 |
+
|
331 |
+
/* Custom Script Option */
|
332 |
+
add_action( 'wp_head', array( $this, 'custom_script_option' ) );
|
333 |
+
|
334 |
+
/* Remove the action applied by the Flatsome theme */
|
335 |
+
if ( Cartflows_Compatibility::get_instance()->is_flatsome_enabled() ) {
|
336 |
+
$this->remove_flatsome_action();
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Function for facebook pixel.
|
343 |
+
*/
|
344 |
+
public function facebook_pixel_init() {
|
345 |
+
|
346 |
+
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
347 |
+
if ( 'enable' === $facebook_settings['facebook_pixel_tracking'] ) {
|
348 |
+
|
349 |
+
$facebook_id = $facebook_settings['facebook_pixel_id'];
|
350 |
+
echo '<!-- Facebook Pixel Script By CartFlows -->';
|
351 |
+
$fb_script = "<script type='text/javascript'>
|
352 |
+
!function(f,b,e,v,n,t,s)
|
353 |
+
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
354 |
+
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
355 |
+
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
356 |
+
n.queue=[];t=b.createElement(e);t.async=!0;
|
357 |
+
t.src=v;s=b.getElementsByTagName(e)[0];
|
358 |
+
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
359 |
+
'https://connect.facebook.net/en_US/fbevents.js');
|
360 |
+
</script>
|
361 |
+
<noscript><img height='1' width='1' style='display:none' src='https://www.facebook.com/tr?id=" . $facebook_id . "&ev=PageView&noscript=1'/></noscript>";
|
362 |
+
|
363 |
+
$fb_page_view = "<script type='text/javascript'>
|
364 |
+
fbq('init', $facebook_id);
|
365 |
+
fbq('track', 'PageView', {'plugin': 'CartFlows'});
|
366 |
+
</script>";
|
367 |
+
|
368 |
+
if ( 'enable' === $facebook_settings['facebook_pixel_tracking_for_site'] && ! wcf()->utils->is_step_post_type() ) {
|
369 |
+
echo $fb_script;
|
370 |
+
echo $fb_page_view;
|
371 |
+
} else {
|
372 |
+
echo $fb_script;
|
373 |
+
}
|
374 |
+
echo '<!-- End Facebook Pixel Script By CartFlows -->';
|
375 |
+
}
|
376 |
+
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Debug Data Setting Actions.
|
381 |
+
*
|
382 |
+
* @since 1.1.14
|
383 |
+
*/
|
384 |
+
public function debug_data_setting_actions() {
|
385 |
+
|
386 |
+
add_filter( 'cartflows_load_min_assets', array( $this, 'allow_load_minify' ) );
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Get/Set the allow minify option.
|
391 |
+
*
|
392 |
+
* @since 1.1.14
|
393 |
+
*/
|
394 |
+
public function allow_load_minify() {
|
395 |
+
$debug_data = Cartflows_Helper::get_debug_settings();
|
396 |
+
$allow_minified = $debug_data['allow_minified_files'];
|
397 |
+
$allow_minify = false;
|
398 |
+
|
399 |
+
if ( 'enable' === $allow_minified ) {
|
400 |
+
$allow_minify = true;
|
401 |
+
}
|
402 |
+
|
403 |
+
return $allow_minify;
|
404 |
+
}
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Global flow scripts.
|
408 |
+
*
|
409 |
+
* @since 1.0.0
|
410 |
+
*/
|
411 |
+
public function global_flow_scripts() {
|
412 |
+
|
413 |
+
global $post, $wcf_step;
|
414 |
+
|
415 |
+
$flow = $wcf_step->get_flow_id();
|
416 |
+
$current_step = $wcf_step->get_current_step();
|
417 |
+
$control_step = $wcf_step->get_control_step();
|
418 |
+
$next_step_link = '';
|
419 |
+
$compatibility = Cartflows_Compatibility::get_instance();
|
420 |
+
|
421 |
+
if ( _is_wcf_landing_type() ) {
|
422 |
+
|
423 |
+
$next_step_id = $wcf_step->get_direct_next_step_id();
|
424 |
+
$next_step_link = get_permalink( $next_step_id );
|
425 |
+
}
|
426 |
+
|
427 |
+
$page_template = get_post_meta( $current_step, '_wp_page_template', true );
|
428 |
+
|
429 |
+
$fb_active = Cartflows_Helper::get_facebook_settings();
|
430 |
+
$ga_active = Cartflows_Helper::get_google_analytics_settings();
|
431 |
+
$params = array();
|
432 |
+
$ga_param = array();
|
433 |
+
|
434 |
+
if ( 'enable' === $fb_active['facebook_pixel_tracking'] && Cartflows_Loader::get_instance()->is_woo_active ) {
|
435 |
+
|
436 |
+
$params = Cartflows_Helper::prepare_cart_data_fb_response();
|
437 |
+
}
|
438 |
+
|
439 |
+
if ( 'enable' === $ga_active['enable_google_analytics'] ) {
|
440 |
+
$ga_param = Cartflows_Tracking::get_ga_items_list();
|
441 |
+
}
|
442 |
+
|
443 |
+
$localize = array(
|
444 |
+
'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
|
445 |
+
'is_pb_preview' => $compatibility->is_page_builder_preview(),
|
446 |
+
'current_theme' => $compatibility->get_current_theme(),
|
447 |
+
'current_flow' => $flow,
|
448 |
+
'current_step' => $current_step,
|
449 |
+
'control_step' => $control_step,
|
450 |
+
'next_step' => $next_step_link,
|
451 |
+
'page_template' => $page_template,
|
452 |
+
'is_checkout_page' => _is_wcf_checkout_type(),
|
453 |
+
'params' => $params,
|
454 |
+
'fb_active' => $fb_active,
|
455 |
+
'wcf_ga_active' => $ga_active,
|
456 |
+
'ga_param' => $ga_param,
|
457 |
+
);
|
458 |
+
|
459 |
+
$localize = apply_filters( 'global_cartflows_js_localize', $localize );
|
460 |
+
|
461 |
+
$localize_script = '<!-- script to print the admin localized variables -->';
|
462 |
+
$localize_script .= '<script type="text/javascript">';
|
463 |
+
$localize_script .= 'var cartflows = ' . wp_json_encode( $localize ) . ';';
|
464 |
+
$localize_script .= '</script>';
|
465 |
+
|
466 |
+
echo $localize_script;
|
467 |
+
|
468 |
+
if ( _wcf_supported_template( $page_template ) ) {
|
469 |
+
|
470 |
+
wp_enqueue_style( 'wcf-normalize-frontend-global', wcf()->utils->get_css_url( 'cartflows-normalize' ), array(), CARTFLOWS_VER );
|
471 |
+
}
|
472 |
+
|
473 |
+
wp_enqueue_style( 'wcf-frontend-global', wcf()->utils->get_css_url( 'frontend' ), array(), CARTFLOWS_VER );
|
474 |
+
|
475 |
+
wp_enqueue_script(
|
476 |
+
'wcf-frontend-global',
|
477 |
+
wcf()->utils->get_js_url( 'frontend' ),
|
478 |
+
array( 'jquery', 'jquery-cookie' ),
|
479 |
+
CARTFLOWS_VER,
|
480 |
+
false
|
481 |
+
);
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Custom Script in head.
|
486 |
+
*
|
487 |
+
* @since 1.0.0
|
488 |
+
*/
|
489 |
+
public function custom_script_option() {
|
490 |
+
|
491 |
+
/* Add custom script to header in frontend. */
|
492 |
+
$script = $this->get_custom_script();
|
493 |
+
if ( '' !== $script ) {
|
494 |
+
if ( false === strpos( $script, '<script' ) ) {
|
495 |
+
$script = '<script>' . $script . '</script>';
|
496 |
+
}
|
497 |
+
echo '<!-- Custom CartFlows Script -->';
|
498 |
+
echo $script;
|
499 |
+
echo '<!-- End Custom CartFlows Script -->';
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Override woo templates.
|
505 |
+
*
|
506 |
+
* @param string $template new Template full path.
|
507 |
+
* @param string $template_name Template name.
|
508 |
+
* @param string $template_path Template Path.
|
509 |
+
* @since 1.1.5
|
510 |
+
* @return string.
|
511 |
+
*/
|
512 |
+
public function override_woo_template( $template, $template_name, $template_path ) {
|
513 |
+
|
514 |
+
global $woocommerce;
|
515 |
+
|
516 |
+
$_template = $template;
|
517 |
+
|
518 |
+
$plugin_path = CARTFLOWS_DIR . 'woocommerce/template/';
|
519 |
+
|
520 |
+
if ( file_exists( $plugin_path . $template_name ) ) {
|
521 |
+
$template = $plugin_path . $template_name;
|
522 |
+
}
|
523 |
+
|
524 |
+
if ( ! $template ) {
|
525 |
+
$template = $_template;
|
526 |
+
}
|
527 |
+
|
528 |
+
return $template;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Remove the action applied by the Flatsome theme.
|
533 |
+
*
|
534 |
+
* @since 1.1.5
|
535 |
+
* @return void.
|
536 |
+
*/
|
537 |
+
public function remove_flatsome_action() {
|
538 |
+
|
539 |
+
// Remove action where flatsome dequeued the woocommerce's default styles.
|
540 |
+
remove_action( 'wp_enqueue_scripts', 'flatsome_woocommerce_scripts_styles', 98 );
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Add version class to body in frontend.
|
545 |
+
*
|
546 |
+
* @since 1.1.5
|
547 |
+
* @param array $classes classes.
|
548 |
+
* @return array $classes classes.
|
549 |
+
*/
|
550 |
+
public function add_cartflows_lite_version_to_body( $classes ) {
|
551 |
+
|
552 |
+
$classes[] = 'cartflows-' . CARTFLOWS_VER;
|
553 |
+
|
554 |
+
return $classes;
|
555 |
+
|
556 |
+
}
|
557 |
+
|
558 |
+
/**
|
559 |
+
* Get custom script data.
|
560 |
+
*
|
561 |
+
* @since 1.0.0
|
562 |
+
*/
|
563 |
+
public function get_custom_script() {
|
564 |
+
|
565 |
+
global $post;
|
566 |
+
|
567 |
+
$script = get_post_meta( $post->ID, 'wcf-custom-script', true );
|
568 |
+
|
569 |
+
return $script;
|
570 |
+
}
|
571 |
+
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Set appropriate filter sctions.
|
575 |
+
*
|
576 |
+
* @since 1.1.14
|
577 |
+
*/
|
578 |
+
public function setup_optin_checkout_filter() {
|
579 |
+
|
580 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
581 |
+
/* Modify the optin order received url to go next step */
|
582 |
+
remove_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_to_thankyou_page' ), 10, 2 );
|
583 |
+
add_filter( 'woocommerce_get_checkout_order_received_url', array( $this, 'redirect_optin_to_next_step' ), 10, 2 );
|
584 |
+
}
|
585 |
+
}
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Redirect to thank page if upsell not exists
|
589 |
+
*
|
590 |
+
* @param string $order_recieve_url url.
|
591 |
+
* @param object $order order object.
|
592 |
+
* @since 1.0.0
|
593 |
+
*/
|
594 |
+
public function redirect_optin_to_next_step( $order_recieve_url, $order ) {
|
595 |
+
|
596 |
+
/* Only for optin page */
|
597 |
+
wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ );
|
598 |
+
wcf()->logger->log( 'Only for optin page' );
|
599 |
+
|
600 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
601 |
+
|
602 |
+
$optin_id = wcf()->utils->get_optin_id_from_post_data();
|
603 |
+
|
604 |
+
if ( ! $optin_id ) {
|
605 |
+
$optin_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
606 |
+
}
|
607 |
+
} else {
|
608 |
+
$optin_id = wcf()->utils->get_optin_id_from_order( $order->get_id() );
|
609 |
+
}
|
610 |
+
|
611 |
+
wcf()->logger->log( 'Optin ID : ' . $optin_id );
|
612 |
+
|
613 |
+
if ( $optin_id ) {
|
614 |
+
|
615 |
+
$wcf_step_obj = wcf_get_step( $optin_id );
|
616 |
+
$next_step_id = $wcf_step_obj->get_direct_next_step_id();
|
617 |
+
|
618 |
+
if ( $next_step_id ) {
|
619 |
+
|
620 |
+
$order_recieve_url = get_permalink( $next_step_id );
|
621 |
+
$query_param = array(
|
622 |
+
'wcf-key' => $order->get_order_key(),
|
623 |
+
'wcf-order' => $order->get_id(),
|
624 |
+
);
|
625 |
+
|
626 |
+
if ( 'yes' === wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-pass-fields' ) ) {
|
627 |
+
|
628 |
+
$fields_string = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-pass-specific-fields' );
|
629 |
+
|
630 |
+
$fields = array_map( 'trim', explode( ',', $fields_string ) );
|
631 |
+
|
632 |
+
if ( is_array( $fields ) ) {
|
633 |
+
|
634 |
+
$order_id = $order->get_id();
|
635 |
+
|
636 |
+
foreach ( $fields as $in => $key ) {
|
637 |
+
switch ( $key ) {
|
638 |
+
case 'first_name':
|
639 |
+
$query_param[ $key ] = $order->get_billing_first_name();
|
640 |
+
break;
|
641 |
+
case 'last_name':
|
642 |
+
$query_param[ $key ] = $order->get_billing_last_name();
|
643 |
+
break;
|
644 |
+
case 'email':
|
645 |
+
$query_param[ $key ] = $order->get_billing_email();
|
646 |
+
break;
|
647 |
+
default:
|
648 |
+
$query_param[ $key ] = get_post_meta( $order_id, '_billing_' . $key, true );
|
649 |
+
break;
|
650 |
+
}
|
651 |
+
}
|
652 |
+
}
|
653 |
+
}
|
654 |
+
|
655 |
+
$order_recieve_url = add_query_arg(
|
656 |
+
$query_param,
|
657 |
+
$order_recieve_url
|
658 |
+
);
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ );
|
663 |
+
|
664 |
+
return $order_recieve_url;
|
665 |
+
}
|
666 |
+
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Prepare if class 'Cartflows_Frontend' exist.
|
670 |
+
* Kicking this off by calling 'get_instance()' method
|
671 |
+
*/
|
672 |
+
Cartflows_Frontend::get_instance();
|
classes/class-cartflows-functions.php
CHANGED
@@ -1,539 +1,555 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows Functions.
|
4 |
-
*
|
5 |
-
* @package CARTFLOWS
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Fatal error mb_strpos fallback.
|
14 |
-
*
|
15 |
-
* @param string $string string where to find.
|
16 |
-
* @param string $search string to search.
|
17 |
-
* @since 1.0.0
|
18 |
-
*/
|
19 |
-
function wcf_mb_strpos( $string, $search ) {
|
20 |
-
|
21 |
-
if ( function_exists( 'mb_strpos' ) ) {
|
22 |
-
return mb_strpos( $string, $search, 0, 'utf-8' );
|
23 |
-
} else {
|
24 |
-
return strpos( $string, $search );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Check if cartflows pro activated.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
function _is_cartflows_pro() {
|
34 |
-
|
35 |
-
if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
|
36 |
-
return true;
|
37 |
-
}
|
38 |
-
|
39 |
-
return false;
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Returns pro version number.
|
45 |
-
*
|
46 |
-
* @param int $version version number.
|
47 |
-
* @since 1.0.0
|
48 |
-
*/
|
49 |
-
function _is_cartflows_pro_ver_less_than( $version ) {
|
50 |
-
|
51 |
-
if ( defined( 'CARTFLOWS_PRO_VER' ) && version_compare( CARTFLOWS_PRO_VER, $version, '<' ) ) {
|
52 |
-
return true;
|
53 |
-
}
|
54 |
-
|
55 |
-
return false;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Returns step id.
|
60 |
-
*
|
61 |
-
* @since 1.0.0
|
62 |
-
*/
|
63 |
-
function _get_wcf_post_id() {
|
64 |
-
|
65 |
-
global $post;
|
66 |
-
|
67 |
-
if ( isset( $post->ID ) ) {
|
68 |
-
return $post->ID;
|
69 |
-
}
|
70 |
-
|
71 |
-
return 0;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Returns step id.
|
76 |
-
*
|
77 |
-
* @since 1.0.0
|
78 |
-
*/
|
79 |
-
function _get_wcf_step_id() {
|
80 |
-
|
81 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
82 |
-
|
83 |
-
global $post;
|
84 |
-
|
85 |
-
return $post->ID;
|
86 |
-
}
|
87 |
-
|
88 |
-
return false;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Check if it is a landing page?
|
93 |
-
*
|
94 |
-
* @since 1.0.0
|
95 |
-
*/
|
96 |
-
function _is_wcf_landing_type() {
|
97 |
-
|
98 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
99 |
-
|
100 |
-
global $post;
|
101 |
-
|
102 |
-
if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
103 |
-
|
104 |
-
return true;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
return false;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Returns landing id.
|
113 |
-
*
|
114 |
-
* @since 1.0.0
|
115 |
-
*/
|
116 |
-
function _get_wcf_landing_id() {
|
117 |
-
|
118 |
-
if ( _is_wcf_landing_type() ) {
|
119 |
-
|
120 |
-
global $post;
|
121 |
-
|
122 |
-
return $post->ID;
|
123 |
-
}
|
124 |
-
|
125 |
-
return false;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Is custom checkout?
|
130 |
-
*
|
131 |
-
* @param int $checkout_id checkout ID.
|
132 |
-
* @since 1.0.0
|
133 |
-
*/
|
134 |
-
function _is_wcf_meta_custom_checkout( $checkout_id ) {
|
135 |
-
|
136 |
-
$is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
|
137 |
-
|
138 |
-
if ( 'yes' === $is_custom ) {
|
139 |
-
|
140 |
-
return true;
|
141 |
-
}
|
142 |
-
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Check if page is cartflow checkout.
|
148 |
-
*
|
149 |
-
* @since 1.0.0
|
150 |
-
* @return bool
|
151 |
-
*/
|
152 |
-
function _is_wcf_checkout_type() {
|
153 |
-
|
154 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
155 |
-
|
156 |
-
global $post;
|
157 |
-
|
158 |
-
if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
159 |
-
|
160 |
-
return true;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
return false;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Check if AJAX call is in progress.
|
169 |
-
*
|
170 |
-
* @since 1.0.0
|
171 |
-
* @return bool
|
172 |
-
*/
|
173 |
-
function _is_wcf_doing_checkout_ajax() {
|
174 |
-
|
175 |
-
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
176 |
-
|
177 |
-
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
178 |
-
isset( $_POST['_wcf_checkout_id'] ) //phpcs:ignore
|
179 |
-
) {
|
180 |
-
return true;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
return false;
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Check if optin AJAX call is in progress.
|
189 |
-
*
|
190 |
-
* @since 1.0.0
|
191 |
-
* @return bool
|
192 |
-
*/
|
193 |
-
function _is_wcf_doing_optin_ajax() {
|
194 |
-
|
195 |
-
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
196 |
-
|
197 |
-
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
198 |
-
isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
|
199 |
-
) {
|
200 |
-
return true;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
return false;
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Returns checkout ID.
|
209 |
-
*
|
210 |
-
* @since 1.0.0
|
211 |
-
* @return int/bool
|
212 |
-
*/
|
213 |
-
function _get_wcf_checkout_id() {
|
214 |
-
|
215 |
-
if ( _is_wcf_checkout_type() ) {
|
216 |
-
|
217 |
-
global $post;
|
218 |
-
|
219 |
-
return $post->ID;
|
220 |
-
}
|
221 |
-
|
222 |
-
return false;
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Check if it is checkout shortcode.
|
227 |
-
*
|
228 |
-
* @since 1.0.0
|
229 |
-
* @return bool
|
230 |
-
*/
|
231 |
-
function _is_wcf_checkout_shortcode() {
|
232 |
-
|
233 |
-
global $post;
|
234 |
-
|
235 |
-
if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
|
236 |
-
|
237 |
-
return true;
|
238 |
-
}
|
239 |
-
|
240 |
-
return false;
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Check if it is checkout shortcode.
|
245 |
-
*
|
246 |
-
* @since 1.0.0
|
247 |
-
* @param string $content shortcode content.
|
248 |
-
* @return bool
|
249 |
-
*/
|
250 |
-
function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
|
251 |
-
|
252 |
-
$checkout_id = 0;
|
253 |
-
|
254 |
-
if ( ! empty( $content ) ) {
|
255 |
-
|
256 |
-
$regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
|
257 |
-
|
258 |
-
preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
|
259 |
-
|
260 |
-
if ( ! empty( $regex_matches ) ) {
|
261 |
-
|
262 |
-
if ( 'cartflows_checkout' == $regex_matches[2] ) {
|
263 |
-
|
264 |
-
$attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
|
265 |
-
$attribure_str = str_replace( '"', '', $attribure_str );
|
266 |
-
|
267 |
-
$attributes = wp_parse_args( $attribure_str );
|
268 |
-
|
269 |
-
if ( isset( $attributes['id'] ) ) {
|
270 |
-
$checkout_id = $attributes['id'];
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
return $checkout_id;
|
277 |
-
}
|
278 |
-
|
279 |
-
/**
|
280 |
-
* Check if post type is upsell.
|
281 |
-
*
|
282 |
-
* @since 1.0.0
|
283 |
-
* @return bool
|
284 |
-
*/
|
285 |
-
function _is_wcf_upsell_type() {
|
286 |
-
|
287 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
288 |
-
|
289 |
-
global $post;
|
290 |
-
|
291 |
-
if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
292 |
-
|
293 |
-
return true;
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
return false;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Returns upsell ID.
|
302 |
-
*
|
303 |
-
* @since 1.0.0
|
304 |
-
* @return int/bool
|
305 |
-
*/
|
306 |
-
function _get_wcf_upsell_id() {
|
307 |
-
|
308 |
-
if ( _is_wcf_upsell_type() ) {
|
309 |
-
|
310 |
-
global $post;
|
311 |
-
|
312 |
-
return $post->ID;
|
313 |
-
}
|
314 |
-
|
315 |
-
return false;
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Check if post is of type downsell.
|
320 |
-
*
|
321 |
-
* @since 1.0.0
|
322 |
-
* @return int/bool
|
323 |
-
*/
|
324 |
-
function _is_wcf_downsell_type() {
|
325 |
-
|
326 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
327 |
-
|
328 |
-
global $post;
|
329 |
-
|
330 |
-
if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
331 |
-
|
332 |
-
return true;
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
return false;
|
337 |
-
}
|
338 |
-
|
339 |
-
/**
|
340 |
-
* Get downsell page ID.
|
341 |
-
*
|
342 |
-
* @since 1.0.0
|
343 |
-
* @return int/bool
|
344 |
-
*/
|
345 |
-
function _get_wcf_downsell_id() {
|
346 |
-
|
347 |
-
if ( _is_wcf_downsell_type() ) {
|
348 |
-
|
349 |
-
global $post;
|
350 |
-
|
351 |
-
return $post->ID;
|
352 |
-
}
|
353 |
-
|
354 |
-
return false;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Check if page is of thank you type.
|
359 |
-
*
|
360 |
-
* @since 1.0.0
|
361 |
-
* @return int/bool
|
362 |
-
*/
|
363 |
-
function _is_wcf_thankyou_type() {
|
364 |
-
|
365 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
366 |
-
|
367 |
-
global $post;
|
368 |
-
|
369 |
-
if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
370 |
-
|
371 |
-
return true;
|
372 |
-
}
|
373 |
-
}
|
374 |
-
|
375 |
-
return false;
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Get thank you page ID.
|
380 |
-
*
|
381 |
-
* @since 1.0.0
|
382 |
-
* @return int/bool
|
383 |
-
*/
|
384 |
-
function _get_wcf_thankyou_id() {
|
385 |
-
|
386 |
-
if ( _is_wcf_thankyou_type() ) {
|
387 |
-
|
388 |
-
global $post;
|
389 |
-
|
390 |
-
return $post->ID;
|
391 |
-
}
|
392 |
-
|
393 |
-
return false;
|
394 |
-
}
|
395 |
-
|
396 |
-
|
397 |
-
/**
|
398 |
-
* Check if post type is upsell.
|
399 |
-
*
|
400 |
-
* @since 1.0.0
|
401 |
-
* @return bool
|
402 |
-
*/
|
403 |
-
function _is_wcf_base_offer_type() {
|
404 |
-
|
405 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
406 |
-
|
407 |
-
global $post;
|
408 |
-
|
409 |
-
$step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
|
410 |
-
|
411 |
-
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
412 |
-
|
413 |
-
return true;
|
414 |
-
}
|
415 |
-
}
|
416 |
-
|
417 |
-
return false;
|
418 |
-
}
|
419 |
-
|
420 |
-
/**
|
421 |
-
* Returns upsell ID.
|
422 |
-
*
|
423 |
-
* @since 1.0.0
|
424 |
-
* @return int/bool
|
425 |
-
*/
|
426 |
-
function _get_wcf_base_offer_id() {
|
427 |
-
|
428 |
-
if ( _is_wcf_base_offer_type() ) {
|
429 |
-
|
430 |
-
global $post;
|
431 |
-
|
432 |
-
return $post->ID;
|
433 |
-
}
|
434 |
-
|
435 |
-
return false;
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
* Check if page is of optin type.
|
440 |
-
*
|
441 |
-
* @since 1.0.0
|
442 |
-
* @return int/bool
|
443 |
-
*/
|
444 |
-
function _is_wcf_optin_type() {
|
445 |
-
|
446 |
-
if ( wcf()->utils->is_step_post_type() ) {
|
447 |
-
|
448 |
-
global $post;
|
449 |
-
|
450 |
-
if ( 'optin' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
451 |
-
|
452 |
-
return true;
|
453 |
-
}
|
454 |
-
}
|
455 |
-
|
456 |
-
return false;
|
457 |
-
}
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Get optin page ID.
|
461 |
-
*
|
462 |
-
* @since 1.0.0
|
463 |
-
* @return int/bool
|
464 |
-
*/
|
465 |
-
function _get_wcf_optin_id() {
|
466 |
-
|
467 |
-
if ( _is_wcf_optin_type() ) {
|
468 |
-
|
469 |
-
global $post;
|
470 |
-
|
471 |
-
return $post->ID;
|
472 |
-
}
|
473 |
-
|
474 |
-
return false;
|
475 |
-
}
|
476 |
-
|
477 |
-
/**
|
478 |
-
* Define a constant if it is not already defined.
|
479 |
-
*
|
480 |
-
* @since 3.0.0
|
481 |
-
* @param string $name Constant name.
|
482 |
-
* @param mixed $value Value.
|
483 |
-
*/
|
484 |
-
function wcf_maybe_define_constant( $name, $value ) {
|
485 |
-
if ( ! defined( $name ) ) {
|
486 |
-
define( $name, $value );
|
487 |
-
}
|
488 |
-
}
|
489 |
-
|
490 |
-
|
491 |
-
if ( ! function_exists( 'wp_body_open' ) ) {
|
492 |
-
/**
|
493 |
-
* Fire the wp_body_open action.
|
494 |
-
*
|
495 |
-
* Added for backwards compatibility to support WordPress versions prior to 5.2.0.
|
496 |
-
*/
|
497 |
-
function wp_body_open() {
|
498 |
-
/**
|
499 |
-
* Triggered after the opening <body> tag.
|
500 |
-
*/
|
501 |
-
do_action( 'wp_body_open' );
|
502 |
-
}
|
503 |
-
}
|
504 |
-
|
505 |
-
/**
|
506 |
-
* Check if type is optin by id.
|
507 |
-
*
|
508 |
-
* @param int $post_id post id.
|
509 |
-
*
|
510 |
-
* @return int/bool
|
511 |
-
* @since 1.0.0
|
512 |
-
*/
|
513 |
-
function _wcf_check_is_optin_by_id( $post_id ) {
|
514 |
-
|
515 |
-
if ( 'optin' === get_post_meta( $post_id, 'wcf-step-type', true ) ) {
|
516 |
-
|
517 |
-
return true;
|
518 |
-
}
|
519 |
-
|
520 |
-
return false;
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Supported Page Template
|
525 |
-
*
|
526 |
-
* @param string $page_template current page template.
|
527 |
-
*
|
528 |
-
* @return int/bool
|
529 |
-
* @since 1.5.7
|
530 |
-
*/
|
531 |
-
function _wcf_supported_template( $page_template ) {
|
532 |
-
|
533 |
-
if ( in_array( $page_template, array( 'cartflows-default', 'cartflows-canvas' ), true ) ) {
|
534 |
-
|
535 |
-
return true;
|
536 |
-
}
|
537 |
-
|
538 |
-
return false;
|
539 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Functions.
|
4 |
+
*
|
5 |
+
* @package CARTFLOWS
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Fatal error mb_strpos fallback.
|
14 |
+
*
|
15 |
+
* @param string $string string where to find.
|
16 |
+
* @param string $search string to search.
|
17 |
+
* @since 1.0.0
|
18 |
+
*/
|
19 |
+
function wcf_mb_strpos( $string, $search ) {
|
20 |
+
|
21 |
+
if ( function_exists( 'mb_strpos' ) ) {
|
22 |
+
return mb_strpos( $string, $search, 0, 'utf-8' );
|
23 |
+
} else {
|
24 |
+
return strpos( $string, $search );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Check if cartflows pro activated.
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
function _is_cartflows_pro() {
|
34 |
+
|
35 |
+
if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
|
39 |
+
return false;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Returns pro version number.
|
45 |
+
*
|
46 |
+
* @param int $version version number.
|
47 |
+
* @since 1.0.0
|
48 |
+
*/
|
49 |
+
function _is_cartflows_pro_ver_less_than( $version ) {
|
50 |
+
|
51 |
+
if ( defined( 'CARTFLOWS_PRO_VER' ) && version_compare( CARTFLOWS_PRO_VER, $version, '<' ) ) {
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Returns step id.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
*/
|
63 |
+
function _get_wcf_post_id() {
|
64 |
+
|
65 |
+
global $post;
|
66 |
+
|
67 |
+
if ( isset( $post->ID ) ) {
|
68 |
+
return $post->ID;
|
69 |
+
}
|
70 |
+
|
71 |
+
return 0;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Returns step id.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*/
|
79 |
+
function _get_wcf_step_id() {
|
80 |
+
|
81 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
82 |
+
|
83 |
+
global $post;
|
84 |
+
|
85 |
+
return $post->ID;
|
86 |
+
}
|
87 |
+
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Check if it is a landing page?
|
93 |
+
*
|
94 |
+
* @since 1.0.0
|
95 |
+
*/
|
96 |
+
function _is_wcf_landing_type() {
|
97 |
+
|
98 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
99 |
+
|
100 |
+
global $post;
|
101 |
+
|
102 |
+
if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
103 |
+
|
104 |
+
return true;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Returns landing id.
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
*/
|
116 |
+
function _get_wcf_landing_id() {
|
117 |
+
|
118 |
+
if ( _is_wcf_landing_type() ) {
|
119 |
+
|
120 |
+
global $post;
|
121 |
+
|
122 |
+
return $post->ID;
|
123 |
+
}
|
124 |
+
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Is custom checkout?
|
130 |
+
*
|
131 |
+
* @param int $checkout_id checkout ID.
|
132 |
+
* @since 1.0.0
|
133 |
+
*/
|
134 |
+
function _is_wcf_meta_custom_checkout( $checkout_id ) {
|
135 |
+
|
136 |
+
$is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
|
137 |
+
|
138 |
+
if ( 'yes' === $is_custom ) {
|
139 |
+
|
140 |
+
return true;
|
141 |
+
}
|
142 |
+
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Check if page is cartflow checkout.
|
148 |
+
*
|
149 |
+
* @since 1.0.0
|
150 |
+
* @return bool
|
151 |
+
*/
|
152 |
+
function _is_wcf_checkout_type() {
|
153 |
+
|
154 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
155 |
+
|
156 |
+
global $post;
|
157 |
+
|
158 |
+
if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
159 |
+
|
160 |
+
return true;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if AJAX call is in progress.
|
169 |
+
*
|
170 |
+
* @since 1.0.0
|
171 |
+
* @return bool
|
172 |
+
*/
|
173 |
+
function _is_wcf_doing_checkout_ajax() {
|
174 |
+
|
175 |
+
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
176 |
+
|
177 |
+
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
178 |
+
isset( $_POST['_wcf_checkout_id'] ) //phpcs:ignore
|
179 |
+
) {
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Check if optin AJAX call is in progress.
|
189 |
+
*
|
190 |
+
* @since 1.0.0
|
191 |
+
* @return bool
|
192 |
+
*/
|
193 |
+
function _is_wcf_doing_optin_ajax() {
|
194 |
+
|
195 |
+
if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
|
196 |
+
|
197 |
+
if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
|
198 |
+
isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
|
199 |
+
) {
|
200 |
+
return true;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Returns checkout ID.
|
209 |
+
*
|
210 |
+
* @since 1.0.0
|
211 |
+
* @return int/bool
|
212 |
+
*/
|
213 |
+
function _get_wcf_checkout_id() {
|
214 |
+
|
215 |
+
if ( _is_wcf_checkout_type() ) {
|
216 |
+
|
217 |
+
global $post;
|
218 |
+
|
219 |
+
return $post->ID;
|
220 |
+
}
|
221 |
+
|
222 |
+
return false;
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Check if it is checkout shortcode.
|
227 |
+
*
|
228 |
+
* @since 1.0.0
|
229 |
+
* @return bool
|
230 |
+
*/
|
231 |
+
function _is_wcf_checkout_shortcode() {
|
232 |
+
|
233 |
+
global $post;
|
234 |
+
|
235 |
+
if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
|
236 |
+
|
237 |
+
return true;
|
238 |
+
}
|
239 |
+
|
240 |
+
return false;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Check if it is checkout shortcode.
|
245 |
+
*
|
246 |
+
* @since 1.0.0
|
247 |
+
* @param string $content shortcode content.
|
248 |
+
* @return bool
|
249 |
+
*/
|
250 |
+
function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
|
251 |
+
|
252 |
+
$checkout_id = 0;
|
253 |
+
|
254 |
+
if ( ! empty( $content ) ) {
|
255 |
+
|
256 |
+
$regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
|
257 |
+
|
258 |
+
preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
|
259 |
+
|
260 |
+
if ( ! empty( $regex_matches ) ) {
|
261 |
+
|
262 |
+
if ( 'cartflows_checkout' == $regex_matches[2] ) {
|
263 |
+
|
264 |
+
$attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
|
265 |
+
$attribure_str = str_replace( '"', '', $attribure_str );
|
266 |
+
|
267 |
+
$attributes = wp_parse_args( $attribure_str );
|
268 |
+
|
269 |
+
if ( isset( $attributes['id'] ) ) {
|
270 |
+
$checkout_id = $attributes['id'];
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
return $checkout_id;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Check if post type is upsell.
|
281 |
+
*
|
282 |
+
* @since 1.0.0
|
283 |
+
* @return bool
|
284 |
+
*/
|
285 |
+
function _is_wcf_upsell_type() {
|
286 |
+
|
287 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
288 |
+
|
289 |
+
global $post;
|
290 |
+
|
291 |
+
if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
292 |
+
|
293 |
+
return true;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
return false;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Returns upsell ID.
|
302 |
+
*
|
303 |
+
* @since 1.0.0
|
304 |
+
* @return int/bool
|
305 |
+
*/
|
306 |
+
function _get_wcf_upsell_id() {
|
307 |
+
|
308 |
+
if ( _is_wcf_upsell_type() ) {
|
309 |
+
|
310 |
+
global $post;
|
311 |
+
|
312 |
+
return $post->ID;
|
313 |
+
}
|
314 |
+
|
315 |
+
return false;
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Check if post is of type downsell.
|
320 |
+
*
|
321 |
+
* @since 1.0.0
|
322 |
+
* @return int/bool
|
323 |
+
*/
|
324 |
+
function _is_wcf_downsell_type() {
|
325 |
+
|
326 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
327 |
+
|
328 |
+
global $post;
|
329 |
+
|
330 |
+
if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
331 |
+
|
332 |
+
return true;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Get downsell page ID.
|
341 |
+
*
|
342 |
+
* @since 1.0.0
|
343 |
+
* @return int/bool
|
344 |
+
*/
|
345 |
+
function _get_wcf_downsell_id() {
|
346 |
+
|
347 |
+
if ( _is_wcf_downsell_type() ) {
|
348 |
+
|
349 |
+
global $post;
|
350 |
+
|
351 |
+
return $post->ID;
|
352 |
+
}
|
353 |
+
|
354 |
+
return false;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Check if page is of thank you type.
|
359 |
+
*
|
360 |
+
* @since 1.0.0
|
361 |
+
* @return int/bool
|
362 |
+
*/
|
363 |
+
function _is_wcf_thankyou_type() {
|
364 |
+
|
365 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
366 |
+
|
367 |
+
global $post;
|
368 |
+
|
369 |
+
if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
370 |
+
|
371 |
+
return true;
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
return false;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Get thank you page ID.
|
380 |
+
*
|
381 |
+
* @since 1.0.0
|
382 |
+
* @return int/bool
|
383 |
+
*/
|
384 |
+
function _get_wcf_thankyou_id() {
|
385 |
+
|
386 |
+
if ( _is_wcf_thankyou_type() ) {
|
387 |
+
|
388 |
+
global $post;
|
389 |
+
|
390 |
+
return $post->ID;
|
391 |
+
}
|
392 |
+
|
393 |
+
return false;
|
394 |
+
}
|
395 |
+
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Check if post type is upsell.
|
399 |
+
*
|
400 |
+
* @since 1.0.0
|
401 |
+
* @return bool
|
402 |
+
*/
|
403 |
+
function _is_wcf_base_offer_type() {
|
404 |
+
|
405 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
406 |
+
|
407 |
+
global $post;
|
408 |
+
|
409 |
+
$step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
|
410 |
+
|
411 |
+
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
412 |
+
|
413 |
+
return true;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
|
417 |
+
return false;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Returns upsell ID.
|
422 |
+
*
|
423 |
+
* @since 1.0.0
|
424 |
+
* @return int/bool
|
425 |
+
*/
|
426 |
+
function _get_wcf_base_offer_id() {
|
427 |
+
|
428 |
+
if ( _is_wcf_base_offer_type() ) {
|
429 |
+
|
430 |
+
global $post;
|
431 |
+
|
432 |
+
return $post->ID;
|
433 |
+
}
|
434 |
+
|
435 |
+
return false;
|
436 |
+
}
|
437 |
+
|
438 |
+
/**
|
439 |
+
* Check if page is of optin type.
|
440 |
+
*
|
441 |
+
* @since 1.0.0
|
442 |
+
* @return int/bool
|
443 |
+
*/
|
444 |
+
function _is_wcf_optin_type() {
|
445 |
+
|
446 |
+
if ( wcf()->utils->is_step_post_type() ) {
|
447 |
+
|
448 |
+
global $post;
|
449 |
+
|
450 |
+
if ( 'optin' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
|
451 |
+
|
452 |
+
return true;
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
return false;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Get optin page ID.
|
461 |
+
*
|
462 |
+
* @since 1.0.0
|
463 |
+
* @return int/bool
|
464 |
+
*/
|
465 |
+
function _get_wcf_optin_id() {
|
466 |
+
|
467 |
+
if ( _is_wcf_optin_type() ) {
|
468 |
+
|
469 |
+
global $post;
|
470 |
+
|
471 |
+
return $post->ID;
|
472 |
+
}
|
473 |
+
|
474 |
+
return false;
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Define a constant if it is not already defined.
|
479 |
+
*
|
480 |
+
* @since 3.0.0
|
481 |
+
* @param string $name Constant name.
|
482 |
+
* @param mixed $value Value.
|
483 |
+
*/
|
484 |
+
function wcf_maybe_define_constant( $name, $value ) {
|
485 |
+
if ( ! defined( $name ) ) {
|
486 |
+
define( $name, $value );
|
487 |
+
}
|
488 |
+
}
|
489 |
+
|
490 |
+
|
491 |
+
if ( ! function_exists( 'wp_body_open' ) ) {
|
492 |
+
/**
|
493 |
+
* Fire the wp_body_open action.
|
494 |
+
*
|
495 |
+
* Added for backwards compatibility to support WordPress versions prior to 5.2.0.
|
496 |
+
*/
|
497 |
+
function wp_body_open() {
|
498 |
+
/**
|
499 |
+
* Triggered after the opening <body> tag.
|
500 |
+
*/
|
501 |
+
do_action( 'wp_body_open' );
|
502 |
+
}
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Check if type is optin by id.
|
507 |
+
*
|
508 |
+
* @param int $post_id post id.
|
509 |
+
*
|
510 |
+
* @return int/bool
|
511 |
+
* @since 1.0.0
|
512 |
+
*/
|
513 |
+
function _wcf_check_is_optin_by_id( $post_id ) {
|
514 |
+
|
515 |
+
if ( 'optin' === get_post_meta( $post_id, 'wcf-step-type', true ) ) {
|
516 |
+
|
517 |
+
return true;
|
518 |
+
}
|
519 |
+
|
520 |
+
return false;
|
521 |
+
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Supported Page Template
|
525 |
+
*
|
526 |
+
* @param string $page_template current page template.
|
527 |
+
*
|
528 |
+
* @return int/bool
|
529 |
+
* @since 1.5.7
|
530 |
+
*/
|
531 |
+
function _wcf_supported_template( $page_template ) {
|
532 |
+
|
533 |
+
if ( in_array( $page_template, array( 'cartflows-default', 'cartflows-canvas' ), true ) ) {
|
534 |
+
|
535 |
+
return true;
|
536 |
+
}
|
537 |
+
|
538 |
+
return false;
|
539 |
+
}
|
540 |
+
|
541 |
+
/**
|
542 |
+
* Get get step object.
|
543 |
+
*
|
544 |
+
* @param int $step_id current step ID.
|
545 |
+
* @since 1.5.9
|
546 |
+
*/
|
547 |
+
function wcf_get_step( $step_id ) {
|
548 |
+
|
549 |
+
if ( ! isset( wcf()->wcf_step_objs[ $step_id ] ) ) {
|
550 |
+
|
551 |
+
wcf()->wcf_step_objs[ $step_id ] = new Cartflows_Step_Factory( $step_id );
|
552 |
+
}
|
553 |
+
|
554 |
+
return wcf()->wcf_step_objs[ $step_id ];
|
555 |
+
}
|
classes/class-cartflows-loader.php
CHANGED
@@ -1,583 +1,599 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CartFlows Loader.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class Cartflows_Loader.
|
12 |
-
*/
|
13 |
-
final class Cartflows_Loader {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Member Variable
|
17 |
-
*
|
18 |
-
* @var instance
|
19 |
-
*/
|
20 |
-
private static $instance = null;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Member Variable
|
24 |
-
*
|
25 |
-
* @var utils
|
26 |
-
*/
|
27 |
-
public $utils = null;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Member Variable
|
31 |
-
*
|
32 |
-
* @var logger
|
33 |
-
*/
|
34 |
-
public $logger = null;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Member Variable
|
38 |
-
*
|
39 |
-
* @var options
|
40 |
-
*/
|
41 |
-
public $options = null;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Member Variable
|
45 |
-
*
|
46 |
-
* @var meta
|
47 |
-
*/
|
48 |
-
public $meta = null;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Member Variable
|
52 |
-
*
|
53 |
-
* @var Tracking_Data
|
54 |
-
*/
|
55 |
-
public $alldata;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Member Variable
|
59 |
-
*
|
60 |
-
* @var flow
|
61 |
-
*/
|
62 |
-
public $flow = null;
|
63 |
-
|
64 |
-
/**
|
65 |
-
*
|
66 |
-
*
|
67 |
-
*
|
68 |
-
*/
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
*
|
74 |
-
*
|
75 |
-
|
76 |
-
|
77 |
-
public $
|
78 |
-
|
79 |
-
/**
|
80 |
-
*
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
define( '
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
define( '
|
139 |
-
|
140 |
-
define( '
|
141 |
-
define( '
|
142 |
-
|
143 |
-
if ( ! defined( '
|
144 |
-
define( '
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
$
|
274 |
-
|
275 |
-
$
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
$this->
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
*
|
293 |
-
*
|
294 |
-
* @
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
/*
|
315 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-
|
316 |
-
|
317 |
-
/*
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
include_once CARTFLOWS_DIR . 'classes/
|
324 |
-
include_once CARTFLOWS_DIR . 'classes/
|
325 |
-
include_once CARTFLOWS_DIR . 'classes/
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
include_once CARTFLOWS_DIR . '
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
include_once CARTFLOWS_DIR . 'classes/class-cartflows-
|
346 |
-
|
347 |
-
|
348 |
-
include_once CARTFLOWS_DIR . 'classes/
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
include_once CARTFLOWS_DIR . '
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
/**
|
435 |
-
*
|
436 |
-
*
|
437 |
-
* @
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
$
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
}
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
$
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
$
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
}
|
565 |
-
|
566 |
-
|
567 |
-
if
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Loader.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! class_exists( 'Cartflows_Loader' ) ) {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Cartflows_Loader.
|
12 |
+
*/
|
13 |
+
final class Cartflows_Loader {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Member Variable
|
17 |
+
*
|
18 |
+
* @var instance
|
19 |
+
*/
|
20 |
+
private static $instance = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Member Variable
|
24 |
+
*
|
25 |
+
* @var utils
|
26 |
+
*/
|
27 |
+
public $utils = null;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Member Variable
|
31 |
+
*
|
32 |
+
* @var logger
|
33 |
+
*/
|
34 |
+
public $logger = null;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Member Variable
|
38 |
+
*
|
39 |
+
* @var options
|
40 |
+
*/
|
41 |
+
public $options = null;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Member Variable
|
45 |
+
*
|
46 |
+
* @var meta
|
47 |
+
*/
|
48 |
+
public $meta = null;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Member Variable
|
52 |
+
*
|
53 |
+
* @var Tracking_Data
|
54 |
+
*/
|
55 |
+
public $alldata;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Member Variable
|
59 |
+
*
|
60 |
+
* @var flow
|
61 |
+
*/
|
62 |
+
public $flow = null;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Member Variable
|
66 |
+
*
|
67 |
+
* @var wcf_step_objs
|
68 |
+
*/
|
69 |
+
|
70 |
+
public $wcf_step_objs = array();
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Member Variable
|
74 |
+
*
|
75 |
+
* @var assets_vars
|
76 |
+
*/
|
77 |
+
public $assets_vars = null;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Member Variable
|
81 |
+
*
|
82 |
+
* @var assets_vars
|
83 |
+
*/
|
84 |
+
|
85 |
+
public $is_woo_active = true;
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Initiator
|
89 |
+
*/
|
90 |
+
public static function get_instance() {
|
91 |
+
|
92 |
+
if ( is_null( self::$instance ) ) {
|
93 |
+
|
94 |
+
self::$instance = new self();
|
95 |
+
|
96 |
+
/**
|
97 |
+
* CartFlows loaded.
|
98 |
+
*
|
99 |
+
* Fires when Cartflows was fully loaded and instantiated.
|
100 |
+
*
|
101 |
+
* @since 1.0.0
|
102 |
+
*/
|
103 |
+
do_action( 'cartflows_loaded' );
|
104 |
+
}
|
105 |
+
|
106 |
+
return self::$instance;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Constructor
|
111 |
+
*/
|
112 |
+
public function __construct() {
|
113 |
+
|
114 |
+
$this->define_constants();
|
115 |
+
|
116 |
+
// Activation hook.
|
117 |
+
register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
|
118 |
+
|
119 |
+
// deActivation hook.
|
120 |
+
register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
|
121 |
+
|
122 |
+
add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
|
123 |
+
add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Defines all constants
|
128 |
+
*
|
129 |
+
* @since 1.0.0
|
130 |
+
*/
|
131 |
+
public function define_constants() {
|
132 |
+
|
133 |
+
define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
|
134 |
+
define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
|
135 |
+
define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
|
136 |
+
define( 'CARTFLOWS_VER', '1.5.15' );
|
137 |
+
define( 'CARTFLOWS_SLUG', 'cartflows' );
|
138 |
+
define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
|
139 |
+
|
140 |
+
define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
|
141 |
+
define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
|
142 |
+
|
143 |
+
if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
|
144 |
+
define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
|
145 |
+
}
|
146 |
+
define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
|
147 |
+
define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
|
148 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
|
149 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
|
150 |
+
|
151 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
|
152 |
+
define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
|
153 |
+
}
|
154 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
|
155 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
|
156 |
+
}
|
157 |
+
if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
|
158 |
+
define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
162 |
+
|
163 |
+
$upload_dir = wp_upload_dir( null, false );
|
164 |
+
|
165 |
+
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
166 |
+
}
|
167 |
+
|
168 |
+
$GLOBALS['wcf_step'] = null;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Loads plugin files.
|
173 |
+
*
|
174 |
+
* @since 1.0.0
|
175 |
+
*
|
176 |
+
* @return void
|
177 |
+
*/
|
178 |
+
public function load_plugin() {
|
179 |
+
|
180 |
+
$this->load_helper_files_components();
|
181 |
+
$this->load_core_files();
|
182 |
+
$this->load_core_components();
|
183 |
+
|
184 |
+
add_action( 'wp_loaded', array( $this, 'initialize' ) );
|
185 |
+
add_action( 'cartflows_pro_init', array( $this, 'after_cartflows_pro_init' ) );
|
186 |
+
|
187 |
+
if ( ! $this->is_woo_active ) {
|
188 |
+
add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* CartFlows Init.
|
193 |
+
*
|
194 |
+
* Fires when Cartflows is instantiated.
|
195 |
+
*
|
196 |
+
* @since 1.0.0
|
197 |
+
*/
|
198 |
+
do_action( 'cartflows_init' );
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* After CartFlows Pro init.
|
203 |
+
*
|
204 |
+
* @since 1.1.19
|
205 |
+
*
|
206 |
+
* @return void
|
207 |
+
*/
|
208 |
+
public function after_cartflows_pro_init() {
|
209 |
+
|
210 |
+
if ( ! is_admin() ) {
|
211 |
+
return;
|
212 |
+
}
|
213 |
+
|
214 |
+
if ( version_compare( CARTFLOWS_PRO_VER, '1.5.8', '<' ) ) {
|
215 |
+
add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Required CartFlows Pro Notice.
|
221 |
+
*
|
222 |
+
* @since 1.1.19
|
223 |
+
*
|
224 |
+
* @return void
|
225 |
+
*/
|
226 |
+
public function required_cartflows_pro_notice() {
|
227 |
+
|
228 |
+
$required_pro_version = '1.5.8';
|
229 |
+
|
230 |
+
$class = 'notice notice-warning';
|
231 |
+
/* translators: %s: html tags */
|
232 |
+
$message = sprintf( __( 'You are using an older version of %1$sCartFlows Pro%2$s. Please update %1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher.', 'cartflows' ), '<strong>', '</strong>', $required_pro_version );
|
233 |
+
|
234 |
+
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Load Helper Files and Components.
|
239 |
+
*
|
240 |
+
* @since 1.0.0
|
241 |
+
*
|
242 |
+
* @return void
|
243 |
+
*/
|
244 |
+
public function load_helper_files_components() {
|
245 |
+
|
246 |
+
$this->is_woo_active = function_exists( 'WC' );
|
247 |
+
|
248 |
+
/* Public Utils */
|
249 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
|
250 |
+
|
251 |
+
/* Public Global Namespace Function */
|
252 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
253 |
+
|
254 |
+
/* Admin Helper */
|
255 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
256 |
+
|
257 |
+
/* Factory objects */
|
258 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-step-factory.php';
|
259 |
+
|
260 |
+
/* Meta Default Values */
|
261 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
|
262 |
+
|
263 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
|
264 |
+
|
265 |
+
if ( is_admin() ) {
|
266 |
+
require_once CARTFLOWS_DIR . 'classes/lib/notices/class-astra-notices.php';
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( ! class_exists( 'BSF_Analytics_Loader' ) ) {
|
270 |
+
require_once CARTFLOWS_DIR . '/admin/bsf-analytics/class-bsf-analytics-loader.php';
|
271 |
+
}
|
272 |
+
|
273 |
+
$bsf_analytics = BSF_Analytics_Loader::get_instance();
|
274 |
+
|
275 |
+
$bsf_analytics->set_entity(
|
276 |
+
array(
|
277 |
+
'cf' => array(
|
278 |
+
'product_name' => 'CartFlows',
|
279 |
+
'usage_doc_link' => 'https://my.cartflows.com/usage-tracking/',
|
280 |
+
'path' => CARTFLOWS_DIR . 'admin/bsf-analytics',
|
281 |
+
'author' => 'CartFlows Inc',
|
282 |
+
),
|
283 |
+
)
|
284 |
+
);
|
285 |
+
|
286 |
+
$this->utils = Cartflows_Utils::get_instance();
|
287 |
+
$this->options = Cartflows_Default_Meta::get_instance();
|
288 |
+
$this->alldata = Cartflows_Tracking::get_instance();
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Init hooked function.
|
293 |
+
*
|
294 |
+
* @since 1.0.0
|
295 |
+
*
|
296 |
+
* @return void
|
297 |
+
*/
|
298 |
+
public function initialize() {
|
299 |
+
$this->assets_vars = $this->utils->get_assets_path();
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Load Core Files.
|
304 |
+
*
|
305 |
+
* @since 1.0.0
|
306 |
+
*
|
307 |
+
* @return void
|
308 |
+
*/
|
309 |
+
public function load_core_files() {
|
310 |
+
|
311 |
+
/* Update compatibility. */
|
312 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
|
313 |
+
|
314 |
+
/* Page builder compatibilty class */
|
315 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
|
316 |
+
|
317 |
+
/* Theme support */
|
318 |
+
if ( $this->is_woo_active ) {
|
319 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
|
320 |
+
}
|
321 |
+
|
322 |
+
/* Admin Meta Fields*/
|
323 |
+
include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
|
324 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
|
325 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
|
326 |
+
|
327 |
+
if ( is_admin() ) {
|
328 |
+
/* Cloning */
|
329 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
|
330 |
+
|
331 |
+
/* Admin Settings */
|
332 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
|
333 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-stats.php';
|
334 |
+
}
|
335 |
+
|
336 |
+
/* Logger */
|
337 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-interface.php';
|
338 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler.php';
|
339 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-file.php';
|
340 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-levels.php';
|
341 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-logger-interface.php';
|
342 |
+
include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-wc-logger.php';
|
343 |
+
|
344 |
+
/* Core Modules */
|
345 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
|
346 |
+
|
347 |
+
/* Frontend Global */
|
348 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
|
349 |
+
require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
|
350 |
+
|
351 |
+
/* Modules */
|
352 |
+
include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
|
353 |
+
include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
|
354 |
+
|
355 |
+
if ( $this->is_woo_active ) {
|
356 |
+
include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
|
357 |
+
include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
|
358 |
+
include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
|
359 |
+
}
|
360 |
+
|
361 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
|
362 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
|
363 |
+
|
364 |
+
include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
|
365 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
|
366 |
+
|
367 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-wizard.php';
|
368 |
+
|
369 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
|
370 |
+
|
371 |
+
include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
|
372 |
+
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Load Core Components.
|
377 |
+
*
|
378 |
+
* @since 1.0.0
|
379 |
+
*
|
380 |
+
* @return void
|
381 |
+
*/
|
382 |
+
public function load_core_components() {
|
383 |
+
|
384 |
+
$this->meta = Cartflows_Meta_Fields::get_instance();
|
385 |
+
$this->logger = Cartflows_Logger::get_instance();
|
386 |
+
$this->flow = Cartflows_Flow_Frontend::get_instance();
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Create files/directories.
|
391 |
+
*/
|
392 |
+
public function create_files() {
|
393 |
+
|
394 |
+
// Install files and folders for uploading files and prevent hotlinking.
|
395 |
+
$upload_dir = wp_upload_dir();
|
396 |
+
|
397 |
+
$files = array(
|
398 |
+
array(
|
399 |
+
'base' => CARTFLOWS_LOG_DIR,
|
400 |
+
'file' => '.htaccess',
|
401 |
+
'content' => 'deny from all',
|
402 |
+
),
|
403 |
+
array(
|
404 |
+
'base' => CARTFLOWS_LOG_DIR,
|
405 |
+
'file' => 'index.html',
|
406 |
+
'content' => '',
|
407 |
+
),
|
408 |
+
);
|
409 |
+
|
410 |
+
foreach ( $files as $file ) {
|
411 |
+
if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
|
412 |
+
$file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore
|
413 |
+
if ( $file_handle ) {
|
414 |
+
fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
|
415 |
+
fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
/**
|
421 |
+
* Load CartFlows Pro Text Domain.
|
422 |
+
* This will load the translation textdomain depending on the file priorities.
|
423 |
+
* 1. Global Languages /wp-content/languages/cartflows/ folder
|
424 |
+
* 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
|
425 |
+
*
|
426 |
+
* @since 1.0.3
|
427 |
+
* @return void
|
428 |
+
*/
|
429 |
+
public function load_cf_textdomain() {
|
430 |
+
|
431 |
+
// Default languages directory for CartFlows Pro.
|
432 |
+
$lang_dir = CARTFLOWS_DIR . 'languages/';
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Filters the languages directory path to use for CartFlows Pro.
|
436 |
+
*
|
437 |
+
* @param string $lang_dir The languages directory path.
|
438 |
+
*/
|
439 |
+
$lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
|
440 |
+
|
441 |
+
// Traditional WordPress plugin locale filter.
|
442 |
+
global $wp_version;
|
443 |
+
|
444 |
+
$get_locale = get_locale();
|
445 |
+
|
446 |
+
if ( $wp_version >= 4.7 ) {
|
447 |
+
$get_locale = get_user_locale();
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Language Locale for CartFlows Pro
|
452 |
+
*
|
453 |
+
* @var $get_locale The locale to use.
|
454 |
+
* Uses get_user_locale()` in WordPress 4.7 or greater,
|
455 |
+
* otherwise uses `get_locale()`.
|
456 |
+
*/
|
457 |
+
$locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
|
458 |
+
$mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
|
459 |
+
|
460 |
+
// Setup paths to current locale file.
|
461 |
+
$mofile_local = $lang_dir . $mofile;
|
462 |
+
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
|
463 |
+
|
464 |
+
if ( file_exists( $mofile_global ) ) {
|
465 |
+
// Look in global /wp-content/languages/cartflows/ folder.
|
466 |
+
load_textdomain( 'cartflows', $mofile_global );
|
467 |
+
} elseif ( file_exists( $mofile_local ) ) {
|
468 |
+
// Look in local /wp-content/plugins/cartflows/languages/ folder.
|
469 |
+
load_textdomain( 'cartflows', $mofile_local );
|
470 |
+
} else {
|
471 |
+
// Load the default language files.
|
472 |
+
load_plugin_textdomain( 'cartflows', false, $lang_dir );
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Fires admin notice when Elementor is not installed and activated.
|
478 |
+
*
|
479 |
+
* @since 1.0.0
|
480 |
+
*
|
481 |
+
* @return void
|
482 |
+
*/
|
483 |
+
public function fails_to_load() {
|
484 |
+
|
485 |
+
$screen = get_current_screen();
|
486 |
+
|
487 |
+
if ( ! wcf()->utils->is_step_post_type() ) {
|
488 |
+
return;
|
489 |
+
}
|
490 |
+
|
491 |
+
if ( ! wcf()->utils->check_is_woo_required_page() ) {
|
492 |
+
return;
|
493 |
+
}
|
494 |
+
|
495 |
+
$skip_notice = false;
|
496 |
+
|
497 |
+
wp_localize_script( 'wcf-global-admin', 'cartflows_woo', array( 'show_update_post' => $skip_notice ) );
|
498 |
+
|
499 |
+
$class = 'notice notice-warning';
|
500 |
+
/* translators: %s: html tags */
|
501 |
+
$message = sprintf( __( 'This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
|
502 |
+
|
503 |
+
$plugin = 'woocommerce/woocommerce.php';
|
504 |
+
|
505 |
+
if ( _is_woo_installed() ) {
|
506 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
507 |
+
return;
|
508 |
+
}
|
509 |
+
|
510 |
+
$action_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
511 |
+
$button_label = __( 'Activate WooCommerce', 'cartflows' );
|
512 |
+
|
513 |
+
} else {
|
514 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
515 |
+
return;
|
516 |
+
}
|
517 |
+
|
518 |
+
$action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
|
519 |
+
$button_label = __( 'Install WooCommerce', 'cartflows' );
|
520 |
+
}
|
521 |
+
|
522 |
+
$button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
|
523 |
+
|
524 |
+
printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Activation Reset
|
529 |
+
*/
|
530 |
+
public function activation_reset() {
|
531 |
+
|
532 |
+
if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
|
533 |
+
|
534 |
+
$upload_dir = wp_upload_dir( null, false );
|
535 |
+
|
536 |
+
define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
|
537 |
+
}
|
538 |
+
|
539 |
+
$this->create_files();
|
540 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
|
541 |
+
include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
|
542 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
|
543 |
+
include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
|
544 |
+
|
545 |
+
Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
|
546 |
+
Cartflows_Step_Post_Type::get_instance()->step_post_type();
|
547 |
+
flush_rewrite_rules();
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Deactivation Reset
|
552 |
+
*/
|
553 |
+
public function deactivation_reset() {
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Logger Class Instance
|
558 |
+
*/
|
559 |
+
public function logger() {
|
560 |
+
return Cartflows_Logger::get_instance();
|
561 |
+
}
|
562 |
+
|
563 |
+
|
564 |
+
}
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Prepare if class 'Cartflows_Loader' exist.
|
568 |
+
* Kicking this off by calling 'get_instance()' method
|
569 |
+
*/
|
570 |
+
Cartflows_Loader::get_instance();
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Get global class.
|
575 |
+
*
|
576 |
+
* @return object
|
577 |
+
*/
|
578 |
+
function wcf() {
|
579 |
+
return Cartflows_Loader::get_instance();
|
580 |
+
}
|
581 |
+
|
582 |
+
|
583 |
+
if ( ! function_exists( '_is_woo_installed' ) ) {
|
584 |
+
|
585 |
+
/**
|
586 |
+
* Is woocommerce plugin installed.
|
587 |
+
*
|
588 |
+
* @since 1.0.0
|
589 |
+
*
|
590 |
+
* @access public
|
591 |
+
*/
|
592 |
+
function _is_woo_installed() {
|
593 |
+
|
594 |
+
$path = 'woocommerce/woocommerce.php';
|
595 |
+
$plugins = get_plugins();
|
596 |
+
|
597 |
+
return isset( $plugins[ $path ] );
|
598 |
+
}
|
599 |
+
}
|
classes/class-cartflows-meta-fields.php
CHANGED
@@ -1,1039 +1,1046 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Meta Fields.
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Cartflows_Meta_Fields.
|
10 |
-
*/
|
11 |
-
class Cartflows_Meta_Fields {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Instance
|
15 |
-
*
|
16 |
-
* @var $instance
|
17 |
-
*/
|
18 |
-
private static $instance;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Initiator
|
22 |
-
*/
|
23 |
-
public static function get_instance() {
|
24 |
-
if ( ! isset( self::$instance ) ) {
|
25 |
-
self::$instance = new self();
|
26 |
-
}
|
27 |
-
|
28 |
-
return self::$instance;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Constructor
|
33 |
-
*/
|
34 |
-
public function __construct() {
|
35 |
-
|
36 |
-
/* Add Scripts */
|
37 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_meta_scripts' ), 20 );
|
38 |
-
|
39 |
-
add_action( 'wp_ajax_wcf_json_search_coupons', array( $this, 'json_search_coupons' ) );
|
40 |
-
|
41 |
-
add_action( 'wp_ajax_wcf_json_search_products_and_variations', array( $this, 'json_search_products' ) );
|
42 |
-
|
43 |
-
add_action( 'wp_ajax_wcf_json_search_pages', array( $this, 'json_search_pages' ) );
|
44 |
-
|
45 |
-
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Admin meta scripts
|
50 |
-
*/
|
51 |
-
public function admin_meta_scripts() {
|
52 |
-
|
53 |
-
global $pagenow;
|
54 |
-
global $post;
|
55 |
-
|
56 |
-
$
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
'
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
//
|
119 |
-
$
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
//
|
159 |
-
$
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
$
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
$
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
);
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
}
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
$
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
$
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
if ( isset( $field_data['
|
573 |
-
$
|
574 |
-
}
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
$field_content .= '<
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
$
|
632 |
-
|
633 |
-
|
634 |
-
$field_content .= '
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
$
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
$
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
$field_content
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Meta Fields.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Cartflows_Meta_Fields.
|
10 |
+
*/
|
11 |
+
class Cartflows_Meta_Fields {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Instance
|
15 |
+
*
|
16 |
+
* @var $instance
|
17 |
+
*/
|
18 |
+
private static $instance;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Initiator
|
22 |
+
*/
|
23 |
+
public static function get_instance() {
|
24 |
+
if ( ! isset( self::$instance ) ) {
|
25 |
+
self::$instance = new self();
|
26 |
+
}
|
27 |
+
|
28 |
+
return self::$instance;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Constructor
|
33 |
+
*/
|
34 |
+
public function __construct() {
|
35 |
+
|
36 |
+
/* Add Scripts */
|
37 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_meta_scripts' ), 20 );
|
38 |
+
|
39 |
+
add_action( 'wp_ajax_wcf_json_search_coupons', array( $this, 'json_search_coupons' ) );
|
40 |
+
|
41 |
+
add_action( 'wp_ajax_wcf_json_search_products_and_variations', array( $this, 'json_search_products' ) );
|
42 |
+
|
43 |
+
add_action( 'wp_ajax_wcf_json_search_pages', array( $this, 'json_search_pages' ) );
|
44 |
+
|
45 |
+
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Admin meta scripts
|
50 |
+
*/
|
51 |
+
public function admin_meta_scripts() {
|
52 |
+
|
53 |
+
global $pagenow;
|
54 |
+
global $post;
|
55 |
+
|
56 |
+
$localize = array(
|
57 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
58 |
+
'google_fonts' => CartFlows_Font_Families::get_google_fonts(),
|
59 |
+
'system_fonts' => CartFlows_Font_Families::get_system_fonts(),
|
60 |
+
'font_weights' => array(
|
61 |
+
'100' => __( 'Thin 100', 'cartflows' ),
|
62 |
+
'200' => __( 'Extra-Light 200', 'cartflows' ),
|
63 |
+
'300' => __( 'Light 300', 'cartflows' ),
|
64 |
+
'400' => __( 'Normal 400', 'cartflows' ),
|
65 |
+
'500' => __( 'Medium 500', 'cartflows' ),
|
66 |
+
'600' => __( 'Semi-Bold 600', 'cartflows' ),
|
67 |
+
'700' => __( 'Bold 700', 'cartflows' ),
|
68 |
+
'800' => __( 'Extra-Bold 800', 'cartflows' ),
|
69 |
+
'900' => __( 'Ultra-Bold 900', 'cartflows' ),
|
70 |
+
),
|
71 |
+
);
|
72 |
+
|
73 |
+
$localize = apply_filters( 'wcf_js_localize', $localize );
|
74 |
+
|
75 |
+
$localize_script = '<!-- script to print the admin localized variables -->';
|
76 |
+
$localize_script .= '<script type="text/javascript">';
|
77 |
+
$localize_script .= 'var wcf = ' . wp_json_encode( $localize ) . ';';
|
78 |
+
$localize_script .= '</script>';
|
79 |
+
|
80 |
+
echo $localize_script;
|
81 |
+
|
82 |
+
$screen = get_current_screen();
|
83 |
+
|
84 |
+
if (
|
85 |
+
( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) &&
|
86 |
+
wcf()->utils->is_step_post_type( $screen->post_type )
|
87 |
+
) {
|
88 |
+
|
89 |
+
wp_enqueue_style( 'woocommerce_admin_styles' );
|
90 |
+
|
91 |
+
wp_enqueue_script( 'select2' );
|
92 |
+
wp_enqueue_script( 'wc-enhanced-select' );
|
93 |
+
|
94 |
+
wp_enqueue_script(
|
95 |
+
'wcf-admin-meta',
|
96 |
+
CARTFLOWS_URL . 'admin/meta-assets/js/admin-edit.js',
|
97 |
+
array( 'jquery', 'wp-color-picker' ),
|
98 |
+
CARTFLOWS_VER,
|
99 |
+
true
|
100 |
+
);
|
101 |
+
|
102 |
+
wp_enqueue_style( 'wcf-admin-meta', CARTFLOWS_URL . 'admin/meta-assets/css/admin-edit.css', array( 'wp-color-picker' ), CARTFLOWS_VER );
|
103 |
+
wp_style_add_data( 'wcf-admin-meta', 'rtl', 'replace' );
|
104 |
+
|
105 |
+
do_action( 'cartflows_admin_meta_scripts' );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Function to search products.
|
111 |
+
*/
|
112 |
+
public function json_search_products() {
|
113 |
+
|
114 |
+
check_admin_referer( 'wcf-json-search-products-and-variations', 'security' );
|
115 |
+
|
116 |
+
global $wpdb;
|
117 |
+
|
118 |
+
// get search term.
|
119 |
+
$term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
|
120 |
+
|
121 |
+
if ( empty( $term ) ) {
|
122 |
+
die();
|
123 |
+
}
|
124 |
+
|
125 |
+
// CartFlows supported product types.
|
126 |
+
$supported_product_types = array( 'simple', 'variable', 'variation', 'subscription', 'variable-subscription', 'subscription_variation', 'course' );
|
127 |
+
|
128 |
+
// Allowed product types.
|
129 |
+
if ( isset( $_GET['allowed'] ) && ! empty( $_GET['allowed'] ) ) {
|
130 |
+
|
131 |
+
$allowed_product_types = sanitize_text_field( ( wp_unslash( $_GET['allowed'] ) ) );
|
132 |
+
|
133 |
+
$allowed_product_types = $this->sanitize_data_attributes( $allowed_product_types );
|
134 |
+
|
135 |
+
$supported_product_types = $allowed_product_types;
|
136 |
+
}
|
137 |
+
|
138 |
+
// Include product types.
|
139 |
+
if ( isset( $_GET['included'] ) && ! empty( $_GET['included'] ) ) {
|
140 |
+
|
141 |
+
$include_product_types = sanitize_text_field( ( wp_unslash( $_GET['included'] ) ) );
|
142 |
+
|
143 |
+
$include_product_types = $this->sanitize_data_attributes( $include_product_types );
|
144 |
+
|
145 |
+
$supported_product_types = array_merge( $supported_product_types, $include_product_types );
|
146 |
+
}
|
147 |
+
|
148 |
+
// Exclude product types.
|
149 |
+
if ( isset( $_GET['excluded'] ) && ! empty( $_GET['excluded'] ) ) {
|
150 |
+
|
151 |
+
$excluded_product_types = sanitize_text_field( ( wp_unslash( $_GET['excluded'] ) ) );
|
152 |
+
|
153 |
+
$excluded_product_types = $this->sanitize_data_attributes( $excluded_product_types );
|
154 |
+
|
155 |
+
$supported_product_types = array_diff( $supported_product_types, $excluded_product_types );
|
156 |
+
}
|
157 |
+
|
158 |
+
// Get all products data.
|
159 |
+
$data = WC_Data_Store::load( 'product' );
|
160 |
+
$ids = $data->search_products( $term, '', true, false, 11 );
|
161 |
+
|
162 |
+
// Get all product objects.
|
163 |
+
$product_objects = array_filter( array_map( 'wc_get_product', $ids ), 'wc_products_array_filter_readable' );
|
164 |
+
|
165 |
+
// Remove the product objects whose product type are not in supported array.
|
166 |
+
$product_objects = array_filter(
|
167 |
+
$product_objects,
|
168 |
+
function ( $arr ) use ( $supported_product_types ) {
|
169 |
+
return $arr && is_a( $arr, 'WC_Product' ) && in_array( $arr->get_type(), $supported_product_types, true );
|
170 |
+
}
|
171 |
+
);
|
172 |
+
|
173 |
+
$products_found = array();
|
174 |
+
|
175 |
+
foreach ( $product_objects as $product_object ) {
|
176 |
+
$formatted_name = $product_object->get_formatted_name();
|
177 |
+
$managing_stock = $product_object->managing_stock();
|
178 |
+
|
179 |
+
if ( $managing_stock && ! empty( $_GET['display_stock'] ) ) {
|
180 |
+
$stock_amount = $product_object->get_stock_quantity();
|
181 |
+
/* Translators: %d stock amount */
|
182 |
+
$formatted_name .= ' – ' . sprintf( __( 'Stock: %d', 'cartflows' ), wc_format_stock_quantity_for_display( $stock_amount, $product_object ) );
|
183 |
+
}
|
184 |
+
|
185 |
+
$products_found[ $product_object->get_id() ] = rawurldecode( $formatted_name );
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
wp_send_json( $products_found );
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Function to sanitize the product type data attribute.
|
194 |
+
*
|
195 |
+
* @param array $product_types product types.
|
196 |
+
*/
|
197 |
+
public function sanitize_data_attributes( $product_types = array() ) {
|
198 |
+
|
199 |
+
if ( ! is_array( $product_types ) ) {
|
200 |
+
$product_types = explode( ',', $product_types );
|
201 |
+
}
|
202 |
+
|
203 |
+
// Sanitize the excluded types against valid product types.
|
204 |
+
foreach ( $product_types as $index => $value ) {
|
205 |
+
$product_types[ $index ] = strtolower( trim( $value ) );
|
206 |
+
}
|
207 |
+
return $product_types;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Function to search coupons
|
212 |
+
*/
|
213 |
+
public function json_search_coupons() {
|
214 |
+
|
215 |
+
check_admin_referer( 'wcf-json-search-coupons', 'security' );
|
216 |
+
|
217 |
+
global $wpdb;
|
218 |
+
|
219 |
+
$term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
|
220 |
+
|
221 |
+
if ( empty( $term ) ) {
|
222 |
+
die();
|
223 |
+
}
|
224 |
+
|
225 |
+
$posts = wp_cache_get( 'wcf_search_coupons', 'wcf_funnel_Cart' );
|
226 |
+
|
227 |
+
if ( false === $posts ) {
|
228 |
+
$posts = $wpdb->get_results( // phpcs:ignore
|
229 |
+
$wpdb->prepare(
|
230 |
+
"SELECT *
|
231 |
+
FROM {$wpdb->prefix}posts
|
232 |
+
WHERE post_type = %s
|
233 |
+
AND post_title LIKE %s
|
234 |
+
AND post_status = %s",
|
235 |
+
'shop_coupon',
|
236 |
+
$wpdb->esc_like( $term ) . '%',
|
237 |
+
'publish'
|
238 |
+
)
|
239 |
+
);
|
240 |
+
wp_cache_set( 'wcf_search_coupons', $posts, 'wcf_funnel_Cart' );
|
241 |
+
}
|
242 |
+
|
243 |
+
$coupons_found = array();
|
244 |
+
$all_discount_types = wc_get_coupon_types();
|
245 |
+
|
246 |
+
if ( $posts ) {
|
247 |
+
foreach ( $posts as $post ) {
|
248 |
+
|
249 |
+
$discount_type = get_post_meta( $post->ID, 'discount_type', true );
|
250 |
+
|
251 |
+
if ( ! empty( $all_discount_types[ $discount_type ] ) ) {
|
252 |
+
$coupons_found[ get_the_title( $post->ID ) ] = get_the_title( $post->ID ) . ' (Type: ' . $all_discount_types[ $discount_type ] . ')';
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
wp_send_json( $coupons_found );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Function to search coupons
|
262 |
+
*/
|
263 |
+
public function json_search_pages() {
|
264 |
+
|
265 |
+
check_ajax_referer( 'wcf-json-search-pages', 'security' );
|
266 |
+
|
267 |
+
$term = (string) urldecode( sanitize_text_field( wp_unslash( $_GET['term'] ) ) ); // phpcs:ignore
|
268 |
+
|
269 |
+
if ( empty( $term ) ) {
|
270 |
+
die( 'not found' );
|
271 |
+
}
|
272 |
+
|
273 |
+
$search_string = $term;
|
274 |
+
$data = array();
|
275 |
+
$result = array();
|
276 |
+
|
277 |
+
add_filter( 'posts_search', array( $this, 'search_only_titles' ), 10, 2 );
|
278 |
+
|
279 |
+
$query = new WP_Query(
|
280 |
+
array(
|
281 |
+
's' => $search_string,
|
282 |
+
'post_type' => 'page',
|
283 |
+
'posts_per_page' => -1,
|
284 |
+
)
|
285 |
+
);
|
286 |
+
|
287 |
+
if ( $query->have_posts() ) {
|
288 |
+
while ( $query->have_posts() ) {
|
289 |
+
$query->the_post();
|
290 |
+
$title = get_the_title();
|
291 |
+
$title .= ( 0 != $query->post->post_parent ) ? ' (' . get_the_title( $query->post->post_parent ) . ')' : '';
|
292 |
+
$id = get_the_id();
|
293 |
+
$data[] = array(
|
294 |
+
'id' => $id,
|
295 |
+
'text' => $title,
|
296 |
+
);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
+
if ( is_array( $data ) && ! empty( $data ) ) {
|
301 |
+
$result[] = array(
|
302 |
+
'text' => '',
|
303 |
+
'children' => $data,
|
304 |
+
);
|
305 |
+
}
|
306 |
+
|
307 |
+
wp_reset_postdata();
|
308 |
+
|
309 |
+
// return the result in json.
|
310 |
+
wp_send_json( $result );
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Search only titles.
|
315 |
+
*
|
316 |
+
* @param string $search Field data.
|
317 |
+
* @param object $wp_query Query.
|
318 |
+
*
|
319 |
+
* @return array.
|
320 |
+
*/
|
321 |
+
public function search_only_titles( $search, $wp_query ) {
|
322 |
+
if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
|
323 |
+
global $wpdb;
|
324 |
+
|
325 |
+
$q = $wp_query->query_vars;
|
326 |
+
$n = ! empty( $q['exact'] ) ? '' : '%';
|
327 |
+
|
328 |
+
$search = array();
|
329 |
+
|
330 |
+
foreach ( (array) $q['search_terms'] as $term ) {
|
331 |
+
$search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
|
332 |
+
}
|
333 |
+
|
334 |
+
if ( ! is_user_logged_in() ) {
|
335 |
+
$search[] = "$wpdb->posts.post_password = ''";
|
336 |
+
}
|
337 |
+
|
338 |
+
$search = ' AND ' . implode( ' AND ', $search );
|
339 |
+
}
|
340 |
+
|
341 |
+
return $search;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Get field.
|
346 |
+
*
|
347 |
+
* @param array $field_data Field data.
|
348 |
+
* @param string $field_content Field content.
|
349 |
+
*
|
350 |
+
* @return string field.
|
351 |
+
*/
|
352 |
+
public function get_field( $field_data, $field_content ) {
|
353 |
+
|
354 |
+
$field_data['generated_content'] = $field_content;
|
355 |
+
|
356 |
+
return $this->get_meta_field_template(
|
357 |
+
'get-field.php',
|
358 |
+
$field_data
|
359 |
+
);
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Text field.
|
364 |
+
*
|
365 |
+
* @param array $field_data Field data.
|
366 |
+
*
|
367 |
+
* @return string field.
|
368 |
+
*/
|
369 |
+
public function get_text_field( $field_data ) {
|
370 |
+
|
371 |
+
$value = $field_data['value'];
|
372 |
+
|
373 |
+
$attr = '';
|
374 |
+
|
375 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
376 |
+
|
377 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
378 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
379 |
+
}
|
380 |
+
}
|
381 |
+
|
382 |
+
$field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . esc_attr( $value ) . '" ' . $attr . '>';
|
383 |
+
|
384 |
+
return $this->get_field( $field_data, $field_content );
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Shortcode field.
|
389 |
+
*
|
390 |
+
* @param array $field_data Field data.
|
391 |
+
*
|
392 |
+
* @return string field.
|
393 |
+
*/
|
394 |
+
public function get_shortcode_field( $field_data ) {
|
395 |
+
|
396 |
+
$attr = '';
|
397 |
+
|
398 |
+
$attr_fields = array(
|
399 |
+
'readonly' => 'readonly',
|
400 |
+
'onfocus' => 'this.select()',
|
401 |
+
'onmouseup' => 'return false',
|
402 |
+
);
|
403 |
+
|
404 |
+
if ( $attr_fields && is_array( $attr_fields ) ) {
|
405 |
+
|
406 |
+
foreach ( $attr_fields as $attr_key => $attr_value ) {
|
407 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
$field_content = '<input type="text" name="' . $field_data['name'] . '" value="' . $field_data['content'] . '" ' . $attr . '>';
|
412 |
+
|
413 |
+
return $this->get_field( $field_data, $field_content );
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Display field.
|
418 |
+
*
|
419 |
+
* @param array $field_data Field data.
|
420 |
+
*
|
421 |
+
* @return string field.
|
422 |
+
*/
|
423 |
+
public function get_display_field( $field_data ) {
|
424 |
+
|
425 |
+
$field_content = $field_data['content'];
|
426 |
+
|
427 |
+
return $this->get_field( $field_data, $field_content );
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Hr linke field.
|
432 |
+
*
|
433 |
+
* @param array $field_data Field data.
|
434 |
+
*
|
435 |
+
* @return string field.
|
436 |
+
*/
|
437 |
+
public function get_hr_line_field( $field_data ) {
|
438 |
+
|
439 |
+
$field_data = array(
|
440 |
+
'name' => 'wcf-hr-line',
|
441 |
+
'content' => '<hr>',
|
442 |
+
);
|
443 |
+
|
444 |
+
$field_content = $field_data['content'];
|
445 |
+
|
446 |
+
return $this->get_field( $field_data, $field_content );
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Number field.
|
451 |
+
*
|
452 |
+
* @param array $field_data Field data.
|
453 |
+
*
|
454 |
+
* @return string field.
|
455 |
+
*/
|
456 |
+
public function get_number_field( $field_data ) {
|
457 |
+
|
458 |
+
$value = $field_data['value'];
|
459 |
+
|
460 |
+
$attr = '';
|
461 |
+
|
462 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
463 |
+
|
464 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
465 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
$field_content = '<input type="number" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
|
470 |
+
|
471 |
+
return $this->get_field( $field_data, $field_content );
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Hidden field.
|
476 |
+
*
|
477 |
+
* @param array $field_data Field data.
|
478 |
+
*
|
479 |
+
* @return string field.
|
480 |
+
*/
|
481 |
+
public function get_hidden_field( $field_data ) {
|
482 |
+
|
483 |
+
$value = $field_data['value'];
|
484 |
+
|
485 |
+
$attr = '';
|
486 |
+
|
487 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
488 |
+
|
489 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
490 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
$field_content = '<input type="hidden" id="' . $field_data['name'] . '" name="' . $field_data['name'] . '" value="' . $value . '" ' . $attr . '>';
|
495 |
+
|
496 |
+
return $this->get_field( $field_data, $field_content );
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* Text area field.
|
501 |
+
*
|
502 |
+
* @param array $field_data Field data.
|
503 |
+
*
|
504 |
+
* @return string field.
|
505 |
+
*/
|
506 |
+
public function get_area_field( $field_data ) {
|
507 |
+
|
508 |
+
$value = $field_data['value'];
|
509 |
+
|
510 |
+
$attr = '';
|
511 |
+
|
512 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
513 |
+
|
514 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
515 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
$field_content = '<textarea name="' . $field_data['name'] . '" rows="10" cols="50" ' . $attr . '>';
|
520 |
+
$field_content .= $value;
|
521 |
+
$field_content .= '</textarea>';
|
522 |
+
|
523 |
+
return $this->get_field( $field_data, $field_content );
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Only checkbox field.
|
528 |
+
*
|
529 |
+
* @param array $field_data Field data.
|
530 |
+
*
|
531 |
+
* @return string field.
|
532 |
+
*/
|
533 |
+
public function get_only_checkbox_field( $field_data ) {
|
534 |
+
|
535 |
+
$value = $field_data['value'];
|
536 |
+
|
537 |
+
$field_content = '';
|
538 |
+
if ( isset( $field_data['before'] ) ) {
|
539 |
+
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
540 |
+
}
|
541 |
+
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
542 |
+
$field_content .= '<input type="checkbox" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . '>';
|
543 |
+
|
544 |
+
if ( isset( $field_data['after'] ) ) {
|
545 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
546 |
+
}
|
547 |
+
|
548 |
+
if ( isset( $field_data['after_html'] ) ) {
|
549 |
+
$field_content .= '<span>' . $field_data['after_html'] . '</span>';
|
550 |
+
}
|
551 |
+
|
552 |
+
return $field_content;
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Checkbox field.
|
557 |
+
*
|
558 |
+
* @param array $field_data Field data.
|
559 |
+
*
|
560 |
+
* @return string field.
|
561 |
+
*/
|
562 |
+
public function get_checkbox_field( $field_data ) {
|
563 |
+
|
564 |
+
$value = $field_data['value'];
|
565 |
+
|
566 |
+
$field_content = '';
|
567 |
+
if ( isset( $field_data['before'] ) ) {
|
568 |
+
$field_content .= '<span>' . $field_data['before'] . '</span>';
|
569 |
+
}
|
570 |
+
|
571 |
+
$toggle_data = '';
|
572 |
+
if ( isset( $field_data['toggle'] ) ) {
|
573 |
+
$toggle_data .= 'toggle="' . htmlspecialchars( wp_json_encode( $field_data['toggle'] ) ) . '"'; //phpcs:ignore
|
574 |
+
}
|
575 |
+
|
576 |
+
$field_content .= '<input type="hidden" name="' . $field_data['name'] . '" value="no">';
|
577 |
+
$field_content .= '<input type="checkbox" id="' . $field_data['name'] . '" name="' . $field_data['name'] . '" value="yes" ' . checked( 'yes', $value, false ) . ' ' . $toggle_data . '>';
|
578 |
+
|
579 |
+
if ( isset( $field_data['after'] ) ) {
|
580 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
581 |
+
}
|
582 |
+
|
583 |
+
return $this->get_field( $field_data, $field_content );
|
584 |
+
}
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Radio field.
|
588 |
+
*
|
589 |
+
* @param array $field_data Field data.
|
590 |
+
*
|
591 |
+
* @return string field.
|
592 |
+
*/
|
593 |
+
public function get_radio_field( $field_data ) {
|
594 |
+
|
595 |
+
$value = $field_data['value'];
|
596 |
+
$field_content = '';
|
597 |
+
|
598 |
+
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
599 |
+
|
600 |
+
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
601 |
+
|
602 |
+
$field_content .= '<div class="wcf-radio-option">';
|
603 |
+
$field_content .= '<input type="radio" name="' . $field_data['name'] . '" value="' . $data_key . '" ' . checked( $data_key, $value, false ) . '>';
|
604 |
+
$field_content .= $data_value;
|
605 |
+
$field_content .= '</div>';
|
606 |
+
}
|
607 |
+
}
|
608 |
+
|
609 |
+
return $this->get_field( $field_data, $field_content );
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Font family field.
|
614 |
+
*
|
615 |
+
* @param array $field_data Field data.
|
616 |
+
*
|
617 |
+
* @return string field.
|
618 |
+
*/
|
619 |
+
public function get_font_family_field( $field_data ) {
|
620 |
+
|
621 |
+
$value = $field_data['value'];
|
622 |
+
|
623 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
624 |
+
|
625 |
+
$field_content = '<select class="wcf-field-font-family" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
626 |
+
|
627 |
+
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
628 |
+
|
629 |
+
$field_content .= '<optgroup label="Other System Fonts">';
|
630 |
+
foreach ( CartFlows_Font_Families::get_system_fonts() as $name => $variants ) {
|
631 |
+
$field_content .= '<option value="' . esc_attr( $name ) . '" ' . selected( $name, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
632 |
+
}
|
633 |
+
$field_content .= '</optgroup>';
|
634 |
+
$field_content .= '<optgroup label="Google">';
|
635 |
+
foreach ( CartFlows_Font_Families::get_google_fonts() as $name => $single_font ) {
|
636 |
+
$variants = wcf_get_prop( $single_font, '0' );
|
637 |
+
$category = wcf_get_prop( $single_font, '1' );
|
638 |
+
$font_value = '\'' . esc_attr( $name ) . '\', ' . esc_attr( $category );
|
639 |
+
$field_content .= '<option value="' . esc_attr( $font_value ) . '" ' . selected( $font_value, $value, false ) . '>' . esc_attr( $name ) . '</option>';
|
640 |
+
}
|
641 |
+
$field_content .= '</optgroup>';
|
642 |
+
|
643 |
+
$field_content .= '</select>';
|
644 |
+
|
645 |
+
return $this->get_field( $field_data, $field_content );
|
646 |
+
}
|
647 |
+
|
648 |
+
/**
|
649 |
+
* Font weight field.
|
650 |
+
*
|
651 |
+
* @param array $field_data Field data.
|
652 |
+
*
|
653 |
+
* @return string field.
|
654 |
+
*/
|
655 |
+
public function get_font_weight_field( $field_data ) {
|
656 |
+
|
657 |
+
$value = $field_data['value'];
|
658 |
+
|
659 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
660 |
+
|
661 |
+
$field_content = '<select data-selected="' . esc_attr( $value ) . '" class="wcf-field-font-weight" data-for="' . $field_data['for'] . '" name="' . $field_data['name'] . '">';
|
662 |
+
|
663 |
+
$field_content .= '<option value="" ' . selected( '', $value, false ) . '>Default</option>';
|
664 |
+
|
665 |
+
$field_content .= '</select>';
|
666 |
+
|
667 |
+
return $this->get_field( $field_data, $field_content );
|
668 |
+
}
|
669 |
+
|
670 |
+
/**
|
671 |
+
* Select field.
|
672 |
+
*
|
673 |
+
* @param array $field_data Field data.
|
674 |
+
*
|
675 |
+
* @return string field.
|
676 |
+
*/
|
677 |
+
public function get_select_field( $field_data ) {
|
678 |
+
|
679 |
+
$value = $field_data['value'];
|
680 |
+
$pro_options = isset( $field_data['pro-options'] ) ? $field_data['pro-options'] : array();
|
681 |
+
|
682 |
+
$field_content = '<select name="' . $field_data['name'] . '">';
|
683 |
+
|
684 |
+
if ( is_array( $field_data['options'] ) && ! empty( $field_data['options'] ) ) {
|
685 |
+
|
686 |
+
foreach ( $field_data['options'] as $data_key => $data_value ) {
|
687 |
+
|
688 |
+
$disabled = '';
|
689 |
+
|
690 |
+
if ( array_key_exists( $data_key, $pro_options ) ) {
|
691 |
+
$disabled = 'disabled ';
|
692 |
+
$data_value = $pro_options[ $data_key ];
|
693 |
+
}
|
694 |
+
|
695 |
+
$field_content .= '<option value="' . $data_key . '" ' . selected( $value, $data_key, false ) . ' ' . $disabled . '>' . $data_value . '</option>';
|
696 |
+
}
|
697 |
+
}
|
698 |
+
|
699 |
+
$field_content .= '</select>';
|
700 |
+
|
701 |
+
if ( isset( $field_data['after'] ) ) {
|
702 |
+
$field_content .= '<span>' . $field_data['after'] . '</span>';
|
703 |
+
}
|
704 |
+
|
705 |
+
return $this->get_field( $field_data, $field_content );
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Color picker field.
|
710 |
+
*
|
711 |
+
* @param array $field_data Field data.
|
712 |
+
*
|
713 |
+
* @return string field.
|
714 |
+
*/
|
715 |
+
public function get_color_picker_field( $field_data ) {
|
716 |
+
|
717 |
+
$value = $field_data['value'];
|
718 |
+
|
719 |
+
$field_data['field_type'] = 'color-picker';
|
720 |
+
|
721 |
+
$field_content = '<input class="wcf-color-picker" type="text" name="' . $field_data['name'] . '" value="' . $value . '">';
|
722 |
+
|
723 |
+
return $this->get_field( $field_data, $field_content );
|
724 |
+
}
|
725 |
+
|
726 |
+
/**
|
727 |
+
* Product selection field.
|
728 |
+
*
|
729 |
+
* @param array $field_data Field data.
|
730 |
+
*
|
731 |
+
* @return string field.
|
732 |
+
*/
|
733 |
+
public function get_product_selection_field( $field_data ) {
|
734 |
+
|
735 |
+
$value = $field_data['value'];
|
736 |
+
$excluded = '';
|
737 |
+
$allowed = '';
|
738 |
+
$included = '';
|
739 |
+
|
740 |
+
if ( isset( $field_data['excluded_product_types'] ) && is_array( $field_data['excluded_product_types'] ) && ! empty( $field_data['excluded_product_types'] ) ) {
|
741 |
+
$excluded = html_entity_decode( implode( ',', $field_data['excluded_product_types'] ), ENT_COMPAT, 'UTF-8' );
|
742 |
+
}
|
743 |
+
if ( isset( $field_data['allowed_product_types'] ) && is_array( $field_data['allowed_product_types'] ) && ! empty( $field_data['allowed_product_types'] ) ) {
|
744 |
+
$allowed = html_entity_decode( implode( ',', $field_data['allowed_product_types'] ), ENT_COMPAT, 'UTF-8' );
|
745 |
+
}
|
746 |
+
if ( isset( $field_data['include_product_types'] ) && is_array( $field_data['include_product_types'] ) && ! empty( $field_data['allowed_product_types'] ) ) {
|
747 |
+
$included = html_entity_decode( implode( ',', $field_data['include_product_types'] ), ENT_COMPAT, 'UTF-8' );
|
748 |
+
}
|
749 |
+
|
750 |
+
$multiple = '';
|
751 |
+
|
752 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
753 |
+
$multiple = ' multiple="multiple"';
|
754 |
+
}
|
755 |
+
|
756 |
+
$allow_clear = '';
|
757 |
+
|
758 |
+
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
759 |
+
$allow_clear = ' data-allow_clear="allow_clear"';
|
760 |
+
}
|
761 |
+
|
762 |
+
$field_content = '<select
|
763 |
+
name="' . $field_data['name'] . '[]"
|
764 |
+
class="wcf-product-search" ' . $multiple . $allow_clear . '
|
765 |
+
data-placeholder="' . __( 'Search for a product…', 'cartflows' ) . '"
|
766 |
+
data-action="wcf_json_search_products_and_variations"
|
767 |
+
data-excluded_product_types ="' . $excluded . '"
|
768 |
+
data-allowed_product_types ="' . $allowed . '"
|
769 |
+
data-include_product_types ="' . $included . '">';
|
770 |
+
|
771 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
772 |
+
|
773 |
+
foreach ( $value as $data_key => $product_id ) {
|
774 |
+
|
775 |
+
$product = wc_get_product( $product_id );
|
776 |
+
|
777 |
+
// posts.
|
778 |
+
if ( ! empty( $product ) ) {
|
779 |
+
$post_title = $product->get_name() . ' (#' . $product_id . ')';
|
780 |
+
|
781 |
+
$field_content .= '<option value="' . $product_id . '" selected="selected" >' . $post_title . '</option>';
|
782 |
+
}
|
783 |
+
}
|
784 |
+
}
|
785 |
+
$field_content .= '</select>';
|
786 |
+
|
787 |
+
return $this->get_field( $field_data, $field_content );
|
788 |
+
}
|
789 |
+
|
790 |
+
/**
|
791 |
+
* Coupon selection field.
|
792 |
+
*
|
793 |
+
* @param array $field_data Field data.
|
794 |
+
*
|
795 |
+
* @return string field.
|
796 |
+
*/
|
797 |
+
public function get_coupon_selection_field( $field_data ) {
|
798 |
+
|
799 |
+
$value = $field_data['value'];
|
800 |
+
|
801 |
+
$multiple = '';
|
802 |
+
|
803 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
804 |
+
$multiple = ' multiple="multiple"';
|
805 |
+
}
|
806 |
+
|
807 |
+
$allow_clear = '';
|
808 |
+
|
809 |
+
if ( isset( $field_data['allow_clear'] ) && $field_data['allow_clear'] ) {
|
810 |
+
$allow_clear = ' data-allow_clear="allow_clear"';
|
811 |
+
}
|
812 |
+
|
813 |
+
$field_content = '<select
|
814 |
+
name="' . $field_data['name'] . '[]"
|
815 |
+
class="wc-coupon-search wcf-coupon-search" ' . $multiple . $allow_clear . '
|
816 |
+
data-placeholder="' . __( 'Search for a coupon…', 'cartflows' ) . '"
|
817 |
+
data-action="wcf_json_search_coupons">';
|
818 |
+
|
819 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
820 |
+
|
821 |
+
$all_discount_types = wc_get_coupon_types();
|
822 |
+
|
823 |
+
foreach ( $value as $coupon_title ) {
|
824 |
+
|
825 |
+
$coupon = new WC_Coupon( $coupon_title );
|
826 |
+
|
827 |
+
$discount_type = $coupon->get_discount_type();
|
828 |
+
|
829 |
+
if ( isset( $discount_type ) && $discount_type ) {
|
830 |
+
$discount_type = ' ( Type: ' . $all_discount_types[ $discount_type ] . ' )';
|
831 |
+
}
|
832 |
+
|
833 |
+
$field_content .= '<option value="' . $coupon_title . '" selected="selected">' . $coupon_title . $discount_type . '</option>';
|
834 |
+
}
|
835 |
+
}
|
836 |
+
|
837 |
+
$field_content .= '</select>';
|
838 |
+
|
839 |
+
return $this->get_field( $field_data, $field_content );
|
840 |
+
}
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Page selction field.
|
844 |
+
*
|
845 |
+
* @param array $field_data Field data.
|
846 |
+
*
|
847 |
+
* @return string field.
|
848 |
+
*/
|
849 |
+
public function get_page_selection_field( $field_data ) {
|
850 |
+
|
851 |
+
$value = $field_data['value'];
|
852 |
+
|
853 |
+
$multiple = '';
|
854 |
+
|
855 |
+
if ( isset( $field_data['multiple'] ) && $field_data['multiple'] ) {
|
856 |
+
$multiple = 'multiple="multiple"';
|
857 |
+
}
|
858 |
+
|
859 |
+
$field_content = '<select
|
860 |
+
name="' . $field_data['name'] . '[]"
|
861 |
+
class="wcf-search-pages" ' . $multiple . '"
|
862 |
+
data-action="wcf_json_search_pages">';
|
863 |
+
|
864 |
+
if ( is_array( $value ) && ! empty( $value ) ) {
|
865 |
+
|
866 |
+
foreach ( $value as $data_key => $data_value ) {
|
867 |
+
|
868 |
+
$field_content .= '<option value="' . $data_value . '">' . get_the_title( $data_value ) . '</option>';
|
869 |
+
}
|
870 |
+
}
|
871 |
+
|
872 |
+
$field_content .= '</select>';
|
873 |
+
|
874 |
+
return $this->get_field( $field_data, $field_content );
|
875 |
+
}
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Get section field.
|
879 |
+
*
|
880 |
+
* @param array $field_data Field data.
|
881 |
+
*
|
882 |
+
* @return string field.
|
883 |
+
*/
|
884 |
+
public function get_section( $field_data ) {
|
885 |
+
$field_html = '<div class="wcf-field-row wcf-field-section">';
|
886 |
+
$field_html .= '<div class="wcf-field-section-heading" colspan="2">';
|
887 |
+
$field_html .= '<label>' . esc_html( $field_data['label'] ) . '</label>';
|
888 |
+
|
889 |
+
if ( isset( $field_data['help'] ) ) {
|
890 |
+
$field_html .= '<i class="wcf-field-heading-help dashicons dashicons-editor-help" title="' . esc_attr( $field_data['help'] ) . '"></i>';
|
891 |
+
}
|
892 |
+
$field_html .= '</div>';
|
893 |
+
$field_html .= '</div>';
|
894 |
+
return $field_html;
|
895 |
+
}
|
896 |
+
|
897 |
+
/**
|
898 |
+
* Description field.
|
899 |
+
*
|
900 |
+
* @param array $field_data Field data.
|
901 |
+
*
|
902 |
+
* @return string field.
|
903 |
+
*/
|
904 |
+
public function get_description_field( $field_data ) {
|
905 |
+
|
906 |
+
$field_html = '<div class="wcf-field-row wcf-field-desc ' . $field_data['name'] . '">';
|
907 |
+
$field_html .= '<div class="wcf-field-desc-content">';
|
908 |
+
$field_html .= $field_data['content'];
|
909 |
+
$field_html .= '</div>';
|
910 |
+
$field_html .= '</div>';
|
911 |
+
|
912 |
+
return $field_html;
|
913 |
+
}
|
914 |
+
|
915 |
+
/**
|
916 |
+
* Product selection repeater field.
|
917 |
+
*
|
918 |
+
* @param array $field_data Field data.
|
919 |
+
*
|
920 |
+
* @return string field.
|
921 |
+
*/
|
922 |
+
public function get_product_selection_repeater( $field_data ) {
|
923 |
+
|
924 |
+
return $this->get_meta_field_template(
|
925 |
+
'get-product-selection-repeater.php',
|
926 |
+
$field_data
|
927 |
+
);
|
928 |
+
}
|
929 |
+
|
930 |
+
/**
|
931 |
+
* Generate product repeater html.
|
932 |
+
*
|
933 |
+
* @param string $id ID.
|
934 |
+
* @param string $options Options.
|
935 |
+
* @param array $selected_data Discount_data.
|
936 |
+
*
|
937 |
+
* @return string field.
|
938 |
+
*/
|
939 |
+
public function generate_product_repeater_html( $id, $options = '', $selected_data = '' ) {
|
940 |
+
|
941 |
+
ob_start();
|
942 |
+
|
943 |
+
include CARTFLOWS_DIR . 'includes/meta-fields/generate-product-repeater.php';
|
944 |
+
|
945 |
+
return ob_get_clean();
|
946 |
+
}
|
947 |
+
|
948 |
+
/**
|
949 |
+
* Image field.
|
950 |
+
*
|
951 |
+
* @param array $field_data Field data.
|
952 |
+
*
|
953 |
+
* @return string field.
|
954 |
+
*/
|
955 |
+
public function get_image_field( $field_data ) {
|
956 |
+
|
957 |
+
global $post;
|
958 |
+
$value = $field_data['value'];
|
959 |
+
|
960 |
+
$attr = '';
|
961 |
+
|
962 |
+
if ( isset( $field_data['attr'] ) && is_array( $field_data['attr'] ) ) {
|
963 |
+
|
964 |
+
foreach ( $field_data['attr'] as $attr_key => $attr_value ) {
|
965 |
+
$attr .= ' ' . $attr_key . '="' . $attr_value . '"';
|
966 |
+
}
|
967 |
+
}
|
968 |
+
|
969 |
+
$display_preview_box = ( isset( $value ) && '' != $value ) ? 'display:block;' : 'display:none';
|
970 |
+
|
971 |
+
$field_content = '<div id="wcf-image-preview" style="' . $display_preview_box . '">';
|
972 |
+
|
973 |
+
if ( isset( $value ) ) {
|
974 |
+
|
975 |
+
$field_content .= '<img src="' . $field_data['value'] . '" class="saved-image" name="' . $field_data['name'] . '" width="150">';
|
976 |
+
}
|
977 |
+
|
978 |
+
$field_content .= '</div>';
|
979 |
+
|
980 |
+
$image_data = htmlentities( serialize( get_post_meta( $post->ID, $field_data['name'] . '-obj' ) ) ); // phpcs:ignore
|
981 |
+
|
982 |
+
$field_content .= '<input type="hidden" id="' . $field_data['name'] . '" class="wcf-image" name="' . $field_data['name'] . '" value="' . $value . '">'; // phpcs:ignore
|
983 |
+
|
984 |
+
$field_content .= '<input type="hidden" id="' . $field_data['name'] . '-obj' . '" class="wcf-image-obj" name="' . $field_data['name'] . '-obj' . '" value="' . $image_data . '">'; // phpcs:ignore
|
985 |
+
|
986 |
+
$field_content .= '<button type="button" ' . $attr . ' class="wcf-select-image button-secondary">Select Image</button>';
|
987 |
+
|
988 |
+
$display_remove_button = ( isset( $value ) && '' != $value ) ? 'display:inline-block; margin-left: 5px;' : 'display:none';
|
989 |
+
|
990 |
+
$field_content .= '<button type="button" class="wcf-remove-image button-secondary" style="' . $display_remove_button . '">Remove Image</button>';
|
991 |
+
|
992 |
+
return $this->get_field( $field_data, $field_content );
|
993 |
+
}
|
994 |
+
|
995 |
+
/**
|
996 |
+
* Localize variables in admin
|
997 |
+
*
|
998 |
+
* @param array $vars variables.
|
999 |
+
*/
|
1000 |
+
public function localize_vars( $vars ) {
|
1001 |
+
|
1002 |
+
$ajax_actions = array(
|
1003 |
+
'wcf_json_search_pages',
|
1004 |
+
'wcf_json_search_coupons',
|
1005 |
+
'wcf_json_search_products_and_variations',
|
1006 |
+
);
|
1007 |
+
|
1008 |
+
foreach ( $ajax_actions as $action ) {
|
1009 |
+
|
1010 |
+
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
/* Add product from iframe */
|
1014 |
+
$product_src = esc_url_raw(
|
1015 |
+
add_query_arg(
|
1016 |
+
array(
|
1017 |
+
'post_type' => 'product',
|
1018 |
+
'wcf-woo-iframe' => 'true',
|
1019 |
+
),
|
1020 |
+
admin_url( 'post-new.php' )
|
1021 |
+
)
|
1022 |
+
);
|
1023 |
+
|
1024 |
+
$vars['create_product_src'] = $product_src;
|
1025 |
+
/* Add product from iframe End */
|
1026 |
+
|
1027 |
+
return $vars;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
/**
|
1031 |
+
* Get meta field template.
|
1032 |
+
*
|
1033 |
+
* @param string $template file name.
|
1034 |
+
* @param array $field_data Field data.
|
1035 |
+
*
|
1036 |
+
* @return string.
|
1037 |
+
*/
|
1038 |
+
public function get_meta_field_template( $template, $field_data ) {
|
1039 |
+
|
1040 |
+
ob_start();
|
1041 |
+
|
1042 |
+
include CARTFLOWS_DIR . 'includes/meta-fields/' . $template;
|
1043 |
+
|
1044 |
+
return ob_get_clean();
|
1045 |
+
}
|
1046 |
+
}
|
classes/class-cartflows-stats.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Stats
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stats
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Stats {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Member Variable
|
17 |
+
*
|
18 |
+
* @var object instance
|
19 |
+
*/
|
20 |
+
private static $instance;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Initiator
|
24 |
+
*/
|
25 |
+
public static function get_instance() {
|
26 |
+
if ( ! isset( self::$instance ) ) {
|
27 |
+
self::$instance = new self();
|
28 |
+
}
|
29 |
+
return self::$instance;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructor
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
|
37 |
+
add_action( 'wp_ajax_cartflows_fetch_stats', array( $this, 'fetch_stats' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get stats.
|
42 |
+
*/
|
43 |
+
public function fetch_stats() {
|
44 |
+
|
45 |
+
check_ajax_referer( 'wcf-fetch-stats', 'security' );
|
46 |
+
|
47 |
+
$filter = filter_input( INPUT_POST, 'filter', FILTER_SANITIZE_STRING );
|
48 |
+
|
49 |
+
if ( ! $filter ) {
|
50 |
+
$filter = 'week';
|
51 |
+
}
|
52 |
+
|
53 |
+
$from_date = gmdate( 'Y-m-d' );
|
54 |
+
$to_date = gmdate( 'Y-m-d' );
|
55 |
+
$to_date = date( 'Y-m-d H:i:s', strtotime( $to_date . '23:59:59' ) ); //phpcs:ignore
|
56 |
+
|
57 |
+
switch ( $filter ) {
|
58 |
+
|
59 |
+
case 'today':
|
60 |
+
$from_date = date( 'Y-m-d H:i:s', strtotime( $from_date . '00:00:00' ) ); //phpcs:ignore
|
61 |
+
break;
|
62 |
+
case 'yesterday':
|
63 |
+
$yesterday = gmdate( 'Y-m-d', strtotime( '-1 days' ) );
|
64 |
+
$from_date = date( 'Y-m-d H:i:s', strtotime( $yesterday . '00:00:00' ) ); //phpcs:ignore
|
65 |
+
$to_date = date( 'Y-m-d H:i:s', strtotime( $yesterday . '23:59:59' ) ); //phpcs:ignore
|
66 |
+
break;
|
67 |
+
case 'week':
|
68 |
+
$from_date = gmdate( 'Y-m-d', strtotime( '-7 days' ) );
|
69 |
+
$from_date = date( 'Y-m-d H:i:s', strtotime( $from_date . '00:00:00' ) ); //phpcs:ignore
|
70 |
+
break;
|
71 |
+
case 'month':
|
72 |
+
$from_date = gmdate( 'Y-m-d', strtotime( '-1 months' ) );
|
73 |
+
$from_date = date( 'Y-m-d H:i:s', strtotime( $from_date . '00:00:00' ) ); //phpcs:ignore
|
74 |
+
break;
|
75 |
+
case 'custom':
|
76 |
+
$to_date = $to_date ? $to_date : gmdate( 'Y-m-d' );
|
77 |
+
$from_date = $from_date ? $from_date : $to_date;
|
78 |
+
break;
|
79 |
+
default:
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Kicking this off by calling 'get_instance()' method
|
86 |
+
*/
|
87 |
+
Cartflows_Stats::get_instance();
|
classes/class-cartflows-step-factory.php
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Get current step data - factory.
|
4 |
+
*
|
5 |
+
* @package cartflows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Step factory
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Step_Factory {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Member Variable
|
17 |
+
*
|
18 |
+
* @var int step_id
|
19 |
+
*/
|
20 |
+
private $step_id;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Member Variable
|
24 |
+
*
|
25 |
+
* @var int control_step_id
|
26 |
+
*/
|
27 |
+
private $control_step_id;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Member Variable
|
31 |
+
*
|
32 |
+
* @var int flow_id
|
33 |
+
*/
|
34 |
+
private $flow_id;
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Member Variable
|
39 |
+
*
|
40 |
+
* @var string step_type
|
41 |
+
*/
|
42 |
+
private $step_type;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Member Variable
|
46 |
+
*
|
47 |
+
* @var int flow_steps
|
48 |
+
*/
|
49 |
+
private $flow_steps;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Member Variable
|
53 |
+
*
|
54 |
+
* @var int flow_steps
|
55 |
+
*/
|
56 |
+
private $flow_steps_map;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Member Variable
|
60 |
+
*
|
61 |
+
* @var int ab_test
|
62 |
+
*/
|
63 |
+
private $ab_test;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Member Variable
|
67 |
+
*
|
68 |
+
* @var int all_variations
|
69 |
+
*/
|
70 |
+
private $all_variations;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Member Variable
|
74 |
+
*
|
75 |
+
* @var array show_variations
|
76 |
+
*/
|
77 |
+
private $show_variations;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Member Variable
|
81 |
+
*
|
82 |
+
* @var int show_variation_id
|
83 |
+
*/
|
84 |
+
private $show_variation_id;
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Constructor
|
88 |
+
*
|
89 |
+
* @param int $id step id.
|
90 |
+
*/
|
91 |
+
public function __construct( $id = null ) {
|
92 |
+
|
93 |
+
if ( null !== $id ) {
|
94 |
+
|
95 |
+
/* Data from step */
|
96 |
+
$this->step_id = intval( $id );
|
97 |
+
$this->step_type = get_post_meta( $this->step_id, 'wcf-step-type', true );
|
98 |
+
/* Data from flow */
|
99 |
+
$this->flow_id = get_post_meta( $this->step_id, 'wcf-flow-id', true );
|
100 |
+
$this->flow_steps = get_post_meta( $this->flow_id, 'wcf-steps', true );
|
101 |
+
|
102 |
+
/* If Ab test */
|
103 |
+
$this->ab_test = get_post_meta( $this->step_id, 'wcf-ab-test', true );
|
104 |
+
$this->control_step_id = $this->step_id;
|
105 |
+
|
106 |
+
if ( $this->ab_test ) {
|
107 |
+
|
108 |
+
$control_step_id = get_post_meta( $this->step_id, 'wcf-control-step', true );
|
109 |
+
|
110 |
+
if ( ! empty( $control_step_id ) ) {
|
111 |
+
$this->control_step_id = intval( $control_step_id );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Is ab test enable
|
119 |
+
*/
|
120 |
+
public function is_ab_test_enable() {
|
121 |
+
|
122 |
+
if ( $this->ab_test ) {
|
123 |
+
|
124 |
+
return true;
|
125 |
+
}
|
126 |
+
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Get flow id
|
132 |
+
*/
|
133 |
+
public function get_flow_id() {
|
134 |
+
return $this->flow_id;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Get step id
|
139 |
+
*/
|
140 |
+
public function get_step_id() {
|
141 |
+
return $this->step_id;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get step type
|
146 |
+
*/
|
147 |
+
public function get_step_type() {
|
148 |
+
return $this->step_type;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Get control step id
|
153 |
+
*/
|
154 |
+
public function get_current_step() {
|
155 |
+
return $this->step_id;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Get control step id
|
160 |
+
*/
|
161 |
+
public function get_control_step() {
|
162 |
+
return $this->control_step_id;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Get flow steps
|
167 |
+
*/
|
168 |
+
public function get_flow_steps() {
|
169 |
+
return $this->flow_steps;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Set flow steps map
|
174 |
+
*/
|
175 |
+
public function set_flow_steps_map() {
|
176 |
+
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Check for thank you page
|
181 |
+
*
|
182 |
+
* @return bool
|
183 |
+
*/
|
184 |
+
public function is_thankyou_page() {
|
185 |
+
|
186 |
+
$step_type = $this->get_step_type();
|
187 |
+
|
188 |
+
if ( 'thankyou' === $step_type ) {
|
189 |
+
|
190 |
+
return true;
|
191 |
+
}
|
192 |
+
|
193 |
+
return false;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Check for checkout page
|
198 |
+
*
|
199 |
+
* @return bool
|
200 |
+
*/
|
201 |
+
public function is_checkout_page() {
|
202 |
+
|
203 |
+
$step_type = $this->get_step_type();
|
204 |
+
|
205 |
+
if ( 'checkout' === $step_type ) {
|
206 |
+
|
207 |
+
return true;
|
208 |
+
}
|
209 |
+
|
210 |
+
return false;
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Get direct next step id.
|
215 |
+
*
|
216 |
+
* @since x.x.x
|
217 |
+
*
|
218 |
+
* @return bool|int
|
219 |
+
*/
|
220 |
+
public function get_direct_next_step_id() {
|
221 |
+
|
222 |
+
$next_step_id = false;
|
223 |
+
|
224 |
+
if ( $this->flow_id ) {
|
225 |
+
|
226 |
+
$flow_steps = $this->get_flow_steps();
|
227 |
+
$control_step = $this->get_control_step();
|
228 |
+
|
229 |
+
if ( is_array( $flow_steps ) ) {
|
230 |
+
|
231 |
+
foreach ( $flow_steps as $index => $data ) {
|
232 |
+
|
233 |
+
if ( intval( $data['id'] ) === $control_step ) {
|
234 |
+
|
235 |
+
$next_step_index = $index + 1;
|
236 |
+
|
237 |
+
if ( isset( $flow_steps[ $next_step_index ] ) ) {
|
238 |
+
|
239 |
+
$next_step_id = intval( $flow_steps[ $next_step_index ]['id'] );
|
240 |
+
}
|
241 |
+
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
return $next_step_id;
|
249 |
+
}
|
250 |
+
}
|
classes/class-cartflows-update.php
CHANGED
@@ -74,10 +74,6 @@ if ( ! class_exists( 'Cartflows_Update' ) ) :
|
|
74 |
$this->changed_wp_templates();
|
75 |
}
|
76 |
|
77 |
-
if ( version_compare( $saved_version, '1.5.13', '<' ) ) {
|
78 |
-
$this->update_usage_tracking_option();
|
79 |
-
}
|
80 |
-
|
81 |
// Update auto saved version number.
|
82 |
update_option( 'cartflows-version', CARTFLOWS_VER );
|
83 |
|
@@ -103,24 +99,6 @@ if ( ! class_exists( 'Cartflows_Update' ) ) :
|
|
103 |
wcf()->create_files();
|
104 |
}
|
105 |
|
106 |
-
/**
|
107 |
-
* Update usage tracking option.
|
108 |
-
*
|
109 |
-
* @since 1.0.0
|
110 |
-
* @return void
|
111 |
-
*/
|
112 |
-
public function update_usage_tracking_option() {
|
113 |
-
|
114 |
-
$bsf_usage_tracking = get_site_option( 'bsf_analytics_optin' );
|
115 |
-
|
116 |
-
$cf_usage_tracking = get_site_option( 'cf_analytics_optin' );
|
117 |
-
|
118 |
-
if ( isset( $bsf_usage_tracking ) && 'yes' === $bsf_usage_tracking && false === $cf_usage_tracking ) {
|
119 |
-
update_site_option( 'cf_analytics_optin', 'yes' );
|
120 |
-
}
|
121 |
-
|
122 |
-
}
|
123 |
-
|
124 |
/**
|
125 |
* Init
|
126 |
*
|
74 |
$this->changed_wp_templates();
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
77 |
// Update auto saved version number.
|
78 |
update_option( 'cartflows-version', CARTFLOWS_VER );
|
79 |
|
99 |
wcf()->create_files();
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* Init
|
104 |
*
|
classes/class-cartflows-utils.php
CHANGED
@@ -1,591 +1,581 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Utils.
|
4 |
-
*
|
5 |
-
* @package CARTFLOWS
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit; // Exit if accessed directly.
|
10 |
-
}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class Cartflows_Utils.
|
14 |
-
*/
|
15 |
-
class Cartflows_Utils {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Member Variable
|
19 |
-
*
|
20 |
-
* @var instance
|
21 |
-
*/
|
22 |
-
private static $instance;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Member Variable
|
26 |
-
*
|
27 |
-
* @var checkout_products
|
28 |
-
*/
|
29 |
-
public $checkout_products = array();
|
30 |
-
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Initiator
|
34 |
-
*/
|
35 |
-
public static function get_instance() {
|
36 |
-
if ( ! isset( self::$instance ) ) {
|
37 |
-
self::$instance = new self();
|
38 |
-
}
|
39 |
-
return self::$instance;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Constructor
|
44 |
-
*/
|
45 |
-
public function __construct() {
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Get current post type
|
50 |
-
*
|
51 |
-
* @param string $post_type post type.
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public function current_post_type( $post_type = '' ) {
|
55 |
-
|
56 |
-
if ( '' === $post_type ) {
|
57 |
-
$post_type = get_post_type();
|
58 |
-
}
|
59 |
-
|
60 |
-
return $post_type;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Check if post type is of step.
|
65 |
-
*
|
66 |
-
* @param string $post_type post type.
|
67 |
-
* @return bool
|
68 |
-
*/
|
69 |
-
public function is_step_post_type( $post_type = '' ) {
|
70 |
-
|
71 |
-
if ( $this->get_step_post_type() === $this->current_post_type( $post_type ) ) {
|
72 |
-
|
73 |
-
return true;
|
74 |
-
}
|
75 |
-
|
76 |
-
return false;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Check if post type is of flow.
|
81 |
-
*
|
82 |
-
* @param string $post_type post type.
|
83 |
-
* @return bool
|
84 |
-
*/
|
85 |
-
public function is_flow_post_type( $post_type = '' ) {
|
86 |
-
|
87 |
-
if ( $this->get_flow_post_type() === $this->current_post_type( $post_type ) ) {
|
88 |
-
|
89 |
-
return true;
|
90 |
-
}
|
91 |
-
|
92 |
-
return false;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get post type of step.
|
97 |
-
*
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function get_step_post_type() {
|
101 |
-
|
102 |
-
return CARTFLOWS_STEP_POST_TYPE;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get post type of flow.
|
107 |
-
*
|
108 |
-
* @return string
|
109 |
-
*/
|
110 |
-
public function get_flow_post_type() {
|
111 |
-
|
112 |
-
return CARTFLOWS_FLOW_POST_TYPE;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Get flow id
|
117 |
-
*
|
118 |
-
* @return int
|
119 |
-
*/
|
120 |
-
public function get_flow_id() {
|
121 |
-
|
122 |
-
global $post;
|
123 |
-
|
124 |
-
return get_post_meta( $post->ID, 'wcf-flow-id', true );
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Get flow id by step
|
129 |
-
*
|
130 |
-
* @param int $step_id step ID.
|
131 |
-
* @return int
|
132 |
-
*/
|
133 |
-
public function get_flow_id_from_step_id( $step_id ) {
|
134 |
-
|
135 |
-
return get_post_meta( $step_id, 'wcf-flow-id', true );
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Get flow steps by id
|
140 |
-
*
|
141 |
-
* @param int $flow_id flow ID.
|
142 |
-
* @return int
|
143 |
-
*/
|
144 |
-
public function get_flow_steps( $flow_id ) {
|
145 |
-
|
146 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
147 |
-
|
148 |
-
if ( is_array( $steps ) && ! empty( $steps ) ) {
|
149 |
-
return $steps;
|
150 |
-
}
|
151 |
-
|
152 |
-
return false;
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Get template type of step
|
157 |
-
*
|
158 |
-
* @param int $step_id step ID.
|
159 |
-
* @return int
|
160 |
-
*/
|
161 |
-
public function get_step_type( $step_id ) {
|
162 |
-
|
163 |
-
return get_post_meta( $step_id, 'wcf-step-type', true );
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Get next id for step
|
168 |
-
*
|
169 |
-
* @param int $flow_id flow ID.
|
170 |
-
* @param int $step_id step ID.
|
171 |
-
* @return bool
|
172 |
-
*/
|
173 |
-
public function get_next_step_id( $flow_id, $step_id ) {
|
174 |
-
|
175 |
-
$
|
176 |
-
$
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
*
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
*
|
344 |
-
*
|
345 |
-
* @return
|
346 |
-
*/
|
347 |
-
public function
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
$
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
$
|
403 |
-
|
404 |
-
return
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
if (
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
}
|
583 |
-
|
584 |
-
if ( isset( $array[ $prop ] ) ) {
|
585 |
-
$value = $array[ $prop ];
|
586 |
-
} else {
|
587 |
-
$value = '';
|
588 |
-
}
|
589 |
-
|
590 |
-
return empty( $value ) && null !== $default ? $default : $value;
|
591 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Utils.
|
4 |
+
*
|
5 |
+
* @package CARTFLOWS
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Cartflows_Utils.
|
14 |
+
*/
|
15 |
+
class Cartflows_Utils {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Member Variable
|
19 |
+
*
|
20 |
+
* @var instance
|
21 |
+
*/
|
22 |
+
private static $instance;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Member Variable
|
26 |
+
*
|
27 |
+
* @var checkout_products
|
28 |
+
*/
|
29 |
+
public $checkout_products = array();
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Initiator
|
34 |
+
*/
|
35 |
+
public static function get_instance() {
|
36 |
+
if ( ! isset( self::$instance ) ) {
|
37 |
+
self::$instance = new self();
|
38 |
+
}
|
39 |
+
return self::$instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Constructor
|
44 |
+
*/
|
45 |
+
public function __construct() {
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get current post type
|
50 |
+
*
|
51 |
+
* @param string $post_type post type.
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function current_post_type( $post_type = '' ) {
|
55 |
+
|
56 |
+
if ( '' === $post_type ) {
|
57 |
+
$post_type = get_post_type();
|
58 |
+
}
|
59 |
+
|
60 |
+
return $post_type;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Check if post type is of step.
|
65 |
+
*
|
66 |
+
* @param string $post_type post type.
|
67 |
+
* @return bool
|
68 |
+
*/
|
69 |
+
public function is_step_post_type( $post_type = '' ) {
|
70 |
+
|
71 |
+
if ( $this->get_step_post_type() === $this->current_post_type( $post_type ) ) {
|
72 |
+
|
73 |
+
return true;
|
74 |
+
}
|
75 |
+
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Check if post type is of flow.
|
81 |
+
*
|
82 |
+
* @param string $post_type post type.
|
83 |
+
* @return bool
|
84 |
+
*/
|
85 |
+
public function is_flow_post_type( $post_type = '' ) {
|
86 |
+
|
87 |
+
if ( $this->get_flow_post_type() === $this->current_post_type( $post_type ) ) {
|
88 |
+
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get post type of step.
|
97 |
+
*
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function get_step_post_type() {
|
101 |
+
|
102 |
+
return CARTFLOWS_STEP_POST_TYPE;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get post type of flow.
|
107 |
+
*
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
public function get_flow_post_type() {
|
111 |
+
|
112 |
+
return CARTFLOWS_FLOW_POST_TYPE;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get flow id
|
117 |
+
*
|
118 |
+
* @return int
|
119 |
+
*/
|
120 |
+
public function get_flow_id() {
|
121 |
+
|
122 |
+
global $post;
|
123 |
+
|
124 |
+
return get_post_meta( $post->ID, 'wcf-flow-id', true );
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Get flow id by step
|
129 |
+
*
|
130 |
+
* @param int $step_id step ID.
|
131 |
+
* @return int
|
132 |
+
*/
|
133 |
+
public function get_flow_id_from_step_id( $step_id ) {
|
134 |
+
|
135 |
+
return get_post_meta( $step_id, 'wcf-flow-id', true );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Get flow steps by id
|
140 |
+
*
|
141 |
+
* @param int $flow_id flow ID.
|
142 |
+
* @return int
|
143 |
+
*/
|
144 |
+
public function get_flow_steps( $flow_id ) {
|
145 |
+
|
146 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
147 |
+
|
148 |
+
if ( is_array( $steps ) && ! empty( $steps ) ) {
|
149 |
+
return $steps;
|
150 |
+
}
|
151 |
+
|
152 |
+
return false;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Get template type of step
|
157 |
+
*
|
158 |
+
* @param int $step_id step ID.
|
159 |
+
* @return int
|
160 |
+
*/
|
161 |
+
public function get_step_type( $step_id ) {
|
162 |
+
|
163 |
+
return get_post_meta( $step_id, 'wcf-step-type', true );
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Get next id for step
|
168 |
+
*
|
169 |
+
* @param int $flow_id flow ID.
|
170 |
+
* @param int $step_id step ID.
|
171 |
+
* @return bool
|
172 |
+
*/
|
173 |
+
public function get_next_step_id( $flow_id, $step_id ) {
|
174 |
+
|
175 |
+
$wcf_step_obj = wcf_get_step( $step_id );
|
176 |
+
$next_step_id = $wcf_step_obj->get_direct_next_step_id();
|
177 |
+
|
178 |
+
return $next_step_id;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get next id for step
|
183 |
+
*
|
184 |
+
* @param int $order_id order ID.
|
185 |
+
* @return int
|
186 |
+
*/
|
187 |
+
public function get_flow_id_from_order( $order_id ) {
|
188 |
+
|
189 |
+
$flow_id = get_post_meta( $order_id, '_wcf_flow_id', true );
|
190 |
+
|
191 |
+
return intval( $flow_id );
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Get checkout id for order
|
196 |
+
*
|
197 |
+
* @param int $order_id order ID.
|
198 |
+
* @return int
|
199 |
+
*/
|
200 |
+
public function get_checkout_id_from_order( $order_id ) {
|
201 |
+
|
202 |
+
$checkout_id = get_post_meta( $order_id, '_wcf_checkout_id', true );
|
203 |
+
|
204 |
+
return intval( $checkout_id );
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* We are using this function mostly in ajax on checkout page
|
209 |
+
*
|
210 |
+
* @return bool
|
211 |
+
*/
|
212 |
+
public function get_checkout_id_from_post_data() {
|
213 |
+
|
214 |
+
if ( isset( $_POST['_wcf_checkout_id'] ) ) { //phpcs:ignore
|
215 |
+
|
216 |
+
$checkout_id = filter_var( wp_unslash( $_POST['_wcf_checkout_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
217 |
+
|
218 |
+
return intval( $checkout_id );
|
219 |
+
}
|
220 |
+
|
221 |
+
return false;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* We are using this function mostly in ajax on checkout page
|
226 |
+
*
|
227 |
+
* @return bool
|
228 |
+
*/
|
229 |
+
public function get_flow_id_from_post_data() {
|
230 |
+
|
231 |
+
if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
|
232 |
+
|
233 |
+
$flow_id = filter_var( wp_unslash( $_POST['_wcf_flow_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
234 |
+
|
235 |
+
return intval( $flow_id );
|
236 |
+
}
|
237 |
+
|
238 |
+
return false;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Get optin id for order
|
243 |
+
*
|
244 |
+
* @param int $order_id order ID.
|
245 |
+
* @return int
|
246 |
+
*/
|
247 |
+
public function get_optin_id_from_order( $order_id ) {
|
248 |
+
|
249 |
+
$optin_id = get_post_meta( $order_id, '_wcf_optin_id', true );
|
250 |
+
|
251 |
+
return intval( $optin_id );
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* We are using this function mostly in ajax on checkout page
|
256 |
+
*
|
257 |
+
* @return bool
|
258 |
+
*/
|
259 |
+
public function get_optin_id_from_post_data() {
|
260 |
+
|
261 |
+
if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
|
262 |
+
|
263 |
+
$optin_id = filter_var( wp_unslash( $_POST['_wcf_optin_id'] ), FILTER_SANITIZE_NUMBER_INT ); //phpcs:ignore
|
264 |
+
|
265 |
+
return intval( $optin_id );
|
266 |
+
}
|
267 |
+
|
268 |
+
return false;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Check for thank you page
|
273 |
+
*
|
274 |
+
* @param int $step_id step ID.
|
275 |
+
* @return bool
|
276 |
+
*/
|
277 |
+
public function check_is_thankyou_page( $step_id ) {
|
278 |
+
|
279 |
+
$step_type = $this->get_step_type( $step_id );
|
280 |
+
|
281 |
+
if ( 'thankyou' === $step_type ) {
|
282 |
+
|
283 |
+
return true;
|
284 |
+
}
|
285 |
+
|
286 |
+
return false;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Check for offer page
|
291 |
+
*
|
292 |
+
* @param int $step_id step ID.
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public function check_is_offer_page( $step_id ) {
|
296 |
+
|
297 |
+
$step_type = $this->get_step_type( $step_id );
|
298 |
+
|
299 |
+
if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
|
300 |
+
|
301 |
+
return true;
|
302 |
+
}
|
303 |
+
|
304 |
+
return false;
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Check if loaded page requires woo.
|
309 |
+
*
|
310 |
+
* @return bool
|
311 |
+
*/
|
312 |
+
public function check_is_woo_required_page() {
|
313 |
+
|
314 |
+
global $post;
|
315 |
+
$step_id = $post->ID;
|
316 |
+
$woo_not_required_type = array( 'landing' );
|
317 |
+
$step_type = $this->get_step_type( $step_id );
|
318 |
+
return ( ! in_array( $step_type, $woo_not_required_type, true ) );
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Define constant for cache
|
323 |
+
*
|
324 |
+
* @return void
|
325 |
+
*/
|
326 |
+
public function do_not_cache() {
|
327 |
+
|
328 |
+
global $post;
|
329 |
+
|
330 |
+
if ( ! apply_filters( 'cartflows_do_not_cache_step', true, $post->ID ) ) {
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
|
334 |
+
wcf_maybe_define_constant( 'DONOTCACHEPAGE', true );
|
335 |
+
wcf_maybe_define_constant( 'DONOTCACHEOBJECT', true );
|
336 |
+
wcf_maybe_define_constant( 'DONOTCACHEDB', true );
|
337 |
+
|
338 |
+
nocache_headers();
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Get linking url
|
343 |
+
*
|
344 |
+
* @param array $args query args.
|
345 |
+
* @return string
|
346 |
+
*/
|
347 |
+
public function get_linking_url( $args = array() ) {
|
348 |
+
|
349 |
+
$url = get_home_url();
|
350 |
+
|
351 |
+
$url = add_query_arg( $args, $url );
|
352 |
+
|
353 |
+
return $url;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Get assets urls
|
358 |
+
*
|
359 |
+
* @return array
|
360 |
+
* @since 1.1.6
|
361 |
+
*/
|
362 |
+
public function get_assets_path() {
|
363 |
+
|
364 |
+
$rtl = '';
|
365 |
+
|
366 |
+
if ( is_rtl() ) {
|
367 |
+
$rtl = '-rtl';
|
368 |
+
}
|
369 |
+
|
370 |
+
$file_prefix = '';
|
371 |
+
$dir_name = '';
|
372 |
+
|
373 |
+
$is_min = apply_filters( 'cartflows_load_min_assets', false );
|
374 |
+
|
375 |
+
if ( $is_min ) {
|
376 |
+
$file_prefix = '.min';
|
377 |
+
$dir_name = 'min-';
|
378 |
+
}
|
379 |
+
|
380 |
+
$js_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'js/';
|
381 |
+
$css_gen_path = CARTFLOWS_URL . 'assets/' . $dir_name . 'css/';
|
382 |
+
|
383 |
+
return array(
|
384 |
+
'css' => $css_gen_path,
|
385 |
+
'js' => $js_gen_path,
|
386 |
+
'file_prefix' => $file_prefix,
|
387 |
+
'rtl' => $rtl,
|
388 |
+
);
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Get assets css url
|
393 |
+
*
|
394 |
+
* @param string $file file name.
|
395 |
+
* @return string
|
396 |
+
* @since 1.1.6
|
397 |
+
*/
|
398 |
+
public function get_css_url( $file ) {
|
399 |
+
|
400 |
+
$assets_vars = wcf()->assets_vars;
|
401 |
+
|
402 |
+
$url = $assets_vars['css'] . $file . $assets_vars['rtl'] . $assets_vars['file_prefix'] . '.css';
|
403 |
+
|
404 |
+
return $url;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Get assets js url
|
409 |
+
*
|
410 |
+
* @param string $file file name.
|
411 |
+
* @return string
|
412 |
+
* @since 1.1.6
|
413 |
+
*/
|
414 |
+
public function get_js_url( $file ) {
|
415 |
+
|
416 |
+
$assets_vars = wcf()->assets_vars;
|
417 |
+
|
418 |
+
$url = $assets_vars['js'] . $file . $assets_vars['file_prefix'] . '.js';
|
419 |
+
|
420 |
+
return $url;
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Get unique id.
|
425 |
+
*
|
426 |
+
* @param int $length Length.
|
427 |
+
*
|
428 |
+
* @return string
|
429 |
+
*/
|
430 |
+
public function get_unique_id( $length = 8 ) {
|
431 |
+
|
432 |
+
return substr( md5( microtime() ), 0, $length );
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Get selected checkout products and data
|
437 |
+
*
|
438 |
+
* @param int $checkout_id Checkout id..
|
439 |
+
* @param array $saved_products Saved product.
|
440 |
+
*
|
441 |
+
* @return array
|
442 |
+
*/
|
443 |
+
public function get_selected_checkout_products( $checkout_id = '', $saved_products = array() ) {
|
444 |
+
|
445 |
+
if ( empty( $checkout_id ) ) {
|
446 |
+
|
447 |
+
global $post;
|
448 |
+
|
449 |
+
$checkout_id = $post->ID;
|
450 |
+
}
|
451 |
+
|
452 |
+
if ( ! isset( $this->checkout_products[ $checkout_id ] ) ) {
|
453 |
+
|
454 |
+
if ( ! empty( $saved_products ) ) {
|
455 |
+
|
456 |
+
$products = $saved_products;
|
457 |
+
} else {
|
458 |
+
|
459 |
+
$products = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-products' );
|
460 |
+
}
|
461 |
+
|
462 |
+
$verify_url_data = false;
|
463 |
+
$default_add_to_cart = false;
|
464 |
+
$default_ids = array();
|
465 |
+
$default_add_to_cart = true;
|
466 |
+
|
467 |
+
if ( isset( $_GET['wcf-default'] ) ) { //phpcs:ignore
|
468 |
+
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
469 |
+
$default_sequence = sanitize_text_field( wp_unslash( $_GET['wcf-default'] ) );
|
470 |
+
$default_ids = array_map( 'intval', explode( ',', $default_sequence ) );
|
471 |
+
$verify_url_data = true;
|
472 |
+
}
|
473 |
+
|
474 |
+
if ( is_array( $products ) ) {
|
475 |
+
|
476 |
+
foreach ( $products as $in => $data ) {
|
477 |
+
|
478 |
+
if ( $verify_url_data ) {
|
479 |
+
|
480 |
+
$default_add_to_cart = false;
|
481 |
+
$sequence = $in + 1;
|
482 |
+
|
483 |
+
if ( in_array( $sequence, $default_ids, true ) ) {
|
484 |
+
$default_add_to_cart = true;
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
+
$default_data = array(
|
489 |
+
'quantity' => 1,
|
490 |
+
'discount_type' => '',
|
491 |
+
'discount_value' => '',
|
492 |
+
'unique_id' => $this->get_unique_id(),
|
493 |
+
'add_to_cart' => $default_add_to_cart,
|
494 |
+
);
|
495 |
+
|
496 |
+
$products[ $in ] = wp_parse_args( $products[ $in ], $default_data );
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
500 |
+
$this->checkout_products[ $checkout_id ] = $products;
|
501 |
+
}
|
502 |
+
|
503 |
+
return $this->checkout_products[ $checkout_id ];
|
504 |
+
}
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Get selected checkout products and data
|
508 |
+
*
|
509 |
+
* @param int $checkout_id Checkout id..
|
510 |
+
* @param array $products_data Saved product.
|
511 |
+
*
|
512 |
+
* @return array
|
513 |
+
*/
|
514 |
+
public function set_selcted_checkout_products( $checkout_id = '', $products_data = array() ) {
|
515 |
+
|
516 |
+
if ( empty( $checkout_id ) ) {
|
517 |
+
|
518 |
+
global $post;
|
519 |
+
|
520 |
+
$checkout_id = $post->ID;
|
521 |
+
}
|
522 |
+
|
523 |
+
if ( isset( $this->checkout_products[ $checkout_id ] ) ) {
|
524 |
+
|
525 |
+
$products = $this->checkout_products[ $checkout_id ];
|
526 |
+
} else {
|
527 |
+
$products = $this->get_selected_checkout_products( $checkout_id );
|
528 |
+
}
|
529 |
+
|
530 |
+
if ( is_array( $products ) && ! empty( $products_data ) ) {
|
531 |
+
|
532 |
+
foreach ( $products as $in => $data ) {
|
533 |
+
|
534 |
+
if ( isset( $products_data[ $in ] ) ) {
|
535 |
+
$products[ $in ] = wp_parse_args( $products_data[ $in ], $products[ $in ] );
|
536 |
+
}
|
537 |
+
}
|
538 |
+
}
|
539 |
+
|
540 |
+
$this->checkout_products[ $checkout_id ] = $products;
|
541 |
+
|
542 |
+
return $this->checkout_products[ $checkout_id ];
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Clear Installed Page Builder Cache
|
547 |
+
*/
|
548 |
+
public function clear_cache() {
|
549 |
+
|
550 |
+
// Clear 'Elementor' file cache.
|
551 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
552 |
+
Elementor\Plugin::$instance->files_manager->clear_cache();
|
553 |
+
}
|
554 |
+
}
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Get a specific property of an array without needing to check if that property exists.
|
559 |
+
*
|
560 |
+
* Provide a default value if you want to return a specific value if the property is not set.
|
561 |
+
*
|
562 |
+
* @param array $array Array from which the property's value should be retrieved.
|
563 |
+
* @param string $prop Name of the property to be retrieved.
|
564 |
+
* @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null.
|
565 |
+
*
|
566 |
+
* @return null|string|mixed The value
|
567 |
+
*/
|
568 |
+
function wcf_get_prop( $array, $prop, $default = null ) {
|
569 |
+
|
570 |
+
if ( ! is_array( $array ) && ! ( is_object( $array ) && $array instanceof ArrayAccess ) ) {
|
571 |
+
return $default;
|
572 |
+
}
|
573 |
+
|
574 |
+
if ( isset( $array[ $prop ] ) ) {
|
575 |
+
$value = $array[ $prop ];
|
576 |
+
} else {
|
577 |
+
$value = '';
|
578 |
+
}
|
579 |
+
|
580 |
+
return empty( $value ) && null !== $default ? $default : $value;
|
581 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class-cartflows-wizard.php
CHANGED
@@ -312,7 +312,7 @@ if ( ! class_exists( 'CartFlows_Wizard' ) ) :
|
|
312 |
<div class="cartflows-setup-actions step">
|
313 |
<div class="button-prev-wrap">
|
314 |
</div>
|
315 |
-
<div class="
|
316 |
<input type="submit" class="uct-activate button-primary button button-large " value="<?php esc_html_e( 'Lets Go »', 'cartflows' ); ?>" name="save_step" />
|
317 |
</div>
|
318 |
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
@@ -417,7 +417,13 @@ if ( ! class_exists( 'CartFlows_Wizard' ) ) :
|
|
417 |
</tr>
|
418 |
</table>
|
419 |
<p><?php esc_html_e( 'While CartFlows Should work with most page builders, we offer templates for the above page builders.', 'cartflows' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
420 |
|
|
|
421 |
<div class="cartflows-setup-actions step">
|
422 |
<div class="button-prev-wrap">
|
423 |
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
@@ -456,7 +462,7 @@ if ( ! class_exists( 'CartFlows_Wizard' ) ) :
|
|
456 |
|
457 |
<span>
|
458 |
<?php esc_html_e( 'The following plugin will be installed and activated for you:', 'cartflows' ); ?>
|
459 |
-
<a target="_blank" href="https://wordpress.org/plugins/
|
460 |
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce Cart Abandonment Recovery', 'cartflows' ); ?></a>
|
461 |
|
462 |
</span>
|
312 |
<div class="cartflows-setup-actions step">
|
313 |
<div class="button-prev-wrap">
|
314 |
</div>
|
315 |
+
<div class="wcf-usage-tracking" >
|
316 |
<input type="submit" class="uct-activate button-primary button button-large " value="<?php esc_html_e( 'Lets Go »', 'cartflows' ); ?>" name="save_step" />
|
317 |
</div>
|
318 |
<?php wp_nonce_field( 'cartflow-setup' ); ?>
|
417 |
</tr>
|
418 |
</table>
|
419 |
<p><?php esc_html_e( 'While CartFlows Should work with most page builders, we offer templates for the above page builders.', 'cartflows' ); ?></p>
|
420 |
+
<div class="cartflows-setup-extra-notice">
|
421 |
+
<span>
|
422 |
+
<?php esc_html_e( 'The following plugin will be installed and activated for you:', 'cartflows' ); ?>
|
423 |
+
<a target="_blank" id="wcf-page-builder" href="https://wordpress.org/plugins/elementor/"> <?php esc_html_e( 'Elementor', 'cartflows' ); ?></a>
|
424 |
+
</span>
|
425 |
|
426 |
+
</div>
|
427 |
<div class="cartflows-setup-actions step">
|
428 |
<div class="button-prev-wrap">
|
429 |
<a href="<?php echo esc_url( $this->get_prev_step_link() ); ?>" class="button-primary button button-large button-prev" ><?php esc_html_e( '« Previous', 'cartflows' ); ?></a>
|
462 |
|
463 |
<span>
|
464 |
<?php esc_html_e( 'The following plugin will be installed and activated for you:', 'cartflows' ); ?>
|
465 |
+
<a target="_blank" href="https://wordpress.org/plugins/woocommerce/"> <?php esc_html_e( 'WooCommerce', 'cartflows' ); ?></a>,
|
466 |
<a target="_blank" href="https://wordpress.org/plugins/woo-cart-abandonment-recovery/"> <?php esc_html_e( 'WooCommerce Cart Abandonment Recovery', 'cartflows' ); ?></a>
|
467 |
|
468 |
</span>
|
includes/admin/cartflows-admin-header.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CartFlows Admin Header.
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div class="wcf-menu-page-header">
|
10 |
+
<div class="wcf-container wcf-flex">
|
11 |
+
<div class="wcf-title">
|
12 |
+
<span class="screen-reader-text"><?php echo esc_attr( CARTFLOWS_PLUGIN_NAME ); ?></span>
|
13 |
+
<img class="wcf-logo" src="<?php echo esc_attr( CARTFLOWS_URL ) . 'assets/images/cartflows-logo.svg'; ?>" />
|
14 |
+
</div>
|
15 |
+
<div class="wcf-top-links">
|
16 |
+
<?php
|
17 |
+
esc_attr_e( 'Generate More Leads & More Sales', 'cartflows' );
|
18 |
+
?>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
</div>
|
includes/admin/cartflows-admin.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
</div>
|
17 |
<div class="wcf-top-links">
|
18 |
<?php
|
19 |
-
esc_attr_e( '
|
20 |
?>
|
21 |
</div>
|
22 |
</div>
|
16 |
</div>
|
17 |
<div class="wcf-top-links">
|
18 |
<?php
|
19 |
+
esc_attr_e( 'Generate More Leads & More Sales', 'cartflows' );
|
20 |
?>
|
21 |
</div>
|
22 |
</div>
|
includes/admin/cartflows-general-bck.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* General Setting Form
|
4 |
-
*
|
5 |
-
* @package CARTFLOWS
|
6 |
-
*/
|
7 |
-
|
8 |
-
$extensions = array(
|
9 |
-
'common' => array(
|
10 |
-
'title' => __( 'Selec', 'cartflows' ),
|
11 |
-
'setting_url' => admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS . '&action=common-settings' ),
|
12 |
-
),
|
13 |
-
);
|
14 |
-
|
15 |
-
?>
|
16 |
-
|
17 |
-
<div class="wcf-container wcf-<?php echo $action; ?>">
|
18 |
-
<div id="poststuff">
|
19 |
-
<div id="post-body" class="columns-2">
|
20 |
-
<div id="post-body-content">
|
21 |
-
<!-- All WordPress Notices below header -->
|
22 |
-
<h1 class="screen-reader-text"> <?php esc_html_e( 'General', 'cartflows' ); ?> </h1>
|
23 |
-
<div class="widgets postbox">
|
24 |
-
<h2 class="hndle wcf-flex wcf-widgets-heading"><span><?php esc_html_e( 'Welcome', 'cartflows' ); ?></span>
|
25 |
-
</h2>
|
26 |
-
<div class="inside">
|
27 |
-
<ul class="wcf-setting-tab-wrapper" >
|
28 |
-
<?php
|
29 |
-
|
30 |
-
foreach ( $extensions as $key => $data ) {
|
31 |
-
echo '<li id="' . esc_attr( $key ) . '" class="wcf-setting-tab ' . esc_attr( $key ) . '">';
|
32 |
-
echo '<a class="wcf-tab-title" href="#" target="_blank" rel="noopener">' . esc_attr( $data['title'] ) . '</a>';
|
33 |
-
echo '<div class="wcf-tab-link-wrapper">';
|
34 |
-
echo '<a class="wcf-tab-link" href="' . esc_url( $data['setting_url'] ) . '">' . esc_html__( 'Settings', 'cartflows' ) . '</a>';
|
35 |
-
echo '</div>';
|
36 |
-
echo '</li>';
|
37 |
-
}
|
38 |
-
?>
|
39 |
-
</ul>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
</div>
|
44 |
-
<!-- /post-body -->
|
45 |
-
<br class="clear">
|
46 |
-
</div>
|
47 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/cartflows-general.php
CHANGED
@@ -1,525 +1,507 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* General settings
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
$settings = Cartflows_Helper::get_common_settings();
|
9 |
-
|
10 |
-
$debug_data = Cartflows_Helper::get_debug_settings();
|
11 |
-
|
12 |
-
$permalink_settings = Cartflows_Helper::get_permalink_settings();
|
13 |
-
|
14 |
-
$google_analytics_settings = Cartflows_Helper::get_google_analytics_settings();
|
15 |
-
|
16 |
-
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
17 |
-
|
18 |
-
$debug_on = ( isset( $_GET['debug'] ) ) ? sanitize_text_field( wp_unslash( $_GET['debug'] ) ) : 'false'; //phpcs:ignore
|
19 |
-
|
20 |
-
$error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOOLEAN );
|
21 |
-
?>
|
22 |
-
|
23 |
-
|
24 |
-
<?php if ( $error_log ) : ?>
|
25 |
-
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
26 |
-
<?php Cartflows_Logger::status_logs_file(); ?>
|
27 |
-
</div>
|
28 |
-
<?php else : ?>
|
29 |
-
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
30 |
-
<input type="hidden" name="action" value="wcf_save_common_settings">
|
31 |
-
<h1 class="screen-reader-text"><?php esc_html_e( 'General Settings', 'cartflows' ); ?></h1>
|
32 |
-
|
33 |
-
<div id="poststuff">
|
34 |
-
<div id="post-body" class="columns-2">
|
35 |
-
<div id="post-body-content">
|
36 |
-
|
37 |
-
<!--
|
38 |
-
<div class="postbox
|
39 |
-
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
40 |
-
<span><?php esc_html_e( '
|
41 |
-
</h2>
|
42 |
-
<div class="inside">
|
43 |
-
<
|
44 |
-
<
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
'
|
71 |
-
'
|
72 |
-
'
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
'
|
80 |
-
'
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
'' =>
|
133 |
-
array(
|
134 |
-
'label' => __( '
|
135 |
-
'description' => '
|
136 |
-
),
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
)
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
)
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
?>
|
230 |
-
<hr/>
|
231 |
-
<?php
|
232 |
-
echo Cartflows_Admin_Fields::
|
233 |
-
array(
|
234 |
-
'id' => '
|
235 |
-
'name' => '_cartflows_facebook[
|
236 |
-
'title' => __( '
|
237 |
-
'value' => $facebook_settings['
|
238 |
-
)
|
239 |
-
);
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
'
|
245 |
-
)
|
246 |
-
);
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
'
|
253 |
-
'
|
254 |
-
'
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
'title' => __( '
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
268 |
-
array(
|
269 |
-
'id' => '
|
270 |
-
'name' => '_cartflows_facebook[
|
271 |
-
'title' => __( '
|
272 |
-
'value' => $facebook_settings['
|
273 |
-
)
|
274 |
-
);
|
275 |
-
|
276 |
-
echo
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
?>
|
329 |
-
<hr/>
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
'
|
362 |
-
)
|
363 |
-
);
|
364 |
-
|
365 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
366 |
-
array(
|
367 |
-
'id' => '
|
368 |
-
'name' => '_cartflows_google_analytics[
|
369 |
-
'title' => __( '
|
370 |
-
'value' => $google_analytics_settings['
|
371 |
-
)
|
372 |
-
);
|
373 |
-
|
374 |
-
echo Cartflows_Admin_Fields::checkobox_field(
|
375 |
-
array(
|
376 |
-
'id' => '
|
377 |
-
'name' => '_cartflows_google_analytics[
|
378 |
-
'title' => __( '
|
379 |
-
'value' => $google_analytics_settings['
|
380 |
-
)
|
381 |
-
);
|
382 |
-
|
383 |
-
echo Cartflows_Admin_Fields::
|
384 |
-
array(
|
385 |
-
'
|
386 |
-
'
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
);
|
391 |
-
|
392 |
-
echo
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
<
|
438 |
-
|
439 |
-
|
440 |
-
<p>
|
441 |
-
<?php
|
442 |
-
</p>
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
<
|
453 |
-
|
454 |
-
|
455 |
-
<p>
|
456 |
-
<?php
|
457 |
-
</p>
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
<span
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
?>
|
509 |
-
</div>
|
510 |
-
</div>
|
511 |
-
<!-- Right Sidebar -->
|
512 |
-
|
513 |
-
</div>
|
514 |
-
<!-- /post-body -->
|
515 |
-
<br class="clear">
|
516 |
-
</div>
|
517 |
-
</div>
|
518 |
-
<?php endif; ?>
|
519 |
-
|
520 |
-
<?php
|
521 |
-
/**
|
522 |
-
* Loads Zapier settings admin view.
|
523 |
-
*/
|
524 |
-
do_action( 'cartflows_after_settings' );
|
525 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* General settings
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$settings = Cartflows_Helper::get_common_settings();
|
9 |
+
|
10 |
+
$debug_data = Cartflows_Helper::get_debug_settings();
|
11 |
+
|
12 |
+
$permalink_settings = Cartflows_Helper::get_permalink_settings();
|
13 |
+
|
14 |
+
$google_analytics_settings = Cartflows_Helper::get_google_analytics_settings();
|
15 |
+
|
16 |
+
$facebook_settings = Cartflows_Helper::get_facebook_settings();
|
17 |
+
|
18 |
+
$debug_on = ( isset( $_GET['debug'] ) ) ? sanitize_text_field( wp_unslash( $_GET['debug'] ) ) : 'false'; //phpcs:ignore
|
19 |
+
|
20 |
+
$error_log = filter_input( INPUT_GET, 'cartflows-error-log', FILTER_VALIDATE_BOOLEAN );
|
21 |
+
?>
|
22 |
+
|
23 |
+
|
24 |
+
<?php if ( $error_log ) : ?>
|
25 |
+
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
26 |
+
<?php Cartflows_Logger::status_logs_file(); ?>
|
27 |
+
</div>
|
28 |
+
<?php else : ?>
|
29 |
+
<div class="wrap wcf-addon-wrap wcf-clear wcf-container">
|
30 |
+
<input type="hidden" name="action" value="wcf_save_common_settings">
|
31 |
+
<h1 class="screen-reader-text"><?php esc_html_e( 'General Settings', 'cartflows' ); ?></h1>
|
32 |
+
|
33 |
+
<div id="poststuff">
|
34 |
+
<div id="post-body" class="columns-2">
|
35 |
+
<div id="post-body-content">
|
36 |
+
|
37 |
+
<!-- General Settings -->
|
38 |
+
<div class="general-settings-form postbox">
|
39 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
40 |
+
<span><?php esc_html_e( 'General Settings', 'cartflows' ); ?></span>
|
41 |
+
</h2>
|
42 |
+
<div class="inside">
|
43 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
44 |
+
<div class="form-wrap">
|
45 |
+
<?php
|
46 |
+
|
47 |
+
do_action( 'cartflows_before_settings_fields', $settings );
|
48 |
+
|
49 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
50 |
+
array(
|
51 |
+
'id' => 'wcf_disallow_indexing',
|
52 |
+
'name' => '_cartflows_common[disallow_indexing]',
|
53 |
+
'title' => __( 'Disallow search engines from indexing flows', 'cartflows' ),
|
54 |
+
'value' => $settings['disallow_indexing'],
|
55 |
+
)
|
56 |
+
);
|
57 |
+
|
58 |
+
if ( wcf()->is_woo_active ) {
|
59 |
+
echo Cartflows_Admin_Fields::flow_checkout_selection_field(
|
60 |
+
array(
|
61 |
+
'id' => 'wcf_global_checkout',
|
62 |
+
'name' => '_cartflows_common[global_checkout]',
|
63 |
+
'title' => __( 'Global Checkout', 'cartflows' ),
|
64 |
+
'value' => $settings['global_checkout'],
|
65 |
+
)
|
66 |
+
);
|
67 |
+
}
|
68 |
+
echo Cartflows_Admin_Fields::select_field(
|
69 |
+
array(
|
70 |
+
'id' => 'wcf_default_page_builder',
|
71 |
+
'name' => '_cartflows_common[default_page_builder]',
|
72 |
+
'title' => __( 'Show Templates designed with', 'cartflows' ),
|
73 |
+
'description' => __( 'CartFlows offers flow templates that can be imported in one click. These templates are available in few different page builders. Please choose your preferred page builder from the list so you will only see templates that are made using that page builder..', 'cartflows' ),
|
74 |
+
'value' => $settings['default_page_builder'],
|
75 |
+
'options' => array(
|
76 |
+
'elementor' => __( 'Elementor', 'cartflows' ),
|
77 |
+
'beaver-builder' => __( 'Beaver Builder', 'cartflows' ),
|
78 |
+
'divi' => __( 'Divi', 'cartflows' ),
|
79 |
+
'gutenberg' => __( 'Gutenberg', 'cartflows' ),
|
80 |
+
'other' => __( 'Other', 'cartflows' ),
|
81 |
+
),
|
82 |
+
)
|
83 |
+
);
|
84 |
+
|
85 |
+
do_action( 'cartflows_after_settings_fields', $settings );
|
86 |
+
|
87 |
+
?>
|
88 |
+
</div>
|
89 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
90 |
+
<?php wp_nonce_field( 'cartflows-common-settings', 'cartflows-common-settings-nonce' ); ?>
|
91 |
+
</form>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
<!-- General Settings -->
|
95 |
+
|
96 |
+
<?php do_action( 'cartflows_after_general_settings' ); ?>
|
97 |
+
|
98 |
+
<!-- Permalink Settings -->
|
99 |
+
<div class="general-settingss-form postbox">
|
100 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
101 |
+
<span><?php esc_html_e( 'Permalink Settings', 'cartflows' ); ?></span>
|
102 |
+
</h2>
|
103 |
+
<div class="inside">
|
104 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
105 |
+
<div class="form-wrap wcf_permalink_settings">
|
106 |
+
<?php
|
107 |
+
|
108 |
+
echo Cartflows_Admin_Fields::radio_field(
|
109 |
+
array(
|
110 |
+
'id' => 'permalink_structure',
|
111 |
+
'name' => '_cartflows_permalink[permalink_structure]',
|
112 |
+
'value' => $permalink_settings['permalink_structure'],
|
113 |
+
'options' => array(
|
114 |
+
'' =>
|
115 |
+
array(
|
116 |
+
'label' => __( 'Default', 'cartflows' ),
|
117 |
+
'description' => 'Default WordPress Permalink',
|
118 |
+
),
|
119 |
+
|
120 |
+
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
121 |
+
array(
|
122 |
+
'label' => __( 'Flow and Step Slug', 'cartflows' ),
|
123 |
+
'description' => get_site_url() . '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
124 |
+
),
|
125 |
+
|
126 |
+
'/' . CARTFLOWS_FLOW_POST_TYPE . '/%flowname%' =>
|
127 |
+
array(
|
128 |
+
'label' => __( 'Flow Slug', 'cartflows' ),
|
129 |
+
'description' => get_site_url() . '/<code>' . CARTFLOWS_FLOW_POST_TYPE . '</code>/%flowname%/%stepname%/',
|
130 |
+
),
|
131 |
+
|
132 |
+
'/%flowname%/' . CARTFLOWS_STEP_POST_TYPE =>
|
133 |
+
array(
|
134 |
+
'label' => __( 'Step Slug', 'cartflows' ),
|
135 |
+
'description' => get_site_url() . '/%flowname%/<code>' . CARTFLOWS_STEP_POST_TYPE . '</code>/%stepname%/',
|
136 |
+
),
|
137 |
+
),
|
138 |
+
)
|
139 |
+
);
|
140 |
+
?>
|
141 |
+
<hr/>
|
142 |
+
<?php
|
143 |
+
|
144 |
+
echo Cartflows_Admin_Fields::title_field(
|
145 |
+
array(
|
146 |
+
'title' => __( 'Post Type Permalink Base', 'cartflows' ),
|
147 |
+
)
|
148 |
+
);
|
149 |
+
|
150 |
+
echo Cartflows_Admin_Fields::text_field(
|
151 |
+
array(
|
152 |
+
'id' => 'wcf_permalink_step_base',
|
153 |
+
'name' => '_cartflows_permalink[permalink]',
|
154 |
+
'title' => __( 'Step Base', 'cartflows' ),
|
155 |
+
'value' => $permalink_settings['permalink'],
|
156 |
+
'placeholder' => CARTFLOWS_STEP_POST_TYPE,
|
157 |
+
)
|
158 |
+
);
|
159 |
+
|
160 |
+
echo Cartflows_Admin_Fields::text_field(
|
161 |
+
array(
|
162 |
+
'id' => 'wcf_permalink_flow_base',
|
163 |
+
'name' => '_cartflows_permalink[permalink_flow_base]',
|
164 |
+
'title' => __( 'Flow Base', 'cartflows' ),
|
165 |
+
'value' => $permalink_settings['permalink_flow_base'],
|
166 |
+
'placeholder' => CARTFLOWS_FLOW_POST_TYPE,
|
167 |
+
)
|
168 |
+
);
|
169 |
+
|
170 |
+
?>
|
171 |
+
|
172 |
+
|
173 |
+
</div>
|
174 |
+
<p>
|
175 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
176 |
+
<?php submit_button( __( 'Set Default', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'reset', false ); ?>
|
177 |
+
<?php wp_nonce_field( 'cartflows-permalink-settings', 'cartflows-permalink-settings-nonce' ); ?>
|
178 |
+
</p>
|
179 |
+
|
180 |
+
|
181 |
+
</form>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
<!-- Permalink Settings -->
|
185 |
+
|
186 |
+
<!-- Facebook Pixel Tracking -->
|
187 |
+
<div class="general-settingss-form postbox">
|
188 |
+
<h2 class="wcf-facebook-hndle wcf-normal-cusror ui-sortable-handle hndle">
|
189 |
+
|
190 |
+
<span><?php esc_html_e( 'Facebook Pixel Settings', 'cartflows' ); ?></span>
|
191 |
+
</h2>
|
192 |
+
|
193 |
+
<form method="post" class="wrap wcf-clear" action="">
|
194 |
+
<div class="form-wrap">
|
195 |
+
<input type="hidden" name="action" value="wcf_save_facebook_pixel_settings">
|
196 |
+
<div id="post-body">
|
197 |
+
|
198 |
+
<div class="inside">
|
199 |
+
<div class="form-wrap">
|
200 |
+
<?php
|
201 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
202 |
+
array(
|
203 |
+
'id' => 'wcf_facebook_pixel_tracking',
|
204 |
+
'name' => '_cartflows_facebook[facebook_pixel_tracking]',
|
205 |
+
'title' => __( 'Enable Facebook Pixel Tracking', 'cartflows' ),
|
206 |
+
'value' => $facebook_settings['facebook_pixel_tracking'],
|
207 |
+
)
|
208 |
+
);
|
209 |
+
|
210 |
+
echo "<div class='wcf-fb-pixel-wrapper'>";
|
211 |
+
?>
|
212 |
+
<hr/>
|
213 |
+
<?php
|
214 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
215 |
+
array(
|
216 |
+
'id' => 'wcf_facebook_pixel_tracking_for_site',
|
217 |
+
'name' => '_cartflows_facebook[facebook_pixel_tracking_for_site]',
|
218 |
+
'title' => __( 'Enable for the whole site', 'cartflows' ),
|
219 |
+
'value' => $facebook_settings['facebook_pixel_tracking_for_site'],
|
220 |
+
)
|
221 |
+
);
|
222 |
+
|
223 |
+
echo Cartflows_Admin_Fields::title_field(
|
224 |
+
array(
|
225 |
+
'title' => '',
|
226 |
+
'description' => __( 'If this option is unchecked, it will only apply to CartFlows steps.', 'cartflows' ),
|
227 |
+
)
|
228 |
+
);
|
229 |
+
?>
|
230 |
+
<hr/>
|
231 |
+
<?php
|
232 |
+
echo Cartflows_Admin_Fields::text_field(
|
233 |
+
array(
|
234 |
+
'id' => 'wcf_facebook_pixel_id',
|
235 |
+
'name' => '_cartflows_facebook[facebook_pixel_id]',
|
236 |
+
'title' => __( 'Enter Facebook pixel ID', 'cartflows' ),
|
237 |
+
'value' => $facebook_settings['facebook_pixel_id'],
|
238 |
+
)
|
239 |
+
);
|
240 |
+
|
241 |
+
|
242 |
+
echo Cartflows_Admin_Fields::title_field(
|
243 |
+
array(
|
244 |
+
'title' => __( 'Enable Events:', 'cartflows' ),
|
245 |
+
)
|
246 |
+
);
|
247 |
+
|
248 |
+
|
249 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
250 |
+
array(
|
251 |
+
'id' => 'wcf_facebook_pixel_initiate_checkout',
|
252 |
+
'name' => '_cartflows_facebook[facebook_pixel_initiate_checkout]',
|
253 |
+
'title' => __( 'Initiate Checkout', 'cartflows' ),
|
254 |
+
'value' => $facebook_settings['facebook_pixel_initiate_checkout'],
|
255 |
+
)
|
256 |
+
);
|
257 |
+
|
258 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
259 |
+
array(
|
260 |
+
'id' => 'wcf_facebook_pixel_add_payment_info',
|
261 |
+
'name' => '_cartflows_facebook[facebook_pixel_add_payment_info]',
|
262 |
+
'title' => __( 'Add Payment Info', 'cartflows' ),
|
263 |
+
'value' => $facebook_settings['facebook_pixel_add_payment_info'],
|
264 |
+
)
|
265 |
+
);
|
266 |
+
|
267 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
268 |
+
array(
|
269 |
+
'id' => 'wcf_facebook_pixel_purchase_complete',
|
270 |
+
'name' => '_cartflows_facebook[facebook_pixel_purchase_complete]',
|
271 |
+
'title' => __( 'Purchase Complete', 'cartflows' ),
|
272 |
+
'value' => $facebook_settings['facebook_pixel_purchase_complete'],
|
273 |
+
)
|
274 |
+
);
|
275 |
+
|
276 |
+
echo '</div>';
|
277 |
+
|
278 |
+
?>
|
279 |
+
</div>
|
280 |
+
|
281 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-facebook-setting-save-btn button-primary button', 'submit', false ); ?>
|
282 |
+
<?php wp_nonce_field( 'cartflows-facebook-settings', 'cartflows-facebook-settings-nonce' ); ?>
|
283 |
+
</div>
|
284 |
+
</div>
|
285 |
+
</div>
|
286 |
+
</form>
|
287 |
+
</div>
|
288 |
+
<!-- Facebook Pixel Tracking -->
|
289 |
+
|
290 |
+
<!-- Google Analytics Tracking -->
|
291 |
+
<div class="general-settingss-form postbox">
|
292 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
293 |
+
<span><?php esc_html_e( 'Google Analytics Settings', 'cartflows' ); ?></span>
|
294 |
+
</h2>
|
295 |
+
<div class="inside">
|
296 |
+
<form method="post" class="wrap wcf-clear" action="" >
|
297 |
+
<div class="form-wrap">
|
298 |
+
<?php
|
299 |
+
|
300 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
301 |
+
array(
|
302 |
+
'id' => 'enable_google-analytics-id',
|
303 |
+
'name' => '_cartflows_google_analytics[enable_google_analytics]',
|
304 |
+
'title' => __( 'Enable Google Analytics Tracking', 'cartflows' ),
|
305 |
+
'value' => $google_analytics_settings['enable_google_analytics'],
|
306 |
+
)
|
307 |
+
);
|
308 |
+
|
309 |
+
echo "<div class='wcf-google-analytics-wrapper'>";
|
310 |
+
?>
|
311 |
+
<hr/>
|
312 |
+
<?php
|
313 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
314 |
+
array(
|
315 |
+
'id' => 'enable_google_analytics_for_site',
|
316 |
+
'name' => '_cartflows_google_analytics[enable_google_analytics_for_site]',
|
317 |
+
'title' => __( 'Enable for the whole website', 'cartflows' ),
|
318 |
+
'value' => $google_analytics_settings['enable_google_analytics_for_site'],
|
319 |
+
)
|
320 |
+
);
|
321 |
+
|
322 |
+
echo Cartflows_Admin_Fields::title_field(
|
323 |
+
array(
|
324 |
+
'title' => '',
|
325 |
+
'description' => __( 'If this option is unchecked, it will only apply to CartFlows steps.', 'cartflows' ),
|
326 |
+
)
|
327 |
+
);
|
328 |
+
?>
|
329 |
+
<hr/>
|
330 |
+
<?php
|
331 |
+
echo Cartflows_Admin_Fields::text_field(
|
332 |
+
array(
|
333 |
+
'id' => 'google-analytics-id',
|
334 |
+
'name' => '_cartflows_google_analytics[google_analytics_id]',
|
335 |
+
'title' => __( 'Google Analytics ID', 'cartflows' ),
|
336 |
+
'value' => $google_analytics_settings['google_analytics_id'],
|
337 |
+
'description' => __( 'Log into your <a href="https://analytics.google.com/" target="_blank">google analytics account</a> to find your ID. eg: UA-XXXXXX-X.', 'cartflows' ),
|
338 |
+
)
|
339 |
+
);
|
340 |
+
|
341 |
+
echo Cartflows_Admin_Fields::title_field(
|
342 |
+
array(
|
343 |
+
'title' => __( 'Enable Events:', 'cartflows' ),
|
344 |
+
)
|
345 |
+
);
|
346 |
+
|
347 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
348 |
+
array(
|
349 |
+
'id' => 'enable_begin_checkout',
|
350 |
+
'name' => '_cartflows_google_analytics[enable_begin_checkout]',
|
351 |
+
'title' => __( 'Begin Checkout', 'cartflows' ),
|
352 |
+
'value' => $google_analytics_settings['enable_begin_checkout'],
|
353 |
+
)
|
354 |
+
);
|
355 |
+
|
356 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
357 |
+
array(
|
358 |
+
'id' => 'enable_add_to_cart',
|
359 |
+
'name' => '_cartflows_google_analytics[enable_add_to_cart]',
|
360 |
+
'title' => __( 'Add To Cart', 'cartflows' ),
|
361 |
+
'value' => $google_analytics_settings['enable_add_to_cart'],
|
362 |
+
)
|
363 |
+
);
|
364 |
+
|
365 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
366 |
+
array(
|
367 |
+
'id' => 'enable_add_payment_info',
|
368 |
+
'name' => '_cartflows_google_analytics[enable_add_payment_info]',
|
369 |
+
'title' => __( 'Add Payment Info', 'cartflows' ),
|
370 |
+
'value' => $google_analytics_settings['enable_add_payment_info'],
|
371 |
+
)
|
372 |
+
);
|
373 |
+
|
374 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
375 |
+
array(
|
376 |
+
'id' => 'enable_purchase_event',
|
377 |
+
'name' => '_cartflows_google_analytics[enable_purchase_event]',
|
378 |
+
'title' => __( 'Purchase', 'cartflows' ),
|
379 |
+
'value' => $google_analytics_settings['enable_purchase_event'],
|
380 |
+
)
|
381 |
+
);
|
382 |
+
|
383 |
+
echo Cartflows_Admin_Fields::title_field(
|
384 |
+
array(
|
385 |
+
'title' => '',
|
386 |
+
'description' => __( 'Google Analytics not working correctly? <a href="https://cartflows.com/docs/troubleshooting-google-analytics-tracking-issues/" > Click here </a> to know more. ', 'cartflows' ),
|
387 |
+
)
|
388 |
+
);
|
389 |
+
|
390 |
+
do_action( 'cartflows_google_analytics_admin_fields', $google_analytics_settings );
|
391 |
+
|
392 |
+
echo '</div>';
|
393 |
+
?>
|
394 |
+
|
395 |
+
|
396 |
+
</div>
|
397 |
+
<p>
|
398 |
+
<?php submit_button( __( 'Save Changes', 'cartflows' ), 'cartflows-common-setting-save-btn button-primary button', 'submit', false ); ?>
|
399 |
+
<?php wp_nonce_field( 'cartflows-google-analytics-settings', 'cartflows-google-analytics-settings-nonce' ); ?>
|
400 |
+
</p>
|
401 |
+
|
402 |
+
|
403 |
+
</form>
|
404 |
+
</div>
|
405 |
+
</div>
|
406 |
+
<!-- Google Analytics Tracking -->
|
407 |
+
|
408 |
+
<?php do_action( 'cartflows_register_general_settings' ); ?>
|
409 |
+
|
410 |
+
</div>
|
411 |
+
|
412 |
+
<!-- Right Sidebar -->
|
413 |
+
<div class="postbox-container" id="postbox-container-1">
|
414 |
+
<div id="side-sortables">
|
415 |
+
|
416 |
+
<div class="postbox">
|
417 |
+
<h2 class="hndle">
|
418 |
+
<span class="dashicons dashicons-book"></span>
|
419 |
+
<span><?php esc_html_e( 'Knowledge Base', 'cartflows' ); ?></span>
|
420 |
+
</h2>
|
421 |
+
<div class="inside">
|
422 |
+
<p>
|
423 |
+
<?php esc_html_e( 'Not sure how something works? Take a peek at the knowledge base and learn.', 'cartflows' ); ?>
|
424 |
+
</p>
|
425 |
+
<p>
|
426 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/docs' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Visit Knowledge Base »', 'cartflows' ); ?></a>
|
427 |
+
</p>
|
428 |
+
</div>
|
429 |
+
</div>
|
430 |
+
|
431 |
+
<div class="postbox">
|
432 |
+
<h2 class="hndle">
|
433 |
+
<span class="dashicons dashicons-groups"></span>
|
434 |
+
<span><?php esc_html_e( 'Community', 'cartflows' ); ?></span>
|
435 |
+
</h2>
|
436 |
+
<div class="inside">
|
437 |
+
<p>
|
438 |
+
<?php esc_html_e( 'Join the community of super helpful CartFlows users. Say hello, ask questions, give feedback and help each other!', 'cartflows' ); ?>
|
439 |
+
</p>
|
440 |
+
<p>
|
441 |
+
<a href="<?php echo esc_url( 'https://www.facebook.com/groups/cartflows/' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Join Our Facebook Group »', 'cartflows' ); ?></a>
|
442 |
+
</p>
|
443 |
+
</div>
|
444 |
+
</div>
|
445 |
+
|
446 |
+
<div class="postbox">
|
447 |
+
<h2 class="hndle">
|
448 |
+
<span class="dashicons dashicons-sos"></span>
|
449 |
+
<span><?php esc_html_e( 'Five Star Support', 'cartflows' ); ?></span>
|
450 |
+
</h2>
|
451 |
+
<div class="inside">
|
452 |
+
<p>
|
453 |
+
<?php esc_html_e( 'Got a question? Get in touch with CartFlows developers. We\'re happy to help!', 'cartflows' ); ?>
|
454 |
+
</p>
|
455 |
+
<p>
|
456 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/contact' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Submit a Ticket »', 'cartflows' ); ?></a>
|
457 |
+
</p>
|
458 |
+
</div>
|
459 |
+
</div>
|
460 |
+
<?php
|
461 |
+
if ( 'true' == $debug_on ) {
|
462 |
+
?>
|
463 |
+
<div class="postbox">
|
464 |
+
<h2 class="hndle">
|
465 |
+
<span class="dashicons dashicons-editor-code"></span>
|
466 |
+
<span><?php esc_html_e( 'Load Minified CSS', 'cartflows' ); ?></span>
|
467 |
+
</h2>
|
468 |
+
<div class="inside">
|
469 |
+
<form method="post" class="wrap wcf-clear" action="">
|
470 |
+
<p>
|
471 |
+
<?php esc_html_e( 'Load the Minified CSS from here. Just Enable it by checking the below given checkbox.', 'cartflows' ); ?>
|
472 |
+
</p>
|
473 |
+
<?php
|
474 |
+
echo Cartflows_Admin_Fields::checkobox_field(
|
475 |
+
array(
|
476 |
+
'id' => 'allow_minified_files',
|
477 |
+
'name' => '_cartflows_debug_data[allow_minified_files]',
|
478 |
+
'title' => __( 'Load minified CSS & JS Files', 'cartflows' ),
|
479 |
+
'value' => $debug_data['allow_minified_files'],
|
480 |
+
)
|
481 |
+
);
|
482 |
+
?>
|
483 |
+
<?php submit_button( __( 'Save', 'cartflows' ), 'button-primary button', 'submit', false ); ?>
|
484 |
+
<?php wp_nonce_field( 'cartflows-debug-settings', 'cartflows-debug-settings-nonce' ); ?>
|
485 |
+
</form>
|
486 |
+
</div>
|
487 |
+
</div>
|
488 |
+
<?php
|
489 |
+
}
|
490 |
+
?>
|
491 |
+
</div>
|
492 |
+
</div>
|
493 |
+
<!-- Right Sidebar -->
|
494 |
+
|
495 |
+
</div>
|
496 |
+
<!-- /post-body -->
|
497 |
+
<br class="clear">
|
498 |
+
</div>
|
499 |
+
</div>
|
500 |
+
<?php endif; ?>
|
501 |
+
|
502 |
+
<?php
|
503 |
+
/**
|
504 |
+
* Loads Zapier settings admin view.
|
505 |
+
*/
|
506 |
+
do_action( 'cartflows_after_settings' );
|
507 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/cartflows-home.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Home overview
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
|
10 |
+
<div class="wrap wcf-clear wcf-container">
|
11 |
+
<h1 class="screen-reader-text"><?php esc_html_e( 'Home', 'cartflows' ); ?></h1>
|
12 |
+
<div id="poststuff">
|
13 |
+
|
14 |
+
<div id="post-body" class="columns-2">
|
15 |
+
<div id="post-body-content">
|
16 |
+
|
17 |
+
<!-- Getting Started -->
|
18 |
+
<div class="postbox introduction">
|
19 |
+
<h2 class="hndle wcf-normal-cusror ui-sortable-handle">
|
20 |
+
<span><?php esc_html_e( 'Getting Started', 'cartflows' ); ?></span>
|
21 |
+
</h2>
|
22 |
+
<div class="inside">
|
23 |
+
<div class="iframe-wrap">
|
24 |
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/SlE0moPKjMY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
25 |
+
</div>
|
26 |
+
<p>
|
27 |
+
<?php
|
28 |
+
esc_attr_e( 'Modernizing WordPress eCommerce!', 'cartflows' );
|
29 |
+
?>
|
30 |
+
</p>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<!-- Getting Started -->
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<!-- Right Sidebar -->
|
37 |
+
<div class="postbox-container" id="postbox-container-1">
|
38 |
+
<div id="side-sortables">
|
39 |
+
|
40 |
+
<div class="postbox">
|
41 |
+
<h2 class="hndle">
|
42 |
+
<span class="dashicons dashicons-book"></span>
|
43 |
+
<span><?php esc_html_e( 'Knowledge Base', 'cartflows' ); ?></span>
|
44 |
+
</h2>
|
45 |
+
<div class="inside">
|
46 |
+
<p>
|
47 |
+
<?php esc_html_e( 'Not sure how something works? Take a peek at the knowledge base and learn.', 'cartflows' ); ?>
|
48 |
+
</p>
|
49 |
+
<p>
|
50 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/docs' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Visit Knowledge Base »', 'cartflows' ); ?></a>
|
51 |
+
</p>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<div class="postbox">
|
56 |
+
<h2 class="hndle">
|
57 |
+
<span class="dashicons dashicons-groups"></span>
|
58 |
+
<span><?php esc_html_e( 'Community', 'cartflows' ); ?></span>
|
59 |
+
</h2>
|
60 |
+
<div class="inside">
|
61 |
+
<p>
|
62 |
+
<?php esc_html_e( 'Join the community of super helpful CartFlows users. Say hello, ask questions, give feedback and help each other!', 'cartflows' ); ?>
|
63 |
+
</p>
|
64 |
+
<p>
|
65 |
+
<a href="<?php echo esc_url( 'https://www.facebook.com/groups/cartflows/' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Join Our Facebook Group »', 'cartflows' ); ?></a>
|
66 |
+
</p>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="postbox">
|
71 |
+
<h2 class="hndle">
|
72 |
+
<span class="dashicons dashicons-sos"></span>
|
73 |
+
<span><?php esc_html_e( 'Five Star Support', 'cartflows' ); ?></span>
|
74 |
+
</h2>
|
75 |
+
<div class="inside">
|
76 |
+
<p>
|
77 |
+
<?php esc_html_e( 'Got a question? Get in touch with CartFlows developers. We\'re happy to help!', 'cartflows' ); ?>
|
78 |
+
</p>
|
79 |
+
<p>
|
80 |
+
<a href="<?php echo esc_url( 'https://cartflows.com/contact' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Submit a Ticket »', 'cartflows' ); ?></a>
|
81 |
+
</p>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<!-- Right Sidebar -->
|
87 |
+
|
88 |
+
</div>
|
89 |
+
<!-- /post-body -->
|
90 |
+
<br class="clear">
|
91 |
+
</div>
|
92 |
+
</div>
|
languages/cartflows.pot
CHANGED
@@ -1,2119 +1,2159 @@
|
|
1 |
-
# Copyright (C) 2020 CartFlows Inc
|
2 |
-
# This file is distributed under the same license as the CartFlows package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: CartFlows 1.5.
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
|
12 |
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
"Language: en\n"
|
15 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
-
"X-Poedit-Country: United States\n"
|
17 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
-
"X-Poedit-KeywordsList: "
|
19 |
-
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
20 |
-
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
21 |
-
"X-Poedit-Basepath: ../\n"
|
22 |
-
"X-Poedit-SearchPath-0: .\n"
|
23 |
-
"X-Poedit-Bookmarks: \n"
|
24 |
-
"X-Textdomain-Support: yes\n"
|
25 |
-
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
26 |
-
|
27 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
28 |
-
#. translators: %s product name
|
29 |
-
msgid ""
|
30 |
-
"Want to help make <strong>%1s</strong> even more awesome? Allow us to "
|
31 |
-
"collect non-sensitive diagnostic data and usage information. "
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
35 |
-
msgid "This will be applicable for all sites from the network."
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
39 |
-
#. translators: %s usage doc link
|
40 |
-
msgid " Know More."
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
44 |
-
msgid "Yes! Allow it"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
48 |
-
msgid "No Thanks"
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
52 |
-
msgid "
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
#: admin/bsf-analytics/class-bsf-analytics.php:
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
"
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
#: includes/admin/cartflows-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
#: classes/class-cartflows-
|
102 |
-
msgid "
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: classes/class-cartflows-admin.php:
|
106 |
-
msgid "
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: classes/class-cartflows-admin.php:
|
110 |
-
msgid "
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: classes/class-cartflows-admin.php:
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
#:
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
#:
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
#:
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
#:
|
134 |
-
msgid "
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: classes/class-cartflows-admin.php:
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
#:
|
145 |
-
msgid "
|
146 |
-
msgstr ""
|
147 |
-
|
148 |
-
#: classes/class-cartflows-
|
149 |
-
msgid "
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: classes/class-cartflows-cloning.php:
|
153 |
-
|
154 |
-
msgid "
|
155 |
-
msgstr ""
|
156 |
-
|
157 |
-
#: classes/class-cartflows-
|
158 |
-
|
159 |
-
msgid "
|
160 |
-
msgstr ""
|
161 |
-
|
162 |
-
#: classes/class-cartflows-
|
163 |
-
msgid ""
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
#: classes/class-cartflows-
|
173 |
-
msgid "
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: classes/class-cartflows-
|
177 |
-
msgid "
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
#: classes/class-cartflows-importer.php:
|
231 |
-
msgid "
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: classes/class-cartflows-importer.php:
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
#: classes/class-cartflows-importer.php:
|
240 |
-
msgid "
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
-
#: classes/class-cartflows-importer.php:
|
244 |
-
#: classes/class-cartflows-importer.php:
|
245 |
-
msgid "
|
246 |
-
msgstr ""
|
247 |
-
|
248 |
-
#: classes/class-cartflows-importer.php:
|
249 |
-
#: classes/class-cartflows-importer.php:
|
250 |
-
msgid "
|
251 |
-
msgstr ""
|
252 |
-
|
253 |
-
#: classes/class-cartflows-importer.php:
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
#: classes/class-cartflows-importer.php:
|
264 |
-
msgid "
|
265 |
-
msgstr ""
|
266 |
-
|
267 |
-
#: classes/class-cartflows-importer.php:
|
268 |
-
|
269 |
-
|
270 |
-
"
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
#: classes/class-cartflows-importer.php:
|
274 |
-
msgid ""
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
msgid ""
|
283 |
-
"
|
284 |
-
"
|
285 |
-
msgstr ""
|
286 |
-
|
287 |
-
#: classes/class-cartflows-importer.php:
|
288 |
-
msgid "
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
msgid "
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
#:
|
306 |
-
msgid "
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
#: classes/class-cartflows-importer.php:
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
#:
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
#:
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
#: classes/class-cartflows-
|
331 |
-
|
332 |
-
msgid "
|
333 |
-
msgstr ""
|
334 |
-
|
335 |
-
#: classes/class-cartflows-importer.php:
|
336 |
-
msgid ""
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
msgid "
|
347 |
-
msgstr ""
|
348 |
-
|
349 |
-
#: classes/class-cartflows-importer.php:
|
350 |
-
msgid "
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
"
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: classes/class-cartflows-loader.php:
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
msgid "
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
#:
|
437 |
-
msgid "
|
438 |
-
msgstr ""
|
439 |
-
|
440 |
-
#: classes/class-cartflows-meta-fields.php:
|
441 |
-
msgid "
|
442 |
-
msgstr ""
|
443 |
-
|
444 |
-
#: classes/class-cartflows-meta.php:
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
#:
|
450 |
-
#:
|
451 |
-
msgid "
|
452 |
-
msgstr ""
|
453 |
-
|
454 |
-
#: classes/class-cartflows-meta.php:
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
#:
|
459 |
-
msgid "
|
460 |
-
msgstr ""
|
461 |
-
|
462 |
-
#: classes/class-cartflows-meta.php:
|
463 |
-
|
464 |
-
|
465 |
-
"
|
466 |
-
msgstr ""
|
467 |
-
|
468 |
-
#: classes/class-cartflows-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
#: classes/class-cartflows-
|
473 |
-
msgid "
|
474 |
-
msgstr ""
|
475 |
-
|
476 |
-
#: classes/class-cartflows-
|
477 |
-
msgid ""
|
478 |
-
"
|
479 |
-
"
|
480 |
-
msgstr ""
|
481 |
-
|
482 |
-
#: classes/class-cartflows-
|
483 |
-
msgid "
|
484 |
-
msgstr ""
|
485 |
-
|
486 |
-
#: classes/class-cartflows-wizard.php:
|
487 |
-
msgid "
|
488 |
-
msgstr ""
|
489 |
-
|
490 |
-
#: classes/class-cartflows-wizard.php:
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
"
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
"
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
#:
|
567 |
-
msgid "
|
568 |
-
msgstr ""
|
569 |
-
|
570 |
-
#: classes/class-cartflows-wizard.php:
|
571 |
-
msgid "
|
572 |
-
msgstr ""
|
573 |
-
|
574 |
-
#: classes/class-cartflows-wizard.php:
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
#: classes/class-cartflows-wizard.php:
|
580 |
-
#: includes/admin/cartflows-general.php:
|
581 |
-
msgid "
|
582 |
-
msgstr ""
|
583 |
-
|
584 |
-
#: classes/class-cartflows-wizard.php:
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
#:
|
590 |
-
msgid ""
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
msgstr ""
|
608 |
-
|
609 |
-
#: classes/class-cartflows-wizard.php:
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
"
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
#: classes/class-cartflows-wizard.php:
|
639 |
-
msgid "
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
"
|
655 |
-
msgstr ""
|
656 |
-
|
657 |
-
#: classes/class-cartflows-wizard.php:
|
658 |
-
msgid "
|
659 |
-
msgstr ""
|
660 |
-
|
661 |
-
#: classes/class-cartflows-wizard.php:
|
662 |
-
msgid "
|
663 |
-
msgstr ""
|
664 |
-
|
665 |
-
#: classes/class-cartflows-wizard.php:
|
666 |
-
msgid ""
|
667 |
-
"
|
668 |
-
"
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
msgid "
|
700 |
-
msgstr ""
|
701 |
-
|
702 |
-
#:
|
703 |
-
#:
|
704 |
-
msgid "
|
705 |
-
msgstr ""
|
706 |
-
|
707 |
-
#:
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
#:
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
"
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
#: includes/admin/cartflows-general.php:
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
"
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
"
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
#: includes/admin/cartflows-
|
902 |
-
msgid "
|
903 |
-
msgstr ""
|
904 |
-
|
905 |
-
#: includes/admin/cartflows-general.php:
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
msgstr ""
|
926 |
-
|
927 |
-
#: includes/admin/cartflows-general.php:
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
msgstr ""
|
956 |
-
|
957 |
-
#: includes/
|
958 |
-
msgid ""
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
msgstr ""
|
982 |
-
|
983 |
-
#: includes/
|
984 |
-
msgid "
|
985 |
-
msgstr ""
|
986 |
-
|
987 |
-
#: includes/
|
988 |
-
msgid "
|
989 |
-
msgstr ""
|
990 |
-
|
991 |
-
#: includes/
|
992 |
-
msgid "
|
993 |
-
msgstr ""
|
994 |
-
|
995 |
-
#: includes/meta-fields/generate-product-repeater.php:
|
996 |
-
msgid "
|
997 |
-
msgstr ""
|
998 |
-
|
999 |
-
#: includes/meta-fields/generate-product-repeater.php:
|
1000 |
-
msgid "
|
1001 |
-
msgstr ""
|
1002 |
-
|
1003 |
-
#: includes/meta-fields/generate-product-repeater.php:
|
1004 |
-
msgid "Discount
|
1005 |
-
msgstr ""
|
1006 |
-
|
1007 |
-
#: includes/meta-fields/generate-product-repeater.php:
|
1008 |
-
msgid "Discount
|
1009 |
-
msgstr ""
|
1010 |
-
|
1011 |
-
#: includes/meta-fields/
|
1012 |
-
msgid "
|
1013 |
-
msgstr ""
|
1014 |
-
|
1015 |
-
#: includes/meta-fields/
|
1016 |
-
msgid "
|
1017 |
-
msgstr ""
|
1018 |
-
|
1019 |
-
#:
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
"
|
1025 |
-
msgstr ""
|
1026 |
-
|
1027 |
-
#:
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
#: modules/checkout/
|
1040 |
-
#: modules/optin/
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
#: modules/checkout/
|
1059 |
-
#: modules/checkout/
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
#: modules/checkout/classes/class-cartflows-checkout-markup.php:
|
1065 |
-
msgid "
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
#: modules/checkout/classes/class-cartflows-checkout-
|
1085 |
-
msgid "
|
1086 |
-
msgstr ""
|
1087 |
-
|
1088 |
-
#: modules/checkout/classes/class-cartflows-checkout-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
#: modules/
|
1097 |
-
msgid "
|
1098 |
-
msgstr ""
|
1099 |
-
|
1100 |
-
#: modules/checkout/classes/class-cartflows-checkout-
|
1101 |
-
msgid "
|
1102 |
-
msgstr ""
|
1103 |
-
|
1104 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1105 |
-
msgid "
|
1106 |
-
msgstr ""
|
1107 |
-
|
1108 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
#: modules/
|
1117 |
-
msgid "
|
1118 |
-
msgstr ""
|
1119 |
-
|
1120 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1121 |
-
msgid "
|
1122 |
-
msgstr ""
|
1123 |
-
|
1124 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1125 |
-
msgid "
|
1126 |
-
msgstr ""
|
1127 |
-
|
1128 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
msgid "
|
1160 |
-
msgstr ""
|
1161 |
-
|
1162 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1163 |
-
#. translators: %s: link
|
1164 |
-
msgid ""
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
msgid "
|
1219 |
-
msgstr ""
|
1220 |
-
|
1221 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1222 |
-
msgid "
|
1223 |
-
msgstr ""
|
1224 |
-
|
1225 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
#: modules/
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
#: modules/
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
#: modules/
|
1256 |
-
#: modules/
|
1257 |
-
#: modules/
|
1258 |
-
#: modules/
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
#: modules/
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
#: modules/
|
1280 |
-
#: modules/
|
1281 |
-
msgid "
|
1282 |
-
msgstr ""
|
1283 |
-
|
1284 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1285 |
-
#: modules/
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
#: modules/
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1300 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1306 |
-
#: modules/
|
1307 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1313 |
-
#: modules/
|
1314 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1320 |
-
#: modules/
|
1321 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1327 |
-
#: modules/
|
1328 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1334 |
-
#: modules/
|
1335 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1341 |
-
#: modules/
|
1342 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1348 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1354 |
-
#: modules/
|
1355 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1361 |
-
#: modules/
|
1362 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
#: modules/
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
#: modules/
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1381 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
#: modules/
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
#: modules/
|
1392 |
-
msgid "
|
1393 |
-
msgstr ""
|
1394 |
-
|
1395 |
-
#: modules/checkout/classes/class-cartflows-checkout-meta.php:
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
#: modules/
|
1412 |
-
msgid "
|
1413 |
-
msgstr ""
|
1414 |
-
|
1415 |
-
#: modules/checkout/
|
1416 |
-
msgid "
|
1417 |
-
msgstr ""
|
1418 |
-
|
1419 |
-
#: modules/
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
msgid "
|
1437 |
-
msgstr ""
|
1438 |
-
|
1439 |
-
#: modules/flow/classes/class-cartflows-flow-meta.php:
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
msgstr ""
|
1486 |
-
|
1487 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1493 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
#: modules/flow/classes/class-cartflows-
|
1499 |
-
msgid "
|
1500 |
-
msgstr ""
|
1501 |
-
|
1502 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1503 |
-
msgid "
|
1504 |
-
msgstr ""
|
1505 |
-
|
1506 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1507 |
-
msgid "
|
1508 |
-
msgstr ""
|
1509 |
-
|
1510 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1511 |
-
msgid "
|
1512 |
-
msgstr ""
|
1513 |
-
|
1514 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1515 |
-
msgid "
|
1516 |
-
msgstr ""
|
1517 |
-
|
1518 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1519 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
#: modules/flow/classes/class-cartflows-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
#: modules/flow/classes/class-cartflows-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
#: modules/flow/classes/class-cartflows-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
#: modules/flow/classes/class-cartflows-
|
1571 |
-
|
1572 |
-
msgid "
|
1573 |
-
msgstr ""
|
1574 |
-
|
1575 |
-
#: modules/flow/classes/class-cartflows-flow-
|
1576 |
-
#: modules/
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
#: modules/flow/classes/class-cartflows-step-post-type.php:
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
#: modules/flow/
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
msgid "
|
1600 |
-
msgstr ""
|
1601 |
-
|
1602 |
-
#: modules/flow/classes/class-cartflows-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
msgid "
|
1612 |
-
msgstr ""
|
1613 |
-
|
1614 |
-
#: modules/flow/classes/class-cartflows-
|
1615 |
-
#: modules/flow/
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
#: modules/flow/
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
#: modules/
|
1634 |
-
msgid "
|
1635 |
-
msgstr ""
|
1636 |
-
|
1637 |
-
#: modules/flow/
|
1638 |
-
msgid "
|
1639 |
-
msgstr ""
|
1640 |
-
|
1641 |
-
#: modules/flow/
|
1642 |
-
msgid "
|
1643 |
-
msgstr ""
|
1644 |
-
|
1645 |
-
#: modules/flow/
|
1646 |
-
msgid "
|
1647 |
-
msgstr ""
|
1648 |
-
|
1649 |
-
#: modules/flow/
|
1650 |
-
msgid "
|
1651 |
-
msgstr ""
|
1652 |
-
|
1653 |
-
#: modules/flow/
|
1654 |
-
msgid "
|
1655 |
-
msgstr ""
|
1656 |
-
|
1657 |
-
#: modules/flow/
|
1658 |
-
msgid "
|
1659 |
-
msgstr ""
|
1660 |
-
|
1661 |
-
#: modules/flow/
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
#: modules/
|
1698 |
-
msgid "
|
1699 |
-
msgstr ""
|
1700 |
-
|
1701 |
-
#: modules/
|
1702 |
-
msgid "
|
1703 |
-
msgstr ""
|
1704 |
-
|
1705 |
-
#: modules/
|
1706 |
-
msgid "
|
1707 |
-
msgstr ""
|
1708 |
-
|
1709 |
-
#: modules/
|
1710 |
-
msgid "
|
1711 |
-
msgstr ""
|
1712 |
-
|
1713 |
-
#: modules/optin/classes/class-cartflows-optin-
|
1714 |
-
msgid "
|
1715 |
-
msgstr ""
|
1716 |
-
|
1717 |
-
#: modules/optin/classes/class-cartflows-optin-
|
1718 |
-
msgid "
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
msgid ""
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
#: modules/optin/classes/class-cartflows-optin-meta.php:
|
1777 |
-
msgid "
|
1778 |
-
msgstr ""
|
1779 |
-
|
1780 |
-
#: modules/
|
1781 |
-
msgid "
|
1782 |
-
msgstr ""
|
1783 |
-
|
1784 |
-
#: modules/
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
#:
|
1876 |
-
msgid "
|
1877 |
-
msgstr ""
|
1878 |
-
|
1879 |
-
#:
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
msgid "
|
1905 |
-
msgstr ""
|
1906 |
-
|
1907 |
-
#:
|
1908 |
-
msgid "
|
1909 |
-
msgstr ""
|
1910 |
-
|
1911 |
-
#:
|
1912 |
-
msgid "
|
1913 |
-
msgstr ""
|
1914 |
-
|
1915 |
-
#:
|
1916 |
-
msgid "
|
1917 |
-
msgstr ""
|
1918 |
-
|
1919 |
-
#: woocommerce/template/
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
msgid "
|
1945 |
-
msgstr ""
|
1946 |
-
|
1947 |
-
#: woocommerce/template/
|
1948 |
-
msgid "
|
1949 |
-
msgstr ""
|
1950 |
-
|
1951 |
-
#: woocommerce/template/checkout/form-
|
1952 |
-
msgid "
|
1953 |
-
msgstr ""
|
1954 |
-
|
1955 |
-
#: woocommerce/template/checkout/form-
|
1956 |
-
msgid "
|
1957 |
-
msgstr ""
|
1958 |
-
|
1959 |
-
#: woocommerce/template/checkout/form-
|
1960 |
-
msgid ""
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
"
|
1977 |
-
"
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
"
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
"
|
2016 |
-
"
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
#: woocommerce/template/checkout/
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
msgstr ""
|
2058 |
-
|
2059 |
-
#: woocommerce/template/
|
2060 |
-
msgid "
|
2061 |
-
msgstr ""
|
2062 |
-
|
2063 |
-
#: woocommerce/template/
|
2064 |
-
msgid "
|
2065 |
-
msgstr ""
|
2066 |
-
|
2067 |
-
#: woocommerce/template/
|
2068 |
-
msgid "Order
|
2069 |
-
msgstr ""
|
2070 |
-
|
2071 |
-
#: woocommerce/template/
|
2072 |
-
msgid "
|
2073 |
-
msgstr ""
|
2074 |
-
|
2075 |
-
|
2076 |
-
msgid "
|
2077 |
-
msgstr ""
|
2078 |
-
|
2079 |
-
|
2080 |
-
msgid "
|
2081 |
-
msgstr ""
|
2082 |
-
|
2083 |
-
|
2084 |
-
msgid "
|
2085 |
-
msgstr ""
|
2086 |
-
|
2087 |
-
|
2088 |
-
msgid "
|
2089 |
-
msgstr ""
|
2090 |
-
|
2091 |
-
#:
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
msgid "
|
2109 |
-
msgstr ""
|
2110 |
-
|
2111 |
-
#:
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2119 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 CartFlows Inc
|
2 |
+
# This file is distributed under the same license as the CartFlows package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: CartFlows 1.5.15\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
|
7 |
+
"POT-Creation-Date: 2020-08-12 08:20:50+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"Language: en\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Poedit-Country: United States\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-KeywordsList: "
|
19 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
20 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
21 |
+
"X-Poedit-Basepath: ../\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-Bookmarks: \n"
|
24 |
+
"X-Textdomain-Support: yes\n"
|
25 |
+
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
26 |
+
|
27 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:211
|
28 |
+
#. translators: %s product name
|
29 |
+
msgid ""
|
30 |
+
"Want to help make <strong>%1s</strong> even more awesome? Allow us to "
|
31 |
+
"collect non-sensitive diagnostic data and usage information. "
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:214
|
35 |
+
msgid "This will be applicable for all sites from the network."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:238
|
39 |
+
#. translators: %s usage doc link
|
40 |
+
msgid " Know More."
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:246
|
44 |
+
msgid "Yes! Allow it"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:255
|
48 |
+
msgid "No Thanks"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:359
|
52 |
+
msgid "Usage Tracking"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:403
|
56 |
+
#. translators: %s Product title
|
57 |
+
msgid "Allow %s products to track non-sensitive usage tracking data."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:406
|
61 |
+
msgid " This will be applicable for all sites from the network."
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: admin/bsf-analytics/class-bsf-analytics.php:411
|
65 |
+
msgid "Learn More."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: classes/batch-process/class-cartflows-importer-elementor.php:44
|
69 |
+
msgid "Invalid content."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: classes/batch-process/class-cartflows-importer-elementor.php:56
|
73 |
+
msgid "Invalid content. Expected an array."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: classes/batch-process/helpers/class-wp-background-process.php:435
|
77 |
+
msgid "Every %d Minutes"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: classes/class-cartflows-admin-fields.php:235
|
81 |
+
msgid "Select"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: classes/class-cartflows-admin-fields.php:238
|
85 |
+
msgid "No Checkout Steps"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: classes/class-cartflows-admin-fields.php:264
|
89 |
+
#. translators: %s: link
|
90 |
+
msgid ""
|
91 |
+
"Be sure not to add any product in above selected Global Checkout step. "
|
92 |
+
"Please read information about how to set up Global Checkout %1$shere%2$s."
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: classes/class-cartflows-admin.php:159 includes/admin/cartflows-home.php:11
|
96 |
+
msgid "Home"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: classes/class-cartflows-admin.php:164 classes/class-cartflows-admin.php:165
|
100 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:150
|
101 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:148
|
102 |
+
msgid "Settings"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: classes/class-cartflows-admin.php:453
|
106 |
+
msgid "Installing and activating.."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: classes/class-cartflows-admin.php:454
|
110 |
+
msgid "There was an error with the installation of plugin."
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: classes/class-cartflows-admin.php:516
|
114 |
+
msgid "Flows Library"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: classes/class-cartflows-admin.php:523
|
118 |
+
#: modules/flow/view/view-remote-importer.php:26
|
119 |
+
msgid "Ready Templates"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: classes/class-cartflows-admin.php:526
|
123 |
+
#: modules/flow/view/view-remote-importer.php:29
|
124 |
+
msgid "Create Your Own"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: classes/class-cartflows-admin.php:537
|
128 |
+
#: modules/flow/view/view-remote-importer.php:41
|
129 |
+
msgid "Search Sites"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: classes/class-cartflows-admin.php:538
|
133 |
+
#: modules/flow/view/view-remote-importer.php:42
|
134 |
+
msgid "Search Flow..."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: classes/class-cartflows-admin.php:555
|
138 |
+
msgid "Design Your Flow"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: classes/class-cartflows-admin.php:556
|
142 |
+
#: classes/class-cartflows-importer.php:665
|
143 |
+
#: classes/class-cartflows-importer.php:764
|
144 |
+
#: modules/flow/view/view-remote-importer.php:72
|
145 |
+
msgid "Learn How"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: classes/class-cartflows-api.php:369
|
149 |
+
msgid "Request successfully processed!"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: classes/class-cartflows-cloning.php:284
|
153 |
+
#. translators: %s flow id
|
154 |
+
msgid "Can't clone this step - %1$s. Flow - %2$s"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: classes/class-cartflows-cloning.php:401
|
158 |
+
#. translators: %s flow id
|
159 |
+
msgid "Step - %1$s cloned. Flow - %2$s"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: classes/class-cartflows-cloning.php:427
|
163 |
+
msgid "Clone this flow"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: classes/class-cartflows-cloning.php:427
|
167 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:824
|
168 |
+
msgid "Clone"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: classes/class-cartflows-default-meta.php:745
|
172 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:490
|
173 |
+
msgid "Submit"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: classes/class-cartflows-flow-frontend.php:53
|
177 |
+
msgid ""
|
178 |
+
"Test mode is active — which displays random products for previewing. It can "
|
179 |
+
"be deactivated from the flow settings in the admin dashboard."
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: classes/class-cartflows-flow-frontend.php:58
|
183 |
+
msgid "Click here to disable it"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: classes/class-cartflows-importer.php:81
|
187 |
+
msgid "Export this flow"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: classes/class-cartflows-importer.php:81 includes/exporter.php:18
|
191 |
+
msgid "Export"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: classes/class-cartflows-importer.php:92
|
195 |
+
msgid "Flow Export"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: classes/class-cartflows-importer.php:93
|
199 |
+
msgid "Flow Import"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: classes/class-cartflows-importer.php:104
|
203 |
+
msgid "No post to export has been supplied!"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: classes/class-cartflows-importer.php:278
|
207 |
+
msgid "Please upload a valid .json file"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: classes/class-cartflows-importer.php:284
|
211 |
+
msgid "Please upload a file to import"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: classes/class-cartflows-importer.php:506
|
215 |
+
msgid "Successfully imported flows."
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: classes/class-cartflows-importer.php:538
|
219 |
+
msgid "Loading Steps"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: classes/class-cartflows-importer.php:540
|
223 |
+
msgid "Getting steps from the cloud. Please wait for the moment."
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: classes/class-cartflows-importer.php:551
|
227 |
+
msgid "Searching Template.."
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: classes/class-cartflows-importer.php:553
|
231 |
+
msgid "Getting templates from the cloud. Please wait for the moment."
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: classes/class-cartflows-importer.php:562
|
235 |
+
msgid "Importing.."
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: classes/class-cartflows-importer.php:571
|
239 |
+
#: classes/class-cartflows-importer.php:611
|
240 |
+
msgid "Imported"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: classes/class-cartflows-importer.php:572
|
244 |
+
#: classes/class-cartflows-importer.php:612
|
245 |
+
msgid "Thanks for patience"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: classes/class-cartflows-importer.php:581
|
249 |
+
#: classes/class-cartflows-importer.php:593
|
250 |
+
msgid "Coming Soon!"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: classes/class-cartflows-importer.php:612
|
254 |
+
msgid "Redirecting to the Elementor edit window."
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: classes/class-cartflows-importer.php:658
|
258 |
+
#: classes/class-cartflows-importer.php:774
|
259 |
+
msgid "Pro"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: classes/class-cartflows-importer.php:699
|
263 |
+
#: classes/class-cartflows-importer.php:806
|
264 |
+
msgid "Activate License"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: classes/class-cartflows-importer.php:701
|
268 |
+
#: classes/class-cartflows-importer.php:808
|
269 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:503
|
270 |
+
msgid "Get Pro"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: classes/class-cartflows-importer.php:726
|
274 |
+
msgid "Create"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: classes/class-cartflows-importer.php:825
|
278 |
+
msgid "Under Maintenance.."
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: classes/class-cartflows-importer.php:826
|
282 |
+
msgid ""
|
283 |
+
"If you are seeing this message, most likely our servers are under routine "
|
284 |
+
"maintenance and we will be back shortly."
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: classes/class-cartflows-importer.php:827
|
288 |
+
msgid ""
|
289 |
+
"In rare case, it is possible your website is having trouble connecting with "
|
290 |
+
"ours. If you need help, please feel free to get in touch with us from our "
|
291 |
+
"website.."
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: classes/class-cartflows-importer.php:857
|
295 |
+
#. translators: %s: Plugin string
|
296 |
+
msgid ""
|
297 |
+
"%1$s to see CartFlows templates. If you prefer another page builder tool, "
|
298 |
+
"you can <a href=\"%2$s\" target=\"blank\">select it here</a>."
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: classes/class-cartflows-importer.php:872
|
302 |
+
msgid "All"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: classes/class-cartflows-importer.php:875
|
306 |
+
msgid "Select Step Type"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: classes/class-cartflows-importer.php:959
|
310 |
+
msgid "Import from Cloud"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: classes/class-cartflows-importer.php:1267
|
314 |
+
msgid "Sales Landing"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: classes/class-cartflows-importer.php:1271
|
318 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:253
|
319 |
+
#: modules/flow/view/meta-flow-steps.php:12
|
320 |
+
msgid "Checkout (Woo)"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: classes/class-cartflows-importer.php:1275
|
324 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:260
|
325 |
+
#: modules/flow/view/meta-flow-steps.php:13
|
326 |
+
msgid "Thank You (Woo)"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: classes/class-cartflows-importer.php:1283
|
330 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:239
|
331 |
+
#: modules/flow/view/meta-flow-steps.php:11
|
332 |
+
msgid "Landing"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: classes/class-cartflows-importer.php:1287
|
336 |
+
msgid "Thank You"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: classes/class-cartflows-importer.php:1397
|
340 |
+
#. translators: %s: template ID
|
341 |
+
msgid "Invalid template id %1$s or post id %2$s."
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: classes/class-cartflows-importer.php:1472
|
345 |
+
#. translators: %s: flow ID
|
346 |
+
msgid "Invalid flow id %1$s OR step type %2$s."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: classes/class-cartflows-importer.php:1597
|
350 |
+
msgid ""
|
351 |
+
"Elementor is not activated. Please activate plugin Elementor Page Builder "
|
352 |
+
"to import the step."
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: classes/class-cartflows-importer.php:1700
|
356 |
+
msgid "Action failed. Invalid Security Nonce."
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: classes/class-cartflows-importer.php:1707
|
360 |
+
msgid "User have not plugin install permissions."
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: classes/class-cartflows-importer.php:1729
|
364 |
+
msgid "Plugin Successfully Activated"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: classes/class-cartflows-learndash-compatibility.php:86
|
368 |
+
msgid "None"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: classes/class-cartflows-learndash-compatibility.php:113
|
372 |
+
#. translators: 1: anchor start, 2: anchor close
|
373 |
+
msgid ""
|
374 |
+
"Non-enrolled students will redirect to the selected CartFlows template. If "
|
375 |
+
"you have not created any Flow already, add new Flow from %1$shere%2$s."
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: classes/class-cartflows-learndash-compatibility.php:119
|
379 |
+
msgid "Select CartFlows Template for this Course"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: classes/class-cartflows-loader.php:232
|
383 |
+
#. translators: %s: html tags
|
384 |
+
msgid ""
|
385 |
+
"You are using an older version of %1$sCartFlows Pro%2$s. Please update "
|
386 |
+
"%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: classes/class-cartflows-loader.php:501
|
390 |
+
#. translators: %s: html tags
|
391 |
+
msgid ""
|
392 |
+
"This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
|
393 |
+
"activated."
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: classes/class-cartflows-loader.php:511
|
397 |
+
msgid "Activate WooCommerce"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: classes/class-cartflows-loader.php:519
|
401 |
+
msgid "Install WooCommerce"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: classes/class-cartflows-logger.php:161
|
405 |
+
msgid "Action failed. Please refresh the page and retry."
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: classes/class-cartflows-meta-fields.php:61
|
409 |
+
msgid "Thin 100"
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: classes/class-cartflows-meta-fields.php:62
|
413 |
+
msgid "Extra-Light 200"
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: classes/class-cartflows-meta-fields.php:63
|
417 |
+
msgid "Light 300"
|
418 |
+
msgstr ""
|
419 |
+
|
420 |
+
#: classes/class-cartflows-meta-fields.php:64
|
421 |
+
msgid "Normal 400"
|
422 |
+
msgstr ""
|
423 |
+
|
424 |
+
#: classes/class-cartflows-meta-fields.php:65
|
425 |
+
msgid "Medium 500"
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: classes/class-cartflows-meta-fields.php:66
|
429 |
+
msgid "Semi-Bold 600"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
#: classes/class-cartflows-meta-fields.php:67
|
433 |
+
msgid "Bold 700"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: classes/class-cartflows-meta-fields.php:68
|
437 |
+
msgid "Extra-Bold 800"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: classes/class-cartflows-meta-fields.php:69
|
441 |
+
msgid "Ultra-Bold 900"
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: classes/class-cartflows-meta-fields.php:182
|
445 |
+
#. Translators: %d stock amount
|
446 |
+
msgid "Stock: %d"
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: classes/class-cartflows-meta-fields.php:765
|
450 |
+
#: includes/meta-fields/generate-product-repeater.php:30
|
451 |
+
msgid "Search for a product…"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: classes/class-cartflows-meta-fields.php:816
|
455 |
+
msgid "Search for a coupon…"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: classes/class-cartflows-meta.php:34
|
459 |
+
msgid "Update"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: classes/class-cartflows-meta.php:42
|
463 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:95
|
464 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:763
|
465 |
+
msgid "Back to edit Flow"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: classes/class-cartflows-meta.php:63
|
469 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:198
|
470 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:136
|
471 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:156
|
472 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:154
|
473 |
+
msgid "Custom Script"
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: classes/class-cartflows-meta.php:66
|
477 |
+
msgid ""
|
478 |
+
"Custom script lets you add your own custom script on front end of this flow "
|
479 |
+
"page."
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: classes/class-cartflows-metabox.php:59
|
483 |
+
msgid "Flow Details"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: classes/class-cartflows-wizard.php:94
|
487 |
+
msgid "Thanks for installing and using CartFlows!"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: classes/class-cartflows-wizard.php:95
|
491 |
+
msgid ""
|
492 |
+
"It is easy to use the CartFlows. Please use the setup wizard to quick start "
|
493 |
+
"setup."
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: classes/class-cartflows-wizard.php:97
|
497 |
+
msgid "Start Wizard"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: classes/class-cartflows-wizard.php:98
|
501 |
+
msgid "Skip Setup"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: classes/class-cartflows-wizard.php:128
|
505 |
+
msgid "Welcome"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: classes/class-cartflows-wizard.php:133
|
509 |
+
msgid "Page Builder"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: classes/class-cartflows-wizard.php:137
|
513 |
+
msgid "Checkout"
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: classes/class-cartflows-wizard.php:141
|
517 |
+
msgid "Training"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: classes/class-cartflows-wizard.php:145
|
521 |
+
msgid "Ready!"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: classes/class-cartflows-wizard.php:220
|
525 |
+
msgid "CartFlows Setup"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: classes/class-cartflows-wizard.php:246
|
529 |
+
msgid "Exit Setup Wizard"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: classes/class-cartflows-wizard.php:299
|
533 |
+
msgid "Welcome to CartFlows!"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: classes/class-cartflows-wizard.php:300
|
537 |
+
msgid ""
|
538 |
+
"Thank you for choosing CartFlows to get more leads, increase conversions, & "
|
539 |
+
"maximize profits. This short setup wizard will guide you though configuring "
|
540 |
+
"CartFlows and creating your first funnel."
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: classes/class-cartflows-wizard.php:304
|
544 |
+
msgid "Let's Build it better!"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: classes/class-cartflows-wizard.php:305
|
548 |
+
msgid ""
|
549 |
+
"Get improved features and faster fixes by sharing non-sensitive data via "
|
550 |
+
"usage tracking that shows us how CartFlows is used. No personal data is "
|
551 |
+
"tracked or stored."
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: classes/class-cartflows-wizard.php:306
|
555 |
+
msgid "Learn More"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: classes/class-cartflows-wizard.php:309
|
559 |
+
msgid "Yes, I am in."
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: classes/class-cartflows-wizard.php:316
|
563 |
+
msgid "Lets Go »"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: classes/class-cartflows-wizard.php:344
|
567 |
+
msgid "Page Builder Setup"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: classes/class-cartflows-wizard.php:345
|
571 |
+
msgid "Please select a page builder you would like to use with CartFlows."
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: classes/class-cartflows-wizard.php:350
|
575 |
+
msgid "Select Page Builder"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: classes/class-cartflows-wizard.php:357
|
579 |
+
#: classes/class-cartflows-wizard.php:423
|
580 |
+
#: includes/admin/cartflows-general.php:76
|
581 |
+
msgid "Elementor"
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: classes/class-cartflows-wizard.php:367
|
585 |
+
msgid "Beaver Builder Plugin (Lite Version)"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: classes/class-cartflows-wizard.php:377
|
589 |
+
#: includes/admin/cartflows-general.php:78
|
590 |
+
msgid "Divi"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: classes/class-cartflows-wizard.php:387
|
594 |
+
#: includes/admin/cartflows-general.php:79
|
595 |
+
msgid "Gutenberg"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: classes/class-cartflows-wizard.php:397
|
599 |
+
#: includes/admin/cartflows-general.php:80
|
600 |
+
msgid "Other"
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: classes/class-cartflows-wizard.php:419
|
604 |
+
msgid ""
|
605 |
+
"While CartFlows Should work with most page builders, we offer templates for "
|
606 |
+
"the above page builders."
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: classes/class-cartflows-wizard.php:422
|
610 |
+
#: classes/class-cartflows-wizard.php:464
|
611 |
+
msgid "The following plugin will be installed and activated for you:"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: classes/class-cartflows-wizard.php:429
|
615 |
+
#: classes/class-cartflows-wizard.php:474
|
616 |
+
#: classes/class-cartflows-wizard.php:684
|
617 |
+
msgid "« Previous"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: classes/class-cartflows-wizard.php:432
|
621 |
+
msgid "Skip this step"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: classes/class-cartflows-wizard.php:433
|
625 |
+
msgid "Next »"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: classes/class-cartflows-wizard.php:452
|
629 |
+
msgid "Choose a checkout"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: classes/class-cartflows-wizard.php:455
|
633 |
+
msgid ""
|
634 |
+
"While CartFlows is designed to use WooCommerce sell digital and physical "
|
635 |
+
"products, not all funnels need a checkout system."
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: classes/class-cartflows-wizard.php:457
|
639 |
+
msgid ""
|
640 |
+
"Would you like to install WooCommerce to sell digital and physical products "
|
641 |
+
"in your funnels?"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: classes/class-cartflows-wizard.php:465
|
645 |
+
msgid "WooCommerce"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: classes/class-cartflows-wizard.php:466
|
649 |
+
msgid "WooCommerce Cart Abandonment Recovery"
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: classes/class-cartflows-wizard.php:477
|
653 |
+
#: classes/class-cartflows-wizard.php:687
|
654 |
+
msgid "No thanks"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: classes/class-cartflows-wizard.php:478
|
658 |
+
msgid "Yes"
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: classes/class-cartflows-wizard.php:620
|
662 |
+
msgid "Congratulations, You Did It!"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: classes/class-cartflows-wizard.php:627
|
666 |
+
msgid ""
|
667 |
+
"CartFlows is ready to use on your website. You've successfully completed "
|
668 |
+
"the setup process and all that is left for you to do is create your first "
|
669 |
+
"flow."
|
670 |
+
msgstr ""
|
671 |
+
|
672 |
+
#: classes/class-cartflows-wizard.php:641
|
673 |
+
msgid "Create a flow"
|
674 |
+
msgstr ""
|
675 |
+
|
676 |
+
#: classes/class-cartflows-wizard.php:658
|
677 |
+
msgid "Exclusive CartFlows Training Course Offer"
|
678 |
+
msgstr ""
|
679 |
+
|
680 |
+
#: classes/class-cartflows-wizard.php:669
|
681 |
+
msgid ""
|
682 |
+
"We want you to get off to a great start using CartFlows, so we would like "
|
683 |
+
"to give access to our exclusive training course."
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: classes/class-cartflows-wizard.php:670
|
687 |
+
msgid "Get access to this couse, for free, by entering your email below."
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: classes/class-cartflows-wizard.php:672
|
691 |
+
msgid "Enter Email address"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: classes/class-cartflows-wizard.php:688
|
695 |
+
msgid "Allow"
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: classes/lib/notices/class-astra-notices.php:125
|
699 |
+
msgid "WordPress Nonce not validated."
|
700 |
+
msgstr ""
|
701 |
+
|
702 |
+
#: classes/logger/class-cartflows-log-handler-file.php:351
|
703 |
+
#: classes/logger/class-cartflows-log-handler-file.php:371
|
704 |
+
msgid "This method should not be called before plugins_loaded."
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: classes/logger/class-cartflows-wc-logger.php:58
|
708 |
+
#. translators: 1: class name 2: Cartflows_Log_Handler_Interface
|
709 |
+
msgid "The provided handler %1$s does not implement %2$s."
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: classes/logger/class-cartflows-wc-logger.php:136
|
713 |
+
#. translators: 1: Cartflows_WC_Logger::log 2: level
|
714 |
+
msgid "%1$s was called with an invalid level \"%2$s\"."
|
715 |
+
msgstr ""
|
716 |
+
|
717 |
+
#: includes/admin/cartflows-admin-header.php:17
|
718 |
+
#: includes/admin/cartflows-admin.php:19
|
719 |
+
msgid "Generate More Leads & More Sales"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: includes/admin/cartflows-admin.php:29
|
723 |
+
msgid "Settings saved successfully."
|
724 |
+
msgstr ""
|
725 |
+
|
726 |
+
#: includes/admin/cartflows-error-log.php:36
|
727 |
+
msgid "%1$s at %2$s"
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: includes/admin/cartflows-error-log.php:41
|
731 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:804
|
732 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:225
|
733 |
+
msgid "View"
|
734 |
+
msgstr ""
|
735 |
+
|
736 |
+
#: includes/admin/cartflows-error-log.php:65
|
737 |
+
msgid "Delete log"
|
738 |
+
msgstr ""
|
739 |
+
|
740 |
+
#: includes/admin/cartflows-error-log.php:70
|
741 |
+
msgid "There are currently no logs to view."
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: includes/admin/cartflows-general.php:31
|
745 |
+
#: includes/admin/cartflows-general.php:40
|
746 |
+
msgid "General Settings"
|
747 |
+
msgstr ""
|
748 |
+
|
749 |
+
#: includes/admin/cartflows-general.php:53
|
750 |
+
msgid "Disallow search engines from indexing flows"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: includes/admin/cartflows-general.php:63
|
754 |
+
#: modules/flow/view/view-flow-inner-step.php:52
|
755 |
+
msgid "Global Checkout"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
+
#: includes/admin/cartflows-general.php:72
|
759 |
+
msgid "Show Templates designed with"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: includes/admin/cartflows-general.php:73
|
763 |
+
msgid ""
|
764 |
+
"CartFlows offers flow templates that can be imported in one click. These "
|
765 |
+
"templates are available in few different page builders. Please choose your "
|
766 |
+
"preferred page builder from the list so you will only see templates that "
|
767 |
+
"are made using that page builder.."
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: includes/admin/cartflows-general.php:77
|
771 |
+
msgid "Beaver Builder"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: includes/admin/cartflows-general.php:89
|
775 |
+
#: includes/admin/cartflows-general.php:175
|
776 |
+
#: includes/admin/cartflows-general.php:281
|
777 |
+
#: includes/admin/cartflows-general.php:398
|
778 |
+
msgid "Save Changes"
|
779 |
+
msgstr ""
|
780 |
+
|
781 |
+
#: includes/admin/cartflows-general.php:101
|
782 |
+
msgid "Permalink Settings"
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: includes/admin/cartflows-general.php:116
|
786 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:647
|
787 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:383
|
788 |
+
msgid "Default"
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: includes/admin/cartflows-general.php:122
|
792 |
+
msgid "Flow and Step Slug"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: includes/admin/cartflows-general.php:128
|
796 |
+
msgid "Flow Slug"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: includes/admin/cartflows-general.php:134
|
800 |
+
msgid "Step Slug"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: includes/admin/cartflows-general.php:146
|
804 |
+
msgid "Post Type Permalink Base"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: includes/admin/cartflows-general.php:154
|
808 |
+
msgid "Step Base"
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: includes/admin/cartflows-general.php:164
|
812 |
+
msgid "Flow Base"
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: includes/admin/cartflows-general.php:176
|
816 |
+
msgid "Set Default"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: includes/admin/cartflows-general.php:190
|
820 |
+
msgid "Facebook Pixel Settings"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/admin/cartflows-general.php:205
|
824 |
+
msgid "Enable Facebook Pixel Tracking"
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: includes/admin/cartflows-general.php:218
|
828 |
+
msgid "Enable for the whole site"
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: includes/admin/cartflows-general.php:226
|
832 |
+
#: includes/admin/cartflows-general.php:325
|
833 |
+
msgid "If this option is unchecked, it will only apply to CartFlows steps."
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: includes/admin/cartflows-general.php:236
|
837 |
+
msgid "Enter Facebook pixel ID"
|
838 |
+
msgstr ""
|
839 |
+
|
840 |
+
#: includes/admin/cartflows-general.php:244
|
841 |
+
#: includes/admin/cartflows-general.php:343
|
842 |
+
msgid "Enable Events:"
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: includes/admin/cartflows-general.php:253
|
846 |
+
msgid "Initiate Checkout"
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: includes/admin/cartflows-general.php:262
|
850 |
+
#: includes/admin/cartflows-general.php:369
|
851 |
+
msgid "Add Payment Info"
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: includes/admin/cartflows-general.php:271
|
855 |
+
msgid "Purchase Complete"
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: includes/admin/cartflows-general.php:293
|
859 |
+
msgid "Google Analytics Settings"
|
860 |
+
msgstr ""
|
861 |
+
|
862 |
+
#: includes/admin/cartflows-general.php:304
|
863 |
+
msgid "Enable Google Analytics Tracking"
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: includes/admin/cartflows-general.php:317
|
867 |
+
msgid "Enable for the whole website"
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: includes/admin/cartflows-general.php:335
|
871 |
+
msgid "Google Analytics ID"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: includes/admin/cartflows-general.php:337
|
875 |
+
msgid ""
|
876 |
+
"Log into your <a href=\"https://analytics.google.com/\" "
|
877 |
+
"target=\"_blank\">google analytics account</a> to find your ID. eg: "
|
878 |
+
"UA-XXXXXX-X."
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: includes/admin/cartflows-general.php:351
|
882 |
+
msgid "Begin Checkout"
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: includes/admin/cartflows-general.php:360
|
886 |
+
msgid "Add To Cart"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: includes/admin/cartflows-general.php:378
|
890 |
+
msgid "Purchase"
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: includes/admin/cartflows-general.php:386
|
894 |
+
msgid ""
|
895 |
+
"Google Analytics not working correctly? <a "
|
896 |
+
"href=\"https://cartflows.com/docs/troubleshooting-google-analytics-tracking-"
|
897 |
+
"issues/\" > Click here </a> to know more. "
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: includes/admin/cartflows-general.php:419
|
901 |
+
#: includes/admin/cartflows-home.php:43
|
902 |
+
msgid "Knowledge Base"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: includes/admin/cartflows-general.php:423
|
906 |
+
#: includes/admin/cartflows-home.php:47
|
907 |
+
msgid "Not sure how something works? Take a peek at the knowledge base and learn."
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: includes/admin/cartflows-general.php:426
|
911 |
+
#: includes/admin/cartflows-home.php:50
|
912 |
+
msgid "Visit Knowledge Base »"
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: includes/admin/cartflows-general.php:434
|
916 |
+
#: includes/admin/cartflows-home.php:58
|
917 |
+
msgid "Community"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: includes/admin/cartflows-general.php:438
|
921 |
+
#: includes/admin/cartflows-home.php:62
|
922 |
+
msgid ""
|
923 |
+
"Join the community of super helpful CartFlows users. Say hello, ask "
|
924 |
+
"questions, give feedback and help each other!"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/admin/cartflows-general.php:441
|
928 |
+
#: includes/admin/cartflows-home.php:65
|
929 |
+
msgid "Join Our Facebook Group »"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: includes/admin/cartflows-general.php:449
|
933 |
+
#: includes/admin/cartflows-home.php:73
|
934 |
+
msgid "Five Star Support"
|
935 |
+
msgstr ""
|
936 |
+
|
937 |
+
#: includes/admin/cartflows-general.php:453
|
938 |
+
#: includes/admin/cartflows-home.php:77
|
939 |
+
msgid "Got a question? Get in touch with CartFlows developers. We're happy to help!"
|
940 |
+
msgstr ""
|
941 |
+
|
942 |
+
#: includes/admin/cartflows-general.php:456
|
943 |
+
#: includes/admin/cartflows-home.php:80
|
944 |
+
msgid "Submit a Ticket »"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: includes/admin/cartflows-general.php:466
|
948 |
+
msgid "Load Minified CSS"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: includes/admin/cartflows-general.php:471
|
952 |
+
msgid ""
|
953 |
+
"Load the Minified CSS from here. Just Enable it by checking the below given "
|
954 |
+
"checkbox."
|
955 |
+
msgstr ""
|
956 |
+
|
957 |
+
#: includes/admin/cartflows-general.php:478
|
958 |
+
msgid "Load minified CSS & JS Files"
|
959 |
+
msgstr ""
|
960 |
+
|
961 |
+
#: includes/admin/cartflows-general.php:483
|
962 |
+
msgid "Save"
|
963 |
+
msgstr ""
|
964 |
+
|
965 |
+
#: includes/admin/cartflows-home.php:20
|
966 |
+
msgid "Getting Started"
|
967 |
+
msgstr ""
|
968 |
+
|
969 |
+
#: includes/admin/cartflows-home.php:28
|
970 |
+
msgid "Modernizing WordPress eCommerce!"
|
971 |
+
msgstr ""
|
972 |
+
|
973 |
+
#: includes/exporter.php:12
|
974 |
+
msgid "Export Flows to a JSON file"
|
975 |
+
msgstr ""
|
976 |
+
|
977 |
+
#: includes/exporter.php:13
|
978 |
+
msgid ""
|
979 |
+
"This tool allows you to generate and download a JSON file containing a list "
|
980 |
+
"of all flows."
|
981 |
+
msgstr ""
|
982 |
+
|
983 |
+
#: includes/importer.php:12
|
984 |
+
msgid "Import Flows to a JSON file"
|
985 |
+
msgstr ""
|
986 |
+
|
987 |
+
#: includes/importer.php:13
|
988 |
+
msgid "This tool allows you to import the flows from the JSON file."
|
989 |
+
msgstr ""
|
990 |
+
|
991 |
+
#: includes/importer.php:21
|
992 |
+
msgid "Import"
|
993 |
+
msgstr ""
|
994 |
+
|
995 |
+
#: includes/meta-fields/generate-product-repeater.php:36
|
996 |
+
msgid "Remove"
|
997 |
+
msgstr ""
|
998 |
+
|
999 |
+
#: includes/meta-fields/generate-product-repeater.php:51
|
1000 |
+
msgid "Product Quantity"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: includes/meta-fields/generate-product-repeater.php:65
|
1004 |
+
msgid "Discount Type"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/meta-fields/generate-product-repeater.php:69
|
1008 |
+
msgid "Select Discount Type"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: includes/meta-fields/generate-product-repeater.php:70
|
1012 |
+
msgid "Original"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: includes/meta-fields/generate-product-repeater.php:71
|
1016 |
+
msgid "Percentage"
|
1017 |
+
msgstr ""
|
1018 |
+
|
1019 |
+
#: includes/meta-fields/generate-product-repeater.php:72
|
1020 |
+
msgid "Price"
|
1021 |
+
msgstr ""
|
1022 |
+
|
1023 |
+
#: includes/meta-fields/generate-product-repeater.php:83
|
1024 |
+
msgid "Discount Value"
|
1025 |
+
msgstr ""
|
1026 |
+
|
1027 |
+
#: includes/meta-fields/generate-product-repeater.php:85
|
1028 |
+
msgid "Discount value will apply for each quantity of product."
|
1029 |
+
msgstr ""
|
1030 |
+
|
1031 |
+
#: includes/meta-fields/get-product-selection-repeater.php:112
|
1032 |
+
msgid "Add New Product"
|
1033 |
+
msgstr ""
|
1034 |
+
|
1035 |
+
#: includes/meta-fields/get-product-selection-repeater.php:113
|
1036 |
+
msgid "Create Product"
|
1037 |
+
msgstr ""
|
1038 |
+
|
1039 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:284
|
1040 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:159
|
1041 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:90
|
1042 |
+
msgid ""
|
1043 |
+
"WooCommerce functions do not exist. If you are in an IFrame, please reload "
|
1044 |
+
"it."
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:285
|
1048 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:160
|
1049 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-markup.php:91
|
1050 |
+
msgid "Click Here to Reload"
|
1051 |
+
msgstr ""
|
1052 |
+
|
1053 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:303
|
1054 |
+
msgid "Checkout ID not found"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:366
|
1058 |
+
#: modules/checkout/templates/embed/checkout-template-simple.php:25
|
1059 |
+
#: modules/checkout/templates/wcf-template.php:36
|
1060 |
+
#: modules/optin/templates/optin-template-simple.php:25
|
1061 |
+
msgid "Your cart is currently empty."
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:432
|
1065 |
+
msgid ""
|
1066 |
+
"No product is selected. Please select products from the checkout meta "
|
1067 |
+
"settings to continue."
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:522
|
1071 |
+
msgid "Variations Not set"
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:530
|
1075 |
+
msgid "This product can't be purchased"
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:975
|
1079 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1018
|
1080 |
+
msgid "Coupon Code"
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:976
|
1084 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1027
|
1085 |
+
msgid "Apply"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1183
|
1089 |
+
msgid "Sorry there was a problem removing this coupon."
|
1090 |
+
msgstr ""
|
1091 |
+
|
1092 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1186
|
1093 |
+
msgid "Coupon has been removed."
|
1094 |
+
msgstr ""
|
1095 |
+
|
1096 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1205
|
1097 |
+
msgid "Sorry there was a problem removing "
|
1098 |
+
msgstr ""
|
1099 |
+
|
1100 |
+
#: modules/checkout/classes/class-cartflows-checkout-markup.php:1208
|
1101 |
+
msgid " has been removed."
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:65
|
1105 |
+
msgid "Checkout Layout"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:150
|
1109 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:130
|
1110 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:126
|
1111 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:130
|
1112 |
+
msgid "Shortcodes"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:156
|
1116 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:132
|
1117 |
+
msgid "Select Product"
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:162
|
1121 |
+
msgid "Product Options"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:168
|
1125 |
+
msgid "Order Bump"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:174
|
1129 |
+
msgid "Checkout Offer"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:180
|
1133 |
+
msgid "Checkout Design"
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:186
|
1137 |
+
msgid "Checkout Fields"
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:192
|
1141 |
+
msgid "Checkout Settings"
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:209
|
1145 |
+
msgid "Logo (Optional)"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:270
|
1149 |
+
#. translators: %s: link
|
1150 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Product Options feature."
|
1151 |
+
msgstr ""
|
1152 |
+
|
1153 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:281
|
1154 |
+
#. translators: %s: link.
|
1155 |
+
msgid "Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options"
|
1156 |
+
msgstr ""
|
1157 |
+
|
1158 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:309
|
1159 |
+
msgid "Add this shortcode to your checkout page"
|
1160 |
+
msgstr ""
|
1161 |
+
|
1162 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:345
|
1163 |
+
#. translators: %s: link
|
1164 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon."
|
1165 |
+
msgstr ""
|
1166 |
+
|
1167 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:372
|
1168 |
+
#. translators: %s: link
|
1169 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:382
|
1173 |
+
#. translators: %s: link
|
1174 |
+
msgid "Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:409
|
1178 |
+
#. translators: %s: link
|
1179 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature"
|
1180 |
+
msgstr ""
|
1181 |
+
|
1182 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:419
|
1183 |
+
#. translators: %s: link
|
1184 |
+
msgid ""
|
1185 |
+
"Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab "
|
1186 |
+
"feature"
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:442
|
1190 |
+
#. translators: %s: link
|
1191 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature."
|
1192 |
+
msgstr ""
|
1193 |
+
|
1194 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:469
|
1195 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:270
|
1196 |
+
#. translators: %s: link
|
1197 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
|
1198 |
+
msgstr ""
|
1199 |
+
|
1200 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:492
|
1201 |
+
msgid "Place Order Button Text"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:496
|
1205 |
+
msgid "Place order"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:498
|
1209 |
+
msgid "It will change the Place Order Button text on checkout page."
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:508
|
1213 |
+
msgid "Enable cart editing on checkout"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:516
|
1217 |
+
#. translators: %s: link
|
1218 |
+
msgid "Users will able to remove products from the checkout page."
|
1219 |
+
msgstr ""
|
1220 |
+
|
1221 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:546
|
1222 |
+
msgid "One Column (Available in CartFlows Pro) "
|
1223 |
+
msgstr ""
|
1224 |
+
|
1225 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:547
|
1226 |
+
msgid "Two Step (Available in CartFlows Pro) "
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:553
|
1230 |
+
msgid "Checkout Skin"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:557
|
1234 |
+
msgid "One Column"
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:558
|
1238 |
+
msgid "Two Column"
|
1239 |
+
msgstr ""
|
1240 |
+
|
1241 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:559
|
1242 |
+
msgid "Two Step"
|
1243 |
+
msgstr ""
|
1244 |
+
|
1245 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:568
|
1246 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:346
|
1247 |
+
msgid "Primary Color"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:577
|
1251 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:612
|
1252 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:658
|
1253 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:750
|
1254 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:355
|
1255 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:394
|
1256 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:506
|
1257 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:209
|
1258 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:240
|
1259 |
+
msgid "Font Family"
|
1260 |
+
msgstr ""
|
1261 |
+
|
1262 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:585
|
1263 |
+
msgid "Advance Options"
|
1264 |
+
msgstr ""
|
1265 |
+
|
1266 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:597
|
1267 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:225
|
1268 |
+
msgid "Heading"
|
1269 |
+
msgstr ""
|
1270 |
+
|
1271 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:603
|
1272 |
+
msgid "Heading Color"
|
1273 |
+
msgstr ""
|
1274 |
+
|
1275 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:621
|
1276 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:667
|
1277 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:759
|
1278 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:403
|
1279 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:515
|
1280 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:249
|
1281 |
+
msgid "Font Weight"
|
1282 |
+
msgstr ""
|
1283 |
+
|
1284 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:629
|
1285 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:366
|
1286 |
+
msgid "Input Fields"
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:637
|
1290 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:373
|
1291 |
+
msgid "Floating Labels (Available in CartFlows Pro)"
|
1292 |
+
msgstr ""
|
1293 |
+
|
1294 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:643
|
1295 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:379
|
1296 |
+
msgid "Style"
|
1297 |
+
msgstr ""
|
1298 |
+
|
1299 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:648
|
1300 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:384
|
1301 |
+
msgid "Floating Labels"
|
1302 |
+
msgstr ""
|
1303 |
+
|
1304 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:675
|
1305 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:767
|
1306 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:411
|
1307 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:523
|
1308 |
+
msgid "Size"
|
1309 |
+
msgstr ""
|
1310 |
+
|
1311 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:679
|
1312 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:771
|
1313 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:415
|
1314 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:527
|
1315 |
+
msgid "Extra Small"
|
1316 |
+
msgstr ""
|
1317 |
+
|
1318 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:680
|
1319 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:772
|
1320 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:416
|
1321 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:528
|
1322 |
+
msgid "Small"
|
1323 |
+
msgstr ""
|
1324 |
+
|
1325 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:681
|
1326 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:773
|
1327 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:417
|
1328 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:529
|
1329 |
+
msgid "Medium"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:682
|
1333 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:774
|
1334 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:418
|
1335 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:530
|
1336 |
+
msgid "Large"
|
1337 |
+
msgstr ""
|
1338 |
+
|
1339 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:683
|
1340 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:775
|
1341 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:419
|
1342 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:531
|
1343 |
+
msgid "Extra Large"
|
1344 |
+
msgstr ""
|
1345 |
+
|
1346 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:684
|
1347 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:776
|
1348 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:420
|
1349 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:532
|
1350 |
+
msgid "Custom"
|
1351 |
+
msgstr ""
|
1352 |
+
|
1353 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:691
|
1354 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:783
|
1355 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:427
|
1356 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:539
|
1357 |
+
msgid "Top Bottom Spacing"
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:699
|
1361 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:791
|
1362 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:435
|
1363 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:547
|
1364 |
+
msgid "Left Right Spacing"
|
1365 |
+
msgstr ""
|
1366 |
+
|
1367 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:707
|
1368 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:451
|
1369 |
+
msgid "Text / Placeholder Color"
|
1370 |
+
msgstr ""
|
1371 |
+
|
1372 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:715
|
1373 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:815
|
1374 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:459
|
1375 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:584
|
1376 |
+
msgid "Background Color"
|
1377 |
+
msgstr ""
|
1378 |
+
|
1379 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:723
|
1380 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:831
|
1381 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:467
|
1382 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:600
|
1383 |
+
msgid "Border Color"
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:730
|
1387 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:443
|
1388 |
+
msgid "Label Color"
|
1389 |
+
msgstr ""
|
1390 |
+
|
1391 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:743
|
1392 |
+
msgid "Buttons"
|
1393 |
+
msgstr ""
|
1394 |
+
|
1395 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:799
|
1396 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:568
|
1397 |
+
msgid "Text Color"
|
1398 |
+
msgstr ""
|
1399 |
+
|
1400 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:807
|
1401 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:576
|
1402 |
+
msgid "Text Hover Color"
|
1403 |
+
msgstr ""
|
1404 |
+
|
1405 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:823
|
1406 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:592
|
1407 |
+
msgid "Background Hover Color"
|
1408 |
+
msgstr ""
|
1409 |
+
|
1410 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:839
|
1411 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:608
|
1412 |
+
msgid "Border Hover Color"
|
1413 |
+
msgstr ""
|
1414 |
+
|
1415 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:852
|
1416 |
+
msgid "Sections"
|
1417 |
+
msgstr ""
|
1418 |
+
|
1419 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:858
|
1420 |
+
msgid "Highlight Area Background Color"
|
1421 |
+
msgstr ""
|
1422 |
+
|
1423 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:897
|
1424 |
+
msgid "Header Logo"
|
1425 |
+
msgstr ""
|
1426 |
+
|
1427 |
+
#: modules/checkout/classes/class-cartflows-checkout-meta.php:905
|
1428 |
+
msgid "Logo Width (In px)"
|
1429 |
+
msgstr ""
|
1430 |
+
|
1431 |
+
#: modules/checkout/templates/wcf-template.php:46
|
1432 |
+
msgid "Copyright ©"
|
1433 |
+
msgstr ""
|
1434 |
+
|
1435 |
+
#: modules/checkout/templates/wcf-template.php:50
|
1436 |
+
msgid "All Rights Reserved"
|
1437 |
+
msgstr ""
|
1438 |
+
|
1439 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:265
|
1440 |
+
#. translators: %s flow id
|
1441 |
+
msgid "Step not deleted for flow - %s"
|
1442 |
+
msgstr ""
|
1443 |
+
|
1444 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:303
|
1445 |
+
#. translators: %s flow id
|
1446 |
+
msgid "Step deleted for flow - %s"
|
1447 |
+
msgstr ""
|
1448 |
+
|
1449 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:312
|
1450 |
+
#. translators: %s flow id
|
1451 |
+
msgid "This step can not be deleted."
|
1452 |
+
msgstr ""
|
1453 |
+
|
1454 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:344
|
1455 |
+
#. translators: %s flow id
|
1456 |
+
msgid "Steps not sorted for flow - %s"
|
1457 |
+
msgstr ""
|
1458 |
+
|
1459 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:380
|
1460 |
+
#. translators: %s flow id
|
1461 |
+
msgid "Steps sorted for flow - %s"
|
1462 |
+
msgstr ""
|
1463 |
+
|
1464 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:485
|
1465 |
+
msgid "Analytics"
|
1466 |
+
msgstr ""
|
1467 |
+
|
1468 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:502
|
1469 |
+
#. translators: %s: link
|
1470 |
+
msgid "Upgrade to %1$sCartFlows Pro%2$s for Analytics feature"
|
1471 |
+
msgstr ""
|
1472 |
+
|
1473 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:520
|
1474 |
+
msgid "Flow Settings"
|
1475 |
+
msgstr ""
|
1476 |
+
|
1477 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:605
|
1478 |
+
msgid "Enable Test Mode"
|
1479 |
+
msgstr ""
|
1480 |
+
|
1481 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:612
|
1482 |
+
msgid ""
|
1483 |
+
"If you are using WooCommerce plugin then test mode will add random products "
|
1484 |
+
"in your flow, so you can preview it easily while testing."
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:732
|
1488 |
+
#: modules/flow/view/meta-flow-steps.php:145
|
1489 |
+
msgid "Add New Step"
|
1490 |
+
msgstr ""
|
1491 |
+
|
1492 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:802
|
1493 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:166
|
1494 |
+
msgid "View Step"
|
1495 |
+
msgstr ""
|
1496 |
+
|
1497 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:813
|
1498 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:165
|
1499 |
+
msgid "Edit Step"
|
1500 |
+
msgstr ""
|
1501 |
+
|
1502 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:815
|
1503 |
+
msgid "Edit"
|
1504 |
+
msgstr ""
|
1505 |
+
|
1506 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:822
|
1507 |
+
msgid "Clone Step"
|
1508 |
+
msgstr ""
|
1509 |
+
|
1510 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:833
|
1511 |
+
msgid "Delete Step"
|
1512 |
+
msgstr ""
|
1513 |
+
|
1514 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:835
|
1515 |
+
msgid "Delete"
|
1516 |
+
msgstr ""
|
1517 |
+
|
1518 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:844
|
1519 |
+
#: modules/flow/classes/class-cartflows-flow-meta.php:846
|
1520 |
+
msgid "A/B Test"
|
1521 |
+
msgstr ""
|
1522 |
+
|
1523 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
1524 |
+
msgid "Flow: "
|
1525 |
+
msgstr ""
|
1526 |
+
|
1527 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:69
|
1528 |
+
msgid "Name: "
|
1529 |
+
msgstr ""
|
1530 |
+
|
1531 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:101
|
1532 |
+
msgid "Search Flows"
|
1533 |
+
msgstr ""
|
1534 |
+
|
1535 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:102
|
1536 |
+
msgid "All Flows"
|
1537 |
+
msgstr ""
|
1538 |
+
|
1539 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:103
|
1540 |
+
msgid "Edit Flow"
|
1541 |
+
msgstr ""
|
1542 |
+
|
1543 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:104
|
1544 |
+
msgid "View Flow"
|
1545 |
+
msgstr ""
|
1546 |
+
|
1547 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:105
|
1548 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:107
|
1549 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:167
|
1550 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:169
|
1551 |
+
msgid "Add New"
|
1552 |
+
msgstr ""
|
1553 |
+
|
1554 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:106
|
1555 |
+
msgid "Update Flow"
|
1556 |
+
msgstr ""
|
1557 |
+
|
1558 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:108
|
1559 |
+
msgid "New Flow Name"
|
1560 |
+
msgstr ""
|
1561 |
+
|
1562 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:190
|
1563 |
+
msgid "Upgrade to CartFlows Pro"
|
1564 |
+
msgstr ""
|
1565 |
+
|
1566 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:209
|
1567 |
+
msgid "Slug"
|
1568 |
+
msgstr ""
|
1569 |
+
|
1570 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:321
|
1571 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:322
|
1572 |
+
msgid "Flows"
|
1573 |
+
msgstr ""
|
1574 |
+
|
1575 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:344
|
1576 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:350
|
1577 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:401
|
1578 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:407
|
1579 |
+
#. translators: %s: singular custom post type name
|
1580 |
+
msgid "%s updated."
|
1581 |
+
msgstr ""
|
1582 |
+
|
1583 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:346
|
1584 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:403
|
1585 |
+
#. translators: %s: singular custom post type name
|
1586 |
+
msgid "Custom %s updated."
|
1587 |
+
msgstr ""
|
1588 |
+
|
1589 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:348
|
1590 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:405
|
1591 |
+
#. translators: %s: singular custom post type name
|
1592 |
+
msgid "Custom %s deleted."
|
1593 |
+
msgstr ""
|
1594 |
+
|
1595 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:352
|
1596 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:409
|
1597 |
+
#. translators: %1$s: singular custom post type name ,%2$s: date and time of
|
1598 |
+
#. the revision
|
1599 |
+
msgid "%1$s restored to revision from %2$s"
|
1600 |
+
msgstr ""
|
1601 |
+
|
1602 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:354
|
1603 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:411
|
1604 |
+
#. translators: %s: singular custom post type name
|
1605 |
+
msgid "%s published."
|
1606 |
+
msgstr ""
|
1607 |
+
|
1608 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:356
|
1609 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:413
|
1610 |
+
#. translators: %s: singular custom post type name
|
1611 |
+
msgid "%s saved."
|
1612 |
+
msgstr ""
|
1613 |
+
|
1614 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:358
|
1615 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:415
|
1616 |
+
#. translators: %s: singular custom post type name
|
1617 |
+
msgid "%s submitted."
|
1618 |
+
msgstr ""
|
1619 |
+
|
1620 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:360
|
1621 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:417
|
1622 |
+
#. translators: %s: singular custom post type name
|
1623 |
+
msgid "%s scheduled for."
|
1624 |
+
msgstr ""
|
1625 |
+
|
1626 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:362
|
1627 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:419
|
1628 |
+
#. translators: %s: singular custom post type name
|
1629 |
+
msgid "%s draft updated."
|
1630 |
+
msgstr ""
|
1631 |
+
|
1632 |
+
#: modules/flow/classes/class-cartflows-flow-shortcodes.php:148
|
1633 |
+
#: modules/widgets/class-cartflows-next-step.php:78
|
1634 |
+
msgid "Next Step"
|
1635 |
+
msgstr ""
|
1636 |
+
|
1637 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:163
|
1638 |
+
msgid "Search Steps"
|
1639 |
+
msgstr ""
|
1640 |
+
|
1641 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:164
|
1642 |
+
msgid "All Steps"
|
1643 |
+
msgstr ""
|
1644 |
+
|
1645 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:168
|
1646 |
+
msgid "Update Step"
|
1647 |
+
msgstr ""
|
1648 |
+
|
1649 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:170
|
1650 |
+
msgid "New Step Name"
|
1651 |
+
msgstr ""
|
1652 |
+
|
1653 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:211
|
1654 |
+
msgid "Step Type"
|
1655 |
+
msgstr ""
|
1656 |
+
|
1657 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:221
|
1658 |
+
msgid "Step Flow"
|
1659 |
+
msgstr ""
|
1660 |
+
|
1661 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:246
|
1662 |
+
#: modules/flow/view/meta-flow-steps.php:16
|
1663 |
+
msgid "Optin (Woo)"
|
1664 |
+
msgstr ""
|
1665 |
+
|
1666 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:267
|
1667 |
+
#: modules/flow/view/meta-flow-steps.php:14
|
1668 |
+
msgid "Upsell (Woo)"
|
1669 |
+
msgstr ""
|
1670 |
+
|
1671 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:274
|
1672 |
+
#: modules/flow/view/meta-flow-steps.php:15
|
1673 |
+
msgid "Downsell (Woo)"
|
1674 |
+
msgstr ""
|
1675 |
+
|
1676 |
+
#: modules/flow/view/view-flow-inner-step.php:30
|
1677 |
+
msgid "Control"
|
1678 |
+
msgstr ""
|
1679 |
+
|
1680 |
+
#: modules/flow/view/view-flow-inner-step.php:32
|
1681 |
+
#. translators: %s badge count
|
1682 |
+
msgid "Variation-%s"
|
1683 |
+
msgstr ""
|
1684 |
+
|
1685 |
+
#: modules/flow/view/view-flow-inner-step.php:44
|
1686 |
+
msgid "No Product Assigned"
|
1687 |
+
msgstr ""
|
1688 |
+
|
1689 |
+
#: modules/flow/view/view-flow-inner-step.php:48
|
1690 |
+
msgid "Global Checkout - Remove selected checkout product"
|
1691 |
+
msgstr ""
|
1692 |
+
|
1693 |
+
#: modules/flow/view/view-remote-importer.php:19
|
1694 |
+
msgid "Steps Library"
|
1695 |
+
msgstr ""
|
1696 |
+
|
1697 |
+
#: modules/flow/view/view-remote-importer.php:68
|
1698 |
+
msgid "Create Step"
|
1699 |
+
msgstr ""
|
1700 |
+
|
1701 |
+
#: modules/flow/view/view-remote-importer.php:70
|
1702 |
+
msgid "You need a Cartflows Pro version to import Upsell / Downsell"
|
1703 |
+
msgstr ""
|
1704 |
+
|
1705 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:66
|
1706 |
+
msgid "Landing Page Settings"
|
1707 |
+
msgstr ""
|
1708 |
+
|
1709 |
+
#: modules/landing/classes/class-cartflows-landing-meta.php:169
|
1710 |
+
msgid "Next Step Link"
|
1711 |
+
msgstr ""
|
1712 |
+
|
1713 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:178
|
1714 |
+
msgid "Please place shortcode on Optin step-type only."
|
1715 |
+
msgstr ""
|
1716 |
+
|
1717 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:238
|
1718 |
+
msgid ""
|
1719 |
+
"No product is selected. Please select a Simple, Virtual and Free product "
|
1720 |
+
"from the meta settings."
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:255
|
1724 |
+
msgid "Please update the selected product's price to zero (0)."
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:264
|
1728 |
+
#: modules/optin/classes/class-cartflows-optin-markup.php:268
|
1729 |
+
msgid "Please select a Simple, Virtual and Free product."
|
1730 |
+
msgstr ""
|
1731 |
+
|
1732 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:65
|
1733 |
+
msgid "Optin Settings"
|
1734 |
+
msgstr ""
|
1735 |
+
|
1736 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:138
|
1737 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:136
|
1738 |
+
msgid "Design"
|
1739 |
+
msgstr ""
|
1740 |
+
|
1741 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:144
|
1742 |
+
msgid "Form Fields"
|
1743 |
+
msgstr ""
|
1744 |
+
|
1745 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:213
|
1746 |
+
msgid "Add this shortcode to your optin page"
|
1747 |
+
msgstr ""
|
1748 |
+
|
1749 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:238
|
1750 |
+
msgid "Select Free Product"
|
1751 |
+
msgstr ""
|
1752 |
+
|
1753 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:239
|
1754 |
+
msgid "Select Free and Virtual product only."
|
1755 |
+
msgstr ""
|
1756 |
+
|
1757 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:293
|
1758 |
+
msgid "Pass Fields as URL Parameters"
|
1759 |
+
msgstr ""
|
1760 |
+
|
1761 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:296
|
1762 |
+
msgid "Enable"
|
1763 |
+
msgstr ""
|
1764 |
+
|
1765 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:297
|
1766 |
+
msgid ""
|
1767 |
+
"You can pass specific fields from the form to next step as URL query "
|
1768 |
+
"parameters."
|
1769 |
+
msgstr ""
|
1770 |
+
|
1771 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:308
|
1772 |
+
msgid "Enter form field"
|
1773 |
+
msgstr ""
|
1774 |
+
|
1775 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:311
|
1776 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:321
|
1777 |
+
msgid "Enter comma seprated field name. E.g. first_name, last_name"
|
1778 |
+
msgstr ""
|
1779 |
+
|
1780 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:313
|
1781 |
+
msgid "Fields to pass, separated by commas"
|
1782 |
+
msgstr ""
|
1783 |
+
|
1784 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:323
|
1785 |
+
#. translators: %s: link
|
1786 |
+
msgid ""
|
1787 |
+
"You can pass field value as a URL parameter to the next step. %1$sClick "
|
1788 |
+
"here%2$s for more information."
|
1789 |
+
msgstr ""
|
1790 |
+
|
1791 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:480
|
1792 |
+
msgid "Submit Button"
|
1793 |
+
msgstr ""
|
1794 |
+
|
1795 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:486
|
1796 |
+
msgid "Button Text"
|
1797 |
+
msgstr ""
|
1798 |
+
|
1799 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:497
|
1800 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:217
|
1801 |
+
msgid "Font Size"
|
1802 |
+
msgstr ""
|
1803 |
+
|
1804 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:555
|
1805 |
+
msgid "Position"
|
1806 |
+
msgstr ""
|
1807 |
+
|
1808 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:559
|
1809 |
+
msgid "Left"
|
1810 |
+
msgstr ""
|
1811 |
+
|
1812 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:560
|
1813 |
+
msgid "Center"
|
1814 |
+
msgstr ""
|
1815 |
+
|
1816 |
+
#: modules/optin/classes/class-cartflows-optin-meta.php:561
|
1817 |
+
msgid "Right"
|
1818 |
+
msgstr ""
|
1819 |
+
|
1820 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:65
|
1821 |
+
msgid "Thank You Page Settings"
|
1822 |
+
msgstr ""
|
1823 |
+
|
1824 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:142
|
1825 |
+
msgid "Edit Fields"
|
1826 |
+
msgstr ""
|
1827 |
+
|
1828 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:182
|
1829 |
+
msgid "Order Details"
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:194
|
1833 |
+
msgid "Text"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:200
|
1837 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:231
|
1838 |
+
msgid "Color"
|
1839 |
+
msgstr ""
|
1840 |
+
|
1841 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:257
|
1842 |
+
msgid "Advanced Options"
|
1843 |
+
msgstr ""
|
1844 |
+
|
1845 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:267
|
1846 |
+
msgid "Container Width (In px)"
|
1847 |
+
msgstr ""
|
1848 |
+
|
1849 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:275
|
1850 |
+
msgid "Section Background Color"
|
1851 |
+
msgstr ""
|
1852 |
+
|
1853 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:289
|
1854 |
+
msgid "Enable Order Overview "
|
1855 |
+
msgstr ""
|
1856 |
+
|
1857 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:297
|
1858 |
+
msgid "Enable Order Details "
|
1859 |
+
msgstr ""
|
1860 |
+
|
1861 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:305
|
1862 |
+
msgid "Enable Billing Details "
|
1863 |
+
msgstr ""
|
1864 |
+
|
1865 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:313
|
1866 |
+
msgid "Enable Shipping Details "
|
1867 |
+
msgstr ""
|
1868 |
+
|
1869 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:329
|
1870 |
+
msgid "Thank You Page Text"
|
1871 |
+
msgstr ""
|
1872 |
+
|
1873 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:333
|
1874 |
+
#: woocommerce/template/checkout/thankyou.php:41
|
1875 |
+
#: woocommerce/template/checkout/thankyou.php:83
|
1876 |
+
msgid "Thank you. Your order has been received."
|
1877 |
+
msgstr ""
|
1878 |
+
|
1879 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:335
|
1880 |
+
msgid "It will change the default text on thank you page."
|
1881 |
+
msgstr ""
|
1882 |
+
|
1883 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:343
|
1884 |
+
msgid "Redirect After Purchase"
|
1885 |
+
msgstr ""
|
1886 |
+
|
1887 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:352
|
1888 |
+
msgid "Redirect Link"
|
1889 |
+
msgstr ""
|
1890 |
+
|
1891 |
+
#: modules/thankyou/classes/class-cartflows-thankyou-meta.php:356
|
1892 |
+
msgid "https://"
|
1893 |
+
msgstr ""
|
1894 |
+
|
1895 |
+
#: modules/widgets/class-cartflows-next-step.php:24
|
1896 |
+
msgid "CartFlows Next Step"
|
1897 |
+
msgstr ""
|
1898 |
+
|
1899 |
+
#: modules/widgets/class-cartflows-next-step.php:26
|
1900 |
+
msgid "Next Step Widgets"
|
1901 |
+
msgstr ""
|
1902 |
+
|
1903 |
+
#: modules/widgets/class-cartflows-next-step.php:106
|
1904 |
+
msgid "New title"
|
1905 |
+
msgstr ""
|
1906 |
+
|
1907 |
+
#: modules/widgets/class-cartflows-next-step.php:123
|
1908 |
+
msgid "Title:"
|
1909 |
+
msgstr ""
|
1910 |
+
|
1911 |
+
#: modules/widgets/class-cartflows-next-step.php:127
|
1912 |
+
msgid "Flow ID:"
|
1913 |
+
msgstr ""
|
1914 |
+
|
1915 |
+
#: modules/widgets/class-cartflows-next-step.php:131
|
1916 |
+
msgid "Step ID:"
|
1917 |
+
msgstr ""
|
1918 |
+
|
1919 |
+
#: woocommerce/template/cart/cart-shipping.php:51
|
1920 |
+
#. Translators: $s shipping destination.
|
1921 |
+
msgid "Estimate for %s."
|
1922 |
+
msgstr ""
|
1923 |
+
|
1924 |
+
#: woocommerce/template/cart/cart-shipping.php:52
|
1925 |
+
msgid "Change address"
|
1926 |
+
msgstr ""
|
1927 |
+
|
1928 |
+
#: woocommerce/template/cart/cart-shipping.php:54
|
1929 |
+
msgid "This is only an estimate. Prices will be updated during checkout."
|
1930 |
+
msgstr ""
|
1931 |
+
|
1932 |
+
#: woocommerce/template/cart/cart-shipping.php:61
|
1933 |
+
msgid "Enter your address to view shipping options."
|
1934 |
+
msgstr ""
|
1935 |
+
|
1936 |
+
#: woocommerce/template/cart/cart-shipping.php:63
|
1937 |
+
msgid ""
|
1938 |
+
"There are no shipping methods available. Please ensure that your address "
|
1939 |
+
"has been entered correctly, or contact us if you need any help."
|
1940 |
+
msgstr ""
|
1941 |
+
|
1942 |
+
#: woocommerce/template/cart/cart-shipping.php:66
|
1943 |
+
#. Translators: $s shipping destination.
|
1944 |
+
msgid "No shipping options were found for %s."
|
1945 |
+
msgstr ""
|
1946 |
+
|
1947 |
+
#: woocommerce/template/cart/cart-shipping.php:67
|
1948 |
+
msgid "Enter a different address"
|
1949 |
+
msgstr ""
|
1950 |
+
|
1951 |
+
#: woocommerce/template/checkout/form-billing.php:27
|
1952 |
+
msgid "Billing & Shipping"
|
1953 |
+
msgstr ""
|
1954 |
+
|
1955 |
+
#: woocommerce/template/checkout/form-billing.php:31
|
1956 |
+
msgid "Billing details"
|
1957 |
+
msgstr ""
|
1958 |
+
|
1959 |
+
#: woocommerce/template/checkout/form-billing.php:59
|
1960 |
+
msgid "Create an account?"
|
1961 |
+
msgstr ""
|
1962 |
+
|
1963 |
+
#: woocommerce/template/checkout/form-checkout.php:26
|
1964 |
+
msgid "You must be logged in to checkout."
|
1965 |
+
msgstr ""
|
1966 |
+
|
1967 |
+
#: woocommerce/template/checkout/form-checkout.php:52
|
1968 |
+
msgid "Your order"
|
1969 |
+
msgstr ""
|
1970 |
+
|
1971 |
+
#: woocommerce/template/checkout/form-coupon.php:26
|
1972 |
+
msgid "Have a coupon?"
|
1973 |
+
msgstr ""
|
1974 |
+
|
1975 |
+
#: woocommerce/template/checkout/form-coupon.php:26
|
1976 |
+
msgid "Click here to enter your code"
|
1977 |
+
msgstr ""
|
1978 |
+
|
1979 |
+
#: woocommerce/template/checkout/form-coupon.php:31
|
1980 |
+
msgid "If you have a coupon code, please apply it below."
|
1981 |
+
msgstr ""
|
1982 |
+
|
1983 |
+
#: woocommerce/template/checkout/form-coupon.php:34
|
1984 |
+
msgid "Coupon code"
|
1985 |
+
msgstr ""
|
1986 |
+
|
1987 |
+
#: woocommerce/template/checkout/form-coupon.php:38
|
1988 |
+
msgid "Apply coupon"
|
1989 |
+
msgstr ""
|
1990 |
+
|
1991 |
+
#: woocommerce/template/checkout/form-login.php:26
|
1992 |
+
msgid "Returning customer?"
|
1993 |
+
msgstr ""
|
1994 |
+
|
1995 |
+
#: woocommerce/template/checkout/form-login.php:26
|
1996 |
+
msgid "Click here to login"
|
1997 |
+
msgstr ""
|
1998 |
+
|
1999 |
+
#: woocommerce/template/checkout/form-login.php:32
|
2000 |
+
msgid ""
|
2001 |
+
"If you have shopped with us before, please enter your details below. If you "
|
2002 |
+
"are a new customer, please proceed to the Billing & Shipping section."
|
2003 |
+
msgstr ""
|
2004 |
+
|
2005 |
+
#: woocommerce/template/checkout/form-shipping.php:26
|
2006 |
+
msgid "Ship to a different address?"
|
2007 |
+
msgstr ""
|
2008 |
+
|
2009 |
+
#: woocommerce/template/checkout/form-shipping.php:57
|
2010 |
+
msgid "Additional information"
|
2011 |
+
msgstr ""
|
2012 |
+
|
2013 |
+
#: woocommerce/template/checkout/payment.php:33
|
2014 |
+
msgid ""
|
2015 |
+
"Sorry, it seems that there are no available payment methods for your state. "
|
2016 |
+
"Please contact us if you require assistance or wish to make alternate "
|
2017 |
+
"arrangements."
|
2018 |
+
msgstr ""
|
2019 |
+
|
2020 |
+
#: woocommerce/template/checkout/payment.php:33
|
2021 |
+
msgid "Please fill in your details above to see available payment methods."
|
2022 |
+
msgstr ""
|
2023 |
+
|
2024 |
+
#: woocommerce/template/checkout/payment.php:42
|
2025 |
+
#. translators: $1 and $2 opening and closing emphasis tags respectively
|
2026 |
+
msgid ""
|
2027 |
+
"Since your browser does not support JavaScript, or it is disabled, please "
|
2028 |
+
"ensure you click the %1$sUpdate Totals%2$s button before placing your "
|
2029 |
+
"order. You may be charged more than the amount stated above if you fail to "
|
2030 |
+
"do so."
|
2031 |
+
msgstr ""
|
2032 |
+
|
2033 |
+
#: woocommerce/template/checkout/payment.php:44
|
2034 |
+
msgid "Update totals"
|
2035 |
+
msgstr ""
|
2036 |
+
|
2037 |
+
#: woocommerce/template/checkout/review-order.php:26
|
2038 |
+
#: woocommerce/template/order/order-details.php:51
|
2039 |
+
msgid "Product"
|
2040 |
+
msgstr ""
|
2041 |
+
|
2042 |
+
#: woocommerce/template/checkout/review-order.php:27
|
2043 |
+
#: woocommerce/template/checkout/review-order.php:107
|
2044 |
+
#: woocommerce/template/order/order-details.php:52
|
2045 |
+
msgid "Total"
|
2046 |
+
msgstr ""
|
2047 |
+
|
2048 |
+
#: woocommerce/template/checkout/review-order.php:60
|
2049 |
+
msgid "Subtotal"
|
2050 |
+
msgstr ""
|
2051 |
+
|
2052 |
+
#: woocommerce/template/checkout/thankyou.php:30
|
2053 |
+
msgid ""
|
2054 |
+
"Unfortunately your order cannot be processed as the originating "
|
2055 |
+
"bank/merchant has declined your transaction. Please attempt your purchase "
|
2056 |
+
"again."
|
2057 |
+
msgstr ""
|
2058 |
+
|
2059 |
+
#: woocommerce/template/checkout/thankyou.php:33
|
2060 |
+
msgid "Pay"
|
2061 |
+
msgstr ""
|
2062 |
+
|
2063 |
+
#: woocommerce/template/checkout/thankyou.php:35
|
2064 |
+
msgid "My account"
|
2065 |
+
msgstr ""
|
2066 |
+
|
2067 |
+
#: woocommerce/template/checkout/thankyou.php:46
|
2068 |
+
msgid "Order number:"
|
2069 |
+
msgstr ""
|
2070 |
+
|
2071 |
+
#: woocommerce/template/checkout/thankyou.php:51
|
2072 |
+
msgid "Date:"
|
2073 |
+
msgstr ""
|
2074 |
+
|
2075 |
+
#: woocommerce/template/checkout/thankyou.php:57
|
2076 |
+
msgid "Email:"
|
2077 |
+
msgstr ""
|
2078 |
+
|
2079 |
+
#: woocommerce/template/checkout/thankyou.php:63
|
2080 |
+
msgid "Total:"
|
2081 |
+
msgstr ""
|
2082 |
+
|
2083 |
+
#: woocommerce/template/checkout/thankyou.php:69
|
2084 |
+
msgid "Payment method:"
|
2085 |
+
msgstr ""
|
2086 |
+
|
2087 |
+
#: woocommerce/template/global/form-login.php:34
|
2088 |
+
msgid "Username or email"
|
2089 |
+
msgstr ""
|
2090 |
+
|
2091 |
+
#: woocommerce/template/global/form-login.php:38
|
2092 |
+
msgid "Password"
|
2093 |
+
msgstr ""
|
2094 |
+
|
2095 |
+
#: woocommerce/template/global/form-login.php:48
|
2096 |
+
msgid "Login"
|
2097 |
+
msgstr ""
|
2098 |
+
|
2099 |
+
#: woocommerce/template/global/form-login.php:53
|
2100 |
+
msgid "Remember me"
|
2101 |
+
msgstr ""
|
2102 |
+
|
2103 |
+
#: woocommerce/template/global/form-login.php:57
|
2104 |
+
msgid "Lost your password?"
|
2105 |
+
msgstr ""
|
2106 |
+
|
2107 |
+
#: woocommerce/template/order/order-details.php:45
|
2108 |
+
msgid "Order details"
|
2109 |
+
msgstr ""
|
2110 |
+
|
2111 |
+
#: woocommerce/template/order/order-details.php:93
|
2112 |
+
msgid "Note:"
|
2113 |
+
msgstr ""
|
2114 |
+
|
2115 |
+
#. Plugin Name of the plugin/theme
|
2116 |
+
msgid "CartFlows"
|
2117 |
+
msgstr ""
|
2118 |
+
|
2119 |
+
#. Author URI of the plugin/theme
|
2120 |
+
msgid "https://cartflows.com/"
|
2121 |
+
msgstr ""
|
2122 |
+
|
2123 |
+
#. Description of the plugin/theme
|
2124 |
+
msgid "Create beautiful checkout pages & sales flows for WooCommerce."
|
2125 |
+
msgstr ""
|
2126 |
+
|
2127 |
+
#. Author of the plugin/theme
|
2128 |
+
msgid "CartFlows Inc"
|
2129 |
+
msgstr ""
|
2130 |
+
|
2131 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:99
|
2132 |
+
msgctxt "flow general name"
|
2133 |
+
msgid "Flows"
|
2134 |
+
msgstr ""
|
2135 |
+
|
2136 |
+
#: modules/flow/classes/class-cartflows-flow-post-type.php:100
|
2137 |
+
msgctxt "flow singular name"
|
2138 |
+
msgid "Flow"
|
2139 |
+
msgstr ""
|
2140 |
+
|
2141 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:161
|
2142 |
+
msgctxt "flow step general name"
|
2143 |
+
msgid "Steps"
|
2144 |
+
msgstr ""
|
2145 |
+
|
2146 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:162
|
2147 |
+
msgctxt "flow step singular name"
|
2148 |
+
msgid "Step"
|
2149 |
+
msgstr ""
|
2150 |
+
|
2151 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:315
|
2152 |
+
msgctxt "cartflows"
|
2153 |
+
msgid "CartFlows — Boxed"
|
2154 |
+
msgstr ""
|
2155 |
+
|
2156 |
+
#: modules/flow/classes/class-cartflows-step-post-type.php:316
|
2157 |
+
msgctxt "cartflows"
|
2158 |
+
msgid "Template for Page Builders"
|
2159 |
msgstr ""
|
modules/checkout/classes/class-cartflows-checkout-markup.php
CHANGED
@@ -477,7 +477,8 @@ class Cartflows_Checkout_Markup {
|
|
477 |
|
478 |
$cart_item_data = array();
|
479 |
|
480 |
-
if
|
|
|
481 |
|
482 |
$cart_item_data = array(
|
483 |
'custom_price' => $custom_price,
|
477 |
|
478 |
$cart_item_data = array();
|
479 |
|
480 |
+
// Set the Product's custom price even if it is zero. Discount may have applied.
|
481 |
+
if ( $custom_price >= 0 && '' !== $custom_price ) {
|
482 |
|
483 |
$cart_item_data = array(
|
484 |
'custom_price' => $custom_price,
|
modules/flow/classes/class-cartflows-flow-meta.php
CHANGED
@@ -1,760 +1,866 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Flow meta
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Meta Boxes setup
|
10 |
-
*/
|
11 |
-
class Cartflows_Flow_Meta {
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Instance
|
16 |
-
*
|
17 |
-
* @var $instance
|
18 |
-
*/
|
19 |
-
private static $instance;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Meta Option
|
23 |
-
*
|
24 |
-
* @var $meta_option
|
25 |
-
*/
|
26 |
-
private static $meta_option;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* For Gutenberg
|
30 |
-
*
|
31 |
-
* @var $is_gutenberg_editor_active
|
32 |
-
*/
|
33 |
-
private $is_gutenberg_editor_active = false;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Initiator
|
37 |
-
*/
|
38 |
-
public static function get_instance() {
|
39 |
-
if ( ! isset( self::$instance ) ) {
|
40 |
-
self::$instance = new self();
|
41 |
-
}
|
42 |
-
|
43 |
-
return self::$instance;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Constructor
|
48 |
-
*/
|
49 |
-
public function __construct() {
|
50 |
-
|
51 |
-
add_action( 'admin_head', array( $this, 'menu_highlight' ) );
|
52 |
-
|
53 |
-
add_action( 'admin_init', array( $this, 'admin_init_actions' ) );
|
54 |
-
|
55 |
-
/* Init Metabox */
|
56 |
-
add_action( 'load-post.php', array( $this, 'init_metabox' ) );
|
57 |
-
add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
|
58 |
-
|
59 |
-
/* Add Scripts */
|
60 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 20 );
|
61 |
-
|
62 |
-
add_action( 'wp_ajax_cartflows_delete_flow_step', array( $this, 'cartflows_delete_flow_step' ) );
|
63 |
-
add_action( 'wp_ajax_cartflows_reorder_flow_steps', array( $this, 'cartflows_reorder_flow_steps' ) );
|
64 |
-
|
65 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
66 |
-
|
67 |
-
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
68 |
-
|
69 |
-
/* To check the status of gutenberg */
|
70 |
-
add_action( 'enqueue_block_editor_assets', array( $this, 'set_block_editor_status' ) );
|
71 |
-
|
72 |
-
/* Add back to edit flow button for gutenberg */
|
73 |
-
add_action( 'admin_footer', array( $this, 'gutenberg_module_templates' ) );
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Display admin notices.
|
78 |
-
*
|
79 |
-
* @since 1.0.0
|
80 |
-
*
|
81 |
-
* @return void
|
82 |
-
*/
|
83 |
-
public function admin_notices() {
|
84 |
-
|
85 |
-
if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type() ) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
$flow_id = get_post_meta( get_the_id(), 'wcf-flow-id', true );
|
90 |
-
if ( $flow_id ) { ?>
|
91 |
-
<div class="wcf-notice-back-edit-flow">
|
92 |
-
<p>
|
93 |
-
<a href="<?php echo esc_url( get_edit_post_link( $flow_id ) ); ?>" class="button button-primary button-hero wcf-header-back-button" style="text-decoration: none;">
|
94 |
-
<i class="dashicons dashicons-arrow-left-alt"></i>
|
95 |
-
<?php esc_html_e( 'Back to edit Flow', 'cartflows' ); ?>
|
96 |
-
</a>
|
97 |
-
</p>
|
98 |
-
</div>
|
99 |
-
<?php
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Initialize admin actions.
|
105 |
-
*
|
106 |
-
* @since 1.0.0
|
107 |
-
*
|
108 |
-
* @return void
|
109 |
-
*/
|
110 |
-
public function admin_init_actions() {
|
111 |
-
add_action( 'before_delete_post', array( $this, 'step_post_sync' ) );
|
112 |
-
add_action( 'wp_trash_post', array( $this, 'step_post_trash_sync' ) );
|
113 |
-
add_action( 'untrashed_post', array( $this, 'step_post_untrash_sync' ) );
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Delete term data and steps data after deleting flow.
|
118 |
-
*
|
119 |
-
* @since 1.0.0
|
120 |
-
* @param int $pid post id.
|
121 |
-
*
|
122 |
-
* @return void
|
123 |
-
*/
|
124 |
-
public function step_post_sync( $pid ) {
|
125 |
-
|
126 |
-
global $post_type;
|
127 |
-
|
128 |
-
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
129 |
-
|
130 |
-
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
131 |
-
|
132 |
-
if ( $steps && is_array( $steps ) ) {
|
133 |
-
foreach ( $steps as $i => $step ) {
|
134 |
-
wp_delete_post( $step['id'], true );
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
$term_data = term_exists( 'flow-' . $pid, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
139 |
-
|
140 |
-
if ( is_array( $term_data ) ) {
|
141 |
-
wp_delete_term( $term_data['term_id'], CARTFLOWS_TAXONOMY_STEP_FLOW );
|
142 |
-
}
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Trash steps data after trashing flow.
|
148 |
-
*
|
149 |
-
* @since 1.0.0
|
150 |
-
* @param int $pid post id.
|
151 |
-
*
|
152 |
-
* @return void
|
153 |
-
*/
|
154 |
-
public function step_post_trash_sync( $pid ) {
|
155 |
-
|
156 |
-
global $post_type;
|
157 |
-
|
158 |
-
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
159 |
-
|
160 |
-
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
161 |
-
|
162 |
-
if ( $steps && is_array( $steps ) ) {
|
163 |
-
foreach ( $steps as $i => $step ) {
|
164 |
-
wp_trash_post( $step['id'] );
|
165 |
-
}
|
166 |
-
}
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Untrash steps data after restoring flow.
|
172 |
-
*
|
173 |
-
* @since 1.0.0
|
174 |
-
* @param int $pid post id.
|
175 |
-
*
|
176 |
-
* @return void
|
177 |
-
*/
|
178 |
-
public function step_post_untrash_sync( $pid ) {
|
179 |
-
|
180 |
-
global $post_type;
|
181 |
-
|
182 |
-
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
183 |
-
|
184 |
-
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
185 |
-
|
186 |
-
if ( $steps && is_array( $steps ) ) {
|
187 |
-
foreach ( $steps as $i => $step ) {
|
188 |
-
wp_untrash_post( $step['id'] );
|
189 |
-
}
|
190 |
-
}
|
191 |
-
}
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Create step for given flow.
|
196 |
-
*
|
197 |
-
* @param int $flow_id flow ID.
|
198 |
-
* @param int $step_type step type.
|
199 |
-
* @param int $step_title step title.
|
200 |
-
* @since 1.0.0
|
201 |
-
*
|
202 |
-
* @return int
|
203 |
-
*/
|
204 |
-
public function create_step( $flow_id, $step_type, $step_title ) {
|
205 |
-
|
206 |
-
$new_step_id = wp_insert_post(
|
207 |
-
array(
|
208 |
-
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
209 |
-
'post_title' => $step_title,
|
210 |
-
'post_status' => 'publish',
|
211 |
-
)
|
212 |
-
);
|
213 |
-
|
214 |
-
if ( $new_step_id ) {
|
215 |
-
|
216 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
217 |
-
|
218 |
-
if ( ! is_array( $flow_steps ) ) {
|
219 |
-
$flow_steps = array();
|
220 |
-
}
|
221 |
-
|
222 |
-
$flow_steps[] = array(
|
223 |
-
'id' => $new_step_id,
|
224 |
-
'title' => $step_title,
|
225 |
-
'type' => $step_type,
|
226 |
-
);
|
227 |
-
|
228 |
-
// insert post meta.
|
229 |
-
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
230 |
-
update_post_meta( $new_step_id, 'wcf-step-type', $step_type );
|
231 |
-
|
232 |
-
wp_set_object_terms( $new_step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
233 |
-
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
234 |
-
}
|
235 |
-
|
236 |
-
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
237 |
-
|
238 |
-
return $new_step_id;
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Delete step for flow
|
243 |
-
*
|
244 |
-
* @since 1.0.0
|
245 |
-
*
|
246 |
-
* @return void
|
247 |
-
*/
|
248 |
-
public function cartflows_delete_flow_step() {
|
249 |
-
|
250 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
251 |
-
return;
|
252 |
-
}
|
253 |
-
|
254 |
-
check_ajax_referer( 'wcf-delete-flow-step', 'security' );
|
255 |
-
|
256 |
-
if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) ) {
|
257 |
-
$flow_id = intval( $_POST['post_id'] );
|
258 |
-
$step_id = intval( $_POST['step_id'] );
|
259 |
-
}
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
'
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
273 |
-
|
274 |
-
if ( ! is_array( $flow_steps ) ) {
|
275 |
-
wp_send_json( $result );
|
276 |
-
}
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
/*
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
$result
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
/**
|
388 |
-
*
|
389 |
-
*
|
390 |
-
* @since 1.0.0
|
391 |
-
*
|
392 |
-
* @return void
|
393 |
-
*/
|
394 |
-
public function
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
*
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
*
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
<
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
*
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Flow meta
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Meta Boxes setup
|
10 |
+
*/
|
11 |
+
class Cartflows_Flow_Meta {
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance
|
16 |
+
*
|
17 |
+
* @var $instance
|
18 |
+
*/
|
19 |
+
private static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Meta Option
|
23 |
+
*
|
24 |
+
* @var $meta_option
|
25 |
+
*/
|
26 |
+
private static $meta_option;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* For Gutenberg
|
30 |
+
*
|
31 |
+
* @var $is_gutenberg_editor_active
|
32 |
+
*/
|
33 |
+
private $is_gutenberg_editor_active = false;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Initiator
|
37 |
+
*/
|
38 |
+
public static function get_instance() {
|
39 |
+
if ( ! isset( self::$instance ) ) {
|
40 |
+
self::$instance = new self();
|
41 |
+
}
|
42 |
+
|
43 |
+
return self::$instance;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Constructor
|
48 |
+
*/
|
49 |
+
public function __construct() {
|
50 |
+
|
51 |
+
add_action( 'admin_head', array( $this, 'menu_highlight' ) );
|
52 |
+
|
53 |
+
add_action( 'admin_init', array( $this, 'admin_init_actions' ) );
|
54 |
+
|
55 |
+
/* Init Metabox */
|
56 |
+
add_action( 'load-post.php', array( $this, 'init_metabox' ) );
|
57 |
+
add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
|
58 |
+
|
59 |
+
/* Add Scripts */
|
60 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 20 );
|
61 |
+
|
62 |
+
add_action( 'wp_ajax_cartflows_delete_flow_step', array( $this, 'cartflows_delete_flow_step' ) );
|
63 |
+
add_action( 'wp_ajax_cartflows_reorder_flow_steps', array( $this, 'cartflows_reorder_flow_steps' ) );
|
64 |
+
|
65 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
66 |
+
|
67 |
+
add_filter( 'cartflows_admin_js_localize', array( $this, 'localize_vars' ) );
|
68 |
+
|
69 |
+
/* To check the status of gutenberg */
|
70 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'set_block_editor_status' ) );
|
71 |
+
|
72 |
+
/* Add back to edit flow button for gutenberg */
|
73 |
+
add_action( 'admin_footer', array( $this, 'gutenberg_module_templates' ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Display admin notices.
|
78 |
+
*
|
79 |
+
* @since 1.0.0
|
80 |
+
*
|
81 |
+
* @return void
|
82 |
+
*/
|
83 |
+
public function admin_notices() {
|
84 |
+
|
85 |
+
if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type() ) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
$flow_id = get_post_meta( get_the_id(), 'wcf-flow-id', true );
|
90 |
+
if ( $flow_id ) { ?>
|
91 |
+
<div class="wcf-notice-back-edit-flow">
|
92 |
+
<p>
|
93 |
+
<a href="<?php echo esc_url( get_edit_post_link( $flow_id ) ); ?>" class="button button-primary button-hero wcf-header-back-button" style="text-decoration: none;">
|
94 |
+
<i class="dashicons dashicons-arrow-left-alt"></i>
|
95 |
+
<?php esc_html_e( 'Back to edit Flow', 'cartflows' ); ?>
|
96 |
+
</a>
|
97 |
+
</p>
|
98 |
+
</div>
|
99 |
+
<?php
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Initialize admin actions.
|
105 |
+
*
|
106 |
+
* @since 1.0.0
|
107 |
+
*
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
public function admin_init_actions() {
|
111 |
+
add_action( 'before_delete_post', array( $this, 'step_post_sync' ) );
|
112 |
+
add_action( 'wp_trash_post', array( $this, 'step_post_trash_sync' ) );
|
113 |
+
add_action( 'untrashed_post', array( $this, 'step_post_untrash_sync' ) );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Delete term data and steps data after deleting flow.
|
118 |
+
*
|
119 |
+
* @since 1.0.0
|
120 |
+
* @param int $pid post id.
|
121 |
+
*
|
122 |
+
* @return void
|
123 |
+
*/
|
124 |
+
public function step_post_sync( $pid ) {
|
125 |
+
|
126 |
+
global $post_type;
|
127 |
+
|
128 |
+
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
129 |
+
|
130 |
+
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
131 |
+
|
132 |
+
if ( $steps && is_array( $steps ) ) {
|
133 |
+
foreach ( $steps as $i => $step ) {
|
134 |
+
wp_delete_post( $step['id'], true );
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
$term_data = term_exists( 'flow-' . $pid, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
139 |
+
|
140 |
+
if ( is_array( $term_data ) ) {
|
141 |
+
wp_delete_term( $term_data['term_id'], CARTFLOWS_TAXONOMY_STEP_FLOW );
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Trash steps data after trashing flow.
|
148 |
+
*
|
149 |
+
* @since 1.0.0
|
150 |
+
* @param int $pid post id.
|
151 |
+
*
|
152 |
+
* @return void
|
153 |
+
*/
|
154 |
+
public function step_post_trash_sync( $pid ) {
|
155 |
+
|
156 |
+
global $post_type;
|
157 |
+
|
158 |
+
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
159 |
+
|
160 |
+
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
161 |
+
|
162 |
+
if ( $steps && is_array( $steps ) ) {
|
163 |
+
foreach ( $steps as $i => $step ) {
|
164 |
+
wp_trash_post( $step['id'] );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Untrash steps data after restoring flow.
|
172 |
+
*
|
173 |
+
* @since 1.0.0
|
174 |
+
* @param int $pid post id.
|
175 |
+
*
|
176 |
+
* @return void
|
177 |
+
*/
|
178 |
+
public function step_post_untrash_sync( $pid ) {
|
179 |
+
|
180 |
+
global $post_type;
|
181 |
+
|
182 |
+
if ( CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
183 |
+
|
184 |
+
$steps = get_post_meta( $pid, 'wcf-steps', true );
|
185 |
+
|
186 |
+
if ( $steps && is_array( $steps ) ) {
|
187 |
+
foreach ( $steps as $i => $step ) {
|
188 |
+
wp_untrash_post( $step['id'] );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Create step for given flow.
|
196 |
+
*
|
197 |
+
* @param int $flow_id flow ID.
|
198 |
+
* @param int $step_type step type.
|
199 |
+
* @param int $step_title step title.
|
200 |
+
* @since 1.0.0
|
201 |
+
*
|
202 |
+
* @return int
|
203 |
+
*/
|
204 |
+
public function create_step( $flow_id, $step_type, $step_title ) {
|
205 |
+
|
206 |
+
$new_step_id = wp_insert_post(
|
207 |
+
array(
|
208 |
+
'post_type' => CARTFLOWS_STEP_POST_TYPE,
|
209 |
+
'post_title' => $step_title,
|
210 |
+
'post_status' => 'publish',
|
211 |
+
)
|
212 |
+
);
|
213 |
+
|
214 |
+
if ( $new_step_id ) {
|
215 |
+
|
216 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
217 |
+
|
218 |
+
if ( ! is_array( $flow_steps ) ) {
|
219 |
+
$flow_steps = array();
|
220 |
+
}
|
221 |
+
|
222 |
+
$flow_steps[] = array(
|
223 |
+
'id' => $new_step_id,
|
224 |
+
'title' => $step_title,
|
225 |
+
'type' => $step_type,
|
226 |
+
);
|
227 |
+
|
228 |
+
// insert post meta.
|
229 |
+
update_post_meta( $new_step_id, 'wcf-flow-id', $flow_id );
|
230 |
+
update_post_meta( $new_step_id, 'wcf-step-type', $step_type );
|
231 |
+
|
232 |
+
wp_set_object_terms( $new_step_id, $step_type, CARTFLOWS_TAXONOMY_STEP_TYPE );
|
233 |
+
wp_set_object_terms( $new_step_id, 'flow-' . $flow_id, CARTFLOWS_TAXONOMY_STEP_FLOW );
|
234 |
+
}
|
235 |
+
|
236 |
+
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
237 |
+
|
238 |
+
return $new_step_id;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Delete step for flow
|
243 |
+
*
|
244 |
+
* @since 1.0.0
|
245 |
+
*
|
246 |
+
* @return void
|
247 |
+
*/
|
248 |
+
public function cartflows_delete_flow_step() {
|
249 |
+
|
250 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
251 |
+
return;
|
252 |
+
}
|
253 |
+
|
254 |
+
check_ajax_referer( 'wcf-delete-flow-step', 'security' );
|
255 |
+
|
256 |
+
if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) ) {
|
257 |
+
$flow_id = intval( $_POST['post_id'] );
|
258 |
+
$step_id = intval( $_POST['step_id'] );
|
259 |
+
}
|
260 |
+
|
261 |
+
$result = array(
|
262 |
+
'status' => false,
|
263 |
+
'reload' => false,
|
264 |
+
/* translators: %s flow id */
|
265 |
+
'text' => sprintf( __( 'Step not deleted for flow - %s', 'cartflows' ), $flow_id ),
|
266 |
+
);
|
267 |
+
|
268 |
+
if ( ! $flow_id || ! $step_id ) {
|
269 |
+
wp_send_json( $result );
|
270 |
+
}
|
271 |
+
|
272 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
273 |
+
|
274 |
+
if ( ! is_array( $flow_steps ) ) {
|
275 |
+
wp_send_json( $result );
|
276 |
+
}
|
277 |
+
|
278 |
+
$is_ab_test = get_post_meta( $step_id, 'wcf-ab-test', true );
|
279 |
+
|
280 |
+
if ( ! $is_ab_test ) {
|
281 |
+
|
282 |
+
foreach ( $flow_steps as $index => $data ) {
|
283 |
+
|
284 |
+
if ( intval( $data['id'] ) === $step_id ) {
|
285 |
+
unset( $flow_steps[ $index ] );
|
286 |
+
break;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
/* Set index order properly */
|
291 |
+
$flow_steps = array_merge( $flow_steps );
|
292 |
+
|
293 |
+
/* Update latest data */
|
294 |
+
update_post_meta( $flow_id, 'wcf-steps', $flow_steps );
|
295 |
+
|
296 |
+
/* Delete step */
|
297 |
+
wp_delete_post( $step_id, true );
|
298 |
+
|
299 |
+
$result = array(
|
300 |
+
'status' => true,
|
301 |
+
'reload' => false,
|
302 |
+
/* translators: %s flow id */
|
303 |
+
'text' => sprintf( __( 'Step deleted for flow - %s', 'cartflows' ), $flow_id ),
|
304 |
+
);
|
305 |
+
|
306 |
+
} else {
|
307 |
+
|
308 |
+
$result = array(
|
309 |
+
'status' => false,
|
310 |
+
'reload' => false,
|
311 |
+
/* translators: %s flow id */
|
312 |
+
'text' => sprintf( __( 'This step can not be deleted.', 'cartflows' ), $flow_id ),
|
313 |
+
);
|
314 |
+
/**
|
315 |
+
Action do_action( 'cartflows_step_delete_ab_test', $step_id, $flow_id, $flow_steps );
|
316 |
+
*/
|
317 |
+
}
|
318 |
+
|
319 |
+
wp_send_json( $result );
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Reorder step flow
|
324 |
+
*
|
325 |
+
* @since 1.0.0
|
326 |
+
*
|
327 |
+
* @return void
|
328 |
+
*/
|
329 |
+
public function cartflows_reorder_flow_steps() {
|
330 |
+
|
331 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
332 |
+
return;
|
333 |
+
}
|
334 |
+
|
335 |
+
check_ajax_referer( 'wcf-reorder-flow-steps', 'security' );
|
336 |
+
|
337 |
+
if ( isset( $_POST['post_id'] ) && isset( $_POST['step_ids'] ) ) {
|
338 |
+
$flow_id = intval( $_POST['post_id'] );
|
339 |
+
$step_ids = array_map( 'intval', $_POST['step_ids'] );
|
340 |
+
}
|
341 |
+
$result = array(
|
342 |
+
'status' => false,
|
343 |
+
/* translators: %s flow id */
|
344 |
+
'text' => sprintf( __( 'Steps not sorted for flow - %s', 'cartflows' ), $flow_id ),
|
345 |
+
);
|
346 |
+
|
347 |
+
if ( ! $flow_id || ! is_array( $step_ids ) ) {
|
348 |
+
wp_send_json( $result );
|
349 |
+
}
|
350 |
+
|
351 |
+
$flow_steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
352 |
+
$flow_steps_map = array();
|
353 |
+
|
354 |
+
foreach ( $flow_steps as $key => $value ) {
|
355 |
+
$flow_steps_map[ $value['id'] ] = $value;
|
356 |
+
}
|
357 |
+
|
358 |
+
$new_flow_steps = array();
|
359 |
+
|
360 |
+
foreach ( $step_ids as $index => $step_id ) {
|
361 |
+
|
362 |
+
$new_flow_step_data = array();
|
363 |
+
|
364 |
+
if ( isset( $flow_steps_map[ $step_id ] ) ) {
|
365 |
+
$new_flow_step_data = $flow_steps_map[ $step_id ];
|
366 |
+
}
|
367 |
+
|
368 |
+
$new_flow_step_data['id'] = intval( $step_id );
|
369 |
+
$new_flow_step_data['title'] = get_the_title( $step_id );
|
370 |
+
$new_flow_step_data['type'] = get_post_meta( $step_id, 'wcf-step-type', true );
|
371 |
+
|
372 |
+
$new_flow_steps[] = $new_flow_step_data;
|
373 |
+
}
|
374 |
+
|
375 |
+
update_post_meta( $flow_id, 'wcf-steps', $new_flow_steps );
|
376 |
+
|
377 |
+
$result = array(
|
378 |
+
'status' => true,
|
379 |
+
/* translators: %s flow id */
|
380 |
+
'text' => sprintf( __( 'Steps sorted for flow - %s', 'cartflows' ), $flow_id ),
|
381 |
+
);
|
382 |
+
|
383 |
+
wp_send_json( $result );
|
384 |
+
}
|
385 |
+
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Load admin scripts
|
389 |
+
*
|
390 |
+
* @since 1.0.0
|
391 |
+
*
|
392 |
+
* @return void
|
393 |
+
*/
|
394 |
+
public function admin_scripts() {
|
395 |
+
|
396 |
+
global $pagenow;
|
397 |
+
global $post;
|
398 |
+
|
399 |
+
$screen = get_current_screen();
|
400 |
+
|
401 |
+
if ( ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) && CARTFLOWS_FLOW_POST_TYPE == $screen->post_type ) {
|
402 |
+
|
403 |
+
wp_enqueue_script(
|
404 |
+
'wcf-flow-meta',
|
405 |
+
CARTFLOWS_URL . 'admin/assets/js/flow-admin-edit.js',
|
406 |
+
array( 'jquery', 'jquery-ui-sortable' ),
|
407 |
+
CARTFLOWS_VER,
|
408 |
+
true
|
409 |
+
);
|
410 |
+
|
411 |
+
wp_enqueue_style( 'wcf-flow-meta', CARTFLOWS_URL . 'admin/assets/css/flow-admin-edit.css', '', CARTFLOWS_VER );
|
412 |
+
wp_style_add_data( 'wcf-flow-meta', 'rtl', 'replace' );
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Initialize meta box
|
418 |
+
*
|
419 |
+
* @since 1.0.0
|
420 |
+
*
|
421 |
+
* @return void
|
422 |
+
*/
|
423 |
+
public function init_metabox() {
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Fires after the title field.
|
427 |
+
*
|
428 |
+
* @param WP_Post $post Post object.
|
429 |
+
*/
|
430 |
+
add_action( 'add_meta_boxes', array( $this, 'settings_meta_box' ) );
|
431 |
+
add_action( 'edit_form_after_title', array( $this, 'setup_meta_box' ) );
|
432 |
+
add_action( 'save_post', array( $this, 'save_meta_box' ) );
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Is first time import?
|
437 |
+
*
|
438 |
+
* @param integer $post_id post ID.
|
439 |
+
* @return bool
|
440 |
+
*/
|
441 |
+
public function is_flow_imported( $post_id = 0 ) {
|
442 |
+
|
443 |
+
if ( 0 === $post_id ) {
|
444 |
+
$post_id = get_the_ID();
|
445 |
+
}
|
446 |
+
|
447 |
+
$steps = get_post_meta( $post_id, 'wcf-steps', true );
|
448 |
+
$choice = get_post_meta( $post_id, 'wcf-flow-choise', true );
|
449 |
+
|
450 |
+
if ( empty( $steps ) && 'import' === $choice ) {
|
451 |
+
return true;
|
452 |
+
}
|
453 |
+
|
454 |
+
return false;
|
455 |
+
}
|
456 |
+
|
457 |
+
/**
|
458 |
+
* Setup meta box.
|
459 |
+
*
|
460 |
+
* @return void
|
461 |
+
*/
|
462 |
+
public function setup_meta_box() {
|
463 |
+
if ( ! Cartflows_Admin::is_flow_edit_admin() ) {
|
464 |
+
return;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Adding Add new step button to the top*/
|
469 |
+
echo $this->add_add_new_step_button();
|
470 |
+
|
471 |
+
$this->markup_meta_box();
|
472 |
+
|
473 |
+
$this->add_upgrade_to_pro_metabox();
|
474 |
+
}
|
475 |
+
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Add metabox when cartflows pro is not enabled.
|
479 |
+
*/
|
480 |
+
public function add_upgrade_to_pro_metabox() {
|
481 |
+
|
482 |
+
if ( ! _is_cartflows_pro() ) {
|
483 |
+
add_meta_box(
|
484 |
+
'wcf-upgrade-pro',
|
485 |
+
__( 'Analytics', 'cartflows' ),
|
486 |
+
array( $this, 'upgrade_to_pro' ),
|
487 |
+
CARTFLOWS_FLOW_POST_TYPE,
|
488 |
+
'side',
|
489 |
+
'high'
|
490 |
+
);
|
491 |
+
}
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Show Upgrade To Pro markup.
|
497 |
+
*/
|
498 |
+
public function upgrade_to_pro() {
|
499 |
+
|
500 |
+
echo '<div>';
|
501 |
+
/* translators: %s: link */
|
502 |
+
echo '<p><i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Analytics feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i></p>';
|
503 |
+
echo '<p><a target="_blank" href="https://cartflows.com/" class="button button-primary">' . esc_html__( 'Get Pro', 'cartflows' ) . '</a></p>';
|
504 |
+
echo '</div>';
|
505 |
+
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Settings meta box.
|
510 |
+
*
|
511 |
+
* @return void
|
512 |
+
*/
|
513 |
+
public function settings_meta_box() {
|
514 |
+
|
515 |
+
if ( CARTFLOWS_FLOW_POST_TYPE === get_post_type() ) {
|
516 |
+
|
517 |
+
/* No need of sandbox will delete it later */
|
518 |
+
add_meta_box(
|
519 |
+
'wcf-sandbox-settings', // Id.
|
520 |
+
__( 'Flow Settings', 'cartflows' ), // Title.
|
521 |
+
array( $this, 'sandbox_meta_box' ), // Callback.
|
522 |
+
CARTFLOWS_FLOW_POST_TYPE, // Post_type.
|
523 |
+
'side', // Context.
|
524 |
+
'high' // Priority.
|
525 |
+
);
|
526 |
+
|
527 |
+
do_action( 'cartflows_add_flow_metabox' );
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Metabox Markup
|
533 |
+
*
|
534 |
+
* @return void
|
535 |
+
*/
|
536 |
+
public function markup_meta_box() {
|
537 |
+
global $post;
|
538 |
+
|
539 |
+
wp_nonce_field( 'save-nonce-flow-meta', 'nonce-flow-meta' );
|
540 |
+
|
541 |
+
// Get defaults.
|
542 |
+
$meta = self::get_current_post_meta( $post->ID );
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Get options
|
546 |
+
*/
|
547 |
+
$updated_data = array(
|
548 |
+
'steps' => $meta['wcf-steps']['default'],
|
549 |
+
);
|
550 |
+
|
551 |
+
do_action( 'wcf_flow_settings_markup_before', $meta );
|
552 |
+
$this->page_header_tab( $updated_data );
|
553 |
+
do_action( 'wcf_flow_settings_markup_after', $meta );
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Metabox Markup
|
558 |
+
*
|
559 |
+
* @param object $post Post object.
|
560 |
+
* @return void
|
561 |
+
*/
|
562 |
+
public function sandbox_meta_box( $post ) {
|
563 |
+
|
564 |
+
// Get defaults.
|
565 |
+
$meta = self::get_current_post_meta( $post->ID );
|
566 |
+
|
567 |
+
/**
|
568 |
+
* Get options
|
569 |
+
*/
|
570 |
+
foreach ( $meta as $key => $value ) {
|
571 |
+
$updated_data[ $key ] = $meta[ $key ]['default'];
|
572 |
+
}
|
573 |
+
|
574 |
+
do_action( 'wcf_flow_sandbox_markup_before', $meta );
|
575 |
+
$this->sandbox_markup( $updated_data );
|
576 |
+
do_action( 'wcf_flow_sandbox_markup_after', $meta );
|
577 |
+
}
|
578 |
+
|
579 |
+
/**
|
580 |
+
* Page Header Tabs
|
581 |
+
*
|
582 |
+
* @param array $options Post meta.
|
583 |
+
* @return void
|
584 |
+
*/
|
585 |
+
public function page_header_tab( $options ) {
|
586 |
+
|
587 |
+
include_once CARTFLOWS_FLOW_DIR . 'view/meta-flow-steps.php';
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Sandbox Markup
|
592 |
+
*
|
593 |
+
* @param array $options Post meta.
|
594 |
+
* @return void
|
595 |
+
*/
|
596 |
+
public function sandbox_markup( $options ) {
|
597 |
+
?>
|
598 |
+
<div class="wcf-flow-sandbox-table wcf-general-metabox-wrap widefat">
|
599 |
+
<div class="wcf-flow-sandbox-table-container">
|
600 |
+
<?php
|
601 |
+
echo wcf()->meta->get_checkbox_field(
|
602 |
+
array(
|
603 |
+
'name' => 'wcf-testing',
|
604 |
+
'value' => $options['wcf-testing'],
|
605 |
+
'after' => esc_html__( 'Enable Test Mode', 'cartflows' ),
|
606 |
+
)
|
607 |
+
);
|
608 |
+
|
609 |
+
echo wcf()->meta->get_description_field(
|
610 |
+
array(
|
611 |
+
'name' => 'wcf-testing-note',
|
612 |
+
'content' => esc_html__( 'If you are using WooCommerce plugin then test mode will add random products in your flow, so you can preview it easily while testing.', 'cartflows' ),
|
613 |
+
)
|
614 |
+
);
|
615 |
+
|
616 |
+
?>
|
617 |
+
</div>
|
618 |
+
</div>
|
619 |
+
<?php
|
620 |
+
}
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Keep the menu open when editing the flows.
|
624 |
+
* Highlights the wanted admin (sub-) menu items for the CPT.
|
625 |
+
*
|
626 |
+
* @since 1.0.0
|
627 |
+
*/
|
628 |
+
public function menu_highlight() {
|
629 |
+
global $parent_file, $submenu_file, $post_type;
|
630 |
+
if ( CARTFLOWS_FLOW_POST_TYPE == $post_type ) :
|
631 |
+
$parent_file = CARTFLOWS_SLUG;//phpcs:ignore
|
632 |
+
$submenu_file = 'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE;//phpcs:ignore
|
633 |
+
endif;
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Get metabox options
|
638 |
+
*
|
639 |
+
* @param int $post_id post id.
|
640 |
+
* @return array
|
641 |
+
*/
|
642 |
+
public static function get_meta_option( $post_id ) {
|
643 |
+
|
644 |
+
if ( null === self::$meta_option ) {
|
645 |
+
/**
|
646 |
+
* Set metabox options
|
647 |
+
*/
|
648 |
+
self::$meta_option = wcf()->options->get_flow_fields( $post_id );
|
649 |
+
}
|
650 |
+
|
651 |
+
return self::$meta_option;
|
652 |
+
}
|
653 |
+
|
654 |
+
/**
|
655 |
+
* Get metabox options
|
656 |
+
*
|
657 |
+
* @param int $post_id post ID.
|
658 |
+
* @return array
|
659 |
+
*/
|
660 |
+
public static function get_current_post_meta( $post_id ) {
|
661 |
+
|
662 |
+
$stored = get_post_meta( $post_id );
|
663 |
+
|
664 |
+
$default_meta = self::get_meta_option( $post_id );
|
665 |
+
|
666 |
+
// Set stored and override defaults.
|
667 |
+
foreach ( $stored as $key => $value ) {
|
668 |
+
if ( array_key_exists( $key, $default_meta ) ) {
|
669 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
|
670 |
+
} else {
|
671 |
+
self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
|
672 |
+
}
|
673 |
+
}
|
674 |
+
|
675 |
+
return self::get_meta_option( $post_id );
|
676 |
+
}
|
677 |
+
|
678 |
+
/**
|
679 |
+
* Metabox Save
|
680 |
+
*
|
681 |
+
* @param number $post_id Post ID.
|
682 |
+
* @return void
|
683 |
+
*/
|
684 |
+
public function save_meta_box( $post_id ) {
|
685 |
+
|
686 |
+
// Checks save status.
|
687 |
+
$is_autosave = wp_is_post_autosave( $post_id );
|
688 |
+
$is_revision = wp_is_post_revision( $post_id );
|
689 |
+
|
690 |
+
$is_valid_nonce = ( isset( $_POST['nonce-flow-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-flow-meta'] ) ), 'save-nonce-flow-meta' ) ) ? true : false;
|
691 |
+
|
692 |
+
// Exits script depending on save status.
|
693 |
+
if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
|
694 |
+
return;
|
695 |
+
}
|
696 |
+
|
697 |
+
wcf()->options->save_flow_fields( $post_id );
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Localize variables in admin
|
702 |
+
*
|
703 |
+
* @param array $vars variables.
|
704 |
+
*/
|
705 |
+
public function localize_vars( $vars ) {
|
706 |
+
|
707 |
+
$ajax_actions = array(
|
708 |
+
'wcf_setup_default_steps',
|
709 |
+
'wcf_add_flow_step',
|
710 |
+
'wcf_delete_flow_step',
|
711 |
+
'wcf_reorder_flow_steps',
|
712 |
+
'wcf_clone_flow_step',
|
713 |
+
);
|
714 |
+
|
715 |
+
foreach ( $ajax_actions as $action ) {
|
716 |
+
|
717 |
+
$vars[ $action . '_nonce' ] = wp_create_nonce( str_replace( '_', '-', $action ) );
|
718 |
+
}
|
719 |
+
|
720 |
+
return $vars;
|
721 |
+
}
|
722 |
+
|
723 |
+
/**
|
724 |
+
* Add New Step Button
|
725 |
+
*
|
726 |
+
* @return string
|
727 |
+
*/
|
728 |
+
public function add_add_new_step_button() {
|
729 |
+
$add_new_btn_markup = '<style>.wrap{ position:relative;}</style>';
|
730 |
+
$add_new_btn_markup .= "<div class='wcf-button-wrap'>";
|
731 |
+
$add_new_btn_markup .= "<button class='wcf-trigger-popup page-title-action'>";
|
732 |
+
$add_new_btn_markup .= esc_html__( 'Add New Step', 'cartflows' );
|
733 |
+
$add_new_btn_markup .= '</button>';
|
734 |
+
$add_new_btn_markup .= '</div>';
|
735 |
+
|
736 |
+
return $add_new_btn_markup;
|
737 |
+
}
|
738 |
+
|
739 |
+
/**
|
740 |
+
* Back to flow button gutenberg template
|
741 |
+
*
|
742 |
+
* @return void
|
743 |
+
*/
|
744 |
+
public function gutenberg_module_templates() {
|
745 |
+
|
746 |
+
// Exit if block editor is not enabled.
|
747 |
+
if ( ! $this->is_gutenberg_editor_active ) {
|
748 |
+
return;
|
749 |
+
}
|
750 |
+
|
751 |
+
if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type() ) {
|
752 |
+
return;
|
753 |
+
}
|
754 |
+
|
755 |
+
$flow_id = get_post_meta( get_the_id(), 'wcf-flow-id', true );
|
756 |
+
|
757 |
+
if ( $flow_id ) {
|
758 |
+
?>
|
759 |
+
<script id="wcf-gutenberg-back-flow-button" type="text/html">
|
760 |
+
<div class="wcf-notice-back-edit-flow gutenberg-button" >
|
761 |
+
<a href="<?php echo esc_url( get_edit_post_link( $flow_id ) ); ?>" class="button button-primary button-large wcf-header-back-button" style="text-decoration: none;">
|
762 |
+
<i class="dashicons dashicons-arrow-left-alt"></i>
|
763 |
+
<?php esc_html_e( 'Back to edit Flow', 'cartflows' ); ?>
|
764 |
+
</a>
|
765 |
+
</div>
|
766 |
+
</script>
|
767 |
+
<?php
|
768 |
+
}
|
769 |
+
}
|
770 |
+
|
771 |
+
/**
|
772 |
+
* Set status true for gutenberg.
|
773 |
+
*
|
774 |
+
* @return void
|
775 |
+
*/
|
776 |
+
public function set_block_editor_status() {
|
777 |
+
|
778 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
779 |
+
return;
|
780 |
+
}
|
781 |
+
|
782 |
+
// Set gutenberg status here.
|
783 |
+
$this->is_gutenberg_editor_active = true;
|
784 |
+
}
|
785 |
+
|
786 |
+
/**
|
787 |
+
* Get step action buttons
|
788 |
+
*
|
789 |
+
* @param int $inner_step_id step id.
|
790 |
+
* @param bool $ab_test_ui ab test.
|
791 |
+
* @param array $args ab test array.
|
792 |
+
* @return array.
|
793 |
+
*/
|
794 |
+
public function get_step_action_buttons( $inner_step_id, $ab_test_ui, $args ) {
|
795 |
+
|
796 |
+
$action_buttons = apply_filters(
|
797 |
+
'cartflows_step_actions',
|
798 |
+
array(
|
799 |
+
'view' => array(
|
800 |
+
'link' => get_permalink( $inner_step_id ),
|
801 |
+
'class' => 'wcf-step-view wcf-action-button wp-ui-text-highlight',
|
802 |
+
'tooltip' => esc_html__( 'View Step', 'cartflows' ),
|
803 |
+
'icon' => 'dashicons-visibility',
|
804 |
+
'label' => esc_html__( 'View', 'cartflows' ),
|
805 |
+
'attr' => array(
|
806 |
+
'target' => '_blank',
|
807 |
+
),
|
808 |
+
'show' => true,
|
809 |
+
),
|
810 |
+
'edit' => array(
|
811 |
+
'link' => get_edit_post_link( $inner_step_id ),
|
812 |
+
'class' => 'wcf-step-edit wcf-action-button wp-ui-text-highlight',
|
813 |
+
'tooltip' => esc_html__( 'Edit Step', 'cartflows' ),
|
814 |
+
'icon' => 'dashicons-edit',
|
815 |
+
'label' => esc_html__( 'Edit', 'cartflows' ),
|
816 |
+
'show' => true,
|
817 |
+
),
|
818 |
+
'clone' => array(
|
819 |
+
'link' => '#',
|
820 |
+
'target' => '_blank',
|
821 |
+
'class' => 'wcf-step-clone wcf-action-button wp-ui-text-highlight',
|
822 |
+
'tooltip' => esc_html__( 'Clone Step', 'cartflows' ),
|
823 |
+
'icon' => 'dashicons-admin-page',
|
824 |
+
'label' => esc_html__( 'Clone', 'cartflows' ),
|
825 |
+
'attr' => array(
|
826 |
+
'data-id' => $inner_step_id,
|
827 |
+
),
|
828 |
+
'show' => _is_cartflows_pro() ? true : false,
|
829 |
+
),
|
830 |
+
'delete' => array(
|
831 |
+
'link' => '#',
|
832 |
+
'class' => 'wcf-step-delete wcf-action-button wp-ui-text-highlight',
|
833 |
+
'tooltip' => esc_html__( 'Delete Step', 'cartflows' ),
|
834 |
+
'icon' => 'dashicons-trash',
|
835 |
+
'label' => esc_html__( 'Delete', 'cartflows' ),
|
836 |
+
'attr' => array(
|
837 |
+
'data-id' => $inner_step_id,
|
838 |
+
),
|
839 |
+
'show' => true,
|
840 |
+
),
|
841 |
+
'ab-test' => array(
|
842 |
+
'link' => '#',
|
843 |
+
'class' => 'wcf-step-abtest wcf-action-button wp-ui-text-highlight',
|
844 |
+
'tooltip' => esc_html__( 'A/B Test', 'cartflows' ),
|
845 |
+
'icon' => 'dashicons-forms',
|
846 |
+
'label' => esc_html__( 'A/B Test', 'cartflows' ),
|
847 |
+
'show' => true,
|
848 |
+
'attr' => array(
|
849 |
+
'data-id' => $inner_step_id,
|
850 |
+
),
|
851 |
+
'show' => _is_cartflows_pro() ? true : false,
|
852 |
+
),
|
853 |
+
),
|
854 |
+
$inner_step_id,
|
855 |
+
$ab_test_ui,
|
856 |
+
$args
|
857 |
+
);
|
858 |
+
|
859 |
+
return $action_buttons;
|
860 |
+
}
|
861 |
+
}
|
862 |
+
|
863 |
+
/**
|
864 |
+
* Kicking this off by calling 'get_instance()' method
|
865 |
+
*/
|
866 |
+
Cartflows_Flow_Meta::get_instance();
|
modules/flow/classes/class-cartflows-flow-post-type.php
CHANGED
@@ -1,383 +1,373 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Flow post type
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Initialization
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*/
|
13 |
-
class Cartflows_Flow_Post_Type {
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Member Variable
|
18 |
-
*
|
19 |
-
* @var instance
|
20 |
-
*/
|
21 |
-
private static $instance;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Initiator
|
25 |
-
*/
|
26 |
-
public static function get_instance() {
|
27 |
-
if ( ! isset( self::$instance ) ) {
|
28 |
-
self::$instance = new self();
|
29 |
-
}
|
30 |
-
return self::$instance;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Constructor
|
35 |
-
*/
|
36 |
-
public function __construct() {
|
37 |
-
|
38 |
-
add_action( 'init', array( $this, 'flow_post_type' ) );
|
39 |
-
add_action( 'admin_menu', array( $this, 'register_as_submenu' ), 100 );
|
40 |
-
add_action( 'do_meta_boxes', array( $this, 'wcf_change_metabox_position' ) );
|
41 |
-
|
42 |
-
add_filter( 'post_updated_messages', array( $this, 'custom_post_type_post_update_messages' ) );
|
43 |
-
|
44 |
-
add_filter( 'display_post_states', array( $this, 'add_cartflows_post_state' ), 15, 1 );
|
45 |
-
|
46 |
-
add_filter( 'hidden_meta_boxes', array( $this, 'display_flow_slug_meta_box' ), 10, 2 );
|
47 |
-
|
48 |
-
/* View Post URL */
|
49 |
-
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
50 |
-
add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 10, 2 );
|
51 |
-
add_action( 'template_redirect', array( $this, 'redirect_to_step' ), 10 );
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Add CartFlows post status.
|
56 |
-
*
|
57 |
-
* @param array $post_states post data.
|
58 |
-
* @return array
|
59 |
-
*/
|
60 |
-
public function add_cartflows_post_state( $post_states ) {
|
61 |
-
|
62 |
-
global $post;
|
63 |
-
|
64 |
-
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
65 |
-
|
66 |
-
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
67 |
-
$flow_title = get_the_title( $flow_id );
|
68 |
-
|
69 |
-
$post_states['cartflows_step'] = '( ' . __( 'Flow: ', 'cartflows' ) . $flow_id . ' | ' . __( 'Name: ', 'cartflows' ) . $flow_title . ')';
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
return $post_states;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Display slugdiv.
|
78 |
-
*
|
79 |
-
* @param array $hidden metaboxes.
|
80 |
-
* @param obj $screen screen.
|
81 |
-
* @return array
|
82 |
-
*/
|
83 |
-
public function display_flow_slug_meta_box( $hidden, $screen ) {
|
84 |
-
$post_type = $screen->id;
|
85 |
-
if ( ! empty( $post_type ) && CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
86 |
-
$pos = array_search( 'slugdiv', $hidden, true );
|
87 |
-
unset( $hidden[ $pos ] );
|
88 |
-
}
|
89 |
-
|
90 |
-
return $hidden;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Create custom post type
|
95 |
-
*/
|
96 |
-
public function flow_post_type() {
|
97 |
-
|
98 |
-
$labels = array(
|
99 |
-
'name' => esc_html_x( 'Flows', 'flow general name', 'cartflows' ),
|
100 |
-
'singular_name' => esc_html_x( 'Flow', 'flow singular name', 'cartflows' ),
|
101 |
-
'search_items' => esc_html__( 'Search Flows', 'cartflows' ),
|
102 |
-
'all_items' => esc_html__( 'All Flows', 'cartflows' ),
|
103 |
-
'edit_item' => esc_html__( 'Edit Flow', 'cartflows' ),
|
104 |
-
'view_item' => esc_html__( 'View Flow', 'cartflows' ),
|
105 |
-
'add_new' => esc_html__( 'Add New', 'cartflows' ),
|
106 |
-
'update_item' => esc_html__( 'Update Flow', 'cartflows' ),
|
107 |
-
'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
|
108 |
-
'new_item_name' => esc_html__( 'New Flow Name', 'cartflows' ),
|
109 |
-
);
|
110 |
-
|
111 |
-
$args = array(
|
112 |
-
'labels' => $labels,
|
113 |
-
'show_in_menu' => false,
|
114 |
-
'public' => false, // it's not public, not own permalink.
|
115 |
-
'publicly_queryable' => true, // you should be able to query it.
|
116 |
-
'show_ui' => true,
|
117 |
-
'query_var' => true,
|
118 |
-
'can_export' => true,
|
119 |
-
'show_in_admin_bar' => true,
|
120 |
-
'exclude_from_search' => true,
|
121 |
-
'has_archive' => false, // it shouldn't have archive page.
|
122 |
-
'rewrite' => false, // it shouldn't have rewrite rules.
|
123 |
-
'supports' => array( 'title', 'thumbnail', 'slug' ),
|
124 |
-
'capability_type' => 'post',
|
125 |
-
);
|
126 |
-
|
127 |
-
if ( ! _is_cartflows_pro() ) {
|
128 |
-
|
129 |
-
$flow_posts = get_posts(
|
130 |
-
array(
|
131 |
-
'posts_per_page' => 4,
|
132 |
-
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
133 |
-
'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private' ),
|
134 |
-
)
|
135 |
-
);
|
136 |
-
|
137 |
-
if ( is_array( $flow_posts ) ) {
|
138 |
-
|
139 |
-
$flow_count = count( $flow_posts );
|
140 |
-
|
141 |
-
if ( $flow_count > 3 || 3 === $flow_count ) {
|
142 |
-
|
143 |
-
$args['capabilities'] = array(
|
144 |
-
'create_posts' => 'do_not_allow',
|
145 |
-
);
|
146 |
-
$args['map_meta_cap'] = true;
|
147 |
-
|
148 |
-
// Add new notice button.
|
149 |
-
add_action( 'admin_print_footer_scripts', array( $this, 'add_new_notice_button' ) );
|
150 |
-
|
151 |
-
// Add the notice popup HTML to admin footer.
|
152 |
-
add_action( 'admin_footer', array( $this, 'upgrade_to_pro_notice_popup' ) );
|
153 |
-
}
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
register_post_type( CARTFLOWS_FLOW_POST_TYPE, $args );
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Show custom add new button.
|
162 |
-
*/
|
163 |
-
public function add_new_notice_button() {
|
164 |
-
|
165 |
-
$screen = get_current_screen();
|
166 |
-
|
167 |
-
if ( is_object( $screen ) && CARTFLOWS_FLOW_POST_TYPE === $screen->post_type && 'edit-cartflows_flow' === $screen->id ) {
|
168 |
-
?>
|
169 |
-
<script>
|
170 |
-
jQuery('.wrap h1.wp-heading-inline').after('<a type="button" class="wcf-custom-add-new-button button">Add New</a>');
|
171 |
-
</script>
|
172 |
-
<?php
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Upgrade to pro notice popup.
|
178 |
-
*
|
179 |
-
* @since 1.3.4
|
180 |
-
*
|
181 |
-
* @return void
|
182 |
-
*/
|
183 |
-
public function upgrade_to_pro_notice_popup() {
|
184 |
-
|
185 |
-
?>
|
186 |
-
<div id="cartflows-upgrade-notice-overlay" style="display:none;"></div>
|
187 |
-
<div id="cartflows-upgrade-notice-popup" style="display:none;">
|
188 |
-
<div class="inner">
|
189 |
-
<div class="heading">
|
190 |
-
<span><?php esc_html_e( 'Upgrade to CartFlows Pro', 'cartflows' ); ?></span>
|
191 |
-
<span class="cartflows-close-popup-button tb-close-icon"></span>
|
192 |
-
</div>
|
193 |
-
<div class="contents">
|
194 |
-
<div class="wcf-notice">
|
195 |
-
<p>Upgrade to CartFlows Pro for adding more flows and other features. <a href ="https://cartflows.com/" target="_blank"> Click here</a> to upgrade.</p>
|
196 |
-
</div>
|
197 |
-
</div>
|
198 |
-
</div>
|
199 |
-
</div>
|
200 |
-
<?php
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Change metabox position.
|
205 |
-
*/
|
206 |
-
public function wcf_change_metabox_position() {
|
207 |
-
|
208 |
-
remove_meta_box( 'slugdiv', CARTFLOWS_FLOW_POST_TYPE, 'normal' );
|
209 |
-
add_meta_box( 'slugdiv', __( 'Slug', 'cartflows' ), 'post_slug_meta_box', CARTFLOWS_FLOW_POST_TYPE, 'side', 'high' );
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Add post raw actions
|
214 |
-
*
|
215 |
-
* @param array $actions actions.
|
216 |
-
* @param array $post post data.
|
217 |
-
* @return array
|
218 |
-
*/
|
219 |
-
public function post_row_actions( $actions, $post ) {
|
220 |
-
|
221 |
-
$first_step = $this->get_first_step_url( $post );
|
222 |
-
|
223 |
-
if ( $first_step && isset( $actions['view'] ) ) {
|
224 |
-
|
225 |
-
$actions['view'] = '<a href="' . $first_step . '">' . __( 'View', 'cartflows' ) . '</a>';
|
226 |
-
}
|
227 |
-
|
228 |
-
return $actions;
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Returns previous post link
|
233 |
-
*
|
234 |
-
* @param string $prev_link previous link.
|
235 |
-
* @param array $post post data.
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
public function preview_post_link( $prev_link, $post ) {
|
239 |
-
|
240 |
-
if ( $this->is_flow_post_type( $post ) ) {
|
241 |
-
|
242 |
-
$first_step = $this->get_first_step_url( $post );
|
243 |
-
|
244 |
-
if ( $first_step ) {
|
245 |
-
|
246 |
-
return $first_step;
|
247 |
-
}
|
248 |
-
|
249 |
-
return '';
|
250 |
-
}
|
251 |
-
|
252 |
-
return $prev_link;
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Check if post type is flow
|
257 |
-
*
|
258 |
-
* @param array $post post data.
|
259 |
-
* @return bool
|
260 |
-
*/
|
261 |
-
public function is_flow_post_type( $post ) {
|
262 |
-
|
263 |
-
if ( isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
264 |
-
|
265 |
-
return true;
|
266 |
-
}
|
267 |
-
|
268 |
-
return false;
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Redirect to first step
|
273 |
-
*
|
274 |
-
* @return void
|
275 |
-
*/
|
276 |
-
public function redirect_to_step() {
|
277 |
-
|
278 |
-
global $post;
|
279 |
-
|
280 |
-
$first_step = $this->get_first_step_url( $post );
|
281 |
-
|
282 |
-
if ( $first_step ) {
|
283 |
-
|
284 |
-
wp_safe_redirect( $first_step );
|
285 |
-
die;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Return first step URL
|
291 |
-
*
|
292 |
-
* @param array $post post data.
|
293 |
-
* @return bool
|
294 |
-
*/
|
295 |
-
public function get_first_step_url( $post ) {
|
296 |
-
|
297 |
-
if ( $this->is_flow_post_type( $post ) ) {
|
298 |
-
|
299 |
-
$flow_id = $post->ID;
|
300 |
-
$title = $post->post_title;
|
301 |
-
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
302 |
-
|
303 |
-
if ( is_array( $steps ) && ! empty( $steps ) && isset( $steps[0]['id'] ) ) {
|
304 |
-
|
305 |
-
return get_permalink( $steps[0]['id'] );
|
306 |
-
}
|
307 |
-
}
|
308 |
-
|
309 |
-
return false;
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Register the admin menu for Custom Layouts
|
314 |
-
*
|
315 |
-
*
|
316 |
-
*
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
__( 'Flows', '
|
322 |
-
'
|
323 |
-
'
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
);
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
/* translators: %s: singular custom post type name */
|
354 |
-
|
355 |
-
/* translators: %s: singular custom post type name */
|
356 |
-
|
357 |
-
/* translators: %s: singular custom post type name */
|
358 |
-
|
359 |
-
/* translators: %s: singular custom post type name */
|
360 |
-
|
361 |
-
/* translators: %
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
return $messages;
|
377 |
-
}
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Kicking this off by calling 'get_instance()' method
|
382 |
-
*/
|
383 |
-
Cartflows_Flow_Post_Type::get_instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Flow post type
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Initialization
|
10 |
+
*
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
class Cartflows_Flow_Post_Type {
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Member Variable
|
18 |
+
*
|
19 |
+
* @var instance
|
20 |
+
*/
|
21 |
+
private static $instance;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initiator
|
25 |
+
*/
|
26 |
+
public static function get_instance() {
|
27 |
+
if ( ! isset( self::$instance ) ) {
|
28 |
+
self::$instance = new self();
|
29 |
+
}
|
30 |
+
return self::$instance;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
|
38 |
+
add_action( 'init', array( $this, 'flow_post_type' ) );
|
39 |
+
add_action( 'admin_menu', array( $this, 'register_as_submenu' ), 100 );
|
40 |
+
add_action( 'do_meta_boxes', array( $this, 'wcf_change_metabox_position' ) );
|
41 |
+
|
42 |
+
add_filter( 'post_updated_messages', array( $this, 'custom_post_type_post_update_messages' ) );
|
43 |
+
|
44 |
+
add_filter( 'display_post_states', array( $this, 'add_cartflows_post_state' ), 15, 1 );
|
45 |
+
|
46 |
+
add_filter( 'hidden_meta_boxes', array( $this, 'display_flow_slug_meta_box' ), 10, 2 );
|
47 |
+
|
48 |
+
/* View Post URL */
|
49 |
+
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
50 |
+
add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 10, 2 );
|
51 |
+
add_action( 'template_redirect', array( $this, 'redirect_to_step' ), 10 );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Add CartFlows post status.
|
56 |
+
*
|
57 |
+
* @param array $post_states post data.
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
public function add_cartflows_post_state( $post_states ) {
|
61 |
+
|
62 |
+
global $post;
|
63 |
+
|
64 |
+
if ( isset( $post->post_type ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) {
|
65 |
+
|
66 |
+
$flow_id = get_post_meta( $post->ID, 'wcf-flow-id', true );
|
67 |
+
$flow_title = get_the_title( $flow_id );
|
68 |
+
|
69 |
+
$post_states['cartflows_step'] = '( ' . __( 'Flow: ', 'cartflows' ) . $flow_id . ' | ' . __( 'Name: ', 'cartflows' ) . $flow_title . ')';
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
return $post_states;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Display slugdiv.
|
78 |
+
*
|
79 |
+
* @param array $hidden metaboxes.
|
80 |
+
* @param obj $screen screen.
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function display_flow_slug_meta_box( $hidden, $screen ) {
|
84 |
+
$post_type = $screen->id;
|
85 |
+
if ( ! empty( $post_type ) && CARTFLOWS_FLOW_POST_TYPE === $post_type ) {
|
86 |
+
$pos = array_search( 'slugdiv', $hidden, true );
|
87 |
+
unset( $hidden[ $pos ] );
|
88 |
+
}
|
89 |
+
|
90 |
+
return $hidden;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Create custom post type
|
95 |
+
*/
|
96 |
+
public function flow_post_type() {
|
97 |
+
|
98 |
+
$labels = array(
|
99 |
+
'name' => esc_html_x( 'Flows', 'flow general name', 'cartflows' ),
|
100 |
+
'singular_name' => esc_html_x( 'Flow', 'flow singular name', 'cartflows' ),
|
101 |
+
'search_items' => esc_html__( 'Search Flows', 'cartflows' ),
|
102 |
+
'all_items' => esc_html__( 'All Flows', 'cartflows' ),
|
103 |
+
'edit_item' => esc_html__( 'Edit Flow', 'cartflows' ),
|
104 |
+
'view_item' => esc_html__( 'View Flow', 'cartflows' ),
|
105 |
+
'add_new' => esc_html__( 'Add New', 'cartflows' ),
|
106 |
+
'update_item' => esc_html__( 'Update Flow', 'cartflows' ),
|
107 |
+
'add_new_item' => esc_html__( 'Add New', 'cartflows' ),
|
108 |
+
'new_item_name' => esc_html__( 'New Flow Name', 'cartflows' ),
|
109 |
+
);
|
110 |
+
|
111 |
+
$args = array(
|
112 |
+
'labels' => $labels,
|
113 |
+
'show_in_menu' => false,
|
114 |
+
'public' => false, // it's not public, not own permalink.
|
115 |
+
'publicly_queryable' => true, // you should be able to query it.
|
116 |
+
'show_ui' => true,
|
117 |
+
'query_var' => true,
|
118 |
+
'can_export' => true,
|
119 |
+
'show_in_admin_bar' => true,
|
120 |
+
'exclude_from_search' => true,
|
121 |
+
'has_archive' => false, // it shouldn't have archive page.
|
122 |
+
'rewrite' => false, // it shouldn't have rewrite rules.
|
123 |
+
'supports' => array( 'title', 'thumbnail', 'slug' ),
|
124 |
+
'capability_type' => 'post',
|
125 |
+
);
|
126 |
+
|
127 |
+
if ( ! _is_cartflows_pro() ) {
|
128 |
+
|
129 |
+
$flow_posts = get_posts(
|
130 |
+
array(
|
131 |
+
'posts_per_page' => 4,
|
132 |
+
'post_type' => CARTFLOWS_FLOW_POST_TYPE,
|
133 |
+
'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private' ),
|
134 |
+
)
|
135 |
+
);
|
136 |
+
|
137 |
+
if ( is_array( $flow_posts ) ) {
|
138 |
+
|
139 |
+
$flow_count = count( $flow_posts );
|
140 |
+
|
141 |
+
if ( $flow_count > 3 || 3 === $flow_count ) {
|
142 |
+
|
143 |
+
$args['capabilities'] = array(
|
144 |
+
'create_posts' => 'do_not_allow',
|
145 |
+
);
|
146 |
+
$args['map_meta_cap'] = true;
|
147 |
+
|
148 |
+
// Add new notice button.
|
149 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'add_new_notice_button' ) );
|
150 |
+
|
151 |
+
// Add the notice popup HTML to admin footer.
|
152 |
+
add_action( 'admin_footer', array( $this, 'upgrade_to_pro_notice_popup' ) );
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
register_post_type( CARTFLOWS_FLOW_POST_TYPE, $args );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Show custom add new button.
|
162 |
+
*/
|
163 |
+
public function add_new_notice_button() {
|
164 |
+
|
165 |
+
$screen = get_current_screen();
|
166 |
+
|
167 |
+
if ( is_object( $screen ) && CARTFLOWS_FLOW_POST_TYPE === $screen->post_type && 'edit-cartflows_flow' === $screen->id ) {
|
168 |
+
?>
|
169 |
+
<script>
|
170 |
+
jQuery('.wrap h1.wp-heading-inline').after('<a type="button" class="wcf-custom-add-new-button button">Add New</a>');
|
171 |
+
</script>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Upgrade to pro notice popup.
|
178 |
+
*
|
179 |
+
* @since 1.3.4
|
180 |
+
*
|
181 |
+
* @return void
|
182 |
+
*/
|
183 |
+
public function upgrade_to_pro_notice_popup() {
|
184 |
+
|
185 |
+
?>
|
186 |
+
<div id="cartflows-upgrade-notice-overlay" style="display:none;"></div>
|
187 |
+
<div id="cartflows-upgrade-notice-popup" style="display:none;">
|
188 |
+
<div class="inner">
|
189 |
+
<div class="heading">
|
190 |
+
<span><?php esc_html_e( 'Upgrade to CartFlows Pro', 'cartflows' ); ?></span>
|
191 |
+
<span class="cartflows-close-popup-button tb-close-icon"></span>
|
192 |
+
</div>
|
193 |
+
<div class="contents">
|
194 |
+
<div class="wcf-notice">
|
195 |
+
<p>Upgrade to CartFlows Pro for adding more flows and other features. <a href ="https://cartflows.com/" target="_blank"> Click here</a> to upgrade.</p>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<?php
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Change metabox position.
|
205 |
+
*/
|
206 |
+
public function wcf_change_metabox_position() {
|
207 |
+
|
208 |
+
remove_meta_box( 'slugdiv', CARTFLOWS_FLOW_POST_TYPE, 'normal' );
|
209 |
+
add_meta_box( 'slugdiv', __( 'Slug', 'cartflows' ), 'post_slug_meta_box', CARTFLOWS_FLOW_POST_TYPE, 'side', 'high' );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Add post raw actions
|
214 |
+
*
|
215 |
+
* @param array $actions actions.
|
216 |
+
* @param array $post post data.
|
217 |
+
* @return array
|
218 |
+
*/
|
219 |
+
public function post_row_actions( $actions, $post ) {
|
220 |
+
|
221 |
+
$first_step = $this->get_first_step_url( $post );
|
222 |
+
|
223 |
+
if ( $first_step && isset( $actions['view'] ) ) {
|
224 |
+
|
225 |
+
$actions['view'] = '<a href="' . $first_step . '">' . __( 'View', 'cartflows' ) . '</a>';
|
226 |
+
}
|
227 |
+
|
228 |
+
return $actions;
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Returns previous post link
|
233 |
+
*
|
234 |
+
* @param string $prev_link previous link.
|
235 |
+
* @param array $post post data.
|
236 |
+
* @return string
|
237 |
+
*/
|
238 |
+
public function preview_post_link( $prev_link, $post ) {
|
239 |
+
|
240 |
+
if ( $this->is_flow_post_type( $post ) ) {
|
241 |
+
|
242 |
+
$first_step = $this->get_first_step_url( $post );
|
243 |
+
|
244 |
+
if ( $first_step ) {
|
245 |
+
|
246 |
+
return $first_step;
|
247 |
+
}
|
248 |
+
|
249 |
+
return '';
|
250 |
+
}
|
251 |
+
|
252 |
+
return $prev_link;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Check if post type is flow
|
257 |
+
*
|
258 |
+
* @param array $post post data.
|
259 |
+
* @return bool
|
260 |
+
*/
|
261 |
+
public function is_flow_post_type( $post ) {
|
262 |
+
|
263 |
+
if ( isset( $post ) && CARTFLOWS_FLOW_POST_TYPE === $post->post_type ) {
|
264 |
+
|
265 |
+
return true;
|
266 |
+
}
|
267 |
+
|
268 |
+
return false;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Redirect to first step
|
273 |
+
*
|
274 |
+
* @return void
|
275 |
+
*/
|
276 |
+
public function redirect_to_step() {
|
277 |
+
|
278 |
+
global $post;
|
279 |
+
|
280 |
+
$first_step = $this->get_first_step_url( $post );
|
281 |
+
|
282 |
+
if ( $first_step ) {
|
283 |
+
|
284 |
+
wp_safe_redirect( $first_step );
|
285 |
+
die;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Return first step URL
|
291 |
+
*
|
292 |
+
* @param array $post post data.
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public function get_first_step_url( $post ) {
|
296 |
+
|
297 |
+
if ( $this->is_flow_post_type( $post ) ) {
|
298 |
+
|
299 |
+
$flow_id = $post->ID;
|
300 |
+
$title = $post->post_title;
|
301 |
+
$steps = get_post_meta( $flow_id, 'wcf-steps', true );
|
302 |
+
|
303 |
+
if ( is_array( $steps ) && ! empty( $steps ) && isset( $steps[0]['id'] ) ) {
|
304 |
+
|
305 |
+
return get_permalink( $steps[0]['id'] );
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
return false;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Register the admin menu for Custom Layouts
|
314 |
+
* Add flows submenu
|
315 |
+
*
|
316 |
+
* @since 1.0.0
|
317 |
+
*/
|
318 |
+
public function register_as_submenu() {
|
319 |
+
add_submenu_page(
|
320 |
+
CARTFLOWS_SLUG,
|
321 |
+
__( 'Flows', 'cartflows' ),
|
322 |
+
__( 'Flows', 'cartflows' ),
|
323 |
+
'edit_pages',
|
324 |
+
'edit.php?post_type=' . CARTFLOWS_FLOW_POST_TYPE
|
325 |
+
);
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Add Update messages for any custom post type
|
330 |
+
*
|
331 |
+
* @param array $messages Array of default messages.
|
332 |
+
*/
|
333 |
+
public function custom_post_type_post_update_messages( $messages ) {
|
334 |
+
|
335 |
+
$custom_post_type = get_post_type( get_the_ID() );
|
336 |
+
|
337 |
+
if ( CARTFLOWS_FLOW_POST_TYPE == $custom_post_type ) {
|
338 |
+
|
339 |
+
$obj = get_post_type_object( $custom_post_type );
|
340 |
+
$singular_name = $obj->labels->singular_name;
|
341 |
+
$messages[ $custom_post_type ] = array(
|
342 |
+
0 => '', // Unused. Messages start at index 1.
|
343 |
+
/* translators: %s: singular custom post type name */
|
344 |
+
1 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
345 |
+
/* translators: %s: singular custom post type name */
|
346 |
+
2 => sprintf( __( 'Custom %s updated.', 'cartflows' ), $singular_name ),
|
347 |
+
/* translators: %s: singular custom post type name */
|
348 |
+
3 => sprintf( __( 'Custom %s deleted.', 'cartflows' ), $singular_name ),
|
349 |
+
/* translators: %s: singular custom post type name */
|
350 |
+
4 => sprintf( __( '%s updated.', 'cartflows' ), $singular_name ),
|
351 |
+
/* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */
|
352 |
+
5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'cartflows' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, //phpcs:ignore
|
353 |
+
/* translators: %s: singular custom post type name */
|
354 |
+
6 => sprintf( __( '%s published.', 'cartflows' ), $singular_name ),
|
355 |
+
/* translators: %s: singular custom post type name */
|
356 |
+
7 => sprintf( __( '%s saved.', 'cartflows' ), $singular_name ),
|
357 |
+
/* translators: %s: singular custom post type name */
|
358 |
+
8 => sprintf( __( '%s submitted.', 'cartflows' ), $singular_name ),
|
359 |
+
/* translators: %s: singular custom post type name */
|
360 |
+
9 => sprintf( __( '%s scheduled for.', 'cartflows' ), $singular_name ),
|
361 |
+
/* translators: %s: singular custom post type name */
|
362 |
+
10 => sprintf( __( '%s draft updated.', 'cartflows' ), $singular_name ),
|
363 |
+
);
|
364 |
+
}
|
365 |
+
|
366 |
+
return $messages;
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Kicking this off by calling 'get_instance()' method
|
372 |
+
*/
|
373 |
+
Cartflows_Flow_Post_Type::get_instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/flow/view/meta-flow-steps.php
CHANGED
@@ -1,210 +1,158 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* View Flow steps
|
4 |
-
*
|
5 |
-
* @package CartFlows
|
6 |
-
*/
|
7 |
-
|
8 |
-
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
9 |
-
|
10 |
-
$steps = array(
|
11 |
-
'landing' => __( 'Landing', 'cartflows' ),
|
12 |
-
'checkout' => __( 'Checkout (Woo)', 'cartflows' ),
|
13 |
-
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
-
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
-
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
16 |
-
'optin' => __( 'Optin (Woo)', 'cartflows' ),
|
17 |
-
);
|
18 |
-
|
19 |
-
|
20 |
-
<div class="wcf-flow-
|
21 |
-
|
22 |
-
|
23 |
-
<div class="wcf-flow-steps-
|
24 |
-
|
25 |
-
<?php
|
26 |
-
<?php
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
160 |
-
</li>
|
161 |
-
</ul>
|
162 |
-
</div>
|
163 |
-
<?php } ?>
|
164 |
-
</div>
|
165 |
-
<div class="wcf-popup-close-wrap">
|
166 |
-
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
167 |
-
</div>
|
168 |
-
</div>
|
169 |
-
|
170 |
-
<!--<div class="wcf-search-form">
|
171 |
-
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
172 |
-
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
173 |
-
</div>-->
|
174 |
-
|
175 |
-
<div id="wcf-remote-content">
|
176 |
-
<?php if ( 'other' !== $default_page_builder ) { ?>
|
177 |
-
<div id="wcf-ready-templates">
|
178 |
-
<div id="wcf-remote-filters">
|
179 |
-
<div id="wcf-page-builders"></div>
|
180 |
-
<div id="wcf-categories"></div>
|
181 |
-
</div>
|
182 |
-
<div class="wcf-page-builder-notice"></div>
|
183 |
-
<div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
184 |
-
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
185 |
-
</div>
|
186 |
-
<?php } ?>
|
187 |
-
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
188 |
-
<div class="inner">
|
189 |
-
<div id="wcf-scratch-steps-categories">
|
190 |
-
<select class="step-type-filter-links filter-links">
|
191 |
-
<option value="" class="current"> Select Step Type </option>
|
192 |
-
|
193 |
-
<?php foreach ( $steps as $key => $value ) { ?>
|
194 |
-
<option class="<?php echo $key; ?>" data-slug="<?php echo $key; ?>" data-title="<?php echo $key; ?>"><?php echo $value; ?></option>
|
195 |
-
<?php } ?>
|
196 |
-
</select>
|
197 |
-
</div>
|
198 |
-
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create Step', 'cartflows' ); ?></a>
|
199 |
-
<?php if ( ! _is_cartflows_pro() ) { ?>
|
200 |
-
<div class="wcf-template-notice"><p><?php echo esc_html__( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
|
201 |
-
<?php } ?>
|
202 |
-
<p class="wcf-learn-how"><a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank"><?php esc_html_e( 'Learn How', 'cartflows' ); ?> <i class="dashicons dashicons-external"></i></a></p>
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
</div>
|
206 |
-
</div>
|
207 |
-
</div>
|
208 |
-
</div><!-- .wcf-templates-popup-overlay -->
|
209 |
-
</div>
|
210 |
-
<?php
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View Flow steps
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
|
9 |
+
|
10 |
+
$steps = array(
|
11 |
+
'landing' => __( 'Landing', 'cartflows' ),
|
12 |
+
'checkout' => __( 'Checkout (Woo)', 'cartflows' ),
|
13 |
+
'thankyou' => __( 'Thank You (Woo)', 'cartflows' ),
|
14 |
+
'upsell' => __( 'Upsell (Woo)', 'cartflows' ),
|
15 |
+
'downsell' => __( 'Downsell (Woo)', 'cartflows' ),
|
16 |
+
'optin' => __( 'Optin (Woo)', 'cartflows' ),
|
17 |
+
);
|
18 |
+
?>
|
19 |
+
<div class="wcf-flow-steps-meta-box">
|
20 |
+
<div class="wcf-flow-settings">
|
21 |
+
<?php do_action( 'cartflows_above_flow_steps' ); ?>
|
22 |
+
<div class="wcf-flow-steps-wrap">
|
23 |
+
<div class="wcf-flow-steps-container">
|
24 |
+
<?php if ( is_array( $options['steps'] ) ) { ?>
|
25 |
+
<?php foreach ( $options['steps'] as $index => $data ) { ?>
|
26 |
+
<?php
|
27 |
+
$term_slug = '';
|
28 |
+
$term_name = '';
|
29 |
+
$step_wrap_class = '';
|
30 |
+
$has_product_assigned = true;
|
31 |
+
$is_global_checkout = '';
|
32 |
+
$common = '';
|
33 |
+
$data_step_id = intval( $data['id'] );
|
34 |
+
|
35 |
+
$control_id = $data_step_id;
|
36 |
+
$note = '';
|
37 |
+
$ab_test = false;
|
38 |
+
$ab_test_ui = false;
|
39 |
+
$ab_test_variations = array();
|
40 |
+
$ab_test_archived_variations = array();
|
41 |
+
$ab_test_variations_count = 0;
|
42 |
+
$ab_test_args = array();
|
43 |
+
|
44 |
+
if ( _is_cartflows_pro() ) {
|
45 |
+
|
46 |
+
$ab_test_ui = isset( $data['ab-test-ui'] ) && $data['ab-test-ui'] ? true : false;
|
47 |
+
$ab_test = isset( $data['ab-test'] ) && $data['ab-test'] ? true : false;
|
48 |
+
$ab_test_variations = isset( $data['ab-test-variations'] ) ? $data['ab-test-variations'] : array();
|
49 |
+
$ab_test_archived_variations = isset( $data['ab-test-archived-variations'] ) ? $data['ab-test-archived-variations'] : array();
|
50 |
+
$ab_test_variations_count = count( $ab_test_variations );
|
51 |
+
|
52 |
+
if ( $ab_test_variations_count < 2 ) {
|
53 |
+
$ab_test_ui = false;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
$ab_test_args = array(
|
58 |
+
'control_id' => $data_step_id,
|
59 |
+
'ab_test_variations' => $ab_test_variations,
|
60 |
+
'ab_test_archived_variations' => $ab_test_archived_variations,
|
61 |
+
'ab_test_variations_count' => $ab_test_variations_count,
|
62 |
+
);
|
63 |
+
|
64 |
+
if ( isset( $data['type'] ) ) {
|
65 |
+
$term_slug = $data['type'];
|
66 |
+
$term_name = $steps[ $data['type'] ];
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ! _is_cartflows_pro() && ( 'upsell' === $term_slug || 'downsell' === $term_slug ) ) {
|
70 |
+
$step_wrap_class .= ' invalid-step';
|
71 |
+
}
|
72 |
+
|
73 |
+
if ( isset( $_GET['highlight-step-id'] ) ) { //phpcs:ignore
|
74 |
+
|
75 |
+
$highlight_step_id = intval( $_GET['highlight-step-id'] ); //phpcs:ignore
|
76 |
+
|
77 |
+
if ( $highlight_step_id === $data_step_id ) {
|
78 |
+
$step_wrap_class .= ' wcf-new-step-highlight';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( 'checkout' === $term_slug ) {
|
83 |
+
|
84 |
+
$common = Cartflows_Helper::get_common_settings();
|
85 |
+
|
86 |
+
$is_global_checkout = (int) $common['global_checkout'];
|
87 |
+
|
88 |
+
if ( $data['id'] === $is_global_checkout ) {
|
89 |
+
$step_wrap_class .= ' wcf-global-checkout';
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( 'upsell' === $term_slug || 'downsell' === $term_slug || 'checkout' === $term_slug ) {
|
94 |
+
|
95 |
+
$has_product_assigned = Cartflows_Helper::has_product_assigned( $data['id'] );
|
96 |
+
|
97 |
+
if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
|
98 |
+
$step_wrap_class .= ' wcf-no-product-step';
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
if ( $ab_test_ui ) {
|
103 |
+
$step_wrap_class .= apply_filters( 'cartflows_ab_test_step_wrap_class', ' wcf-ab-test' );
|
104 |
+
}
|
105 |
+
|
106 |
+
?>
|
107 |
+
<div class="wcf-step-wrap <?php echo $step_wrap_class; ?>" data-id="<?php echo $data['id']; ?>" data-term-slug="<?php echo esc_attr( $term_slug ); ?>">
|
108 |
+
<?php
|
109 |
+
do_action( 'cartflows_wcf_step_wrap_top', $data, $ab_test_ui, $ab_test, $ab_test_args );
|
110 |
+
?>
|
111 |
+
<?php
|
112 |
+
|
113 |
+
if ( $ab_test_ui && is_array( $ab_test_variations ) && ! empty( $ab_test_variations ) ) {
|
114 |
+
|
115 |
+
$var_badge_count = 0;
|
116 |
+
|
117 |
+
foreach ( $ab_test_variations as $ab_test_variation ) {
|
118 |
+
|
119 |
+
$inner_step_id = $ab_test_variation['id'];
|
120 |
+
$action_buttons = $this->get_step_action_buttons( $inner_step_id, $ab_test_ui, $ab_test_args );
|
121 |
+
|
122 |
+
include CARTFLOWS_FLOW_DIR . 'view/view-flow-inner-step.php';
|
123 |
+
}
|
124 |
+
} else {
|
125 |
+
|
126 |
+
$inner_step_id = $data['id'];
|
127 |
+
$action_buttons = $this->get_step_action_buttons( $inner_step_id, $ab_test_ui, $ab_test_args );
|
128 |
+
|
129 |
+
include CARTFLOWS_FLOW_DIR . 'view/view-flow-inner-step.php';
|
130 |
+
}
|
131 |
+
|
132 |
+
do_action( 'cartflows_wcf_step_wrap_bottom', $data, $ab_test_ui, $ab_test, $ab_test_args );
|
133 |
+
|
134 |
+
|
135 |
+
?>
|
136 |
+
</div><!-- .wcf-step-wrap -->
|
137 |
+
<?php } ?>
|
138 |
+
<?php } ?>
|
139 |
+
</div><!-- .wcf-flow-steps-container -->
|
140 |
+
</div> <!-- .wcf-flow-steps-wrap -->
|
141 |
+
<div class="wcf-flow-buttons-wrap"> <!-- .wcf-flow-buttons-wrap -->
|
142 |
+
<?php do_action( 'cartflows_below_flow_steps' ); ?>
|
143 |
+
<div class='wcf-add-new-step-btn-wrap'>
|
144 |
+
<button class='wcf-trigger-popup button button-primary'>
|
145 |
+
<?php echo esc_html__( 'Add New Step', 'cartflows' ); ?>
|
146 |
+
</button>
|
147 |
+
</div>
|
148 |
+
</div><!-- .wcf-flow-buttons-wrap -->
|
149 |
+
</div><!-- .wcf-flow-settings -->
|
150 |
+
|
151 |
+
<?php
|
152 |
+
|
153 |
+
require CARTFLOWS_FLOW_DIR . 'view/view-remote-importer.php';
|
154 |
+
|
155 |
+
do_action( 'cartflows_after_flow_settings_meta', $data );
|
156 |
+
?>
|
157 |
+
</div>
|
158 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/flow/view/view-flow-inner-step.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View flow inner step
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
$inner_step_title = get_the_title( $inner_step_id );
|
9 |
+
$note = get_post_meta( $inner_step_id, 'wcf-step-note', true );
|
10 |
+
?>
|
11 |
+
<div class="wcf-step">
|
12 |
+
<div class="wcf-step-left-content">
|
13 |
+
<span class="dashicons dashicons-menu"></span>
|
14 |
+
<span title="<?php echo esc_attr( $inner_step_title ); ?>"><?php echo wp_trim_words( $inner_step_title, 3 ); ?></span>
|
15 |
+
<?php
|
16 |
+
if ( $ab_test && ! empty( $note ) ) {
|
17 |
+
?>
|
18 |
+
<span class="dashicons dashicons-editor-help" id="wcf-tooltip">
|
19 |
+
<span class="wcf-ab-test-note-badge"><?php echo $note; ?></span>
|
20 |
+
</span>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
?>
|
26 |
+
<?php
|
27 |
+
if ( $ab_test_ui ) {
|
28 |
+
if ( $control_id === $inner_step_id ) {
|
29 |
+
?>
|
30 |
+
<span class="wcf-step-badge wcf-abtest-control-badge"><?php esc_html_e( 'Control', 'cartflows' ); ?></span>
|
31 |
+
<?php } else { ?>
|
32 |
+
<span class="wcf-step-badge wcf-abtest-variation-badge"><?php /* translators: %s badge count */ echo esc_html( sprintf( __( 'Variation-%s', 'cartflows' ), ++$var_badge_count ) ); ?></span>
|
33 |
+
<?php
|
34 |
+
}
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
|
38 |
+
<span class="wcf-flow-badge"><?php echo esc_html( $term_name ); ?></span>
|
39 |
+
|
40 |
+
<?php
|
41 |
+
|
42 |
+
if ( ( ! $has_product_assigned ) && ( $inner_step_id != $is_global_checkout ) ) {
|
43 |
+
?>
|
44 |
+
<span class="wcf-no-product-badge"><?php esc_html_e( 'No Product Assigned', 'cartflows' ); ?></span>
|
45 |
+
<?php
|
46 |
+
} elseif ( ( $has_product_assigned ) && ( $inner_step_id === $is_global_checkout ) ) {
|
47 |
+
?>
|
48 |
+
<span class="wcf-global-checkout-badge wcf-error-badge"><?php esc_html_e( 'Global Checkout - Remove selected checkout product', 'cartflows' ); ?></span>
|
49 |
+
<?php
|
50 |
+
} elseif ( ( ! $has_product_assigned ) && $inner_step_id === $is_global_checkout ) {
|
51 |
+
?>
|
52 |
+
<span class="wcf-global-checkout-badge"><?php esc_html_e( 'Global Checkout', 'cartflows' ); ?></span>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
|
56 |
+
?>
|
57 |
+
|
58 |
+
<?php if ( $control_id === $inner_step_id ) { ?>
|
59 |
+
<input type="hidden" class="wcf-steps-hidden" name="wcf-steps[]" value="<?php echo $inner_step_id; ?>">
|
60 |
+
<?php } ?>
|
61 |
+
<?php do_action( 'cartflows_step_left_content', $inner_step_id, $term_slug ); ?>
|
62 |
+
</div>
|
63 |
+
|
64 |
+
<!-- popup for setting -->
|
65 |
+
<div id="wcf-edit-dropdown" class="wcf-edit-content" >
|
66 |
+
|
67 |
+
|
68 |
+
<?php foreach ( $action_buttons as $action_slug => $action_data ) { ?>
|
69 |
+
<?php
|
70 |
+
|
71 |
+
if ( 'view' === $action_slug || 'edit' === $action_slug ) {
|
72 |
+
continue;
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( $ab_test_ui ) {
|
76 |
+
|
77 |
+
if ( 'ab-test' === $action_slug ) {
|
78 |
+
continue;
|
79 |
+
}
|
80 |
+
} else {
|
81 |
+
|
82 |
+
if ( isset( $action_data['ab-test'] ) ) {
|
83 |
+
continue;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
$action_attr = ' ';
|
89 |
+
if ( isset( $action_data['attr'] ) && is_array( $action_data['attr'] ) ) {
|
90 |
+
foreach ( $action_data['attr'] as $attr_key => $attr_value ) {
|
91 |
+
$action_attr .= $attr_key . '="' . $attr_value . '"';
|
92 |
+
}
|
93 |
+
}
|
94 |
+
$style = '';
|
95 |
+
if ( ! $action_data['show'] ) {
|
96 |
+
$style = 'opacity: 0.65; cursor: not-allowed;';
|
97 |
+
$action_data['label'] .= ' ( Pro )';
|
98 |
+
$action_data['tooltip'] = 'Upgrade to Pro for this feature.';
|
99 |
+
$action_data['class'] .= ' wcf-pro';
|
100 |
+
}
|
101 |
+
?>
|
102 |
+
<a href="<?php echo $action_data['link']; ?>" style ="<?php echo $style; ?>" class="<?php echo $action_data['class']; ?>" title="<?php echo $action_data['tooltip']; ?>" <?php echo $action_attr; ?>>
|
103 |
+
<span class="dashicons <?php echo $action_data['icon']; ?>"></span>
|
104 |
+
<span class="wcf-step-act-btn-text"><?php echo $action_data['label']; ?></span>
|
105 |
+
</a>
|
106 |
+
<?php } ?>
|
107 |
+
|
108 |
+
</div>
|
109 |
+
|
110 |
+
<!-- popup for setting -->
|
111 |
+
|
112 |
+
<div class="wcf-steps-action-buttons">
|
113 |
+
<div class="wcf-basic-action-buttons">
|
114 |
+
<?php
|
115 |
+
foreach ( $action_buttons as $action_slug => $action_data ) {
|
116 |
+
if ( 'view' === $action_slug || 'edit' === $action_slug ) {
|
117 |
+
?>
|
118 |
+
<a href="<?php echo $action_data['link']; ?>" class="<?php echo $action_data['class']; ?>" title="<?php echo $action_data['tooltip']; ?>" <?php echo $action_attr; ?>>
|
119 |
+
<span class="dashicons <?php echo $action_data['icon']; ?>"></span>
|
120 |
+
<span class="wcf-step-act-btn-text"><?php echo $action_data['label']; ?></span>
|
121 |
+
</a>
|
122 |
+
<?php
|
123 |
+
}
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</div>
|
127 |
+
<div class="wcf-edit-settings"></div>
|
128 |
+
</div>
|
129 |
+
</div>
|
modules/flow/view/view-remote-importer.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View Remote importer popup
|
4 |
+
*
|
5 |
+
* @package CartFlows
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div id="wcf-remote-step-importer" class="wcf-templates-popup-overlay">
|
10 |
+
<div class="wcf-templates-popup-content">
|
11 |
+
<div class="spinner"></div>
|
12 |
+
<div class="wcf-templates-wrap wcf-templates-wrap-flows">
|
13 |
+
|
14 |
+
<div id="wcf-remote-step-actions" class="wcf-template-header">
|
15 |
+
<div class="wcf-template-logo-wrap">
|
16 |
+
<span class="wcf-cartflows-logo-img">
|
17 |
+
<span class="cartflows-logo-icon"></span>
|
18 |
+
</span>
|
19 |
+
<span class="wcf-cartflows-title"><?php esc_html_e( 'Steps Library', 'cartflows' ); ?></span>
|
20 |
+
</div>
|
21 |
+
<div class="wcf-tab-wrapper">
|
22 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
23 |
+
<div id="wcf-get-started-steps">
|
24 |
+
<ul class="filter-links ">
|
25 |
+
<li>
|
26 |
+
<a href="#" class="current" data-slug="ready-templates" data-title="<?php esc_html_e( 'Ready Templates', 'cartflows' ); ?>"><?php esc_html_e( 'Ready Templates', 'cartflows' ); ?></a>
|
27 |
+
</li>
|
28 |
+
<li>
|
29 |
+
<a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
|
30 |
+
</li>
|
31 |
+
</ul>
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
+
</div>
|
35 |
+
<div class="wcf-popup-close-wrap">
|
36 |
+
<span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<!--<div class="wcf-search-form">
|
41 |
+
<label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
|
42 |
+
<input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
|
43 |
+
</div>-->
|
44 |
+
|
45 |
+
<div id="wcf-remote-content">
|
46 |
+
<?php if ( 'other' !== $default_page_builder ) { ?>
|
47 |
+
<div id="wcf-ready-templates">
|
48 |
+
<div id="wcf-remote-filters">
|
49 |
+
<div id="wcf-page-builders"></div>
|
50 |
+
<div id="wcf-categories"></div>
|
51 |
+
</div>
|
52 |
+
<div class="wcf-page-builder-notice"></div>
|
53 |
+
<div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
|
54 |
+
<div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
|
55 |
+
</div>
|
56 |
+
<?php } ?>
|
57 |
+
<div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
|
58 |
+
<div class="inner">
|
59 |
+
<div id="wcf-scratch-steps-categories">
|
60 |
+
<select class="step-type-filter-links filter-links">
|
61 |
+
<option value="" class="current"> Select Step Type </option>
|
62 |
+
|
63 |
+
<?php foreach ( $steps as $key => $value ) { ?>
|
64 |
+
<option class="<?php echo $key; ?>" data-slug="<?php echo $key; ?>" data-title="<?php echo $key; ?>"><?php echo $value; ?></option>
|
65 |
+
<?php } ?>
|
66 |
+
</select>
|
67 |
+
</div>
|
68 |
+
<a href="#" class="button button-primary cartflows-step-import-blank"><?php esc_html_e( 'Create Step', 'cartflows' ); ?></a>
|
69 |
+
<?php if ( ! _is_cartflows_pro() ) { ?>
|
70 |
+
<div class="wcf-template-notice"><p><?php echo esc_html__( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
|
71 |
+
<?php } ?>
|
72 |
+
<p class="wcf-learn-how"><a href="https://cartflows.com/docs/cartflows-step-types/" target="_blank"><?php esc_html_e( 'Learn How', 'cartflows' ); ?> <i class="dashicons dashicons-external"></i></a></p>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
</div><!-- .wcf-templates-popup-overlay -->
|
modules/optin/classes/class-cartflows-optin-markup.php
CHANGED
@@ -62,6 +62,8 @@ class Cartflows_Optin_Markup {
|
|
62 |
|
63 |
add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'change_field_label_in_required_notice' ), 100, 2 );
|
64 |
|
|
|
|
|
65 |
$this->elementor_editor_compatibility();
|
66 |
}
|
67 |
|
@@ -83,6 +85,17 @@ class Cartflows_Optin_Markup {
|
|
83 |
}
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
/**
|
87 |
* Change order button text .
|
88 |
*
|
@@ -310,6 +323,10 @@ class Cartflows_Optin_Markup {
|
|
310 |
|
311 |
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
312 |
|
|
|
|
|
|
|
|
|
313 |
global $post;
|
314 |
|
315 |
$optin_id = $post->ID;
|
62 |
|
63 |
add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'change_field_label_in_required_notice' ), 100, 2 );
|
64 |
|
65 |
+
add_action( 'init', array( $this, 'remove_login_actions' ) );
|
66 |
+
|
67 |
$this->elementor_editor_compatibility();
|
68 |
}
|
69 |
|
85 |
}
|
86 |
}
|
87 |
|
88 |
+
/**
|
89 |
+
* Remove login and registration actions.
|
90 |
+
*/
|
91 |
+
public function remove_login_actions() {
|
92 |
+
|
93 |
+
if ( _is_wcf_doing_optin_ajax() ) {
|
94 |
+
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
95 |
+
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
/**
|
100 |
* Change order button text .
|
101 |
*
|
323 |
|
324 |
add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
|
325 |
|
326 |
+
/* Remove login actions */
|
327 |
+
add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
|
328 |
+
add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
|
329 |
+
|
330 |
global $post;
|
331 |
|
332 |
$optin_id = $post->ID;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce, wpcrafter
|
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.5.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -18,7 +18,7 @@ Create beautiful checkout pages & sales flows for WooCommerce.
|
|
18 |
|
19 |
**Funnels are the most effective way to sell products & services.** We created CartFlows, a <a href="https://cartflows.com" target="_blank">**WordPress Funnel Builder**</a>, to help every website owner get more leads, increase conversions, & maximize profits.
|
20 |
|
21 |
-
[youtube https://www.youtube.com/watch?v=
|
22 |
|
23 |
Turn your WooCommerce website into a selling machine using one-click sales funnels with frictionless checkout, custom thank you pages, global checkout replacement, and more…
|
24 |
|
@@ -127,6 +127,12 @@ Glad you asked! Most normal users have less than 3 funnels on a single website,
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= Version 1.5.14 - Thursday, 30th July 2020 =
|
131 |
* Fix: Not able to search & select the course type of product.
|
132 |
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 5.5
|
7 |
+
Stable tag: 1.5.15
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
18 |
|
19 |
**Funnels are the most effective way to sell products & services.** We created CartFlows, a <a href="https://cartflows.com" target="_blank">**WordPress Funnel Builder**</a>, to help every website owner get more leads, increase conversions, & maximize profits.
|
20 |
|
21 |
+
[youtube https://www.youtube.com/watch?v=5iFv9Pxwgx0]
|
22 |
|
23 |
Turn your WooCommerce website into a selling machine using one-click sales funnels with frictionless checkout, custom thank you pages, global checkout replacement, and more…
|
24 |
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= Version 1.5.15 - Wednesday, 12th August 2020 =
|
131 |
+
* Improvement: Added Split Testing compatibility for a future release of CartFlows Pro.
|
132 |
+
* Improvement: Added WordPress 5.5 Compatibility.
|
133 |
+
* Fix: Product discount price & percentage options were not working if the full discount is applied.
|
134 |
+
* Fix: Account already exists error message on the Optin step.
|
135 |
+
|
136 |
= Version 1.5.14 - Thursday, 30th July 2020 =
|
137 |
* Fix: Not able to search & select the course type of product.
|
138 |
|