Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress - Version 1.5.18

Version Description

Download this release

Release Info

Developer sandesh055
Plugin Icon Funnel Builder by CartFlows – Create High Converting Sales Funnels For WordPress
Version 1.5.18
Comparing to
See all releases

Code changes from version 1.5.17 to 1.5.18

Files changed (51) hide show
  1. admin/assets/css/admin-menu-settings-rtl.css +48 -45
  2. admin/assets/css/admin-menu-settings.css +48 -45
  3. admin/assets/css/global-admin-rtl.css +58 -6
  4. admin/assets/css/global-admin.css +58 -6
  5. admin/assets/js/global-admin.js +2 -2
  6. admin/bsf-analytics/class-bsf-analytics.php +503 -503
  7. admin/meta-assets/js/admin-edit.js +197 -108
  8. assets/css/checkout-template-rtl.css +1070 -809
  9. assets/css/checkout-template.css +1070 -809
  10. assets/elementor-assets/css/style.css +39 -0
  11. assets/elementor-assets/fonts/wcf-el.eot +0 -0
  12. assets/elementor-assets/fonts/wcf-el.svg +14 -0
  13. assets/elementor-assets/fonts/wcf-el.ttf +0 -0
  14. assets/elementor-assets/fonts/wcf-el.woff +0 -0
  15. assets/min-css/checkout-template-rtl.min.css +1 -1
  16. assets/min-css/checkout-template.min.css +1 -1
  17. cartflows.php +2 -2
  18. changelog.txt +6 -0
  19. classes/class-cartflows-admin-fields.php +277 -271
  20. classes/class-cartflows-admin.php +740 -740
  21. classes/class-cartflows-default-meta.php +855 -871
  22. classes/class-cartflows-functions.php +589 -555
  23. classes/class-cartflows-helper.php +813 -793
  24. classes/class-cartflows-loader.php +10 -5
  25. classes/class-cartflows-woo-hooks.php +81 -0
  26. includes/meta-fields/generate-product-repeater.php +99 -99
  27. languages/cartflows.pot +717 -252
  28. modules/checkout/classes/class-cartflows-checkout-markup.php +116 -60
  29. modules/checkout/classes/class-cartflows-checkout-meta.php +619 -959
  30. modules/checkout/includes/meta-views/design-checkout-metabox-markup.php +52 -0
  31. modules/checkout/includes/meta-views/design-checkout-style-tab.php +347 -0
  32. modules/checkout/templates/embed/checkout-template-simple.php +34 -33
  33. modules/elementor/class-cartflows-el-widgets-loader.php +180 -0
  34. modules/elementor/classes/class-cartflows-elementor-editor.php +112 -0
  35. modules/elementor/widgets-css/frontend.css +77 -0
  36. modules/elementor/widgets/class-cartflows-el-checkout-form.php +1087 -0
  37. modules/elementor/widgets/class-cartflows-el-next-step-button.php +678 -0
  38. modules/elementor/widgets/class-cartflows-el-optin-form.php +518 -0
  39. modules/elementor/widgets/class-cartflows-el-order-details-form.php +826 -0
  40. modules/elementor/widgets/index.php +3 -0
  41. modules/flow/view/view-flow-inner-step.php +129 -129
  42. modules/landing/classes/class-cartflows-landing-markup.php +147 -147
  43. modules/landing/classes/class-cartflows-landing-meta.php +237 -235
  44. modules/optin/classes/class-cartflows-optin-markup.php +762 -736
  45. modules/optin/classes/class-cartflows-optin-meta.php +739 -675
  46. modules/thankyou/classes/class-cartflows-thankyou-markup.php +324 -314
  47. modules/thankyou/classes/class-cartflows-thankyou-meta.php +482 -423
  48. readme.txt +7 -1
  49. woocommerce/template/checkout/form-billing.php +1 -1
  50. woocommerce/template/checkout/form-checkout.php +11 -6
  51. woocommerce/template/checkout/form-shipping.php +1 -1
admin/assets/css/admin-menu-settings-rtl.css CHANGED
@@ -36,17 +36,17 @@
36
  }
37
 
38
  .wcf-container #poststuff h2 {
39
- padding: 12px 12px;
40
  }
41
  .wcf-container .postbox .hndle {
42
- background: #ffffff;
43
- border-bottom: 1px solid #e6e6e6;
44
  }
45
 
46
- .wcf-menu-page-wrapper{
47
  right: -20px;
48
- position: relative;
49
- width: calc( 100% + 20px);
50
  }
51
 
52
  .wcf-menu-page-wrapper a {
@@ -127,7 +127,7 @@
127
  .wcf-widget-list li a:before {
128
  display: inline-block;
129
  margin-left: 2px;
130
- font: normal 20px/1 'dashicons';
131
  -webkit-font-smoothing: antialiased;
132
  -moz-osx-font-smoothing: grayscale;
133
  vertical-align: top;
@@ -141,18 +141,18 @@
141
  background: #f7f7f7;
142
  border-bottom: 2px solid #e6e6e6;
143
  }
144
- .wcf-container .postbox ul{
145
  margin: 0;
146
  }
147
- .wcf-widget-list a{
148
  line-height: 1.6;
149
  }
150
- .wcf-widget-list a:focus{
151
  box-shadow: none;
152
  }
153
 
154
- .wcf-branding-list{
155
- margin:0;
156
  }
157
 
158
  /* Update icon. */
@@ -200,19 +200,19 @@
200
  }
201
  .wcf-menu-page-header {
202
  background-color: #fff;
203
- text-align: center;
204
- padding: 20px 0;
205
- margin-bottom: 20px;
206
- box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
207
  }
208
 
209
  .wcf-logo {
210
- max-width: 170px;
211
  }
212
 
213
  /* Spinner */
214
  .wcf-button-spinner:before {
215
- font: normal 20px/.5 dashicons;
216
  speak: none;
217
  display: inline-block;
218
  padding: 0;
@@ -228,12 +228,11 @@
228
  animation: rotation 1s infinite linear;
229
  }
230
 
231
-
232
  /* New CSS */
233
  .wcf-setting-tab-wrapper .wcf-setting-tab {
234
  padding: 10px 15px;
235
- display: flex;
236
- flex-wrap: wrap;
237
  }
238
 
239
  .wcf-setting-tab-wrapper .wcf-tab-title {
@@ -242,57 +241,61 @@
242
 
243
  .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
244
  width: 60%;
245
- text-align: left;
246
  }
247
 
248
  /** Settings Page - Introduction Box */
249
  #wcf-menu-page .introduction iframe {
250
- width: 100%;
251
- vertical-align: middle;
252
  }
253
  #wcf-menu-page .introduction .iframe-wrap {
254
- margin: -6px -12px 0px -12px;
255
  }
256
 
257
-
258
  /* Form Fields */
 
 
 
 
 
259
  .form-field-label,
260
  .form-field-data {
261
- display: inline-block;
262
- padding-left: 5px;
263
  }
264
  .form-field-actions {
265
- display: inline-block;
266
  margin-right: 15px;
267
  }
268
  .form-field-actions a {
269
- margin: 0 0 0 12px;
270
  }
271
  .form-field-actions span.dashicons {
272
- margin: 0 0 0 5px;
273
  }
274
  .form-field-desc {
275
- margin: 5px 0 0;
276
  }
277
  #poststuff .general-settings-form .inside {
278
- margin: 2em 0 0;
279
  }
280
  .general-settings-form .form-field,
281
  .postbox-container .form-field {
282
- border-bottom: 1px solid #e6e6e6;
283
- display: block;
284
- width: 100%;
285
- margin: 0 0 1em;
286
- padding: 0 0 1em;
287
  }
288
  .general-settings-form .form-field:first-child {
289
- margin: 1em 0 1em;
290
  }
291
  .general-settings-form .form-field:last-child {
292
- border: none;
293
  }
294
 
295
- .postbox-container .form-field{
296
  border: none;
297
  }
298
 
@@ -313,7 +316,7 @@
313
  white-space: pre-wrap;
314
  }
315
 
316
- .wcf_permalink_settings .form-field-desc p{
317
  word-break: break-all;
318
  }
319
 
@@ -334,16 +337,16 @@
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
- }
36
  }
37
 
38
  .wcf-container #poststuff h2 {
39
+ padding: 12px 12px;
40
  }
41
  .wcf-container .postbox .hndle {
42
+ background: #ffffff;
43
+ border-bottom: 1px solid #e6e6e6;
44
  }
45
 
46
+ .wcf-menu-page-wrapper {
47
  right: -20px;
48
+ position: relative;
49
+ width: calc(100% + 20px);
50
  }
51
 
52
  .wcf-menu-page-wrapper a {
127
  .wcf-widget-list li a:before {
128
  display: inline-block;
129
  margin-left: 2px;
130
+ font: normal 20px/1 "dashicons";
131
  -webkit-font-smoothing: antialiased;
132
  -moz-osx-font-smoothing: grayscale;
133
  vertical-align: top;
141
  background: #f7f7f7;
142
  border-bottom: 2px solid #e6e6e6;
143
  }
144
+ .wcf-container .postbox ul {
145
  margin: 0;
146
  }
147
+ .wcf-widget-list a {
148
  line-height: 1.6;
149
  }
150
+ .wcf-widget-list a:focus {
151
  box-shadow: none;
152
  }
153
 
154
+ .wcf-branding-list {
155
+ margin: 0;
156
  }
157
 
158
  /* Update icon. */
200
  }
201
  .wcf-menu-page-header {
202
  background-color: #fff;
203
+ text-align: center;
204
+ padding: 20px 0;
205
+ margin-bottom: 20px;
206
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
207
  }
208
 
209
  .wcf-logo {
210
+ max-width: 170px;
211
  }
212
 
213
  /* Spinner */
214
  .wcf-button-spinner:before {
215
+ font: normal 20px/0.5 dashicons;
216
  speak: none;
217
  display: inline-block;
218
  padding: 0;
228
  animation: rotation 1s infinite linear;
229
  }
230
 
 
231
  /* New CSS */
232
  .wcf-setting-tab-wrapper .wcf-setting-tab {
233
  padding: 10px 15px;
234
+ display: flex;
235
+ flex-wrap: wrap;
236
  }
237
 
238
  .wcf-setting-tab-wrapper .wcf-tab-title {
241
 
242
  .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
243
  width: 60%;
244
+ text-align: left;
245
  }
246
 
247
  /** Settings Page - Introduction Box */
248
  #wcf-menu-page .introduction iframe {
249
+ width: 100%;
250
+ vertical-align: middle;
251
  }
252
  #wcf-menu-page .introduction .iframe-wrap {
253
+ margin: -6px -12px 0px -12px;
254
  }
255
 
 
256
  /* Form Fields */
257
+ .form-field select,
258
+ .form-field p {
259
+ max-width: 100%;
260
+ }
261
+
262
  .form-field-label,
263
  .form-field-data {
264
+ display: inline-block;
265
+ padding-left: 5px;
266
  }
267
  .form-field-actions {
268
+ display: inline-block;
269
  margin-right: 15px;
270
  }
271
  .form-field-actions a {
272
+ margin: 0 0 0 12px;
273
  }
274
  .form-field-actions span.dashicons {
275
+ margin: 0 0 0 5px;
276
  }
277
  .form-field-desc {
278
+ margin: 5px 0 0;
279
  }
280
  #poststuff .general-settings-form .inside {
281
+ margin: 2em 0 0;
282
  }
283
  .general-settings-form .form-field,
284
  .postbox-container .form-field {
285
+ border-bottom: 1px solid #e6e6e6;
286
+ display: block;
287
+ width: 100%;
288
+ margin: 0 0 1em;
289
+ padding: 0 0 1em;
290
  }
291
  .general-settings-form .form-field:first-child {
292
+ margin: 1em 0 1em;
293
  }
294
  .general-settings-form .form-field:last-child {
295
+ border: none;
296
  }
297
 
298
+ .postbox-container .form-field {
299
  border: none;
300
  }
301
 
316
  white-space: pre-wrap;
317
  }
318
 
319
+ .wcf_permalink_settings .form-field-desc p {
320
  word-break: break-all;
321
  }
322
 
337
  border-bottom: 1px solid #dfdfdf;
338
  }
339
  .wcf-stats-box {
340
+ padding: 15px;
341
  box-sizing: border-box;
342
  border-left: 1px solid #dfdfdf;
343
  }
344
  .wcf-stats-box:last-child {
345
+ border: 0;
346
  }
347
  /*.wcf-stats-grid-container:last-of-type {
348
  border-top: 0;
349
  }*/
350
  .wcf-stats-buttons {
351
  padding: 15px 0;
352
+ }
admin/assets/css/admin-menu-settings.css CHANGED
@@ -36,17 +36,17 @@
36
  }
37
 
38
  .wcf-container #poststuff h2 {
39
- padding: 12px 12px;
40
  }
41
  .wcf-container .postbox .hndle {
42
- background: #ffffff;
43
- border-bottom: 1px solid #e6e6e6;
44
  }
45
 
46
- .wcf-menu-page-wrapper{
47
  left: -20px;
48
- position: relative;
49
- width: calc( 100% + 20px);
50
  }
51
 
52
  .wcf-menu-page-wrapper a {
@@ -127,7 +127,7 @@
127
  .wcf-widget-list li a:before {
128
  display: inline-block;
129
  margin-right: 2px;
130
- font: normal 20px/1 'dashicons';
131
  -webkit-font-smoothing: antialiased;
132
  -moz-osx-font-smoothing: grayscale;
133
  vertical-align: top;
@@ -141,18 +141,18 @@
141
  background: #f7f7f7;
142
  border-bottom: 2px solid #e6e6e6;
143
  }
144
- .wcf-container .postbox ul{
145
  margin: 0;
146
  }
147
- .wcf-widget-list a{
148
  line-height: 1.6;
149
  }
150
- .wcf-widget-list a:focus{
151
  box-shadow: none;
152
  }
153
 
154
- .wcf-branding-list{
155
- margin:0;
156
  }
157
 
158
  /* Update icon. */
@@ -200,19 +200,19 @@
200
  }
201
  .wcf-menu-page-header {
202
  background-color: #fff;
203
- text-align: center;
204
- padding: 20px 0;
205
- margin-bottom: 20px;
206
- box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
207
  }
208
 
209
  .wcf-logo {
210
- max-width: 170px;
211
  }
212
 
213
  /* Spinner */
214
  .wcf-button-spinner:before {
215
- font: normal 20px/.5 dashicons;
216
  speak: none;
217
  display: inline-block;
218
  padding: 0;
@@ -228,12 +228,11 @@
228
  animation: rotation 1s infinite linear;
229
  }
230
 
231
-
232
  /* New CSS */
233
  .wcf-setting-tab-wrapper .wcf-setting-tab {
234
  padding: 10px 15px;
235
- display: flex;
236
- flex-wrap: wrap;
237
  }
238
 
239
  .wcf-setting-tab-wrapper .wcf-tab-title {
@@ -242,57 +241,61 @@
242
 
243
  .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
244
  width: 60%;
245
- text-align: right;
246
  }
247
 
248
  /** Settings Page - Introduction Box */
249
  #wcf-menu-page .introduction iframe {
250
- width: 100%;
251
- vertical-align: middle;
252
  }
253
  #wcf-menu-page .introduction .iframe-wrap {
254
- margin: -6px -12px 0px -12px;
255
  }
256
 
257
-
258
  /* Form Fields */
 
 
 
 
 
259
  .form-field-label,
260
  .form-field-data {
261
- display: inline-block;
262
- padding-right: 5px;
263
  }
264
  .form-field-actions {
265
- display: inline-block;
266
  margin-left: 15px;
267
  }
268
  .form-field-actions a {
269
- margin: 0 12px 0 0;
270
  }
271
  .form-field-actions span.dashicons {
272
- margin: 0 5px 0 0;
273
  }
274
  .form-field-desc {
275
- margin: 5px 0 0;
276
  }
277
  #poststuff .general-settings-form .inside {
278
- margin: 2em 0 0;
279
  }
280
  .general-settings-form .form-field,
281
  .postbox-container .form-field {
282
- border-bottom: 1px solid #e6e6e6;
283
- display: block;
284
- width: 100%;
285
- margin: 0 0 1em;
286
- padding: 0 0 1em;
287
  }
288
  .general-settings-form .form-field:first-child {
289
- margin: 1em 0 1em;
290
  }
291
  .general-settings-form .form-field:last-child {
292
- border: none;
293
  }
294
 
295
- .postbox-container .form-field{
296
  border: none;
297
  }
298
 
@@ -313,7 +316,7 @@
313
  white-space: pre-wrap;
314
  }
315
 
316
- .wcf_permalink_settings .form-field-desc p{
317
  word-break: break-all;
318
  }
319
 
@@ -334,16 +337,16 @@
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
- }
36
  }
37
 
38
  .wcf-container #poststuff h2 {
39
+ padding: 12px 12px;
40
  }
41
  .wcf-container .postbox .hndle {
42
+ background: #ffffff;
43
+ border-bottom: 1px solid #e6e6e6;
44
  }
45
 
46
+ .wcf-menu-page-wrapper {
47
  left: -20px;
48
+ position: relative;
49
+ width: calc(100% + 20px);
50
  }
51
 
52
  .wcf-menu-page-wrapper a {
127
  .wcf-widget-list li a:before {
128
  display: inline-block;
129
  margin-right: 2px;
130
+ font: normal 20px/1 "dashicons";
131
  -webkit-font-smoothing: antialiased;
132
  -moz-osx-font-smoothing: grayscale;
133
  vertical-align: top;
141
  background: #f7f7f7;
142
  border-bottom: 2px solid #e6e6e6;
143
  }
144
+ .wcf-container .postbox ul {
145
  margin: 0;
146
  }
147
+ .wcf-widget-list a {
148
  line-height: 1.6;
149
  }
150
+ .wcf-widget-list a:focus {
151
  box-shadow: none;
152
  }
153
 
154
+ .wcf-branding-list {
155
+ margin: 0;
156
  }
157
 
158
  /* Update icon. */
200
  }
201
  .wcf-menu-page-header {
202
  background-color: #fff;
203
+ text-align: center;
204
+ padding: 20px 0;
205
+ margin-bottom: 20px;
206
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
207
  }
208
 
209
  .wcf-logo {
210
+ max-width: 170px;
211
  }
212
 
213
  /* Spinner */
214
  .wcf-button-spinner:before {
215
+ font: normal 20px/0.5 dashicons;
216
  speak: none;
217
  display: inline-block;
218
  padding: 0;
228
  animation: rotation 1s infinite linear;
229
  }
230
 
 
231
  /* New CSS */
232
  .wcf-setting-tab-wrapper .wcf-setting-tab {
233
  padding: 10px 15px;
234
+ display: flex;
235
+ flex-wrap: wrap;
236
  }
237
 
238
  .wcf-setting-tab-wrapper .wcf-tab-title {
241
 
242
  .wcf-setting-tab-wrapper .wcf-tab-link-wrapper {
243
  width: 60%;
244
+ text-align: right;
245
  }
246
 
247
  /** Settings Page - Introduction Box */
248
  #wcf-menu-page .introduction iframe {
249
+ width: 100%;
250
+ vertical-align: middle;
251
  }
252
  #wcf-menu-page .introduction .iframe-wrap {
253
+ margin: -6px -12px 0px -12px;
254
  }
255
 
 
256
  /* Form Fields */
257
+ .form-field select,
258
+ .form-field p {
259
+ max-width: 100%;
260
+ }
261
+
262
  .form-field-label,
263
  .form-field-data {
264
+ display: inline-block;
265
+ padding-right: 5px;
266
  }
267
  .form-field-actions {
268
+ display: inline-block;
269
  margin-left: 15px;
270
  }
271
  .form-field-actions a {
272
+ margin: 0 12px 0 0;
273
  }
274
  .form-field-actions span.dashicons {
275
+ margin: 0 5px 0 0;
276
  }
277
  .form-field-desc {
278
+ margin: 5px 0 0;
279
  }
280
  #poststuff .general-settings-form .inside {
281
+ margin: 2em 0 0;
282
  }
283
  .general-settings-form .form-field,
284
  .postbox-container .form-field {
285
+ border-bottom: 1px solid #e6e6e6;
286
+ display: block;
287
+ width: 100%;
288
+ margin: 0 0 1em;
289
+ padding: 0 0 1em;
290
  }
291
  .general-settings-form .form-field:first-child {
292
+ margin: 1em 0 1em;
293
  }
294
  .general-settings-form .form-field:last-child {
295
+ border: none;
296
  }
297
 
298
+ .postbox-container .form-field {
299
  border: none;
300
  }
301
 
316
  white-space: pre-wrap;
317
  }
318
 
319
+ .wcf_permalink_settings .form-field-desc p {
320
  word-break: break-all;
321
  }
322
 
337
  border-bottom: 1px solid #dfdfdf;
338
  }
339
  .wcf-stats-box {
340
+ padding: 15px;
341
  box-sizing: border-box;
342
  border-right: 1px solid #dfdfdf;
343
  }
344
  .wcf-stats-box:last-child {
345
+ border: 0;
346
  }
347
  /*.wcf-stats-grid-container:last-of-type {
348
  border-top: 0;
349
  }*/
350
  .wcf-stats-buttons {
351
  padding: 15px 0;
352
+ }
admin/assets/css/global-admin-rtl.css CHANGED
@@ -593,17 +593,69 @@ input[type="text"].error:focus{
593
  /*
594
  * Inside Div css for all the metaboxes
595
  */
596
- #wcf-ladning-settings .inside,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  #wcf-checkout-settings .inside,
598
- #wcf-offer-settings .inside,
599
- #wcf-upsell-settings .inside,
 
600
  #wcf-optin-settings .inside,
601
- #wcf-thankyou-settings .inside{
 
 
602
  margin:0px;
603
  padding: 0px;
604
  line-height: 0.9em;
605
  }
606
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
607
  /**
608
  * ****************************
609
  * 1. Container
@@ -1245,10 +1297,10 @@ input[type="text"].error:focus{
1245
  */
1246
  @media only screen and (min-width: 1200px){
1247
  .wcf-column-left{
1248
- width: 300px;
1249
  }
1250
  .wcf-column-right{
1251
- width: calc( 100% - 300px );
1252
  }
1253
  }
1254
 
593
  /*
594
  * Inside Div css for all the metaboxes
595
  */
596
+ #wcf-landing-settings,
597
+ #wcf-checkout-settings,
598
+ #wcf-checkout-design-settings,
599
+ #wcf-thankyou-settings,
600
+ #wcf-thankyou-design-settings,
601
+ #wcf-optin-settings,
602
+ #wcf-optin-design-settings,
603
+ #wcf-offer-settings,
604
+ #wcf-upsell-settings {
605
+ border: 1px solid #ccd0d4;
606
+ margin-bottom: 15px;
607
+ }
608
+
609
+ #wcf-landing-settings .hndle.ui-sortable-handle,
610
+ #wcf-checkout-settings .hndle.ui-sortable-handle,
611
+ #wcf-checkout-design-settings .hndle.ui-sortable-handle,
612
+ #wcf-thankyou-settings .hndle.ui-sortable-handle,
613
+ #wcf-thankyou-design-settings .hndle.ui-sortable-handle,
614
+ #wcf-optin-settings .hndle.ui-sortable-handle,
615
+ #wcf-optin-design-settings .hndle.ui-sortable-handle,
616
+ #wcf-offer-settings .hndle.ui-sortable-handle,
617
+ #wcf-upsell-settings .hndle.ui-sortable-handle{
618
+ border-bottom: none !important;
619
+ }
620
+
621
+ #wcf-landing-settings .inside,
622
  #wcf-checkout-settings .inside,
623
+ #wcf-checkout-design-settings .inside,
624
+ #wcf-thankyou-settings .inside,
625
+ #wcf-thankyou-design-settings .inside,
626
  #wcf-optin-settings .inside,
627
+ #wcf-optin-design-settings .inside,
628
+ #wcf-offer-settings .inside,
629
+ #wcf-upsell-settings .inside {
630
  margin:0px;
631
  padding: 0px;
632
  line-height: 0.9em;
633
  }
634
 
635
+ /* Notice in metabox */
636
+ .wcf-metabox-notice-wrap .wcf-metabox-notice {
637
+ border: 0;
638
+ background: #eee;
639
+ border-bottom: 1px solid #ccc;
640
+ font-weight: 600;
641
+ margin: 0 auto;
642
+ padding: 15px;
643
+ }
644
+
645
+ .wcf-metabox-notice .dashicons-info:before {
646
+ color: #0274be;
647
+ }
648
+
649
+ /* Notice in content */
650
+ .wcf-tab-content .wcf-metabox-notice-wrap {
651
+ padding: 5px 15px 15px;
652
+ }
653
+
654
+ .wcf-tab-content .wcf-metabox-notice-wrap .wcf-metabox-notice {
655
+ display: inline-block;
656
+ border: 0;
657
+ }
658
+
659
  /**
660
  * ****************************
661
  * 1. Container
1297
  */
1298
  @media only screen and (min-width: 1200px){
1299
  .wcf-column-left{
1300
+ width: 280px;
1301
  }
1302
  .wcf-column-right{
1303
+ width: calc( 100% - 280px );
1304
  }
1305
  }
1306
 
admin/assets/css/global-admin.css CHANGED
@@ -593,17 +593,69 @@ input[type="text"].error:focus{
593
  /*
594
  * Inside Div css for all the metaboxes
595
  */
596
- #wcf-ladning-settings .inside,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  #wcf-checkout-settings .inside,
598
- #wcf-offer-settings .inside,
599
- #wcf-upsell-settings .inside,
 
600
  #wcf-optin-settings .inside,
601
- #wcf-thankyou-settings .inside{
 
 
602
  margin:0px;
603
  padding: 0px;
604
  line-height: 0.9em;
605
  }
606
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
607
  /**
608
  * ****************************
609
  * 1. Container
@@ -1245,10 +1297,10 @@ input[type="text"].error:focus{
1245
  */
1246
  @media only screen and (min-width: 1200px){
1247
  .wcf-column-left{
1248
- width: 300px;
1249
  }
1250
  .wcf-column-right{
1251
- width: calc( 100% - 300px );
1252
  }
1253
  }
1254
 
593
  /*
594
  * Inside Div css for all the metaboxes
595
  */
596
+ #wcf-landing-settings,
597
+ #wcf-checkout-settings,
598
+ #wcf-checkout-design-settings,
599
+ #wcf-thankyou-settings,
600
+ #wcf-thankyou-design-settings,
601
+ #wcf-optin-settings,
602
+ #wcf-optin-design-settings,
603
+ #wcf-offer-settings,
604
+ #wcf-upsell-settings {
605
+ border: 1px solid #ccd0d4;
606
+ margin-bottom: 15px;
607
+ }
608
+
609
+ #wcf-landing-settings .hndle.ui-sortable-handle,
610
+ #wcf-checkout-settings .hndle.ui-sortable-handle,
611
+ #wcf-checkout-design-settings .hndle.ui-sortable-handle,
612
+ #wcf-thankyou-settings .hndle.ui-sortable-handle,
613
+ #wcf-thankyou-design-settings .hndle.ui-sortable-handle,
614
+ #wcf-optin-settings .hndle.ui-sortable-handle,
615
+ #wcf-optin-design-settings .hndle.ui-sortable-handle,
616
+ #wcf-offer-settings .hndle.ui-sortable-handle,
617
+ #wcf-upsell-settings .hndle.ui-sortable-handle{
618
+ border-bottom: none !important;
619
+ }
620
+
621
+ #wcf-landing-settings .inside,
622
  #wcf-checkout-settings .inside,
623
+ #wcf-checkout-design-settings .inside,
624
+ #wcf-thankyou-settings .inside,
625
+ #wcf-thankyou-design-settings .inside,
626
  #wcf-optin-settings .inside,
627
+ #wcf-optin-design-settings .inside,
628
+ #wcf-offer-settings .inside,
629
+ #wcf-upsell-settings .inside {
630
  margin:0px;
631
  padding: 0px;
632
  line-height: 0.9em;
633
  }
634
 
635
+ /* Notice in metabox */
636
+ .wcf-metabox-notice-wrap .wcf-metabox-notice {
637
+ border: 0;
638
+ background: #eee;
639
+ border-bottom: 1px solid #ccc;
640
+ font-weight: 600;
641
+ margin: 0 auto;
642
+ padding: 15px;
643
+ }
644
+
645
+ .wcf-metabox-notice .dashicons-info:before {
646
+ color: #0274be;
647
+ }
648
+
649
+ /* Notice in content */
650
+ .wcf-tab-content .wcf-metabox-notice-wrap {
651
+ padding: 5px 15px 15px;
652
+ }
653
+
654
+ .wcf-tab-content .wcf-metabox-notice-wrap .wcf-metabox-notice {
655
+ display: inline-block;
656
+ border: 0;
657
+ }
658
+
659
  /**
660
  * ****************************
661
  * 1. Container
1297
  */
1298
  @media only screen and (min-width: 1200px){
1299
  .wcf-column-left{
1300
+ width: 280px;
1301
  }
1302
  .wcf-column-right{
1303
+ width: calc( 100% - 280px );
1304
  }
1305
  }
1306
 
admin/assets/js/global-admin.js CHANGED
@@ -381,8 +381,8 @@
381
  $('#cartflows-upgrade-notice-overlay').hide();
382
  });
383
  };
384
-
385
- /* Optin - hide/show login */
386
  var wcf_optin_hide_show_init = function(){
387
 
388
  var wrapper = $('.wcf-optin-table');
381
  $('#cartflows-upgrade-notice-overlay').hide();
382
  });
383
  };
384
+
385
+ /* Optin - hide/show logic */
386
  var wcf_optin_hide_show_init = function(){
387
 
388
  var wrapper = $('.wcf-optin-table');
admin/bsf-analytics/class-bsf-analytics.php CHANGED
@@ -1,503 +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 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
- }
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/meta-assets/js/admin-edit.js CHANGED
@@ -218,6 +218,49 @@
218
  }
219
  }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  var wcf_init_color_fields = function() {
222
 
223
  // Call color picker
@@ -523,122 +566,71 @@
523
  }
524
  };
525
 
526
- /* Advance Style Fields Hide / Show */
527
- var wcf_advance_style_fields_events = function() {
528
-
529
- /* Ready */
530
- wcf_advance_style_fields();
531
- wcf_thankyou_advance_style_fields();
532
- wcf_thankyou_settings_fields();
533
-
534
- /* Change Advance Style Field*/
535
- $('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field input:checkbox').on('change', function(e) {
536
- wcf_advance_style_fields();
537
- });
538
-
539
- /* Change Advance Style Field*/
540
- $('.wcf-thankyou-table [name="wcf-tq-advance-options-fields"]').on('change', function(e) {
541
- wcf_thankyou_advance_style_fields();
542
- });
543
-
544
- $('.wcf-thankyou-table [name="wcf-show-tq-redirect-section"]').on('change', function(e) {
545
- wcf_thankyou_settings_fields();
546
- });
547
-
548
-
549
- };
550
-
551
- var wcf_thankyou_advance_style_fields = function() {
552
- var wrap = $('.wcf-thankyou-table'),
553
- checkbox_field = $('.wcf-thankyou-table [name="wcf-tq-advance-options-fields"]');
554
-
555
- var field_names = [
556
- '.field-wcf-tq-container-width',
557
- '.field-wcf-tq-section-bg-color'
558
- ];
559
-
560
- if ( checkbox_field.is(":checked") ) {
561
- $.each( field_names, function(i, val) {
562
- wrap.find( val ).show();
563
- })
564
- } else {
565
- $.each( field_names, function(i, val) {
566
- wrap.find( val ).hide();
567
- });
568
- }
569
- };
570
-
571
- var wcf_thankyou_settings_fields = function() {
572
- var wrap = $('.wcf-thankyou-table'),
573
- checkbox_field = $('.wcf-thankyou-table [name="wcf-show-tq-redirect-section"]');
574
-
575
- var field_names = [
576
- '.field-wcf-tq-redirect-link'
577
- ];
578
 
579
- if ( checkbox_field.is(":checked") ) {
580
- $.each( field_names, function(i, val) {
581
- wrap.find( val ).show();
582
- })
583
- } else {
584
- $.each( field_names, function(i, val) {
585
- wrap.find( val ).hide();
586
- });
587
- }
588
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
589
 
590
- /* Disable/Enable Advance Style Field section*/
591
- var wcf_advance_style_fields = function() {
592
-
593
- var wrap = $('.wcf-checkout-table'),
594
- custom_fields = wrap.find('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .wcf-cs-checkbox-field input:checkbox');
595
-
596
- var field_names = [
597
- '.wcf-cs-fields-options',
598
- '.wcf-cs-button-options',
599
- '.wcf-cs-section-options',
600
- ];
601
-
602
- // console.log(custom_fields);
603
-
604
- if ( custom_fields.is(":checked") ) {
605
- $.each( field_names, function(i, val) {
606
- wrap.find( val ).show();
607
- })
608
- } else {
609
- $.each( field_names, function(i, val) {
610
- wrap.find( val ).hide();
611
  });
612
  }
613
- };
614
-
615
- var wcf_settings_tab = function() {
616
-
617
- if( $('.wcf-tab.active').length ) {
618
- $active_tab = $('.wcf-tab.active');
619
-
620
- $active_tab_markup = '.' + $active_tab.data('tab');
621
-
622
- if( $( $active_tab_markup ).length ) {
623
- $( $active_tab_markup ).siblings().removeClass('active');
624
- $( $active_tab_markup ).addClass('active');
625
- }
626
- }
627
-
628
  $('.wcf-tab').on('click', function(e) {
629
  e.preventDefault();
630
 
631
- $this = $(this),
632
- tab_class = $this.data('tab');
 
 
 
633
 
634
- $('#wcf-active-tab').val( tab_class );
635
 
636
  $this.siblings().removeClass('wp-ui-text-highlight active');
637
  $this.addClass('wp-ui-text-highlight active');
638
 
639
- if( $( '.' + tab_class ).length ) {
640
- $( '.' + tab_class ).siblings().removeClass('active');
641
- $( '.' + tab_class ).addClass('active');
642
  }
643
  });
644
  };
@@ -712,9 +704,101 @@
712
  });
713
  };
714
 
715
- $(document).ready(function($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
716
 
717
- wcf_settings_tab();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718
 
719
  wcf_init_color_fields();
720
 
@@ -747,10 +831,15 @@
747
  /* Remove Repeatable Product */
748
  wcf_remove_repeatable_product();
749
 
750
- /* Advance Style Fields Show Hide */
751
- wcf_advance_style_fields_events();
752
 
753
  /*sortable products*/
754
  wcf_products_sortable();
 
 
 
 
 
755
  });
756
  })(jQuery);
218
  }
219
  }
220
 
221
+ var wcf_check_is_local_storage = function(){
222
+ var test = 'test';
223
+ try {
224
+ localStorage.setItem(test, test);
225
+ localStorage.removeItem(test);
226
+ return true;
227
+ } catch(e) {
228
+ return false;
229
+ }
230
+ };
231
+
232
+ var wcf_local_storage = {
233
+
234
+ set : function ( name, data ){
235
+
236
+ localStorage.removeItem( name );
237
+ localStorage.setItem( name, JSON.stringify( data ) );
238
+ },
239
+ get : function ( name ){
240
+
241
+ let data = {};
242
+
243
+ if( localStorage.getItem( name ) != null ){
244
+ data = JSON.parse( localStorage.getItem( name ) );
245
+ }
246
+
247
+ return data;
248
+ }
249
+ };
250
+
251
+ var wcf_update_settings_local_storage = function( settings_id, tab ){
252
+
253
+ if ( false === wcf_check_is_local_storage() ) {
254
+ return;
255
+ }
256
+
257
+ let data = wcf_local_storage.get( 'wcf_meta_settings' );
258
+
259
+ data[ settings_id ] = tab;
260
+
261
+ wcf_local_storage.set( 'wcf_meta_settings', data );
262
+ };
263
+
264
  var wcf_init_color_fields = function() {
265
 
266
  // Call color picker
566
  }
567
  };
568
 
569
+ var wcf_settings_tab = function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
 
571
+ if ( $('.wcf-metabox-wrap').length ) {
572
+ $('.wcf-metabox-wrap').each(function( index ) {
573
+
574
+ let $this = $(this),
575
+ parent = $this.closest('.postbox'),
576
+ settings_id = parent.attr('id'),
577
+ save_settings = wcf_local_storage.get( 'wcf_meta_settings' ),
578
+ show_active_tab = true;
579
+
580
+ if( save_settings[ settings_id ] !== undefined ) {
581
+
582
+ // We found a tab in cookie
583
+ show_active_tab = false;
584
+
585
+ let tab = save_settings[ settings_id ],
586
+ tab_class = parent.find( '.wcf-tab[data-tab="' + tab + '"]' ),
587
+ tab_content = parent.find( '.' + tab );
588
+
589
+ if ( tab_class.css('display') !== 'none' ) {
590
+ tab_class.siblings().removeClass('active');
591
+ tab_content.siblings().removeClass('active');
592
+ tab_class.addClass('active');
593
+ tab_content.addClass('active');
594
+ }else{
595
+ // We can't show dependent hidden tab.
596
+ show_active_tab = true;
597
+ }
598
+ }
599
+
600
+ if( show_active_tab ) {
601
+ let active_tab = parent.find('.wcf-tab.active');
602
 
603
+ if( active_tab.length && active_tab.css('display') !== 'none' ) {
604
+
605
+ let tab_class = '.' + active_tab.data('tab'),
606
+ tab_content = parent.find( tab_class );
607
+
608
+ if( tab_content.length ) {
609
+ tab_content.siblings().removeClass('active');
610
+ tab_content.addClass('active');
611
+ }
612
+ }
613
+ }
 
 
 
 
 
 
 
 
 
 
614
  });
615
  }
616
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  $('.wcf-tab').on('click', function(e) {
618
  e.preventDefault();
619
 
620
+ let $this = $(this),
621
+ parent = $this.closest('.postbox'),
622
+ settings_id = parent.attr('id'),
623
+ tab_class = '.' + $this.data('tab'),
624
+ tab_content = parent.find( tab_class );
625
 
626
+ wcf_update_settings_local_storage( settings_id, $this.data('tab') );
627
 
628
  $this.siblings().removeClass('wp-ui-text-highlight active');
629
  $this.addClass('wp-ui-text-highlight active');
630
 
631
+ if( tab_content.length ) {
632
+ tab_content.siblings().removeClass('active');
633
+ tab_content.addClass('active');
634
  }
635
  });
636
  };
704
  });
705
  };
706
 
707
+ var wcf_checkout_thankyou_hide_show_init = function() {
708
+
709
+ /* Disable/Enable Advance Style Field section*/
710
+ var wcf_checkout_advance_style_fields = function() {
711
+
712
+ var wrap = $('.wcf-checkout-design-table'),
713
+ custom_fields = wrap.find('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .field-wcf-advance-options-fields input:checkbox');
714
+
715
+ var field_names = [
716
+ '.wcf-cs-fields-options',
717
+ '.wcf-cs-button-options',
718
+ '.wcf-cs-section-options',
719
+ ];
720
+
721
+ // console.log(custom_fields);
722
+
723
+ if ( custom_fields.is(":checked") ) {
724
+ $.each( field_names, function(i, val) {
725
+ wrap.find( val ).show();
726
+ })
727
+ } else {
728
+ $.each( field_names, function(i, val) {
729
+ wrap.find( val ).hide();
730
+ });
731
+ }
732
+ };
733
+
734
+ var wcf_thankyou_advance_style_fields = function() {
735
+ var wrap = $('.wcf-thankyou-design-table'),
736
+ checkbox_field = $('.wcf-thankyou-design-table [name="wcf-tq-advance-options-fields"]');
737
+
738
+ var field_names = [
739
+ '.field-wcf-tq-container-width',
740
+ '.field-wcf-tq-section-bg-color'
741
+ ];
742
+
743
+ if ( checkbox_field.is(":checked") ) {
744
+ $.each( field_names, function(i, val) {
745
+ wrap.find( val ).show();
746
+ })
747
+ } else {
748
+ $.each( field_names, function(i, val) {
749
+ wrap.find( val ).hide();
750
+ });
751
+ }
752
+ };
753
+
754
+ var wcf_thankyou_settings_fields = function() {
755
+ var wrap = $('.wcf-thankyou-table'),
756
+ checkbox_field = $('.wcf-thankyou-table [name="wcf-show-tq-redirect-section"]');
757
+
758
+ var field_names = [
759
+ '.field-wcf-tq-redirect-link'
760
+ ];
761
+
762
+ if ( checkbox_field.is(":checked") ) {
763
+ $.each( field_names, function(i, val) {
764
+ wrap.find( val ).show();
765
+ })
766
+ } else {
767
+ $.each( field_names, function(i, val) {
768
+ wrap.find( val ).hide();
769
+ });
770
+ }
771
+ };
772
+
773
+ /* Advance Style Fields Hide / Show */
774
+ var wcf_advance_style_fields_events = function() {
775
 
776
+ /* Ready */
777
+ wcf_checkout_advance_style_fields();
778
+ wcf_thankyou_advance_style_fields();
779
+ wcf_thankyou_settings_fields();
780
+
781
+ /* Change Advance Style Field*/
782
+ $('.wcf-column-right .wcf-checkout-style .wcf-cs-fields .field-wcf-advance-options-fields input:checkbox').on('change', function(e) {
783
+ wcf_checkout_advance_style_fields();
784
+ });
785
+
786
+ /* Change Advance Style Field*/
787
+ $('.wcf-thankyou-design-table [name="wcf-tq-advance-options-fields"]').on('change', function(e) {
788
+ wcf_thankyou_advance_style_fields();
789
+ });
790
+
791
+ $('.wcf-thankyou-table [name="wcf-show-tq-redirect-section"]').on('change', function(e) {
792
+ wcf_thankyou_settings_fields();
793
+ });
794
+
795
+
796
+ };
797
+
798
+ wcf_advance_style_fields_events();
799
+ };
800
+
801
+ $(document).ready(function($) {
802
 
803
  wcf_init_color_fields();
804
 
831
  /* Remove Repeatable Product */
832
  wcf_remove_repeatable_product();
833
 
834
+ /* Checkout thankyou Show Hide init */
835
+ wcf_checkout_thankyou_hide_show_init();
836
 
837
  /*sortable products*/
838
  wcf_products_sortable();
839
+
840
+ /* Finally update settings options */
841
+ setTimeout(() => {
842
+ wcf_settings_tab();
843
+ }, 300);
844
  });
845
  })(jQuery);
assets/css/checkout-template-rtl.css CHANGED
@@ -1,150 +1,185 @@
1
- /**
2
- * **************
3
- * Login & Coupon Field Layout
4
- * **************
5
- */
6
-
7
  .cartflows-container .wcf-embed-checkout-form,
8
  .cartflows-container .wcf-embed-checkout-form * {
9
- -webkit-box-sizing: border-box;
10
- -moz-box-sizing: border-box;
11
- box-sizing: border-box;
12
  }
13
 
14
  .wcf-embed-checkout-form .wc-backward {
15
- display: none !important;
16
  }
17
 
18
- .wcf-embed-checkout-form .woocommerce form .form-row-first,
19
- .wcf-embed-checkout-form .woocommerce form .form-row-last,
20
- .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
21
- .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
22
- width: 50%;
23
- display: block;
24
  }
25
 
26
  .wcf-embed-checkout-form .woocommerce form .form-row-full,
27
- .wcf-embed-checkout-form .woocommerce-page form .form-row-full{
28
- width: 100%;
29
- clear: both;
30
  }
31
 
32
- .wcf-embed-checkout-form form .form-row-wide{
33
- width: 100%;
34
  }
35
 
36
- .wcf-embed-checkout-form form .wcf-column-33{
37
- width: 33.33%;
38
  }
39
 
40
  /* To test divi and all */
41
- .wcf-embed-checkout-form .woocommerce form .form-row-first, .woocommerce-page form .form-row-first{
42
- float: right;
43
- clear: right;
 
44
  }
45
 
46
- .wcf-embed-checkout-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
47
- float: left;
48
- clear: left;
 
49
  }
50
 
51
- .wcf-embed-checkout-form .woocommerce form .form-row .required{
52
- color: red;
53
- font-weight: 700;
54
- border: 0!important;
55
- text-decoration: none;
56
  }
57
 
58
  /* #wcf-embed-checkout-form .woocommerce .product-name a.remove:hover{
59
  color:red !important;
60
  } */
61
 
62
- .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{
63
- font-family: 'cartflows-icon';
64
- display: inline-block;
65
- font-size: 10px;
66
- border: 1px #4d5763 solid;
67
- -webkit-border-radius: 50%;
68
- border-radius: 50%;
69
- padding: 1px;
70
- color: #4d5763 !important;
71
- /* opacity: 0.6; */
72
- line-height: 1;
73
- margin-left: 5px;
74
- text-align: center;
75
- font-weight: 100;
76
- width: 14px;
77
- height: 14px;
78
- background-color: #fff;
79
- }
80
-
81
- .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{
82
- color: #f1653c !important;
83
- border: 1px #f1653c solid;
84
- background-color: #fff;
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /* To test divi and all */
88
 
89
- .wcf-embed-checkout-form form .form-row-first.form-row-one{
90
- clear: both;
91
  }
92
 
93
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{
94
- display: none;
95
  }
96
 
97
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{
98
- margin-bottom: 15px;
99
  }
100
 
101
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{
102
- clear: none;
103
  }
104
 
105
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{
106
- margin: 0;
107
- line-height: 1em;
108
- padding-top: 0;
109
- position: relative;
110
- top: 0;
 
 
 
 
111
  }
112
 
113
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{
114
- -js-display: flex;
115
- display: -webkit-box;
116
- display: -webkit-flex;
117
- display: -moz-box;
118
- display: -ms-flexbox;
119
- display: flex;
120
- margin-bottom: 0px;
 
 
 
121
  }
122
 
123
  .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me,
124
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
125
- -webkit-box-flex: 1;
126
- -webkit-flex: 1;
127
- -moz-box-flex: 1;
128
- -ms-flex: 1;
129
- flex: 1;
130
- font-family: inherit;
131
- font-size: 13px;
132
- }
133
-
134
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{
135
- margin-bottom: 0px;
136
- vertical-align: text-top;
137
- }
138
-
139
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,
140
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{
141
- vertical-align: middle;
142
- }
143
-
144
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
145
- text-align: left;
146
- margin-top: 0px;
147
- margin-bottom: 0px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
 
150
  /**
@@ -154,37 +189,71 @@
154
  */
155
 
156
  .wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay {
157
- font-size: 15px;
158
- }
159
-
160
- .wcf-embed-checkout-form .woocommerce form .form-row.mt20{
161
- margin-top: 20px ;
162
- }
163
-
164
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
165
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
166
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{
167
- border-width: 1px;
168
- border-color: #e2401c;
169
- }
170
-
171
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,
172
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,
173
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{
174
- border-width: 1px;
175
- /*border-color: #69bf29;*/
176
- }
177
-
178
- .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
179
- .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
180
- .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
181
- .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required{
182
- border-color: #e2401c;
183
- }
184
-
185
- .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{
186
- border-right-width: 2px;
187
- border-right-color: #69bf29;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
 
190
  /**
@@ -193,8 +262,8 @@
193
  * ************
194
  */
195
 
196
- .wcf-embed-checkout-form .wcf-checkout-header-image{
197
- text-align: center;
198
  }
199
 
200
  /**
@@ -203,93 +272,150 @@
203
  * ************************
204
  */
205
 
206
- .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
207
- .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label{
208
- padding: 0px;
209
- }
210
-
211
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]{
212
- -webkit-border-radius: 50%;
213
- border-radius: 50%;
214
- margin-left: 4px;
215
- line-height: 10px;
216
- }
217
-
218
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
219
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
220
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
221
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before{
222
- content: "\e600";
223
- margin: 0;
224
- color: #F16334;
225
- }
226
-
227
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"],
228
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],
229
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"],
230
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio],
231
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]{
232
- border: 1px solid #b4b9be;
233
- background: #fff;
234
- color: #555;
235
- clear: none;
236
- cursor: pointer;
237
- display: inline-block;
238
- line-height: 0;
239
- height: 16px;
240
- margin: -4px 0 0 4px;
241
- outline: 0;
242
- padding: 0!important;
243
- text-align: center;
244
- vertical-align: middle;
245
- width: 16px;
246
- min-width: 16px;
247
- -webkit-appearance: none;
248
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
249
- box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
250
- -webkit-transition: .05s border-color ease-in-out;
251
- transition: .05s border-color ease-in-out;
252
- }
253
-
254
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:focus,
255
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
256
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
257
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,
258
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus{
259
- border-color: #F16334;
260
- -webkit-box-shadow: 0 0 2px rgba(241, 99, 52,.8);
261
- box-shadow: 0 0 2px rgba(241, 99, 52,.8);
262
- }
263
-
264
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{
265
- background-color: #F16334;
266
- -webkit-border-radius: 50px;
267
- border-radius: 50px;
268
- content: "\2022";
269
- font-size: 24px;
270
- height: 6px;
271
- line-height: 16px;
272
- margin: 4px;
273
- text-indent: -9999px;
274
- width: 6px;
275
- }
276
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
277
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
278
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
279
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,
280
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before{
281
- display: inline-block;
282
- float: right;
283
- font: normal 15px/1 cartflows-icon;
284
- speak: none;
285
- vertical-align: middle;
286
- width: 6px;
287
- -webkit-font-smoothing: antialiased;
288
- -moz-osx-font-smoothing: grayscale;
289
- }
290
-
291
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{
292
- min-width: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
294
 
295
  /* Added for pro support */
@@ -302,279 +428,343 @@
302
  .wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,
303
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
304
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2 {
305
- float: none;
306
- width: 100%;
307
- max-width: 100%;
308
- padding: 0px;
309
- -webkit-border-radius: 0px;
310
- border-radius: 0px;
311
- border: none;
312
- border-color: none;
313
- margin-bottom: 0px;
314
  }
315
 
316
  .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
317
  .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
318
  .wcf-embed-checkout-form #order_review_heading,
319
  .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
320
- font-family: inherit;
321
- font-weight: 600;
322
- font-size: 20px;
323
- /*text-transform: capitalize;*/
324
- margin:0 0 25px 0;
325
- padding: 0px;
326
- width: 100%;
327
  }
328
 
329
  .wcf-embed-checkout-form .woocommerce-checkout #payment {
330
- background: unset;
331
- -webkit-border-radius: 0;
332
- border-radius: 0;
333
  }
334
 
335
  .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
336
- margin: 0;
337
- padding: 0;
338
- }
339
-
340
- .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{
341
- display: block;
342
- margin-bottom: 1.1em;
343
- }
344
-
345
- .wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
346
- float: none;
347
- margin-right: 10px;
348
- }
349
-
350
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{
351
- margin: 0 0 0.5em;
352
- }
353
-
354
- .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row
355
- .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{
356
- margin-bottom: 10px;
357
- }
358
-
359
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
360
- background-color: #eaeaea;
361
- font-family: inherit;
362
- font-weight:inherit;
363
- margin-bottom: 0.5em;
364
- }
365
-
366
- .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
367
- .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
368
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{
369
- content: '';
370
- display: block;
371
- border: 1em solid;
372
- border-left-color: transparent;
373
- border-right-color: transparent;
374
- border-top-color: transparent;
375
- border-bottom-color: #eaeaea;
376
- position: absolute;
377
- top: -.75em;
378
- right: 0;
379
- margin: -1em 2em 0 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  }
381
 
382
  /* Fields */
383
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
384
- display: block;
385
- width: 100%;
386
- min-height: 34px;
387
- height: auto;
388
- padding: 11px 12px;
389
- font-size: 14px;
390
- line-height: 1.42857143 !important;
391
- color: #555;
392
- background-color: #fff;
393
- background-image: none;
394
- border: 1px solid;
395
- border-color: #d4d4d4;
396
- -webkit-border-radius: 3px;
397
- border-radius: 3px;
398
- -webkit-box-shadow: none;
399
- box-shadow: none;
400
- outline: none;
401
- }
402
-
403
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
404
- color: #666;
405
- line-height: 19px;
406
- min-height: 19px;
407
- overflow: visible;
408
- padding-right: 0;
409
- }
410
-
411
- .wcf-embed-checkout-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
412
- font-size: 14px;
413
- }
414
-
415
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow {
416
- height: 100%;
417
- }
418
-
419
- .select2-dropdown{
420
- border: 1px solid #d4d4d4;
421
- }
422
-
423
- .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
 
 
 
 
 
 
 
 
 
424
  .wcf-embed-checkout-form .woocommerce form .form-row textarea,
425
  .wcf-embed-checkout-form .woocommerce form .form-row select,
426
- .wcf-embed-checkout-form .woocommerce #order_review .input-text{
427
- display: block;
428
- width: 100%;
429
- min-height: 34px;
430
- padding: 11px 12px;
431
- font-family: inherit;
432
- font-weight:inherit;
433
- font-size: 14px;
434
- line-height: 1.42857143 !important;
435
- color: #555;
436
- background-color: #fff;
437
- background-image: none;
438
- border: 1px solid;
439
- border-color: #d4d4d4;
440
- -webkit-border-radius: 3px;
441
- border-radius: 3px;
442
- -webkit-box-shadow: none;
443
- box-shadow: none;
444
- height: auto;
445
- }
446
-
447
- .wcf-embed-checkout-form #order_review{
448
- padding: 3px;
449
- width: 100%;
450
- }
451
-
452
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message,
453
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error{
454
- padding: 0em 2em 1.2em 2em;
455
- background-color: transparent;
456
- border: none;
457
- margin: 0px;
458
- width: 100%;
459
- }
460
-
461
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{
462
- list-style:none !important;
463
- margin: 0px;
464
- }
465
-
466
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before,
467
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{
468
- top: 0px;
469
- right: 0px;
470
- }
471
-
472
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{
473
- content: '\e016';
474
- }
475
-
476
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{
477
- margin: 0px 8px 0 0px;
478
- }
479
-
480
- .wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type="text"]{
481
- font-weight: normal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
  }
483
 
484
  .wcf-embed-checkout-form .wcf-custom-coupon-field {
485
- clear: right;
486
- -js-display: flex;
487
- display: -webkit-box;
488
- display: -webkit-flex;
489
- display: -moz-box;
490
- display: -ms-flexbox;
491
- display: flex;
492
- margin-bottom: 15px;
493
- margin-top: 25px;
494
- border-top: 1px solid #dcdcdc;
495
- border-bottom: 1px solid #dcdcdc;
496
- padding-top: 25px;
497
- padding-bottom: 25px;
498
- -webkit-flex-wrap: wrap;
499
- -ms-flex-wrap: wrap;
500
- flex-wrap: wrap;
501
  }
502
 
503
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
504
- width: 70%;
505
- display: inline-block;
506
- padding-left: 20px;
507
  }
508
 
509
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
510
- width: 30%;
511
  }
512
 
513
- .wcf-embed-checkout-form input[type="text"]:focus,
514
- .wcf-embed-checkout-form input[type="email"]:focus,
515
- .wcf-embed-checkout-form input[type="password"]:focus,
516
- .wcf-embed-checkout-form input[type="tel"]:focus,
517
- .wcf-embed-checkout-form textarea:focus,
518
  .wcf-embed-checkout-form .select2-container--open {
519
- border-color: #b3b3b3;
520
- -webkit-box-shadow: none;
521
- box-shadow: none;
522
- outline: none;
523
  }
524
 
525
  .wcf-embed-checkout-form button:focus {
526
- outline: none;
527
- outline-color: none;
528
- outline-style: none;
529
- outline-width: none;
530
  }
531
 
532
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
 
 
 
 
533
  .wcf-embed-checkout-form form.checkout_coupon .button {
534
- display: block;
535
- clear: both;
536
- border: none;
537
- font-size: 15px;
538
- font-family: inherit;
539
- font-weight: inherit;
540
- background-color: #F16334;
541
- line-height: 9px;
542
- padding: 18px;
543
- margin-bottom: 10px;
544
- width: 100%;
 
545
  }
546
 
547
  .wcf-embed-checkout-form .woocommerce #order_review button {
548
- border: 1px solid;
549
- border-color: #F16334;
550
- background-color: #F16334;
551
- font-family: inherit;
552
- font-weight:inherit;
553
- font-size: 18px;
554
- letter-spacing: 0.5px;
555
- width: 100%;
556
- padding: 16px 24px;
557
- font-size: 16px;
558
- line-height: 1.5;
559
- -webkit-border-radius: 3px;
560
- border-radius: 3px;
561
- color: #fff;
562
  }
563
 
564
  .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
565
- padding: 8px 6px;
566
- background-color: #c8c8c8;
567
- border: 1px #c8c8c8 solid;
568
  }
569
 
570
- .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
571
- border-color: #F16334;
572
- background-color: #F16334;
573
  }
574
  .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
575
- background-color: #F16334;
576
- border-color: #F16334;
577
- color: #fff;
578
  }
579
 
580
  /**
@@ -583,19 +773,19 @@
583
  * ***********************
584
  */
585
 
586
- .wcf-embed-checkout-form .woocommerce-checkout{
587
- display: inline-block;
588
- text-align: inherit;
589
- width: 100%;
590
  }
591
 
592
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
593
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{
594
- display: inline-block;
595
- width: 55%;
596
- float: right;
597
- padding-left: 40px;
598
- margin:20px 0 0;
599
  }
600
 
601
  /*Added for pro support */
@@ -603,331 +793,381 @@
603
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
604
  /*Added for pro support */
605
  .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
606
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{
607
- margin: 0 -7px;
608
- -ms-flex-wrap: wrap;
609
- flex-wrap: wrap;
610
- -js-display: flex;
611
- display: -webkit-box;
612
- display: -moz-box;
613
- display: -ms-flexbox;
614
- display: flex;
615
- display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
616
- flex-wrap: wrap;
617
- -webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
618
-
619
- }
620
-
621
- .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,
622
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
623
- margin: 0px -7px;
624
- }
625
-
626
- .wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{
627
- display: inline-block;
628
- float: none;
629
- width: 45%;
630
- border: none;
631
- background-color: inherit/*#F6F6F6*/;
632
- padding: 0 10px;
633
- -webkit-border-radius: 3px;
634
- border-radius: 3px;
635
- }
636
-
637
- .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
638
- display: inline-block;
639
- font-family: inherit;
640
- font-weight: 600;
641
- width: 100%;
642
- margin:20px 0 0;
643
- padding: 3px 3px 20px;
644
- border: none;
645
- border-bottom: none;
646
- }
647
-
648
- .wcf-embed-checkout-form .woocommerce-checkout #payment{
649
- background-color: inherit;
650
- border:none;
651
- /*border-top: 1px solid;*/
652
- -webkit-border-radius: 0px;
653
- border-radius: 0px;
654
- /*border-color: #dcdcdc;*/
655
- /*padding-top: 20px;*/
656
- }
657
-
658
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
659
- padding: 1em 0px;
660
- }
661
-
662
- .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
663
- .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
664
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
665
- border: none;
666
  }
667
 
668
- .wcf-embed-checkout-form #payment ul.payment_methods li,
669
- .wcf-embed-checkout-form #payment ul.payment_methods li:hover{
670
- background-color: transparent;
 
 
 
 
 
671
  }
672
 
673
- /*.wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
674
- clear: both;
675
- }*/
676
-
677
- .wcf-embed-checkout-form .woocommerce form .form-row{
678
- display: block;
679
- margin-bottom: 1.1em;
680
- padding: 3px 7px;
681
- position: relative;
682
  }
683
 
684
- .wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{
685
- padding: 0px;
 
 
686
  }
687
 
688
- .wcf-embed-checkout-form table.shop_table {
689
- border:none;
690
- border-bottom: 0;
691
- background-color: inherit;
692
- -webkit-border-radius: 0;
693
- border-radius: 0;
694
- font-family: inherit;
695
- font-weight:inherit;
696
- font-size: 0.95em;
697
- margin: 0 0 0px 0 !important;
698
- border-collapse: collapse;
699
- text-align: right;
700
  }
701
 
702
- .wcf-embed-checkout-form table.shop_table td strong.product-quantity{
703
- font-weight: normal;
704
- }
705
 
706
- .wcf-embed-checkout-form table.shop_table #shipping_method{
707
- margin: 0;
708
- padding: 0;
709
- list-style: none;
710
- }
711
- .wcf-embed-checkout-form table.shop_table #shipping_method .amount{
712
- font-weight: normal;
713
  }
714
- .wcf-embed-checkout-form table.shop_table th{
715
- border: none;
716
- font-weight: 400;
717
- padding: 9px 0px;
718
- line-height: 1.2em;
719
- }
720
- .wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
721
- font-size: 1em;
722
  }
723
 
724
- .wcf-embed-checkout-form table.shop_table td,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
725
  .wcf-embed-checkout-form table.shop_table th,
726
  .wcf-embed-checkout-form table.shop_table td dl dt,
727
  .wcf-embed-checkout-form table.shop_table td dl dd {
728
- background-color: transparent;
729
- border: none;
730
- padding: 0.6em 0;
731
- line-height: 1.4em;
732
  }
733
- .wcf-embed-checkout-form table.shop_table td dl dd p{
734
- margin-top: 0;
735
  }
736
 
737
- .wcf-embed-checkout-form table.shop_table tbody th,
738
- .wcf-embed-checkout-form table.shop_table tfoot td,
739
  .wcf-embed-checkout-form table.shop_table tfoot th {
740
- border: none;
741
- display: table-cell;
742
- font-weight: normal;
743
- width: 50%;
744
  }
745
- .wcf-embed-checkout-form table.shop_table thead{
746
- background-color: transparent;
747
  }
748
  .wcf-embed-checkout-form table.shop_table tbody {
749
- border-top: 1px dashed #cccccc;
750
- border-bottom: 1px dashed #cccccc;
751
  }
752
  .wcf-embed-checkout-form table.shop_table th.product-name,
753
- .wcf-embed-checkout-form table.shop_table th.product-total{
754
- font-weight: 600;
755
- }
756
- .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th,
757
- .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td {
758
- font-weight: 600;
759
- border-top: 1px dashed #cccccc;
 
 
 
 
 
 
 
 
760
  }
761
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
762
- padding-top: 1.8em;
763
- font-weight: 600;
764
  }
765
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
766
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
767
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
768
- vertical-align: top;
769
  }
770
 
771
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1),
772
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),
773
- .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1){
774
- width: 70%;
775
  }
776
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2),
777
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),
778
- .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2){
779
- width: 30%;
780
  }
781
 
782
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
783
- .wcf-embed-checkout-form .woocommerce-checkout .form-row label{
784
- font-size: 13px;
785
- line-height: 1em;
786
- letter-spacing: 0.3px;
787
- font-family: inherit;
788
- font-weight:inherit;
789
- /*text-transform: capitalize;*/
790
- margin-bottom: 8px;
 
 
 
 
791
  }
792
 
793
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,
794
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{
795
- display: inherit;
796
  }
797
 
798
- .wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
799
- line-height: 20px;
800
- text-transform: none;
 
 
 
801
  }
802
 
803
- .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
804
- font-family: inherit;
805
- font-weight:inherit;
806
- font-size: 11px;
807
- color: #777;
808
- margin-top: 0;
809
- text-align: justify;
810
  }
811
 
812
- .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{
813
- margin: 0;
814
  }
815
 
816
- .wcf-embed-checkout-form .woocommerce a{
817
- color: #F16334;
818
- background-color: transparent;
819
- text-decoration: none;
820
  }
821
 
822
  .wcf-embed-checkout-form .woocommerce .woocommerce-info,
823
- .wcf-embed-checkout-form .woocommerce .woocommerce-error,
824
  .wcf-embed-checkout-form .woocommerce .woocommerce-message,
825
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message,
826
- .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message{
827
- padding: 1em 2.0em 0.4em 2em;
828
- border-top:none;
829
- background-color: inherit;
830
- font-size: 14px;
831
- font-weight: 500;
832
- text-align: right;
833
- margin:0px;
 
 
 
 
 
 
834
  }
835
 
836
  .wcf-embed-checkout-form .woocommerce-info::before,
837
- .wcf-embed-checkout-form .woocommerce-message::before{
838
- right: 0.1em;
839
- color: #F16334;
840
  }
841
 
842
  .wcf-embed-checkout-form .woocommerce .woocommerce-error,
843
- .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
844
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
845
- background-color: #fff6f6;
846
- border: dashed 1px #a00;
847
- padding: 25px 25px 20px;
848
- color: #a00;
849
- margin: 1rem 0 1rem;
850
- font-size: 14px;
851
- width: 100%;
852
-
 
 
 
 
 
853
  }
854
 
855
  .wcf-embed-checkout-form .woocommerce .woocommerce-error::before {
856
- content: '';
857
  }
858
 
859
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
860
- display: inline;
 
 
 
 
861
  }
862
 
863
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
864
- margin:1em 0 1em;
 
 
 
865
  }
866
 
867
- .wcf-embed-checkout-form .woocommerce .woocommerce-error li{
868
- list-style: disc inside !important;
869
- margin: 0 0 8px;
870
  }
871
 
872
- .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{
873
- font-weight: 400;
874
  }
875
 
876
- .wcf-embed-checkout-form .woocommerce form.checkout_coupon{
877
- border: 1px solid #d3ced2;
878
- padding: 30px 20px 20px;
879
- margin: 2em 0;
880
- text-align: right;
881
- -webkit-border-radius: 5px;
882
- border-radius: 5px;
883
  }
884
 
885
- .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
886
- font-size: 14px;
887
  }
888
 
889
- .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
890
- font-family: inherit;
891
- font-weight: 500;
892
- margin-top: 0;
893
- margin-bottom: 10px;
894
  }
895
 
896
  @media only screen and (max-width: 768px) {
897
- .wcf-embed-checkout-form form .wcf-column-33{
898
- width: 100%;
899
- }
900
- .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
901
- width: 100%;
902
- }
903
- .wcf-embed-checkout-form .woocommerce-checkout #order_review{
904
- width: 100%;
905
- }
906
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{
907
- width: 100%;
908
- }
909
- .wcf-embed-checkout-form .woocommerce-checkout{
910
- display: block;
911
- }
912
-
913
- .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
914
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{
915
- display: block;
916
- width: 100%;
917
- padding-left: 0;
918
- margin: 20px 0 0;
919
- }
920
-
921
- .wcf-embed-checkout-form form.checkout_coupon .button{
922
- font-size: 12px;
923
- }
924
-
925
- .wcf-bump-order-field-wrap .wcf-bump-order-label{
926
- font-size: 16px;
927
- }
928
-
929
- /* Added for pro support */
930
- .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
931
  .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
932
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
933
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,
@@ -937,127 +1177,148 @@
937
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
938
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,
939
  .wcf-embed-checkout-form .woocommerce .wcf-order-wrap,
940
- .wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{
941
- padding: 15px 18px;
942
- }
943
-
944
- .wcf-embed-checkout-form .woocommerce form .form-row-first,
945
- .wcf-embed-checkout-form .woocommerce form .form-row-last,
946
- .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
947
- .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
948
- width: 100%;
949
- }
950
-
951
- /*.wcf-embed-checkout-form .woocommerce form .form-row-first,
952
  .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
953
  margin-right: 4%;
954
  }*/
955
 
956
- .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
957
- .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
958
- .wcf-embed-checkout-form #order_review_heading,
959
- .wcf-embed-checkout-form .woocommerce #ship-to-different-address{
960
- font-size: 1.0em;
961
- }
962
  }
963
 
964
-
965
  /**
966
  * **********************
967
  * Divi Css Overrite
968
  * **********************
969
  */
970
 
971
- #et-info-email:before,
972
- #et-info-phone:before,
973
- #et_search_icon:before,
974
- .comment-reply-link:after,
975
- .et-cart-info span:before,
976
- .et-pb-arrow-next:before,
977
- .et-pb-arrow-prev:before,
978
- .et-social-icon a:before,
979
- .et_audio_container .mejs-playpause-button button:before,
980
- .et_audio_container .mejs-volume-button button:before,
981
- .et_overlay:before,
982
- .et_password_protected_form .et_submit_button:after,
983
- .et_pb_button:after,
984
- .et_pb_contact_reset:after,
985
- .et_pb_contact_submit:after,
986
- .et_pb_font_icon:before,
987
- .et_pb_newsletter_button:after,
988
- .et_pb_pricing_table_button:after,
989
- .et_pb_promo_button:after,
990
- .et_pb_social_icon a.icon:before,
991
- .et_pb_testimonial:before,
992
- .et_pb_toggle_title:before,
993
- .form-submit .et_pb_button:after,
994
- .mobile_menu_bar:before,
995
- .woocommerce #content input.button.alt:after,
996
- .woocommerce #content input.button:after,
997
- .woocommerce #respond input#submit.alt:after,
998
- .woocommerce #respond input#submit:after,
999
- .woocommerce a.button.alt:after,
1000
- .woocommerce button.button.alt:after,
1001
- .woocommerce button.button:after,
1002
- .woocommerce button.single_add_to_cart_button.button:after,
1003
- .woocommerce input.button.alt:after,
1004
- .woocommerce input.button:after,
1005
- .woocommerce-page #content input.button.alt:after,
1006
- .woocommerce-page #content input.button:after,
1007
- .woocommerce-page #respond input#submit.alt:after,
1008
- .woocommerce-page #respond input#submit:after,
1009
- .woocommerce-page a.button.alt:after,
1010
- .woocommerce-page a.button:after,
1011
- .woocommerce-page button.button.alt:after,
1012
- .woocommerce-page button.button:after,
1013
- .woocommerce-page input.button.alt:after,
1014
- .woocommerce-page input.button:after,
1015
- a.et_pb_more_button:after{
1016
- text-shadow: 0 0;
1017
- font-family: none;
1018
- font-weight: 400;
1019
- font-style: normal;
1020
- font-variant: normal;
1021
- -webkit-font-smoothing: antialiased;
1022
- -moz-osx-font-smoothing: grayscale;
1023
- line-height: 1;
1024
- text-transform: none;
1025
- speak: none;
1026
- }
1027
-
1028
- .comment-reply-link:hover:after,
1029
- .woocommerce #content input.button.alt:hover:after,
1030
- .woocommerce #content input.button:hover:after,
1031
- .woocommerce #respond input#submit.alt:hover:after,
1032
- .woocommerce #respond input#submit:hover:after,
1033
- .woocommerce a.button.alt:hover:after,
1034
- .woocommerce a.button:hover:after,
1035
- .woocommerce button.button.alt:hover:after,
1036
- .woocommerce button.button:hover:after,
1037
- .woocommerce input.button.alt:hover:after,
1038
- .woocommerce input.button:hover:after,
1039
- .woocommerce-page #content input.button.alt:hover:after,
1040
- .woocommerce-page #content input.button:hover:after,
1041
- .woocommerce-page #respond input#submit.alt:hover:after,
1042
- .woocommerce-page #respond input#submit:hover:after,
1043
- .woocommerce-page a.button.alt:hover:after,
1044
- .woocommerce-page a.button:hover:after,
1045
- .woocommerce-page button.button.alt:hover:after,
1046
- .woocommerce-page button.button:hover:after,
1047
- .woocommerce-page input.button.alt:hover:after,
1048
- .woocommerce-page input.button:hover:after{
1049
- opacity: 0;
1050
  }
1051
 
1052
-
1053
  /**
1054
  * **************************
1055
  * Thrive Compatibility css
1056
  * **************************
1057
  */
1058
 
1059
- .thrv_wrapper .wcf-embed-checkout-form div{
1060
- -webkit-box-sizing: border-box;
1061
- -moz-box-sizing: border-box;
1062
- box-sizing: border-box;
1063
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******************
2
+ * Login & Coupon Field Layout
3
+ ****************/
 
 
 
4
  .cartflows-container .wcf-embed-checkout-form,
5
  .cartflows-container .wcf-embed-checkout-form * {
6
+ -webkit-box-sizing: border-box;
7
+ -moz-box-sizing: border-box;
8
+ box-sizing: border-box;
9
  }
10
 
11
  .wcf-embed-checkout-form .wc-backward {
12
+ display: none !important;
13
  }
14
 
15
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
16
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
17
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
18
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last {
19
+ width: 50%;
20
+ display: block;
21
  }
22
 
23
  .wcf-embed-checkout-form .woocommerce form .form-row-full,
24
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-full {
25
+ width: 100%;
26
+ clear: both;
27
  }
28
 
29
+ .wcf-embed-checkout-form form .form-row-wide {
30
+ width: 100%;
31
  }
32
 
33
+ .wcf-embed-checkout-form form .wcf-column-33 {
34
+ width: 33.33%;
35
  }
36
 
37
  /* To test divi and all */
38
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
39
+ .woocommerce-page form .form-row-first {
40
+ float: right;
41
+ clear: right;
42
  }
43
 
44
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
45
+ .woocommerce-page form .form-row-last {
46
+ float: left;
47
+ clear: left;
48
  }
49
 
50
+ .wcf-embed-checkout-form .woocommerce form .form-row .required {
51
+ color: red;
52
+ font-weight: 700;
53
+ border: 0 !important;
54
+ text-decoration: none;
55
  }
56
 
57
  /* #wcf-embed-checkout-form .woocommerce .product-name a.remove:hover{
58
  color:red !important;
59
  } */
60
 
61
+ .wcf-embed-checkout-form
62
+ .woocommerce
63
+ .woocommerce-checkout
64
+ .product-name
65
+ .remove {
66
+ font-family: "cartflows-icon";
67
+ display: inline-block;
68
+ font-size: 10px;
69
+ border: 1px #4d5763 solid;
70
+ -webkit-border-radius: 50%;
71
+ border-radius: 50%;
72
+ padding: 1px;
73
+ color: #4d5763 !important;
74
+ /* opacity: 0.6; */
75
+ line-height: 1;
76
+ margin-left: 5px;
77
+ text-align: center;
78
+ font-weight: 100;
79
+ width: 14px;
80
+ height: 14px;
81
+ background-color: #fff;
82
+ }
83
+
84
+ .wcf-embed-checkout-form
85
+ .woocommerce
86
+ .woocommerce-checkout
87
+ .product-name
88
+ .remove:hover {
89
+ color: #f1653c !important;
90
+ border: 1px #f1653c solid;
91
+ background-color: #fff;
92
  }
93
 
94
  /* To test divi and all */
95
 
96
+ .wcf-embed-checkout-form form .form-row-first.form-row-one {
97
+ clear: both;
98
  }
99
 
100
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login {
101
+ display: none;
102
  }
103
 
104
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row {
105
+ margin-bottom: 15px;
106
  }
107
 
108
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear {
109
+ clear: none;
110
  }
111
 
112
+ .wcf-embed-checkout-form
113
+ .woocommerce
114
+ form.woocommerce-form-login
115
+ .form-row
116
+ label {
117
+ margin: 0;
118
+ line-height: 1em;
119
+ padding-top: 0;
120
+ position: relative;
121
+ top: 0;
122
  }
123
 
124
+ .wcf-embed-checkout-form
125
+ .woocommerce
126
+ form.woocommerce-form-login
127
+ .login-form-actions {
128
+ -js-display: flex;
129
+ display: -webkit-box;
130
+ display: -webkit-flex;
131
+ display: -moz-box;
132
+ display: -ms-flexbox;
133
+ display: flex;
134
+ margin-bottom: 0px;
135
  }
136
 
137
  .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me,
138
+ .wcf-embed-checkout-form
139
+ .woocommerce
140
+ form.woocommerce-form-login
141
+ .lost_password {
142
+ -webkit-box-flex: 1;
143
+ -webkit-flex: 1;
144
+ -moz-box-flex: 1;
145
+ -ms-flex: 1;
146
+ flex: 1;
147
+ font-family: inherit;
148
+ font-size: 13px;
149
+ }
150
+
151
+ .wcf-embed-checkout-form
152
+ .woocommerce
153
+ form.woocommerce-form-login
154
+ .form-row
155
+ .remember_me
156
+ label {
157
+ margin-bottom: 0px;
158
+ vertical-align: text-top;
159
+ }
160
+
161
+ .wcf-embed-checkout-form
162
+ .woocommerce
163
+ form.woocommerce-form-login
164
+ .form-row
165
+ .remember_me
166
+ input,
167
+ .wcf-embed-checkout-form
168
+ .woocommerce
169
+ form.woocommerce-form-login
170
+ .form-row
171
+ .remember_me
172
+ span {
173
+ vertical-align: middle;
174
+ }
175
+
176
+ .wcf-embed-checkout-form
177
+ .woocommerce
178
+ form.woocommerce-form-login
179
+ .lost_password {
180
+ text-align: left;
181
+ margin-top: 0px;
182
+ margin-bottom: 0px;
183
  }
184
 
185
  /**
189
  */
190
 
191
  .wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay {
192
+ font-size: 15px;
193
+ }
194
+
195
+ .wcf-embed-checkout-form .woocommerce form .form-row.mt20 {
196
+ margin-top: 20px;
197
+ }
198
+
199
+ .wcf-embed-checkout-form
200
+ .woocommerce
201
+ form
202
+ .form-row.woocommerce-invalid
203
+ .select2-container,
204
+ .wcf-embed-checkout-form
205
+ .woocommerce
206
+ form
207
+ .form-row.woocommerce-invalid
208
+ input.input-text,
209
+ .wcf-embed-checkout-form
210
+ .woocommerce
211
+ form
212
+ .form-row.woocommerce-invalid
213
+ select {
214
+ border-width: 1px;
215
+ border-color: #e2401c;
216
+ }
217
+
218
+ .wcf-embed-checkout-form
219
+ .woocommerce
220
+ form
221
+ .form-row.woocommerce-validated
222
+ .select2-container,
223
+ .wcf-embed-checkout-form
224
+ .woocommerce
225
+ form
226
+ .form-row.woocommerce-validated
227
+ input.input-text,
228
+ .wcf-embed-checkout-form
229
+ .woocommerce
230
+ form
231
+ .form-row.woocommerce-validated
232
+ select {
233
+ border-width: 1px;
234
+ /*border-color: #69bf29;*/
235
+ }
236
+
237
+ .wcf-embed-checkout-form
238
+ .select2-container--default.field-required
239
+ .select2-selection--single,
240
+ .wcf-embed-checkout-form
241
+ .woocommerce
242
+ form
243
+ .form-row
244
+ input.input-text.field-required,
245
+ .wcf-embed-checkout-form
246
+ .woocommerce
247
+ form
248
+ .form-row
249
+ textarea.input-text.field-required,
250
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required {
251
+ border-color: #e2401c;
252
+ }
253
+
254
+ .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated {
255
+ border-right-width: 2px;
256
+ border-right-color: #69bf29;
257
  }
258
 
259
  /**
262
  * ************
263
  */
264
 
265
+ .wcf-embed-checkout-form .wcf-checkout-header-image {
266
+ text-align: center;
267
  }
268
 
269
  /**
272
  * ************************
273
  */
274
 
275
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label,
276
+ .wcf-embed-checkout-form
277
+ .woocommerce
278
+ #payment
279
+ [type="radio"]:not(:checked)
280
+ + label {
281
+ padding: 0px;
282
+ }
283
+
284
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"] {
285
+ -webkit-border-radius: 50%;
286
+ border-radius: 50%;
287
+ margin-left: 4px;
288
+ line-height: 10px;
289
+ }
290
+
291
+ .wcf-embed-checkout-form
292
+ .woocommerce
293
+ .woocommerce-billing-fields
294
+ [type="checkbox"]:checked:before,
295
+ .wcf-embed-checkout-form
296
+ .woocommerce
297
+ #payment
298
+ input[type="checkbox"]:checked:before,
299
+ .wcf-embed-checkout-form
300
+ .woocommerce
301
+ .woocommerce-shipping-fields
302
+ [type="checkbox"]:checked:before,
303
+ .wcf-embed-checkout-form
304
+ .woocommerce
305
+ .woocommerce-account-fields
306
+ input[type="checkbox"]:checked:before {
307
+ content: "\e600";
308
+ margin: 0;
309
+ color: #f16334;
310
+ }
311
+
312
+ .wcf-embed-checkout-form
313
+ .woocommerce
314
+ .woocommerce-billing-fields
315
+ [type="checkbox"],
316
+ .wcf-embed-checkout-form .woocommerce #payment input[type="checkbox"],
317
+ .wcf-embed-checkout-form
318
+ .woocommerce
319
+ .woocommerce-shipping-fields
320
+ [type="checkbox"],
321
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"],
322
+ .wcf-embed-checkout-form
323
+ .woocommerce
324
+ .woocommerce-account-fields
325
+ input[type="checkbox"] {
326
+ border: 1px solid #b4b9be;
327
+ background: #fff;
328
+ color: #555;
329
+ clear: none;
330
+ cursor: pointer;
331
+ display: inline-block;
332
+ line-height: 0;
333
+ height: 16px;
334
+ margin: -4px 0 0 4px;
335
+ outline: 0;
336
+ padding: 0 !important;
337
+ text-align: center;
338
+ vertical-align: middle;
339
+ width: 16px;
340
+ min-width: 16px;
341
+ -webkit-appearance: none;
342
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
343
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
344
+ -webkit-transition: 0.05s border-color ease-in-out;
345
+ transition: 0.05s border-color ease-in-out;
346
+ }
347
+
348
+ .wcf-embed-checkout-form
349
+ .woocommerce
350
+ .woocommerce-billing-fields
351
+ [type="checkbox"]:focus,
352
+ .wcf-embed-checkout-form .woocommerce #payment input[type="checkbox"]:focus,
353
+ .wcf-embed-checkout-form
354
+ .woocommerce
355
+ .woocommerce-shipping-fields
356
+ [type="checkbox"]:focus,
357
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"]:focus,
358
+ .wcf-embed-checkout-form
359
+ .woocommerce
360
+ .woocommerce-account-fields
361
+ input[type="checkbox"]:focus {
362
+ border-color: #f16334;
363
+ -webkit-box-shadow: 0 0 2px rgba(241, 99, 52, 0.8);
364
+ box-shadow: 0 0 2px rgba(241, 99, 52, 0.8);
365
+ }
366
+
367
+ .wcf-embed-checkout-form
368
+ .woocommerce
369
+ #payment
370
+ input[type="radio"]:checked:before {
371
+ background-color: #f16334;
372
+ -webkit-border-radius: 50px;
373
+ border-radius: 50px;
374
+ content: "\2022";
375
+ font-size: 24px;
376
+ height: 6px;
377
+ line-height: 16px;
378
+ margin: 4px;
379
+ text-indent: -9999px;
380
+ width: 6px;
381
+ }
382
+ .wcf-embed-checkout-form
383
+ .woocommerce
384
+ .woocommerce-billing-fields
385
+ [type="checkbox"]:checked:before,
386
+ .wcf-embed-checkout-form
387
+ .woocommerce
388
+ #payment
389
+ input[type="checkbox"]:checked:before,
390
+ .wcf-embed-checkout-form
391
+ .woocommerce
392
+ .woocommerce-shipping-fields
393
+ [type="checkbox"]:checked:before,
394
+ .wcf-embed-checkout-form
395
+ .woocommerce
396
+ #payment
397
+ input[type="radio"]:checked:before,
398
+ .wcf-embed-checkout-form
399
+ .woocommerce
400
+ .woocommerce-account-fields
401
+ input[type="checkbox"]:before {
402
+ display: inline-block;
403
+ float: right;
404
+ font: normal 15px/1 cartflows-icon;
405
+ speak: none;
406
+ vertical-align: middle;
407
+ width: 6px;
408
+ -webkit-font-smoothing: antialiased;
409
+ -moz-osx-font-smoothing: grayscale;
410
+ }
411
+
412
+ .wcf-embed-checkout-form
413
+ .woocommerce-checkout
414
+ #payment
415
+ ul.payment_methods
416
+ li
417
+ input[type="checkbox"] {
418
+ min-width: 16px;
419
  }
420
 
421
  /* Added for pro support */
428
  .wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,
429
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
430
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2 {
431
+ float: none;
432
+ width: 100%;
433
+ max-width: 100%;
434
+ padding: 0px;
435
+ -webkit-border-radius: 0px;
436
+ border-radius: 0px;
437
+ border: none;
438
+ border-color: none;
439
+ margin-bottom: 0px;
440
  }
441
 
442
  .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
443
  .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
444
  .wcf-embed-checkout-form #order_review_heading,
445
  .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
446
+ font-family: inherit;
447
+ font-weight: 600;
448
+ font-size: 20px;
449
+ /*text-transform: capitalize;*/
450
+ margin: 0 0 25px 0;
451
+ padding: 0px;
452
+ width: 100%;
453
  }
454
 
455
  .wcf-embed-checkout-form .woocommerce-checkout #payment {
456
+ background: unset;
457
+ -webkit-border-radius: 0;
458
+ border-radius: 0;
459
  }
460
 
461
  .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
462
+ margin: 0;
463
+ padding: 8px 0 0;
464
+ }
465
+
466
+ .wcf-embed-checkout-form
467
+ .woocommerce-checkout
468
+ #payment
469
+ .form-row
470
+ label.checkbox {
471
+ display: block;
472
+ margin-bottom: 1.1em;
473
+ }
474
+
475
+ .wcf-embed-checkout-form
476
+ .woocommerce-checkout
477
+ #payment
478
+ .payment_method_paypal
479
+ .about_paypal {
480
+ float: none;
481
+ margin-right: 10px;
482
+ }
483
+
484
+ .wcf-embed-checkout-form
485
+ .woocommerce-checkout
486
+ #payment
487
+ div.payment_box
488
+ .form-row {
489
+ margin: 0 0 0.5em;
490
+ }
491
+
492
+ .wcf-embed-checkout-form
493
+ .woocommerce-checkout
494
+ #payment
495
+ fieldset
496
+ .form-row
497
+ .wcf-embed-checkout-form
498
+ .woocommerce-checkout
499
+ #payment
500
+ fieldset
501
+ p {
502
+ margin-bottom: 10px;
503
+ }
504
+
505
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
506
+ background-color: #eaeaea;
507
+ font-family: inherit;
508
+ font-weight: inherit;
509
+ margin-bottom: 0.5em;
510
+ }
511
+
512
+ .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
513
+ .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
514
+ .wcf-embed-checkout-form
515
+ .woocommerce-checkout
516
+ #payment
517
+ div.payment_box::before {
518
+ content: "";
519
+ display: block;
520
+ border: 1em solid;
521
+ border-left-color: transparent;
522
+ border-right-color: transparent;
523
+ border-top-color: transparent;
524
+ border-bottom-color: #eaeaea;
525
+ position: absolute;
526
+ top: -0.75em;
527
+ right: 0;
528
+ margin: -1em 2em 0 0;
529
  }
530
 
531
  /* Fields */
532
+ .wcf-embed-checkout-form
533
+ .select2-container--default
534
+ .select2-selection--single {
535
+ display: block;
536
+ width: 100%;
537
+ min-height: 34px;
538
+ height: auto;
539
+ padding: 11px 12px;
540
+ font-size: 14px;
541
+ line-height: 1.42857143 !important;
542
+ color: #555;
543
+ background-color: #fff;
544
+ background-image: none;
545
+ border: 1px solid;
546
+ border-color: #d4d4d4;
547
+ -webkit-border-radius: 3px;
548
+ border-radius: 3px;
549
+ -webkit-box-shadow: none;
550
+ box-shadow: none;
551
+ outline: none;
552
+ }
553
+
554
+ .wcf-embed-checkout-form
555
+ .select2-container--default
556
+ .select2-selection--single
557
+ .select2-selection__rendered {
558
+ color: #666;
559
+ line-height: 19px;
560
+ min-height: 19px;
561
+ overflow: visible;
562
+ padding-right: 0;
563
+ }
564
+
565
+ .wcf-embed-checkout-form .select2-results__option[aria-selected],
566
+ .select2-results__option[data-selected] {
567
+ font-size: 14px;
568
+ }
569
+
570
+ .wcf-embed-checkout-form
571
+ .select2-container--default
572
+ .select2-selection--single
573
+ .select2-selection__arrow {
574
+ height: 100%;
575
+ }
576
+
577
+ .select2-dropdown {
578
+ border: 1px solid #d4d4d4;
579
+ }
580
+
581
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
582
  .wcf-embed-checkout-form .woocommerce form .form-row textarea,
583
  .wcf-embed-checkout-form .woocommerce form .form-row select,
584
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text {
585
+ display: block;
586
+ width: 100%;
587
+ min-height: 34px;
588
+ padding: 11px 12px;
589
+ font-family: inherit;
590
+ font-weight: inherit;
591
+ font-size: 14px;
592
+ line-height: 1.42857143 !important;
593
+ color: #555;
594
+ background-color: #fff;
595
+ background-image: none;
596
+ border: 1px solid;
597
+ border-color: #d4d4d4;
598
+ -webkit-border-radius: 3px;
599
+ border-radius: 3px;
600
+ -webkit-box-shadow: none;
601
+ box-shadow: none;
602
+ height: auto;
603
+ }
604
+
605
+ .wcf-embed-checkout-form #order_review {
606
+ padding: 3px;
607
+ width: 100%;
608
+ }
609
+
610
+ .wcf-embed-checkout-form
611
+ .woocommerce
612
+ .wcf-custom-coupon-field
613
+ .woocommerce-message,
614
+ .wcf-embed-checkout-form
615
+ .woocommerce
616
+ .wcf-custom-coupon-field
617
+ .woocommerce-error {
618
+ padding: 0em 2em 1.2em 2em;
619
+ background-color: transparent;
620
+ border: none;
621
+ margin: 0px;
622
+ width: 100%;
623
+ }
624
+
625
+ .wcf-embed-checkout-form
626
+ .woocommerce
627
+ .wcf-custom-coupon-field
628
+ .woocommerce-error
629
+ li {
630
+ list-style: none !important;
631
+ margin: 0px;
632
+ }
633
+
634
+ .wcf-embed-checkout-form
635
+ .woocommerce
636
+ .wcf-custom-coupon-field
637
+ .woocommerce-message::before,
638
+ .wcf-embed-checkout-form
639
+ .woocommerce
640
+ .wcf-custom-coupon-field
641
+ .woocommerce-error::before {
642
+ top: 0px;
643
+ right: 0px;
644
+ }
645
+
646
+ .wcf-embed-checkout-form
647
+ .woocommerce
648
+ .wcf-custom-coupon-field
649
+ .woocommerce-error::before {
650
+ content: "\e016";
651
+ }
652
+
653
+ .wcf-embed-checkout-form
654
+ .woocommerce
655
+ .wcf-custom-coupon-field
656
+ .woocommerce-error
657
+ li {
658
+ margin: 0px 8px 0 0px;
659
+ }
660
+
661
+ .wcf-embed-checkout-form
662
+ .woocommerce
663
+ #order_review
664
+ .wcf-custom-coupon-field
665
+ input[type="text"] {
666
+ font-weight: normal;
667
  }
668
 
669
  .wcf-embed-checkout-form .wcf-custom-coupon-field {
670
+ clear: right;
671
+ -js-display: flex;
672
+ display: -webkit-box;
673
+ display: -webkit-flex;
674
+ display: -moz-box;
675
+ display: -ms-flexbox;
676
+ display: flex;
677
+ margin-bottom: 15px;
678
+ margin-top: 25px;
679
+ border-top: 1px solid #dcdcdc;
680
+ border-bottom: 1px solid #dcdcdc;
681
+ padding-top: 25px;
682
+ padding-bottom: 25px;
683
+ -webkit-flex-wrap: wrap;
684
+ -ms-flex-wrap: wrap;
685
+ flex-wrap: wrap;
686
  }
687
 
688
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
689
+ width: 70%;
690
+ display: inline-block;
691
+ padding-left: 20px;
692
  }
693
 
694
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
695
+ width: 30%;
696
  }
697
 
698
+ .wcf-embed-checkout-form input[type="text"]:focus,
699
+ .wcf-embed-checkout-form input[type="email"]:focus,
700
+ .wcf-embed-checkout-form input[type="password"]:focus,
701
+ .wcf-embed-checkout-form input[type="tel"]:focus,
702
+ .wcf-embed-checkout-form textarea:focus,
703
  .wcf-embed-checkout-form .select2-container--open {
704
+ border-color: #b3b3b3;
705
+ -webkit-box-shadow: none;
706
+ box-shadow: none;
707
+ outline: none;
708
  }
709
 
710
  .wcf-embed-checkout-form button:focus {
711
+ outline: none;
712
+ outline-color: none;
713
+ outline-style: none;
714
+ outline-width: none;
715
  }
716
 
717
+ .wcf-embed-checkout-form
718
+ .woocommerce
719
+ form.woocommerce-form-login
720
+ .form-row
721
+ button,
722
  .wcf-embed-checkout-form form.checkout_coupon .button {
723
+ display: block;
724
+ clear: both;
725
+ border: none;
726
+ font-size: 15px;
727
+ font-family: inherit;
728
+ font-weight: inherit;
729
+ background-color: #f16334;
730
+ color: #ffffff;
731
+ line-height: 9px;
732
+ padding: 18px;
733
+ margin-bottom: 10px;
734
+ width: 100%;
735
  }
736
 
737
  .wcf-embed-checkout-form .woocommerce #order_review button {
738
+ border: 1px solid;
739
+ border-color: #f16334;
740
+ background-color: #f16334;
741
+ font-family: inherit;
742
+ font-weight: inherit;
743
+ font-size: 18px;
744
+ letter-spacing: 0.5px;
745
+ width: 100%;
746
+ padding: 16px 24px;
747
+ font-size: 16px;
748
+ line-height: 1.5;
749
+ -webkit-border-radius: 3px;
750
+ border-radius: 3px;
751
+ color: #fff;
752
  }
753
 
754
  .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
755
+ padding: 10px 6px;
756
+ /* background-color: #c8c8c8;
757
+ border: 1px #c8c8c8 solid; */
758
  }
759
 
760
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover {
761
+ border-color: #f16334;
762
+ background-color: #f16334;
763
  }
764
  .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
765
+ background-color: #f16334;
766
+ border-color: #f16334;
767
+ color: #fff;
768
  }
769
 
770
  /**
773
  * ***********************
774
  */
775
 
776
+ .wcf-embed-checkout-form .woocommerce-checkout {
777
+ display: inline-block;
778
+ text-align: inherit;
779
+ width: 100%;
780
  }
781
 
782
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
783
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set {
784
+ display: inline-block;
785
+ width: 55%;
786
+ float: right;
787
+ padding-left: 40px;
788
+ margin: 20px 0 0;
789
  }
790
 
791
  /*Added for pro support */
793
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
794
  /*Added for pro support */
795
  .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
796
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper {
797
+ margin: 0 -7px;
798
+ -ms-flex-wrap: wrap;
799
+ flex-wrap: wrap;
800
+ -js-display: flex;
801
+ display: -webkit-box;
802
+ display: -moz-box;
803
+ display: -ms-flexbox;
804
+ display: flex;
805
+ display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
806
+ flex-wrap: wrap;
807
+ -webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
808
+ }
809
+
810
+ .wcf-embed-checkout-form
811
+ .woocommerce-checkout
812
+ .col2-set
813
+ .woocommerce-additional-fields
814
+ .woocommerce-additional-fields__field-wrapper,
815
+ .wcf-embed-checkout-form
816
+ .woocommerce-checkout
817
+ .wcf-col2-set
818
+ .woocommerce-additional-fields
819
+ .woocommerce-additional-fields__field-wrapper {
820
+ margin: 0px -7px;
821
+ }
822
+
823
+ .wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap {
824
+ display: inline-block;
825
+ float: none;
826
+ width: 45%;
827
+ border: none;
828
+ background-color: inherit /*#F6F6F6*/;
829
+ padding: 0 10px;
830
+ -webkit-border-radius: 3px;
831
+ border-radius: 3px;
832
+ }
833
+
834
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading {
835
+ display: inline-block;
836
+ font-family: inherit;
837
+ font-weight: 600;
838
+ width: 100%;
839
+ margin: 20px 0 0;
840
+ padding: 3px 3px 20px;
841
+ border: none;
842
+ border-bottom: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  }
844
 
845
+ .wcf-embed-checkout-form .woocommerce-checkout #payment {
846
+ background-color: inherit;
847
+ border: none;
848
+ /*border-top: 1px solid;*/
849
+ -webkit-border-radius: 0px;
850
+ border-radius: 0px;
851
+ /*border-color: #dcdcdc;*/
852
+ /*padding-top: 20px;*/
853
  }
854
 
855
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
856
+ margin: 1em 0 0;
857
+ background-color: #f7f7f7;
858
+ padding: 15px;
 
 
 
 
 
859
  }
860
 
861
+ .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
862
+ .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
863
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
864
+ border: none;
865
  }
866
 
867
+ .wcf-embed-checkout-form #payment ul.payment_methods li,
868
+ .wcf-embed-checkout-form #payment ul.payment_methods li:hover {
869
+ background-color: transparent;
 
 
 
 
 
 
 
 
 
870
  }
871
 
872
+ /*.wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
873
+ clear: both;
874
+ }*/
875
 
876
+ .wcf-embed-checkout-form .woocommerce form .form-row {
877
+ display: block;
878
+ margin-bottom: 1.1em;
879
+ padding: 3px 7px;
880
+ position: relative;
 
 
881
  }
882
+
883
+ .wcf-embed-checkout-form
884
+ .woocommerce
885
+ form
886
+ .woocommerce-account-fields
887
+ .form-row {
888
+ padding: 0px;
 
889
  }
890
 
891
+ .wcf-embed-checkout-form table.shop_table {
892
+ border: none;
893
+ border-bottom: 0;
894
+ background-color: inherit;
895
+ -webkit-border-radius: 0;
896
+ border-radius: 0;
897
+ font-family: inherit;
898
+ font-weight: inherit;
899
+ font-size: 0.95em;
900
+ margin: 0 0 0px 0 !important;
901
+ border-collapse: collapse;
902
+ text-align: right;
903
+ }
904
+
905
+ .wcf-embed-checkout-form table.shop_table td strong.product-quantity {
906
+ font-weight: normal;
907
+ }
908
+
909
+ .wcf-embed-checkout-form table.shop_table #shipping_method {
910
+ margin: 0;
911
+ padding: 0;
912
+ list-style: none;
913
+ }
914
+ .wcf-embed-checkout-form table.shop_table #shipping_method .amount {
915
+ font-weight: normal;
916
+ }
917
+ .wcf-embed-checkout-form table.shop_table th {
918
+ border: none;
919
+ font-weight: 400;
920
+ padding: 9px 0px;
921
+ line-height: 1.2em;
922
+ }
923
+ .wcf-embed-checkout-form
924
+ table.shop_table
925
+ tfoot
926
+ tr:last-child
927
+ .woocommerce-Price-amount {
928
+ font-size: 1em;
929
+ }
930
+
931
+ .wcf-embed-checkout-form table.shop_table td,
932
  .wcf-embed-checkout-form table.shop_table th,
933
  .wcf-embed-checkout-form table.shop_table td dl dt,
934
  .wcf-embed-checkout-form table.shop_table td dl dd {
935
+ background-color: transparent;
936
+ border: none;
937
+ padding: 0.6em 0;
938
+ line-height: 1.4em;
939
  }
940
+ .wcf-embed-checkout-form table.shop_table td dl dd p {
941
+ margin-top: 0;
942
  }
943
 
944
+ .wcf-embed-checkout-form table.shop_table tbody th,
945
+ .wcf-embed-checkout-form table.shop_table tfoot td,
946
  .wcf-embed-checkout-form table.shop_table tfoot th {
947
+ border: none;
948
+ display: table-cell;
949
+ font-weight: normal;
950
+ width: 50%;
951
  }
952
+ .wcf-embed-checkout-form table.shop_table thead {
953
+ background-color: transparent;
954
  }
955
  .wcf-embed-checkout-form table.shop_table tbody {
956
+ border-top: 1px dashed #cccccc;
957
+ border-bottom: 1px dashed #cccccc;
958
  }
959
  .wcf-embed-checkout-form table.shop_table th.product-name,
960
+ .wcf-embed-checkout-form table.shop_table th.product-total {
961
+ font-weight: 600;
962
+ }
963
+ .wcf-embed-checkout-form
964
+ table.shop_table
965
+ tfoot
966
+ tr.order-total:not(.recurring-total)
967
+ th,
968
+ .wcf-embed-checkout-form
969
+ table.shop_table
970
+ tfoot
971
+ tr.order-total:not(.recurring-total)
972
+ td {
973
+ font-weight: 600;
974
+ border-top: 1px dashed #cccccc;
975
  }
976
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
977
+ padding-top: 1.8em;
978
+ font-weight: 600;
979
  }
980
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
981
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
982
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
983
+ vertical-align: top;
984
  }
985
 
986
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1),
987
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),
988
+ .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1) {
989
+ width: 70%;
990
  }
991
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2),
992
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),
993
+ .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2) {
994
+ width: 30%;
995
  }
996
 
997
+ .wcf-embed-checkout-form
998
+ .woocommerce
999
+ form.woocommerce-form-login
1000
+ .form-row
1001
+ label,
1002
+ .wcf-embed-checkout-form .woocommerce-checkout .form-row label {
1003
+ font-size: 13px;
1004
+ line-height: 1em;
1005
+ letter-spacing: 0.3px;
1006
+ font-family: inherit;
1007
+ font-weight: inherit;
1008
+ /*text-transform: capitalize;*/
1009
+ margin-bottom: 8px;
1010
  }
1011
 
1012
+ .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,
1013
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label {
1014
+ display: inherit;
1015
  }
1016
 
1017
+ .wcf-embed-checkout-form
1018
+ .woocommerce
1019
+ .woocommerce-terms-and-conditions-wrapper
1020
+ .woocommerce-terms-and-conditions-checkbox-text {
1021
+ line-height: 20px;
1022
+ text-transform: none;
1023
  }
1024
 
1025
+ .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p {
1026
+ font-family: inherit;
1027
+ font-weight: inherit;
1028
+ font-size: 11px;
1029
+ color: #777;
1030
+ margin-top: 0;
1031
+ text-align: justify;
1032
  }
1033
 
1034
+ .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p {
1035
+ margin: 0;
1036
  }
1037
 
1038
+ .wcf-embed-checkout-form .woocommerce a {
1039
+ color: #f16334;
1040
+ background-color: transparent;
1041
+ text-decoration: none;
1042
  }
1043
 
1044
  .wcf-embed-checkout-form .woocommerce .woocommerce-info,
1045
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error,
1046
  .wcf-embed-checkout-form .woocommerce .woocommerce-message,
1047
+ .wcf-embed-checkout-form
1048
+ .woocommerce
1049
+ .woocommerce-notices-wrapper
1050
+ .woocommerce-message,
1051
+ .wcf-embed-checkout-form
1052
+ .woocommerce
1053
+ .woocommerce-NoticeGroup
1054
+ .woocommerce-message {
1055
+ padding: 1em 2em 0.4em 2em;
1056
+ border-top: none;
1057
+ background-color: inherit;
1058
+ font-size: 14px;
1059
+ font-weight: 500;
1060
+ text-align: right;
1061
+ margin: 0px;
1062
  }
1063
 
1064
  .wcf-embed-checkout-form .woocommerce-info::before,
1065
+ .wcf-embed-checkout-form .woocommerce-message::before {
1066
+ right: 0.1em;
1067
+ color: #f16334;
1068
  }
1069
 
1070
  .wcf-embed-checkout-form .woocommerce .woocommerce-error,
1071
+ .wcf-embed-checkout-form
1072
+ .woocommerce
1073
+ .woocommerce-NoticeGroup
1074
+ .woocommerce-error,
1075
+ .wcf-embed-checkout-form
1076
+ .woocommerce
1077
+ .woocommerce-notices-wrapper
1078
+ .woocommerce-error {
1079
+ background-color: #fff6f6;
1080
+ border: dashed 1px #a00;
1081
+ padding: 25px 25px 20px;
1082
+ color: #a00;
1083
+ margin: 1rem 0 1rem;
1084
+ font-size: 14px;
1085
+ width: 100%;
1086
  }
1087
 
1088
  .wcf-embed-checkout-form .woocommerce .woocommerce-error::before {
1089
+ content: "";
1090
  }
1091
 
1092
+ .wcf-embed-checkout-form
1093
+ .woocommerce-checkout
1094
+ #payment
1095
+ ul.payment_methods
1096
+ li:not(.woocommerce-notice)::before {
1097
+ display: inline;
1098
  }
1099
 
1100
+ .wcf-embed-checkout-form
1101
+ .woocommerce
1102
+ .woocommerce-notices-wrapper
1103
+ .woocommerce-message {
1104
+ margin: 1em 0 1em;
1105
  }
1106
 
1107
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li {
1108
+ list-style: disc inside !important;
1109
+ margin: 0 0 8px;
1110
  }
1111
 
1112
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong {
1113
+ font-weight: 400;
1114
  }
1115
 
1116
+ .wcf-embed-checkout-form .woocommerce form.checkout_coupon {
1117
+ border: 1px solid #d3ced2;
1118
+ padding: 30px 20px 20px;
1119
+ margin: 2em 0;
1120
+ text-align: right;
1121
+ -webkit-border-radius: 5px;
1122
+ border-radius: 5px;
1123
  }
1124
 
1125
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p {
1126
+ font-size: 14px;
1127
  }
1128
 
1129
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p {
1130
+ font-family: inherit;
1131
+ font-weight: 500;
1132
+ margin-top: 0;
1133
+ margin-bottom: 10px;
1134
  }
1135
 
1136
  @media only screen and (max-width: 768px) {
1137
+ .wcf-embed-checkout-form form .wcf-column-33 {
1138
+ width: 100%;
1139
+ }
1140
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading {
1141
+ width: 100%;
1142
+ }
1143
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review {
1144
+ width: 100%;
1145
+ }
1146
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap {
1147
+ width: 100%;
1148
+ }
1149
+ .wcf-embed-checkout-form .woocommerce-checkout {
1150
+ display: block;
1151
+ }
1152
+
1153
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
1154
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set {
1155
+ display: block;
1156
+ width: 100%;
1157
+ padding-left: 0;
1158
+ margin: 20px 0 0;
1159
+ }
1160
+
1161
+ .wcf-embed-checkout-form form.checkout_coupon .button {
1162
+ font-size: 12px;
1163
+ }
1164
+
1165
+ .wcf-bump-order-field-wrap .wcf-bump-order-label {
1166
+ font-size: 16px;
1167
+ }
1168
+
1169
+ /* Added for pro support */
1170
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
1171
  .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
1172
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
1173
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,
1177
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
1178
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,
1179
  .wcf-embed-checkout-form .woocommerce .wcf-order-wrap,
1180
+ .wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap {
1181
+ padding: 15px 18px;
1182
+ }
1183
+
1184
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
1185
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
1186
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
1187
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last {
1188
+ width: 100%;
1189
+ }
1190
+
1191
+ /*.wcf-embed-checkout-form .woocommerce form .form-row-first,
1192
  .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
1193
  margin-right: 4%;
1194
  }*/
1195
 
1196
+ .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
1197
+ .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
1198
+ .wcf-embed-checkout-form #order_review_heading,
1199
+ .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
1200
+ font-size: 1em;
1201
+ }
1202
  }
1203
 
 
1204
  /**
1205
  * **********************
1206
  * Divi Css Overrite
1207
  * **********************
1208
  */
1209
 
1210
+ #et-info-email:before,
1211
+ #et-info-phone:before,
1212
+ #et_search_icon:before,
1213
+ .comment-reply-link:after,
1214
+ .et-cart-info span:before,
1215
+ .et-pb-arrow-next:before,
1216
+ .et-pb-arrow-prev:before,
1217
+ .et-social-icon a:before,
1218
+ .et_audio_container .mejs-playpause-button button:before,
1219
+ .et_audio_container .mejs-volume-button button:before,
1220
+ .et_overlay:before,
1221
+ .et_password_protected_form .et_submit_button:after,
1222
+ .et_pb_button:after,
1223
+ .et_pb_contact_reset:after,
1224
+ .et_pb_contact_submit:after,
1225
+ .et_pb_font_icon:before,
1226
+ .et_pb_newsletter_button:after,
1227
+ .et_pb_pricing_table_button:after,
1228
+ .et_pb_promo_button:after,
1229
+ .et_pb_social_icon a.icon:before,
1230
+ .et_pb_testimonial:before,
1231
+ .et_pb_toggle_title:before,
1232
+ .form-submit .et_pb_button:after,
1233
+ .mobile_menu_bar:before,
1234
+ .woocommerce #content input.button.alt:after,
1235
+ .woocommerce #content input.button:after,
1236
+ .woocommerce #respond input#submit.alt:after,
1237
+ .woocommerce #respond input#submit:after,
1238
+ .woocommerce a.button.alt:after,
1239
+ .woocommerce button.button.alt:after,
1240
+ .woocommerce button.button:after,
1241
+ .woocommerce button.single_add_to_cart_button.button:after,
1242
+ .woocommerce input.button.alt:after,
1243
+ .woocommerce input.button:after,
1244
+ .woocommerce-page #content input.button.alt:after,
1245
+ .woocommerce-page #content input.button:after,
1246
+ .woocommerce-page #respond input#submit.alt:after,
1247
+ .woocommerce-page #respond input#submit:after,
1248
+ .woocommerce-page a.button.alt:after,
1249
+ .woocommerce-page a.button:after,
1250
+ .woocommerce-page button.button.alt:after,
1251
+ .woocommerce-page button.button:after,
1252
+ .woocommerce-page input.button.alt:after,
1253
+ .woocommerce-page input.button:after,
1254
+ a.et_pb_more_button:after {
1255
+ text-shadow: 0 0;
1256
+ font-family: none;
1257
+ font-weight: 400;
1258
+ font-style: normal;
1259
+ font-variant: normal;
1260
+ -webkit-font-smoothing: antialiased;
1261
+ -moz-osx-font-smoothing: grayscale;
1262
+ line-height: 1;
1263
+ text-transform: none;
1264
+ speak: none;
1265
+ }
1266
+
1267
+ .comment-reply-link:hover:after,
1268
+ .woocommerce #content input.button.alt:hover:after,
1269
+ .woocommerce #content input.button:hover:after,
1270
+ .woocommerce #respond input#submit.alt:hover:after,
1271
+ .woocommerce #respond input#submit:hover:after,
1272
+ .woocommerce a.button.alt:hover:after,
1273
+ .woocommerce a.button:hover:after,
1274
+ .woocommerce button.button.alt:hover:after,
1275
+ .woocommerce button.button:hover:after,
1276
+ .woocommerce input.button.alt:hover:after,
1277
+ .woocommerce input.button:hover:after,
1278
+ .woocommerce-page #content input.button.alt:hover:after,
1279
+ .woocommerce-page #content input.button:hover:after,
1280
+ .woocommerce-page #respond input#submit.alt:hover:after,
1281
+ .woocommerce-page #respond input#submit:hover:after,
1282
+ .woocommerce-page a.button.alt:hover:after,
1283
+ .woocommerce-page a.button:hover:after,
1284
+ .woocommerce-page button.button.alt:hover:after,
1285
+ .woocommerce-page button.button:hover:after,
1286
+ .woocommerce-page input.button.alt:hover:after,
1287
+ .woocommerce-page input.button:hover:after {
1288
+ opacity: 0;
1289
  }
1290
 
 
1291
  /**
1292
  * **************************
1293
  * Thrive Compatibility css
1294
  * **************************
1295
  */
1296
 
1297
+ .thrv_wrapper .wcf-embed-checkout-form div {
1298
+ -webkit-box-sizing: border-box;
1299
+ -moz-box-sizing: border-box;
1300
+ box-sizing: border-box;
1301
+ }
1302
+
1303
+ /**
1304
+ * **************************************************************
1305
+ * Remove Product variaton CSS after few updates of CartFlows Pro
1306
+ * **************************************************************
1307
+ */
1308
+
1309
+ .wcf-embed-checkout-form-two-column
1310
+ .woocommerce
1311
+ .wcf-product-option-wrap.wcf-product-option-before-order {
1312
+ width: 45%;
1313
+ }
1314
+
1315
+ .wcf-embed-checkout-form-two-step
1316
+ .woocommerce.step-one
1317
+ .wcf-product-option-wrap.wcf-product-option-before-order {
1318
+ display: none;
1319
+ }
1320
+
1321
+ /**
1322
+ * **************************************************************
1323
+ * Remove Product variaton CSS after few updates of CartFlows Pro
1324
+ * **************************************************************/
assets/css/checkout-template.css CHANGED
@@ -1,150 +1,185 @@
1
- /**
2
- * **************
3
- * Login & Coupon Field Layout
4
- * **************
5
- */
6
-
7
  .cartflows-container .wcf-embed-checkout-form,
8
  .cartflows-container .wcf-embed-checkout-form * {
9
- -webkit-box-sizing: border-box;
10
- -moz-box-sizing: border-box;
11
- box-sizing: border-box;
12
  }
13
 
14
  .wcf-embed-checkout-form .wc-backward {
15
- display: none !important;
16
  }
17
 
18
- .wcf-embed-checkout-form .woocommerce form .form-row-first,
19
- .wcf-embed-checkout-form .woocommerce form .form-row-last,
20
- .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
21
- .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
22
- width: 50%;
23
- display: block;
24
  }
25
 
26
  .wcf-embed-checkout-form .woocommerce form .form-row-full,
27
- .wcf-embed-checkout-form .woocommerce-page form .form-row-full{
28
- width: 100%;
29
- clear: both;
30
  }
31
 
32
- .wcf-embed-checkout-form form .form-row-wide{
33
- width: 100%;
34
  }
35
 
36
- .wcf-embed-checkout-form form .wcf-column-33{
37
- width: 33.33%;
38
  }
39
 
40
  /* To test divi and all */
41
- .wcf-embed-checkout-form .woocommerce form .form-row-first, .woocommerce-page form .form-row-first{
42
- float: left;
43
- clear: left;
 
44
  }
45
 
46
- .wcf-embed-checkout-form .woocommerce form .form-row-last, .woocommerce-page form .form-row-last{
47
- float: right;
48
- clear: right;
 
49
  }
50
 
51
- .wcf-embed-checkout-form .woocommerce form .form-row .required{
52
- color: red;
53
- font-weight: 700;
54
- border: 0!important;
55
- text-decoration: none;
56
  }
57
 
58
  /* #wcf-embed-checkout-form .woocommerce .product-name a.remove:hover{
59
  color:red !important;
60
  } */
61
 
62
- .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{
63
- font-family: 'cartflows-icon';
64
- display: inline-block;
65
- font-size: 10px;
66
- border: 1px #4d5763 solid;
67
- -webkit-border-radius: 50%;
68
- border-radius: 50%;
69
- padding: 1px;
70
- color: #4d5763 !important;
71
- /* opacity: 0.6; */
72
- line-height: 1;
73
- margin-right: 5px;
74
- text-align: center;
75
- font-weight: 100;
76
- width: 14px;
77
- height: 14px;
78
- background-color: #fff;
79
- }
80
-
81
- .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{
82
- color: #f1653c !important;
83
- border: 1px #f1653c solid;
84
- background-color: #fff;
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /* To test divi and all */
88
 
89
- .wcf-embed-checkout-form form .form-row-first.form-row-one{
90
- clear: both;
91
  }
92
 
93
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{
94
- display: none;
95
  }
96
 
97
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{
98
- margin-bottom: 15px;
99
  }
100
 
101
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{
102
- clear: none;
103
  }
104
 
105
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{
106
- margin: 0;
107
- line-height: 1em;
108
- padding-top: 0;
109
- position: relative;
110
- top: 0;
 
 
 
 
111
  }
112
 
113
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{
114
- -js-display: flex;
115
- display: -webkit-box;
116
- display: -webkit-flex;
117
- display: -moz-box;
118
- display: -ms-flexbox;
119
- display: flex;
120
- margin-bottom: 0px;
 
 
 
121
  }
122
 
123
  .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me,
124
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
125
- -webkit-box-flex: 1;
126
- -webkit-flex: 1;
127
- -moz-box-flex: 1;
128
- -ms-flex: 1;
129
- flex: 1;
130
- font-family: inherit;
131
- font-size: 13px;
132
- }
133
-
134
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{
135
- margin-bottom: 0px;
136
- vertical-align: text-top;
137
- }
138
-
139
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,
140
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{
141
- vertical-align: middle;
142
- }
143
-
144
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{
145
- text-align: right;
146
- margin-top: 0px;
147
- margin-bottom: 0px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
 
150
  /**
@@ -154,37 +189,71 @@
154
  */
155
 
156
  .wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay {
157
- font-size: 15px;
158
- }
159
-
160
- .wcf-embed-checkout-form .woocommerce form .form-row.mt20{
161
- margin-top: 20px ;
162
- }
163
-
164
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
165
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
166
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{
167
- border-width: 1px;
168
- border-color: #e2401c;
169
- }
170
-
171
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,
172
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,
173
- .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{
174
- border-width: 1px;
175
- /*border-color: #69bf29;*/
176
- }
177
-
178
- .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
179
- .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
180
- .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
181
- .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required{
182
- border-color: #e2401c;
183
- }
184
-
185
- .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{
186
- border-left-width: 2px;
187
- border-left-color: #69bf29;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
 
190
  /**
@@ -193,8 +262,8 @@
193
  * ************
194
  */
195
 
196
- .wcf-embed-checkout-form .wcf-checkout-header-image{
197
- text-align: center;
198
  }
199
 
200
  /**
@@ -203,93 +272,150 @@
203
  * ************************
204
  */
205
 
206
- .wcf-embed-checkout-form .woocommerce #payment [type='radio']:checked + label,
207
- .wcf-embed-checkout-form .woocommerce #payment [type='radio']:not(:checked) + label{
208
- padding: 0px;
209
- }
210
-
211
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]{
212
- -webkit-border-radius: 50%;
213
- border-radius: 50%;
214
- margin-right: 4px;
215
- line-height: 10px;
216
- }
217
-
218
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
219
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
220
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
221
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before{
222
- content: "\e600";
223
- margin: 0;
224
- color: #F16334;
225
- }
226
-
227
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"],
228
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],
229
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"],
230
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio],
231
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]{
232
- border: 1px solid #b4b9be;
233
- background: #fff;
234
- color: #555;
235
- clear: none;
236
- cursor: pointer;
237
- display: inline-block;
238
- line-height: 0;
239
- height: 16px;
240
- margin: -4px 4px 0 0;
241
- outline: 0;
242
- padding: 0!important;
243
- text-align: center;
244
- vertical-align: middle;
245
- width: 16px;
246
- min-width: 16px;
247
- -webkit-appearance: none;
248
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
249
- box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
250
- -webkit-transition: .05s border-color ease-in-out;
251
- transition: .05s border-color ease-in-out;
252
- }
253
-
254
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:focus,
255
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
256
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
257
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,
258
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus{
259
- border-color: #F16334;
260
- -webkit-box-shadow: 0 0 2px rgba(241, 99, 52,.8);
261
- box-shadow: 0 0 2px rgba(241, 99, 52,.8);
262
- }
263
-
264
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{
265
- background-color: #F16334;
266
- -webkit-border-radius: 50px;
267
- border-radius: 50px;
268
- content: "\2022";
269
- font-size: 24px;
270
- height: 6px;
271
- line-height: 16px;
272
- margin: 4px;
273
- text-indent: -9999px;
274
- width: 6px;
275
- }
276
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type="checkbox"]:checked:before,
277
- .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
278
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
279
- .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,
280
- .wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before{
281
- display: inline-block;
282
- float: left;
283
- font: normal 15px/1 cartflows-icon;
284
- speak: none;
285
- vertical-align: middle;
286
- width: 6px;
287
- -webkit-font-smoothing: antialiased;
288
- -moz-osx-font-smoothing: grayscale;
289
- }
290
-
291
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{
292
- min-width: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
294
 
295
  /* Added for pro support */
@@ -302,279 +428,343 @@
302
  .wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,
303
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
304
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2 {
305
- float: none;
306
- width: 100%;
307
- max-width: 100%;
308
- padding: 0px;
309
- -webkit-border-radius: 0px;
310
- border-radius: 0px;
311
- border: none;
312
- border-color: none;
313
- margin-bottom: 0px;
314
  }
315
 
316
  .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
317
  .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
318
  .wcf-embed-checkout-form #order_review_heading,
319
  .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
320
- font-family: inherit;
321
- font-weight: 600;
322
- font-size: 20px;
323
- /*text-transform: capitalize;*/
324
- margin:0 0 25px 0;
325
- padding: 0px;
326
- width: 100%;
327
  }
328
 
329
  .wcf-embed-checkout-form .woocommerce-checkout #payment {
330
- background: unset;
331
- -webkit-border-radius: 0;
332
- border-radius: 0;
333
  }
334
 
335
  .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
336
- margin: 0;
337
- padding: 0;
338
- }
339
-
340
- .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{
341
- display: block;
342
- margin-bottom: 1.1em;
343
- }
344
-
345
- .wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{
346
- float: none;
347
- margin-left: 10px;
348
- }
349
-
350
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{
351
- margin: 0 0 0.5em;
352
- }
353
-
354
- .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row
355
- .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{
356
- margin-bottom: 10px;
357
- }
358
-
359
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{
360
- background-color: #eaeaea;
361
- font-family: inherit;
362
- font-weight:inherit;
363
- margin-bottom: 0.5em;
364
- }
365
-
366
- .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
367
- .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
368
- .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{
369
- content: '';
370
- display: block;
371
- border: 1em solid;
372
- border-right-color: transparent;
373
- border-left-color: transparent;
374
- border-top-color: transparent;
375
- border-bottom-color: #eaeaea;
376
- position: absolute;
377
- top: -.75em;
378
- left: 0;
379
- margin: -1em 0 0 2em;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  }
381
 
382
  /* Fields */
383
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
384
- display: block;
385
- width: 100%;
386
- min-height: 34px;
387
- height: auto;
388
- padding: 11px 12px;
389
- font-size: 14px;
390
- line-height: 1.42857143 !important;
391
- color: #555;
392
- background-color: #fff;
393
- background-image: none;
394
- border: 1px solid;
395
- border-color: #d4d4d4;
396
- -webkit-border-radius: 3px;
397
- border-radius: 3px;
398
- -webkit-box-shadow: none;
399
- box-shadow: none;
400
- outline: none;
401
- }
402
-
403
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
404
- color: #666;
405
- line-height: 19px;
406
- min-height: 19px;
407
- overflow: visible;
408
- padding-left: 0;
409
- }
410
-
411
- .wcf-embed-checkout-form .select2-results__option[aria-selected], .select2-results__option[data-selected]{
412
- font-size: 14px;
413
- }
414
-
415
- .wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow {
416
- height: 100%;
417
- }
418
-
419
- .select2-dropdown{
420
- border: 1px solid #d4d4d4;
421
- }
422
-
423
- .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
 
 
 
 
 
 
 
 
 
424
  .wcf-embed-checkout-form .woocommerce form .form-row textarea,
425
  .wcf-embed-checkout-form .woocommerce form .form-row select,
426
- .wcf-embed-checkout-form .woocommerce #order_review .input-text{
427
- display: block;
428
- width: 100%;
429
- min-height: 34px;
430
- padding: 11px 12px;
431
- font-family: inherit;
432
- font-weight:inherit;
433
- font-size: 14px;
434
- line-height: 1.42857143 !important;
435
- color: #555;
436
- background-color: #fff;
437
- background-image: none;
438
- border: 1px solid;
439
- border-color: #d4d4d4;
440
- -webkit-border-radius: 3px;
441
- border-radius: 3px;
442
- -webkit-box-shadow: none;
443
- box-shadow: none;
444
- height: auto;
445
- }
446
-
447
- .wcf-embed-checkout-form #order_review{
448
- padding: 3px;
449
- width: 100%;
450
- }
451
-
452
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message,
453
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error{
454
- padding: 0em 2em 1.2em 2em;
455
- background-color: transparent;
456
- border: none;
457
- margin: 0px;
458
- width: 100%;
459
- }
460
-
461
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{
462
- list-style:none !important;
463
- margin: 0px;
464
- }
465
-
466
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before,
467
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{
468
- top: 0px;
469
- left: 0px;
470
- }
471
-
472
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{
473
- content: '\e016';
474
- }
475
-
476
- .wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{
477
- margin: 0px 0px 0 8px;
478
- }
479
-
480
- .wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type="text"]{
481
- font-weight: normal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
  }
483
 
484
  .wcf-embed-checkout-form .wcf-custom-coupon-field {
485
- clear: left;
486
- -js-display: flex;
487
- display: -webkit-box;
488
- display: -webkit-flex;
489
- display: -moz-box;
490
- display: -ms-flexbox;
491
- display: flex;
492
- margin-bottom: 15px;
493
- margin-top: 25px;
494
- border-top: 1px solid #dcdcdc;
495
- border-bottom: 1px solid #dcdcdc;
496
- padding-top: 25px;
497
- padding-bottom: 25px;
498
- -webkit-flex-wrap: wrap;
499
- -ms-flex-wrap: wrap;
500
- flex-wrap: wrap;
501
  }
502
 
503
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
504
- width: 70%;
505
- display: inline-block;
506
- padding-right: 20px;
507
  }
508
 
509
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
510
- width: 30%;
511
  }
512
 
513
- .wcf-embed-checkout-form input[type="text"]:focus,
514
- .wcf-embed-checkout-form input[type="email"]:focus,
515
- .wcf-embed-checkout-form input[type="password"]:focus,
516
- .wcf-embed-checkout-form input[type="tel"]:focus,
517
- .wcf-embed-checkout-form textarea:focus,
518
  .wcf-embed-checkout-form .select2-container--open {
519
- border-color: #b3b3b3;
520
- -webkit-box-shadow: none;
521
- box-shadow: none;
522
- outline: none;
523
  }
524
 
525
  .wcf-embed-checkout-form button:focus {
526
- outline: none;
527
- outline-color: none;
528
- outline-style: none;
529
- outline-width: none;
530
  }
531
 
532
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
 
 
 
 
533
  .wcf-embed-checkout-form form.checkout_coupon .button {
534
- display: block;
535
- clear: both;
536
- border: none;
537
- font-size: 15px;
538
- font-family: inherit;
539
- font-weight: inherit;
540
- background-color: #F16334;
541
- line-height: 9px;
542
- padding: 18px;
543
- margin-bottom: 10px;
544
- width: 100%;
 
545
  }
546
 
547
  .wcf-embed-checkout-form .woocommerce #order_review button {
548
- border: 1px solid;
549
- border-color: #F16334;
550
- background-color: #F16334;
551
- font-family: inherit;
552
- font-weight:inherit;
553
- font-size: 18px;
554
- letter-spacing: 0.5px;
555
- width: 100%;
556
- padding: 16px 24px;
557
- font-size: 16px;
558
- line-height: 1.5;
559
- -webkit-border-radius: 3px;
560
- border-radius: 3px;
561
- color: #fff;
562
  }
563
 
564
  .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
565
- padding: 8px 6px;
566
- background-color: #c8c8c8;
567
- border: 1px #c8c8c8 solid;
568
  }
569
 
570
- .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{
571
- border-color: #F16334;
572
- background-color: #F16334;
573
  }
574
  .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
575
- background-color: #F16334;
576
- border-color: #F16334;
577
- color: #fff;
578
  }
579
 
580
  /**
@@ -583,19 +773,19 @@
583
  * ***********************
584
  */
585
 
586
- .wcf-embed-checkout-form .woocommerce-checkout{
587
- display: inline-block;
588
- text-align: inherit;
589
- width: 100%;
590
  }
591
 
592
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
593
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{
594
- display: inline-block;
595
- width: 55%;
596
- float: left;
597
- padding-right: 40px;
598
- margin:20px 0 0;
599
  }
600
 
601
  /*Added for pro support */
@@ -603,331 +793,381 @@
603
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
604
  /*Added for pro support */
605
  .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
606
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{
607
- margin: 0 -7px;
608
- -ms-flex-wrap: wrap;
609
- flex-wrap: wrap;
610
- -js-display: flex;
611
- display: -webkit-box;
612
- display: -moz-box;
613
- display: -ms-flexbox;
614
- display: flex;
615
- display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
616
- flex-wrap: wrap;
617
- -webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
618
-
619
- }
620
-
621
- .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,
622
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{
623
- margin: 0px -7px;
624
- }
625
-
626
- .wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{
627
- display: inline-block;
628
- float: none;
629
- width: 45%;
630
- border: none;
631
- background-color: inherit/*#F6F6F6*/;
632
- padding: 0 10px;
633
- -webkit-border-radius: 3px;
634
- border-radius: 3px;
635
- }
636
-
637
- .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
638
- display: inline-block;
639
- font-family: inherit;
640
- font-weight: 600;
641
- width: 100%;
642
- margin:20px 0 0;
643
- padding: 3px 3px 20px;
644
- border: none;
645
- border-bottom: none;
646
- }
647
-
648
- .wcf-embed-checkout-form .woocommerce-checkout #payment{
649
- background-color: inherit;
650
- border:none;
651
- /*border-top: 1px solid;*/
652
- -webkit-border-radius: 0px;
653
- border-radius: 0px;
654
- /*border-color: #dcdcdc;*/
655
- /*padding-top: 20px;*/
656
- }
657
-
658
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
659
- padding: 1em 0px;
660
- }
661
-
662
- .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
663
- .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
664
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{
665
- border: none;
666
  }
667
 
668
- .wcf-embed-checkout-form #payment ul.payment_methods li,
669
- .wcf-embed-checkout-form #payment ul.payment_methods li:hover{
670
- background-color: transparent;
 
 
 
 
 
671
  }
672
 
673
- /*.wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
674
- clear: both;
675
- }*/
676
-
677
- .wcf-embed-checkout-form .woocommerce form .form-row{
678
- display: block;
679
- margin-bottom: 1.1em;
680
- padding: 3px 7px;
681
- position: relative;
682
  }
683
 
684
- .wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{
685
- padding: 0px;
 
 
686
  }
687
 
688
- .wcf-embed-checkout-form table.shop_table {
689
- border:none;
690
- border-bottom: 0;
691
- background-color: inherit;
692
- -webkit-border-radius: 0;
693
- border-radius: 0;
694
- font-family: inherit;
695
- font-weight:inherit;
696
- font-size: 0.95em;
697
- margin: 0 0 0px 0 !important;
698
- border-collapse: collapse;
699
- text-align: left;
700
  }
701
 
702
- .wcf-embed-checkout-form table.shop_table td strong.product-quantity{
703
- font-weight: normal;
704
- }
705
 
706
- .wcf-embed-checkout-form table.shop_table #shipping_method{
707
- margin: 0;
708
- padding: 0;
709
- list-style: none;
710
- }
711
- .wcf-embed-checkout-form table.shop_table #shipping_method .amount{
712
- font-weight: normal;
713
  }
714
- .wcf-embed-checkout-form table.shop_table th{
715
- border: none;
716
- font-weight: 400;
717
- padding: 9px 0px;
718
- line-height: 1.2em;
719
- }
720
- .wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount {
721
- font-size: 1em;
722
  }
723
 
724
- .wcf-embed-checkout-form table.shop_table td,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
725
  .wcf-embed-checkout-form table.shop_table th,
726
  .wcf-embed-checkout-form table.shop_table td dl dt,
727
  .wcf-embed-checkout-form table.shop_table td dl dd {
728
- background-color: transparent;
729
- border: none;
730
- padding: 0.6em 0;
731
- line-height: 1.4em;
732
  }
733
- .wcf-embed-checkout-form table.shop_table td dl dd p{
734
- margin-top: 0;
735
  }
736
 
737
- .wcf-embed-checkout-form table.shop_table tbody th,
738
- .wcf-embed-checkout-form table.shop_table tfoot td,
739
  .wcf-embed-checkout-form table.shop_table tfoot th {
740
- border: none;
741
- display: table-cell;
742
- font-weight: normal;
743
- width: 50%;
744
  }
745
- .wcf-embed-checkout-form table.shop_table thead{
746
- background-color: transparent;
747
  }
748
  .wcf-embed-checkout-form table.shop_table tbody {
749
- border-top: 1px dashed #cccccc;
750
- border-bottom: 1px dashed #cccccc;
751
  }
752
  .wcf-embed-checkout-form table.shop_table th.product-name,
753
- .wcf-embed-checkout-form table.shop_table th.product-total{
754
- font-weight: 600;
755
- }
756
- .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th,
757
- .wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td {
758
- font-weight: 600;
759
- border-top: 1px dashed #cccccc;
 
 
 
 
 
 
 
 
760
  }
761
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
762
- padding-top: 1.8em;
763
- font-weight: 600;
764
  }
765
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
766
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
767
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
768
- vertical-align: top;
769
  }
770
 
771
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1),
772
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),
773
- .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1){
774
- width: 70%;
775
  }
776
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2),
777
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),
778
- .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2){
779
- width: 30%;
780
  }
781
 
782
- .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,
783
- .wcf-embed-checkout-form .woocommerce-checkout .form-row label{
784
- font-size: 13px;
785
- line-height: 1em;
786
- letter-spacing: 0.3px;
787
- font-family: inherit;
788
- font-weight:inherit;
789
- /*text-transform: capitalize;*/
790
- margin-bottom: 8px;
 
 
 
 
791
  }
792
 
793
- .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,
794
- .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{
795
- display: inherit;
796
  }
797
 
798
- .wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{
799
- line-height: 20px;
800
- text-transform: none;
 
 
 
801
  }
802
 
803
- .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{
804
- font-family: inherit;
805
- font-weight:inherit;
806
- font-size: 11px;
807
- color: #777;
808
- margin-top: 0;
809
- text-align: justify;
810
  }
811
 
812
- .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{
813
- margin: 0;
814
  }
815
 
816
- .wcf-embed-checkout-form .woocommerce a{
817
- color: #F16334;
818
- background-color: transparent;
819
- text-decoration: none;
820
  }
821
 
822
  .wcf-embed-checkout-form .woocommerce .woocommerce-info,
823
- .wcf-embed-checkout-form .woocommerce .woocommerce-error,
824
  .wcf-embed-checkout-form .woocommerce .woocommerce-message,
825
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message,
826
- .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message{
827
- padding: 1em 2em 0.4em 2.0em;
828
- border-top:none;
829
- background-color: inherit;
830
- font-size: 14px;
831
- font-weight: 500;
832
- text-align: left;
833
- margin:0px;
 
 
 
 
 
 
834
  }
835
 
836
  .wcf-embed-checkout-form .woocommerce-info::before,
837
- .wcf-embed-checkout-form .woocommerce-message::before{
838
- left: 0.1em;
839
- color: #F16334;
840
  }
841
 
842
  .wcf-embed-checkout-form .woocommerce .woocommerce-error,
843
- .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
844
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{
845
- background-color: #fff6f6;
846
- border: dashed 1px #a00;
847
- padding: 25px 25px 20px;
848
- color: #a00;
849
- margin: 1rem 0 1rem;
850
- font-size: 14px;
851
- width: 100%;
852
-
 
 
 
 
 
853
  }
854
 
855
  .wcf-embed-checkout-form .woocommerce .woocommerce-error::before {
856
- content: '';
857
  }
858
 
859
- .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{
860
- display: inline;
 
 
 
 
861
  }
862
 
863
- .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{
864
- margin:1em 0 1em;
 
 
 
865
  }
866
 
867
- .wcf-embed-checkout-form .woocommerce .woocommerce-error li{
868
- list-style: disc inside !important;
869
- margin: 0 0 8px;
870
  }
871
 
872
- .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{
873
- font-weight: 400;
874
  }
875
 
876
- .wcf-embed-checkout-form .woocommerce form.checkout_coupon{
877
- border: 1px solid #d3ced2;
878
- padding: 30px 20px 20px;
879
- margin: 2em 0;
880
- text-align: left;
881
- -webkit-border-radius: 5px;
882
- border-radius: 5px;
883
  }
884
 
885
- .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
886
- font-size: 14px;
887
  }
888
 
889
- .wcf-embed-checkout-form .woocommerce .checkout_coupon p{
890
- font-family: inherit;
891
- font-weight: 500;
892
- margin-top: 0;
893
- margin-bottom: 10px;
894
  }
895
 
896
  @media only screen and (max-width: 768px) {
897
- .wcf-embed-checkout-form form .wcf-column-33{
898
- width: 100%;
899
- }
900
- .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{
901
- width: 100%;
902
- }
903
- .wcf-embed-checkout-form .woocommerce-checkout #order_review{
904
- width: 100%;
905
- }
906
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{
907
- width: 100%;
908
- }
909
- .wcf-embed-checkout-form .woocommerce-checkout{
910
- display: block;
911
- }
912
-
913
- .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
914
- .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{
915
- display: block;
916
- width: 100%;
917
- padding-right: 0;
918
- margin: 20px 0 0;
919
- }
920
-
921
- .wcf-embed-checkout-form form.checkout_coupon .button{
922
- font-size: 12px;
923
- }
924
-
925
- .wcf-bump-order-field-wrap .wcf-bump-order-label{
926
- font-size: 16px;
927
- }
928
-
929
- /* Added for pro support */
930
- .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
931
  .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
932
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
933
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,
@@ -937,127 +1177,148 @@
937
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
938
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,
939
  .wcf-embed-checkout-form .woocommerce .wcf-order-wrap,
940
- .wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{
941
- padding: 15px 18px;
942
- }
943
-
944
- .wcf-embed-checkout-form .woocommerce form .form-row-first,
945
- .wcf-embed-checkout-form .woocommerce form .form-row-last,
946
- .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
947
- .wcf-embed-checkout-form .woocommerce-page form .form-row-last{
948
- width: 100%;
949
- }
950
-
951
- /*.wcf-embed-checkout-form .woocommerce form .form-row-first,
952
  .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
953
  margin-right: 4%;
954
  }*/
955
 
956
- .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
957
- .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
958
- .wcf-embed-checkout-form #order_review_heading,
959
- .wcf-embed-checkout-form .woocommerce #ship-to-different-address{
960
- font-size: 1.0em;
961
- }
962
  }
963
 
964
-
965
  /**
966
  * **********************
967
  * Divi Css Overrite
968
  * **********************
969
  */
970
 
971
- #et-info-email:before,
972
- #et-info-phone:before,
973
- #et_search_icon:before,
974
- .comment-reply-link:after,
975
- .et-cart-info span:before,
976
- .et-pb-arrow-next:before,
977
- .et-pb-arrow-prev:before,
978
- .et-social-icon a:before,
979
- .et_audio_container .mejs-playpause-button button:before,
980
- .et_audio_container .mejs-volume-button button:before,
981
- .et_overlay:before,
982
- .et_password_protected_form .et_submit_button:after,
983
- .et_pb_button:after,
984
- .et_pb_contact_reset:after,
985
- .et_pb_contact_submit:after,
986
- .et_pb_font_icon:before,
987
- .et_pb_newsletter_button:after,
988
- .et_pb_pricing_table_button:after,
989
- .et_pb_promo_button:after,
990
- .et_pb_social_icon a.icon:before,
991
- .et_pb_testimonial:before,
992
- .et_pb_toggle_title:before,
993
- .form-submit .et_pb_button:after,
994
- .mobile_menu_bar:before,
995
- .woocommerce #content input.button.alt:after,
996
- .woocommerce #content input.button:after,
997
- .woocommerce #respond input#submit.alt:after,
998
- .woocommerce #respond input#submit:after,
999
- .woocommerce a.button.alt:after,
1000
- .woocommerce button.button.alt:after,
1001
- .woocommerce button.button:after,
1002
- .woocommerce button.single_add_to_cart_button.button:after,
1003
- .woocommerce input.button.alt:after,
1004
- .woocommerce input.button:after,
1005
- .woocommerce-page #content input.button.alt:after,
1006
- .woocommerce-page #content input.button:after,
1007
- .woocommerce-page #respond input#submit.alt:after,
1008
- .woocommerce-page #respond input#submit:after,
1009
- .woocommerce-page a.button.alt:after,
1010
- .woocommerce-page a.button:after,
1011
- .woocommerce-page button.button.alt:after,
1012
- .woocommerce-page button.button:after,
1013
- .woocommerce-page input.button.alt:after,
1014
- .woocommerce-page input.button:after,
1015
- a.et_pb_more_button:after{
1016
- text-shadow: 0 0;
1017
- font-family: none;
1018
- font-weight: 400;
1019
- font-style: normal;
1020
- font-variant: normal;
1021
- -webkit-font-smoothing: antialiased;
1022
- -moz-osx-font-smoothing: grayscale;
1023
- line-height: 1;
1024
- text-transform: none;
1025
- speak: none;
1026
- }
1027
-
1028
- .comment-reply-link:hover:after,
1029
- .woocommerce #content input.button.alt:hover:after,
1030
- .woocommerce #content input.button:hover:after,
1031
- .woocommerce #respond input#submit.alt:hover:after,
1032
- .woocommerce #respond input#submit:hover:after,
1033
- .woocommerce a.button.alt:hover:after,
1034
- .woocommerce a.button:hover:after,
1035
- .woocommerce button.button.alt:hover:after,
1036
- .woocommerce button.button:hover:after,
1037
- .woocommerce input.button.alt:hover:after,
1038
- .woocommerce input.button:hover:after,
1039
- .woocommerce-page #content input.button.alt:hover:after,
1040
- .woocommerce-page #content input.button:hover:after,
1041
- .woocommerce-page #respond input#submit.alt:hover:after,
1042
- .woocommerce-page #respond input#submit:hover:after,
1043
- .woocommerce-page a.button.alt:hover:after,
1044
- .woocommerce-page a.button:hover:after,
1045
- .woocommerce-page button.button.alt:hover:after,
1046
- .woocommerce-page button.button:hover:after,
1047
- .woocommerce-page input.button.alt:hover:after,
1048
- .woocommerce-page input.button:hover:after{
1049
- opacity: 0;
1050
  }
1051
 
1052
-
1053
  /**
1054
  * **************************
1055
  * Thrive Compatibility css
1056
  * **************************
1057
  */
1058
 
1059
- .thrv_wrapper .wcf-embed-checkout-form div{
1060
- -webkit-box-sizing: border-box;
1061
- -moz-box-sizing: border-box;
1062
- box-sizing: border-box;
1063
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******************
2
+ * Login & Coupon Field Layout
3
+ ****************/
 
 
 
4
  .cartflows-container .wcf-embed-checkout-form,
5
  .cartflows-container .wcf-embed-checkout-form * {
6
+ -webkit-box-sizing: border-box;
7
+ -moz-box-sizing: border-box;
8
+ box-sizing: border-box;
9
  }
10
 
11
  .wcf-embed-checkout-form .wc-backward {
12
+ display: none !important;
13
  }
14
 
15
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
16
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
17
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
18
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last {
19
+ width: 50%;
20
+ display: block;
21
  }
22
 
23
  .wcf-embed-checkout-form .woocommerce form .form-row-full,
24
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-full {
25
+ width: 100%;
26
+ clear: both;
27
  }
28
 
29
+ .wcf-embed-checkout-form form .form-row-wide {
30
+ width: 100%;
31
  }
32
 
33
+ .wcf-embed-checkout-form form .wcf-column-33 {
34
+ width: 33.33%;
35
  }
36
 
37
  /* To test divi and all */
38
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
39
+ .woocommerce-page form .form-row-first {
40
+ float: left;
41
+ clear: left;
42
  }
43
 
44
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
45
+ .woocommerce-page form .form-row-last {
46
+ float: right;
47
+ clear: right;
48
  }
49
 
50
+ .wcf-embed-checkout-form .woocommerce form .form-row .required {
51
+ color: red;
52
+ font-weight: 700;
53
+ border: 0 !important;
54
+ text-decoration: none;
55
  }
56
 
57
  /* #wcf-embed-checkout-form .woocommerce .product-name a.remove:hover{
58
  color:red !important;
59
  } */
60
 
61
+ .wcf-embed-checkout-form
62
+ .woocommerce
63
+ .woocommerce-checkout
64
+ .product-name
65
+ .remove {
66
+ font-family: "cartflows-icon";
67
+ display: inline-block;
68
+ font-size: 10px;
69
+ border: 1px #4d5763 solid;
70
+ -webkit-border-radius: 50%;
71
+ border-radius: 50%;
72
+ padding: 1px;
73
+ color: #4d5763 !important;
74
+ /* opacity: 0.6; */
75
+ line-height: 1;
76
+ margin-right: 5px;
77
+ text-align: center;
78
+ font-weight: 100;
79
+ width: 14px;
80
+ height: 14px;
81
+ background-color: #fff;
82
+ }
83
+
84
+ .wcf-embed-checkout-form
85
+ .woocommerce
86
+ .woocommerce-checkout
87
+ .product-name
88
+ .remove:hover {
89
+ color: #f1653c !important;
90
+ border: 1px #f1653c solid;
91
+ background-color: #fff;
92
  }
93
 
94
  /* To test divi and all */
95
 
96
+ .wcf-embed-checkout-form form .form-row-first.form-row-one {
97
+ clear: both;
98
  }
99
 
100
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login {
101
+ display: none;
102
  }
103
 
104
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row {
105
+ margin-bottom: 15px;
106
  }
107
 
108
+ .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear {
109
+ clear: none;
110
  }
111
 
112
+ .wcf-embed-checkout-form
113
+ .woocommerce
114
+ form.woocommerce-form-login
115
+ .form-row
116
+ label {
117
+ margin: 0;
118
+ line-height: 1em;
119
+ padding-top: 0;
120
+ position: relative;
121
+ top: 0;
122
  }
123
 
124
+ .wcf-embed-checkout-form
125
+ .woocommerce
126
+ form.woocommerce-form-login
127
+ .login-form-actions {
128
+ -js-display: flex;
129
+ display: -webkit-box;
130
+ display: -webkit-flex;
131
+ display: -moz-box;
132
+ display: -ms-flexbox;
133
+ display: flex;
134
+ margin-bottom: 0px;
135
  }
136
 
137
  .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me,
138
+ .wcf-embed-checkout-form
139
+ .woocommerce
140
+ form.woocommerce-form-login
141
+ .lost_password {
142
+ -webkit-box-flex: 1;
143
+ -webkit-flex: 1;
144
+ -moz-box-flex: 1;
145
+ -ms-flex: 1;
146
+ flex: 1;
147
+ font-family: inherit;
148
+ font-size: 13px;
149
+ }
150
+
151
+ .wcf-embed-checkout-form
152
+ .woocommerce
153
+ form.woocommerce-form-login
154
+ .form-row
155
+ .remember_me
156
+ label {
157
+ margin-bottom: 0px;
158
+ vertical-align: text-top;
159
+ }
160
+
161
+ .wcf-embed-checkout-form
162
+ .woocommerce
163
+ form.woocommerce-form-login
164
+ .form-row
165
+ .remember_me
166
+ input,
167
+ .wcf-embed-checkout-form
168
+ .woocommerce
169
+ form.woocommerce-form-login
170
+ .form-row
171
+ .remember_me
172
+ span {
173
+ vertical-align: middle;
174
+ }
175
+
176
+ .wcf-embed-checkout-form
177
+ .woocommerce
178
+ form.woocommerce-form-login
179
+ .lost_password {
180
+ text-align: right;
181
+ margin-top: 0px;
182
+ margin-bottom: 0px;
183
  }
184
 
185
  /**
189
  */
190
 
191
  .wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay {
192
+ font-size: 15px;
193
+ }
194
+
195
+ .wcf-embed-checkout-form .woocommerce form .form-row.mt20 {
196
+ margin-top: 20px;
197
+ }
198
+
199
+ .wcf-embed-checkout-form
200
+ .woocommerce
201
+ form
202
+ .form-row.woocommerce-invalid
203
+ .select2-container,
204
+ .wcf-embed-checkout-form
205
+ .woocommerce
206
+ form
207
+ .form-row.woocommerce-invalid
208
+ input.input-text,
209
+ .wcf-embed-checkout-form
210
+ .woocommerce
211
+ form
212
+ .form-row.woocommerce-invalid
213
+ select {
214
+ border-width: 1px;
215
+ border-color: #e2401c;
216
+ }
217
+
218
+ .wcf-embed-checkout-form
219
+ .woocommerce
220
+ form
221
+ .form-row.woocommerce-validated
222
+ .select2-container,
223
+ .wcf-embed-checkout-form
224
+ .woocommerce
225
+ form
226
+ .form-row.woocommerce-validated
227
+ input.input-text,
228
+ .wcf-embed-checkout-form
229
+ .woocommerce
230
+ form
231
+ .form-row.woocommerce-validated
232
+ select {
233
+ border-width: 1px;
234
+ /*border-color: #69bf29;*/
235
+ }
236
+
237
+ .wcf-embed-checkout-form
238
+ .select2-container--default.field-required
239
+ .select2-selection--single,
240
+ .wcf-embed-checkout-form
241
+ .woocommerce
242
+ form
243
+ .form-row
244
+ input.input-text.field-required,
245
+ .wcf-embed-checkout-form
246
+ .woocommerce
247
+ form
248
+ .form-row
249
+ textarea.input-text.field-required,
250
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required {
251
+ border-color: #e2401c;
252
+ }
253
+
254
+ .wcf-embed-checkout-form .woocommerce form .form-row input.field-validated {
255
+ border-left-width: 2px;
256
+ border-left-color: #69bf29;
257
  }
258
 
259
  /**
262
  * ************
263
  */
264
 
265
+ .wcf-embed-checkout-form .wcf-checkout-header-image {
266
+ text-align: center;
267
  }
268
 
269
  /**
272
  * ************************
273
  */
274
 
275
+ .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label,
276
+ .wcf-embed-checkout-form
277
+ .woocommerce
278
+ #payment
279
+ [type="radio"]:not(:checked)
280
+ + label {
281
+ padding: 0px;
282
+ }
283
+
284
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"] {
285
+ -webkit-border-radius: 50%;
286
+ border-radius: 50%;
287
+ margin-right: 4px;
288
+ line-height: 10px;
289
+ }
290
+
291
+ .wcf-embed-checkout-form
292
+ .woocommerce
293
+ .woocommerce-billing-fields
294
+ [type="checkbox"]:checked:before,
295
+ .wcf-embed-checkout-form
296
+ .woocommerce
297
+ #payment
298
+ input[type="checkbox"]:checked:before,
299
+ .wcf-embed-checkout-form
300
+ .woocommerce
301
+ .woocommerce-shipping-fields
302
+ [type="checkbox"]:checked:before,
303
+ .wcf-embed-checkout-form
304
+ .woocommerce
305
+ .woocommerce-account-fields
306
+ input[type="checkbox"]:checked:before {
307
+ content: "\e600";
308
+ margin: 0;
309
+ color: #f16334;
310
+ }
311
+
312
+ .wcf-embed-checkout-form
313
+ .woocommerce
314
+ .woocommerce-billing-fields
315
+ [type="checkbox"],
316
+ .wcf-embed-checkout-form .woocommerce #payment input[type="checkbox"],
317
+ .wcf-embed-checkout-form
318
+ .woocommerce
319
+ .woocommerce-shipping-fields
320
+ [type="checkbox"],
321
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"],
322
+ .wcf-embed-checkout-form
323
+ .woocommerce
324
+ .woocommerce-account-fields
325
+ input[type="checkbox"] {
326
+ border: 1px solid #b4b9be;
327
+ background: #fff;
328
+ color: #555;
329
+ clear: none;
330
+ cursor: pointer;
331
+ display: inline-block;
332
+ line-height: 0;
333
+ height: 16px;
334
+ margin: -4px 4px 0 0;
335
+ outline: 0;
336
+ padding: 0 !important;
337
+ text-align: center;
338
+ vertical-align: middle;
339
+ width: 16px;
340
+ min-width: 16px;
341
+ -webkit-appearance: none;
342
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
343
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
344
+ -webkit-transition: 0.05s border-color ease-in-out;
345
+ transition: 0.05s border-color ease-in-out;
346
+ }
347
+
348
+ .wcf-embed-checkout-form
349
+ .woocommerce
350
+ .woocommerce-billing-fields
351
+ [type="checkbox"]:focus,
352
+ .wcf-embed-checkout-form .woocommerce #payment input[type="checkbox"]:focus,
353
+ .wcf-embed-checkout-form
354
+ .woocommerce
355
+ .woocommerce-shipping-fields
356
+ [type="checkbox"]:focus,
357
+ .wcf-embed-checkout-form .woocommerce #payment input[type="radio"]:focus,
358
+ .wcf-embed-checkout-form
359
+ .woocommerce
360
+ .woocommerce-account-fields
361
+ input[type="checkbox"]:focus {
362
+ border-color: #f16334;
363
+ -webkit-box-shadow: 0 0 2px rgba(241, 99, 52, 0.8);
364
+ box-shadow: 0 0 2px rgba(241, 99, 52, 0.8);
365
+ }
366
+
367
+ .wcf-embed-checkout-form
368
+ .woocommerce
369
+ #payment
370
+ input[type="radio"]:checked:before {
371
+ background-color: #f16334;
372
+ -webkit-border-radius: 50px;
373
+ border-radius: 50px;
374
+ content: "\2022";
375
+ font-size: 24px;
376
+ height: 6px;
377
+ line-height: 16px;
378
+ margin: 4px;
379
+ text-indent: -9999px;
380
+ width: 6px;
381
+ }
382
+ .wcf-embed-checkout-form
383
+ .woocommerce
384
+ .woocommerce-billing-fields
385
+ [type="checkbox"]:checked:before,
386
+ .wcf-embed-checkout-form
387
+ .woocommerce
388
+ #payment
389
+ input[type="checkbox"]:checked:before,
390
+ .wcf-embed-checkout-form
391
+ .woocommerce
392
+ .woocommerce-shipping-fields
393
+ [type="checkbox"]:checked:before,
394
+ .wcf-embed-checkout-form
395
+ .woocommerce
396
+ #payment
397
+ input[type="radio"]:checked:before,
398
+ .wcf-embed-checkout-form
399
+ .woocommerce
400
+ .woocommerce-account-fields
401
+ input[type="checkbox"]:before {
402
+ display: inline-block;
403
+ float: left;
404
+ font: normal 15px/1 cartflows-icon;
405
+ speak: none;
406
+ vertical-align: middle;
407
+ width: 6px;
408
+ -webkit-font-smoothing: antialiased;
409
+ -moz-osx-font-smoothing: grayscale;
410
+ }
411
+
412
+ .wcf-embed-checkout-form
413
+ .woocommerce-checkout
414
+ #payment
415
+ ul.payment_methods
416
+ li
417
+ input[type="checkbox"] {
418
+ min-width: 16px;
419
  }
420
 
421
  /* Added for pro support */
428
  .wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,
429
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
430
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2 {
431
+ float: none;
432
+ width: 100%;
433
+ max-width: 100%;
434
+ padding: 0px;
435
+ -webkit-border-radius: 0px;
436
+ border-radius: 0px;
437
+ border: none;
438
+ border-color: none;
439
+ margin-bottom: 0px;
440
  }
441
 
442
  .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
443
  .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
444
  .wcf-embed-checkout-form #order_review_heading,
445
  .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
446
+ font-family: inherit;
447
+ font-weight: 600;
448
+ font-size: 20px;
449
+ /*text-transform: capitalize;*/
450
+ margin: 0 0 25px 0;
451
+ padding: 0px;
452
+ width: 100%;
453
  }
454
 
455
  .wcf-embed-checkout-form .woocommerce-checkout #payment {
456
+ background: unset;
457
+ -webkit-border-radius: 0;
458
+ border-radius: 0;
459
  }
460
 
461
  .wcf-embed-checkout-form .woocommerce-checkout #payment .form-row {
462
+ margin: 0;
463
+ padding: 8px 0 0;
464
+ }
465
+
466
+ .wcf-embed-checkout-form
467
+ .woocommerce-checkout
468
+ #payment
469
+ .form-row
470
+ label.checkbox {
471
+ display: block;
472
+ margin-bottom: 1.1em;
473
+ }
474
+
475
+ .wcf-embed-checkout-form
476
+ .woocommerce-checkout
477
+ #payment
478
+ .payment_method_paypal
479
+ .about_paypal {
480
+ float: none;
481
+ margin-left: 10px;
482
+ }
483
+
484
+ .wcf-embed-checkout-form
485
+ .woocommerce-checkout
486
+ #payment
487
+ div.payment_box
488
+ .form-row {
489
+ margin: 0 0 0.5em;
490
+ }
491
+
492
+ .wcf-embed-checkout-form
493
+ .woocommerce-checkout
494
+ #payment
495
+ fieldset
496
+ .form-row
497
+ .wcf-embed-checkout-form
498
+ .woocommerce-checkout
499
+ #payment
500
+ fieldset
501
+ p {
502
+ margin-bottom: 10px;
503
+ }
504
+
505
+ .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box {
506
+ background-color: #eaeaea;
507
+ font-family: inherit;
508
+ font-weight: inherit;
509
+ margin-bottom: 0.5em;
510
+ }
511
+
512
+ .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
513
+ .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
514
+ .wcf-embed-checkout-form
515
+ .woocommerce-checkout
516
+ #payment
517
+ div.payment_box::before {
518
+ content: "";
519
+ display: block;
520
+ border: 1em solid;
521
+ border-right-color: transparent;
522
+ border-left-color: transparent;
523
+ border-top-color: transparent;
524
+ border-bottom-color: #eaeaea;
525
+ position: absolute;
526
+ top: -0.75em;
527
+ left: 0;
528
+ margin: -1em 0 0 2em;
529
  }
530
 
531
  /* Fields */
532
+ .wcf-embed-checkout-form
533
+ .select2-container--default
534
+ .select2-selection--single {
535
+ display: block;
536
+ width: 100%;
537
+ min-height: 34px;
538
+ height: auto;
539
+ padding: 11px 12px;
540
+ font-size: 14px;
541
+ line-height: 1.42857143 !important;
542
+ color: #555;
543
+ background-color: #fff;
544
+ background-image: none;
545
+ border: 1px solid;
546
+ border-color: #d4d4d4;
547
+ -webkit-border-radius: 3px;
548
+ border-radius: 3px;
549
+ -webkit-box-shadow: none;
550
+ box-shadow: none;
551
+ outline: none;
552
+ }
553
+
554
+ .wcf-embed-checkout-form
555
+ .select2-container--default
556
+ .select2-selection--single
557
+ .select2-selection__rendered {
558
+ color: #666;
559
+ line-height: 19px;
560
+ min-height: 19px;
561
+ overflow: visible;
562
+ padding-left: 0;
563
+ }
564
+
565
+ .wcf-embed-checkout-form .select2-results__option[aria-selected],
566
+ .select2-results__option[data-selected] {
567
+ font-size: 14px;
568
+ }
569
+
570
+ .wcf-embed-checkout-form
571
+ .select2-container--default
572
+ .select2-selection--single
573
+ .select2-selection__arrow {
574
+ height: 100%;
575
+ }
576
+
577
+ .select2-dropdown {
578
+ border: 1px solid #d4d4d4;
579
+ }
580
+
581
+ .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
582
  .wcf-embed-checkout-form .woocommerce form .form-row textarea,
583
  .wcf-embed-checkout-form .woocommerce form .form-row select,
584
+ .wcf-embed-checkout-form .woocommerce #order_review .input-text {
585
+ display: block;
586
+ width: 100%;
587
+ min-height: 34px;
588
+ padding: 11px 12px;
589
+ font-family: inherit;
590
+ font-weight: inherit;
591
+ font-size: 14px;
592
+ line-height: 1.42857143 !important;
593
+ color: #555;
594
+ background-color: #fff;
595
+ background-image: none;
596
+ border: 1px solid;
597
+ border-color: #d4d4d4;
598
+ -webkit-border-radius: 3px;
599
+ border-radius: 3px;
600
+ -webkit-box-shadow: none;
601
+ box-shadow: none;
602
+ height: auto;
603
+ }
604
+
605
+ .wcf-embed-checkout-form #order_review {
606
+ padding: 3px;
607
+ width: 100%;
608
+ }
609
+
610
+ .wcf-embed-checkout-form
611
+ .woocommerce
612
+ .wcf-custom-coupon-field
613
+ .woocommerce-message,
614
+ .wcf-embed-checkout-form
615
+ .woocommerce
616
+ .wcf-custom-coupon-field
617
+ .woocommerce-error {
618
+ padding: 0em 2em 1.2em 2em;
619
+ background-color: transparent;
620
+ border: none;
621
+ margin: 0px;
622
+ width: 100%;
623
+ }
624
+
625
+ .wcf-embed-checkout-form
626
+ .woocommerce
627
+ .wcf-custom-coupon-field
628
+ .woocommerce-error
629
+ li {
630
+ list-style: none !important;
631
+ margin: 0px;
632
+ }
633
+
634
+ .wcf-embed-checkout-form
635
+ .woocommerce
636
+ .wcf-custom-coupon-field
637
+ .woocommerce-message::before,
638
+ .wcf-embed-checkout-form
639
+ .woocommerce
640
+ .wcf-custom-coupon-field
641
+ .woocommerce-error::before {
642
+ top: 0px;
643
+ left: 0px;
644
+ }
645
+
646
+ .wcf-embed-checkout-form
647
+ .woocommerce
648
+ .wcf-custom-coupon-field
649
+ .woocommerce-error::before {
650
+ content: "\e016";
651
+ }
652
+
653
+ .wcf-embed-checkout-form
654
+ .woocommerce
655
+ .wcf-custom-coupon-field
656
+ .woocommerce-error
657
+ li {
658
+ margin: 0px 0px 0 8px;
659
+ }
660
+
661
+ .wcf-embed-checkout-form
662
+ .woocommerce
663
+ #order_review
664
+ .wcf-custom-coupon-field
665
+ input[type="text"] {
666
+ font-weight: normal;
667
  }
668
 
669
  .wcf-embed-checkout-form .wcf-custom-coupon-field {
670
+ clear: left;
671
+ -js-display: flex;
672
+ display: -webkit-box;
673
+ display: -webkit-flex;
674
+ display: -moz-box;
675
+ display: -ms-flexbox;
676
+ display: flex;
677
+ margin-bottom: 15px;
678
+ margin-top: 25px;
679
+ border-top: 1px solid #dcdcdc;
680
+ border-bottom: 1px solid #dcdcdc;
681
+ padding-top: 25px;
682
+ padding-bottom: 25px;
683
+ -webkit-flex-wrap: wrap;
684
+ -ms-flex-wrap: wrap;
685
+ flex-wrap: wrap;
686
  }
687
 
688
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-1 {
689
+ width: 70%;
690
+ display: inline-block;
691
+ padding-right: 20px;
692
  }
693
 
694
  .wcf-embed-checkout-form #order_review .wcf-coupon-col-2 {
695
+ width: 30%;
696
  }
697
 
698
+ .wcf-embed-checkout-form input[type="text"]:focus,
699
+ .wcf-embed-checkout-form input[type="email"]:focus,
700
+ .wcf-embed-checkout-form input[type="password"]:focus,
701
+ .wcf-embed-checkout-form input[type="tel"]:focus,
702
+ .wcf-embed-checkout-form textarea:focus,
703
  .wcf-embed-checkout-form .select2-container--open {
704
+ border-color: #b3b3b3;
705
+ -webkit-box-shadow: none;
706
+ box-shadow: none;
707
+ outline: none;
708
  }
709
 
710
  .wcf-embed-checkout-form button:focus {
711
+ outline: none;
712
+ outline-color: none;
713
+ outline-style: none;
714
+ outline-width: none;
715
  }
716
 
717
+ .wcf-embed-checkout-form
718
+ .woocommerce
719
+ form.woocommerce-form-login
720
+ .form-row
721
+ button,
722
  .wcf-embed-checkout-form form.checkout_coupon .button {
723
+ display: block;
724
+ clear: both;
725
+ border: none;
726
+ font-size: 15px;
727
+ font-family: inherit;
728
+ font-weight: inherit;
729
+ background-color: #f16334;
730
+ color: #ffffff;
731
+ line-height: 9px;
732
+ padding: 18px;
733
+ margin-bottom: 10px;
734
+ width: 100%;
735
  }
736
 
737
  .wcf-embed-checkout-form .woocommerce #order_review button {
738
+ border: 1px solid;
739
+ border-color: #f16334;
740
+ background-color: #f16334;
741
+ font-family: inherit;
742
+ font-weight: inherit;
743
+ font-size: 18px;
744
+ letter-spacing: 0.5px;
745
+ width: 100%;
746
+ padding: 16px 24px;
747
+ font-size: 16px;
748
+ line-height: 1.5;
749
+ -webkit-border-radius: 3px;
750
+ border-radius: 3px;
751
+ color: #fff;
752
  }
753
 
754
  .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
755
+ padding: 10px 6px;
756
+ /* background-color: #c8c8c8;
757
+ border: 1px #c8c8c8 solid; */
758
  }
759
 
760
+ .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover {
761
+ border-color: #f16334;
762
+ background-color: #f16334;
763
  }
764
  .wcf-embed-checkout-form .woocommerce #payment #place_order:hover {
765
+ background-color: #f16334;
766
+ border-color: #f16334;
767
+ color: #fff;
768
  }
769
 
770
  /**
773
  * ***********************
774
  */
775
 
776
+ .wcf-embed-checkout-form .woocommerce-checkout {
777
+ display: inline-block;
778
+ text-align: inherit;
779
+ width: 100%;
780
  }
781
 
782
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
783
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set {
784
+ display: inline-block;
785
+ width: 55%;
786
+ float: left;
787
+ padding-right: 40px;
788
+ margin: 20px 0 0;
789
  }
790
 
791
  /*Added for pro support */
793
  .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
794
  /*Added for pro support */
795
  .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
796
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper {
797
+ margin: 0 -7px;
798
+ -ms-flex-wrap: wrap;
799
+ flex-wrap: wrap;
800
+ -js-display: flex;
801
+ display: -webkit-box;
802
+ display: -moz-box;
803
+ display: -ms-flexbox;
804
+ display: flex;
805
+ display: -webkit-flex; /* Safari 6.1+, firefox, chrome */
806
+ flex-wrap: wrap;
807
+ -webkit-flex-wrap: wrap; /* Safari 6.1+, firefox, chrome*/
808
+ }
809
+
810
+ .wcf-embed-checkout-form
811
+ .woocommerce-checkout
812
+ .col2-set
813
+ .woocommerce-additional-fields
814
+ .woocommerce-additional-fields__field-wrapper,
815
+ .wcf-embed-checkout-form
816
+ .woocommerce-checkout
817
+ .wcf-col2-set
818
+ .woocommerce-additional-fields
819
+ .woocommerce-additional-fields__field-wrapper {
820
+ margin: 0px -7px;
821
+ }
822
+
823
+ .wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap {
824
+ display: inline-block;
825
+ float: none;
826
+ width: 45%;
827
+ border: none;
828
+ background-color: inherit /*#F6F6F6*/;
829
+ padding: 0 10px;
830
+ -webkit-border-radius: 3px;
831
+ border-radius: 3px;
832
+ }
833
+
834
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading {
835
+ display: inline-block;
836
+ font-family: inherit;
837
+ font-weight: 600;
838
+ width: 100%;
839
+ margin: 20px 0 0;
840
+ padding: 3px 3px 20px;
841
+ border: none;
842
+ border-bottom: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  }
844
 
845
+ .wcf-embed-checkout-form .woocommerce-checkout #payment {
846
+ background-color: inherit;
847
+ border: none;
848
+ /*border-top: 1px solid;*/
849
+ -webkit-border-radius: 0px;
850
+ border-radius: 0px;
851
+ /*border-color: #dcdcdc;*/
852
+ /*padding-top: 20px;*/
853
  }
854
 
855
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
856
+ margin: 1em 0 0;
857
+ background-color: #f7f7f7;
858
+ padding: 15px;
 
 
 
 
 
859
  }
860
 
861
+ .wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,
862
+ .wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,
863
+ .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods {
864
+ border: none;
865
  }
866
 
867
+ .wcf-embed-checkout-form #payment ul.payment_methods li,
868
+ .wcf-embed-checkout-form #payment ul.payment_methods li:hover {
869
+ background-color: transparent;
 
 
 
 
 
 
 
 
 
870
  }
871
 
872
+ /*.wcf-embed-checkout-form .woocommerce form .form-row-wide, .woocommerce-page form .form-row-wide{
873
+ clear: both;
874
+ }*/
875
 
876
+ .wcf-embed-checkout-form .woocommerce form .form-row {
877
+ display: block;
878
+ margin-bottom: 1.1em;
879
+ padding: 3px 7px;
880
+ position: relative;
 
 
881
  }
882
+
883
+ .wcf-embed-checkout-form
884
+ .woocommerce
885
+ form
886
+ .woocommerce-account-fields
887
+ .form-row {
888
+ padding: 0px;
 
889
  }
890
 
891
+ .wcf-embed-checkout-form table.shop_table {
892
+ border: none;
893
+ border-bottom: 0;
894
+ background-color: inherit;
895
+ -webkit-border-radius: 0;
896
+ border-radius: 0;
897
+ font-family: inherit;
898
+ font-weight: inherit;
899
+ font-size: 0.95em;
900
+ margin: 0 0 0px 0 !important;
901
+ border-collapse: collapse;
902
+ text-align: left;
903
+ }
904
+
905
+ .wcf-embed-checkout-form table.shop_table td strong.product-quantity {
906
+ font-weight: normal;
907
+ }
908
+
909
+ .wcf-embed-checkout-form table.shop_table #shipping_method {
910
+ margin: 0;
911
+ padding: 0;
912
+ list-style: none;
913
+ }
914
+ .wcf-embed-checkout-form table.shop_table #shipping_method .amount {
915
+ font-weight: normal;
916
+ }
917
+ .wcf-embed-checkout-form table.shop_table th {
918
+ border: none;
919
+ font-weight: 400;
920
+ padding: 9px 0px;
921
+ line-height: 1.2em;
922
+ }
923
+ .wcf-embed-checkout-form
924
+ table.shop_table
925
+ tfoot
926
+ tr:last-child
927
+ .woocommerce-Price-amount {
928
+ font-size: 1em;
929
+ }
930
+
931
+ .wcf-embed-checkout-form table.shop_table td,
932
  .wcf-embed-checkout-form table.shop_table th,
933
  .wcf-embed-checkout-form table.shop_table td dl dt,
934
  .wcf-embed-checkout-form table.shop_table td dl dd {
935
+ background-color: transparent;
936
+ border: none;
937
+ padding: 0.6em 0;
938
+ line-height: 1.4em;
939
  }
940
+ .wcf-embed-checkout-form table.shop_table td dl dd p {
941
+ margin-top: 0;
942
  }
943
 
944
+ .wcf-embed-checkout-form table.shop_table tbody th,
945
+ .wcf-embed-checkout-form table.shop_table tfoot td,
946
  .wcf-embed-checkout-form table.shop_table tfoot th {
947
+ border: none;
948
+ display: table-cell;
949
+ font-weight: normal;
950
+ width: 50%;
951
  }
952
+ .wcf-embed-checkout-form table.shop_table thead {
953
+ background-color: transparent;
954
  }
955
  .wcf-embed-checkout-form table.shop_table tbody {
956
+ border-top: 1px dashed #cccccc;
957
+ border-bottom: 1px dashed #cccccc;
958
  }
959
  .wcf-embed-checkout-form table.shop_table th.product-name,
960
+ .wcf-embed-checkout-form table.shop_table th.product-total {
961
+ font-weight: 600;
962
+ }
963
+ .wcf-embed-checkout-form
964
+ table.shop_table
965
+ tfoot
966
+ tr.order-total:not(.recurring-total)
967
+ th,
968
+ .wcf-embed-checkout-form
969
+ table.shop_table
970
+ tfoot
971
+ tr.order-total:not(.recurring-total)
972
+ td {
973
+ font-weight: 600;
974
+ border-top: 1px dashed #cccccc;
975
  }
976
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th {
977
+ padding-top: 1.8em;
978
+ font-weight: 600;
979
  }
980
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th,
981
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,
982
  .wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td {
983
+ vertical-align: top;
984
  }
985
 
986
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1),
987
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),
988
+ .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1) {
989
+ width: 70%;
990
  }
991
  .wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2),
992
  .wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),
993
+ .wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2) {
994
+ width: 30%;
995
  }
996
 
997
+ .wcf-embed-checkout-form
998
+ .woocommerce
999
+ form.woocommerce-form-login
1000
+ .form-row
1001
+ label,
1002
+ .wcf-embed-checkout-form .woocommerce-checkout .form-row label {
1003
+ font-size: 13px;
1004
+ line-height: 1em;
1005
+ letter-spacing: 0.3px;
1006
+ font-family: inherit;
1007
+ font-weight: inherit;
1008
+ /*text-transform: capitalize;*/
1009
+ margin-bottom: 8px;
1010
  }
1011
 
1012
+ .wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,
1013
+ .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label {
1014
+ display: inherit;
1015
  }
1016
 
1017
+ .wcf-embed-checkout-form
1018
+ .woocommerce
1019
+ .woocommerce-terms-and-conditions-wrapper
1020
+ .woocommerce-terms-and-conditions-checkbox-text {
1021
+ line-height: 20px;
1022
+ text-transform: none;
1023
  }
1024
 
1025
+ .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p {
1026
+ font-family: inherit;
1027
+ font-weight: inherit;
1028
+ font-size: 11px;
1029
+ color: #777;
1030
+ margin-top: 0;
1031
+ text-align: justify;
1032
  }
1033
 
1034
+ .wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p {
1035
+ margin: 0;
1036
  }
1037
 
1038
+ .wcf-embed-checkout-form .woocommerce a {
1039
+ color: #f16334;
1040
+ background-color: transparent;
1041
+ text-decoration: none;
1042
  }
1043
 
1044
  .wcf-embed-checkout-form .woocommerce .woocommerce-info,
1045
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error,
1046
  .wcf-embed-checkout-form .woocommerce .woocommerce-message,
1047
+ .wcf-embed-checkout-form
1048
+ .woocommerce
1049
+ .woocommerce-notices-wrapper
1050
+ .woocommerce-message,
1051
+ .wcf-embed-checkout-form
1052
+ .woocommerce
1053
+ .woocommerce-NoticeGroup
1054
+ .woocommerce-message {
1055
+ padding: 1em 2em 0.4em 2em;
1056
+ border-top: none;
1057
+ background-color: inherit;
1058
+ font-size: 14px;
1059
+ font-weight: 500;
1060
+ text-align: left;
1061
+ margin: 0px;
1062
  }
1063
 
1064
  .wcf-embed-checkout-form .woocommerce-info::before,
1065
+ .wcf-embed-checkout-form .woocommerce-message::before {
1066
+ left: 0.1em;
1067
+ color: #f16334;
1068
  }
1069
 
1070
  .wcf-embed-checkout-form .woocommerce .woocommerce-error,
1071
+ .wcf-embed-checkout-form
1072
+ .woocommerce
1073
+ .woocommerce-NoticeGroup
1074
+ .woocommerce-error,
1075
+ .wcf-embed-checkout-form
1076
+ .woocommerce
1077
+ .woocommerce-notices-wrapper
1078
+ .woocommerce-error {
1079
+ background-color: #fff6f6;
1080
+ border: dashed 1px #a00;
1081
+ padding: 25px 25px 20px;
1082
+ color: #a00;
1083
+ margin: 1rem 0 1rem;
1084
+ font-size: 14px;
1085
+ width: 100%;
1086
  }
1087
 
1088
  .wcf-embed-checkout-form .woocommerce .woocommerce-error::before {
1089
+ content: "";
1090
  }
1091
 
1092
+ .wcf-embed-checkout-form
1093
+ .woocommerce-checkout
1094
+ #payment
1095
+ ul.payment_methods
1096
+ li:not(.woocommerce-notice)::before {
1097
+ display: inline;
1098
  }
1099
 
1100
+ .wcf-embed-checkout-form
1101
+ .woocommerce
1102
+ .woocommerce-notices-wrapper
1103
+ .woocommerce-message {
1104
+ margin: 1em 0 1em;
1105
  }
1106
 
1107
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li {
1108
+ list-style: disc inside !important;
1109
+ margin: 0 0 8px;
1110
  }
1111
 
1112
+ .wcf-embed-checkout-form .woocommerce .woocommerce-error li strong {
1113
+ font-weight: 400;
1114
  }
1115
 
1116
+ .wcf-embed-checkout-form .woocommerce form.checkout_coupon {
1117
+ border: 1px solid #d3ced2;
1118
+ padding: 30px 20px 20px;
1119
+ margin: 2em 0;
1120
+ text-align: left;
1121
+ -webkit-border-radius: 5px;
1122
+ border-radius: 5px;
1123
  }
1124
 
1125
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p {
1126
+ font-size: 14px;
1127
  }
1128
 
1129
+ .wcf-embed-checkout-form .woocommerce .checkout_coupon p {
1130
+ font-family: inherit;
1131
+ font-weight: 500;
1132
+ margin-top: 0;
1133
+ margin-bottom: 10px;
1134
  }
1135
 
1136
  @media only screen and (max-width: 768px) {
1137
+ .wcf-embed-checkout-form form .wcf-column-33 {
1138
+ width: 100%;
1139
+ }
1140
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading {
1141
+ width: 100%;
1142
+ }
1143
+ .wcf-embed-checkout-form .woocommerce-checkout #order_review {
1144
+ width: 100%;
1145
+ }
1146
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap {
1147
+ width: 100%;
1148
+ }
1149
+ .wcf-embed-checkout-form .woocommerce-checkout {
1150
+ display: block;
1151
+ }
1152
+
1153
+ .wcf-embed-checkout-form .woocommerce-checkout .col2-set,
1154
+ .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set {
1155
+ display: block;
1156
+ width: 100%;
1157
+ padding-right: 0;
1158
+ margin: 20px 0 0;
1159
+ }
1160
+
1161
+ .wcf-embed-checkout-form form.checkout_coupon .button {
1162
+ font-size: 12px;
1163
+ }
1164
+
1165
+ .wcf-bump-order-field-wrap .wcf-bump-order-label {
1166
+ font-size: 16px;
1167
+ }
1168
+
1169
+ /* Added for pro support */
1170
+ .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
1171
  .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
1172
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,
1173
  .wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,
1177
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,
1178
  .wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,
1179
  .wcf-embed-checkout-form .woocommerce .wcf-order-wrap,
1180
+ .wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap {
1181
+ padding: 15px 18px;
1182
+ }
1183
+
1184
+ .wcf-embed-checkout-form .woocommerce form .form-row-first,
1185
+ .wcf-embed-checkout-form .woocommerce form .form-row-last,
1186
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-first,
1187
+ .wcf-embed-checkout-form .woocommerce-page form .form-row-last {
1188
+ width: 100%;
1189
+ }
1190
+
1191
+ /*.wcf-embed-checkout-form .woocommerce form .form-row-first,
1192
  .wcf-embed-checkout-form .woocommerce-page form .form-row-first{
1193
  margin-right: 4%;
1194
  }*/
1195
 
1196
+ .wcf-embed-checkout-form .woocommerce-additional-fields > h3,
1197
+ .wcf-embed-checkout-form .woocommerce-billing-fields > h3,
1198
+ .wcf-embed-checkout-form #order_review_heading,
1199
+ .wcf-embed-checkout-form .woocommerce #ship-to-different-address {
1200
+ font-size: 1em;
1201
+ }
1202
  }
1203
 
 
1204
  /**
1205
  * **********************
1206
  * Divi Css Overrite
1207
  * **********************
1208
  */
1209
 
1210
+ #et-info-email:before,
1211
+ #et-info-phone:before,
1212
+ #et_search_icon:before,
1213
+ .comment-reply-link:after,
1214
+ .et-cart-info span:before,
1215
+ .et-pb-arrow-next:before,
1216
+ .et-pb-arrow-prev:before,
1217
+ .et-social-icon a:before,
1218
+ .et_audio_container .mejs-playpause-button button:before,
1219
+ .et_audio_container .mejs-volume-button button:before,
1220
+ .et_overlay:before,
1221
+ .et_password_protected_form .et_submit_button:after,
1222
+ .et_pb_button:after,
1223
+ .et_pb_contact_reset:after,
1224
+ .et_pb_contact_submit:after,
1225
+ .et_pb_font_icon:before,
1226
+ .et_pb_newsletter_button:after,
1227
+ .et_pb_pricing_table_button:after,
1228
+ .et_pb_promo_button:after,
1229
+ .et_pb_social_icon a.icon:before,
1230
+ .et_pb_testimonial:before,
1231
+ .et_pb_toggle_title:before,
1232
+ .form-submit .et_pb_button:after,
1233
+ .mobile_menu_bar:before,
1234
+ .woocommerce #content input.button.alt:after,
1235
+ .woocommerce #content input.button:after,
1236
+ .woocommerce #respond input#submit.alt:after,
1237
+ .woocommerce #respond input#submit:after,
1238
+ .woocommerce a.button.alt:after,
1239
+ .woocommerce button.button.alt:after,
1240
+ .woocommerce button.button:after,
1241
+ .woocommerce button.single_add_to_cart_button.button:after,
1242
+ .woocommerce input.button.alt:after,
1243
+ .woocommerce input.button:after,
1244
+ .woocommerce-page #content input.button.alt:after,
1245
+ .woocommerce-page #content input.button:after,
1246
+ .woocommerce-page #respond input#submit.alt:after,
1247
+ .woocommerce-page #respond input#submit:after,
1248
+ .woocommerce-page a.button.alt:after,
1249
+ .woocommerce-page a.button:after,
1250
+ .woocommerce-page button.button.alt:after,
1251
+ .woocommerce-page button.button:after,
1252
+ .woocommerce-page input.button.alt:after,
1253
+ .woocommerce-page input.button:after,
1254
+ a.et_pb_more_button:after {
1255
+ text-shadow: 0 0;
1256
+ font-family: none;
1257
+ font-weight: 400;
1258
+ font-style: normal;
1259
+ font-variant: normal;
1260
+ -webkit-font-smoothing: antialiased;
1261
+ -moz-osx-font-smoothing: grayscale;
1262
+ line-height: 1;
1263
+ text-transform: none;
1264
+ speak: none;
1265
+ }
1266
+
1267
+ .comment-reply-link:hover:after,
1268
+ .woocommerce #content input.button.alt:hover:after,
1269
+ .woocommerce #content input.button:hover:after,
1270
+ .woocommerce #respond input#submit.alt:hover:after,
1271
+ .woocommerce #respond input#submit:hover:after,
1272
+ .woocommerce a.button.alt:hover:after,
1273
+ .woocommerce a.button:hover:after,
1274
+ .woocommerce button.button.alt:hover:after,
1275
+ .woocommerce button.button:hover:after,
1276
+ .woocommerce input.button.alt:hover:after,
1277
+ .woocommerce input.button:hover:after,
1278
+ .woocommerce-page #content input.button.alt:hover:after,
1279
+ .woocommerce-page #content input.button:hover:after,
1280
+ .woocommerce-page #respond input#submit.alt:hover:after,
1281
+ .woocommerce-page #respond input#submit:hover:after,
1282
+ .woocommerce-page a.button.alt:hover:after,
1283
+ .woocommerce-page a.button:hover:after,
1284
+ .woocommerce-page button.button.alt:hover:after,
1285
+ .woocommerce-page button.button:hover:after,
1286
+ .woocommerce-page input.button.alt:hover:after,
1287
+ .woocommerce-page input.button:hover:after {
1288
+ opacity: 0;
1289
  }
1290
 
 
1291
  /**
1292
  * **************************
1293
  * Thrive Compatibility css
1294
  * **************************
1295
  */
1296
 
1297
+ .thrv_wrapper .wcf-embed-checkout-form div {
1298
+ -webkit-box-sizing: border-box;
1299
+ -moz-box-sizing: border-box;
1300
+ box-sizing: border-box;
1301
+ }
1302
+
1303
+ /**
1304
+ * **************************************************************
1305
+ * Remove Product variaton CSS after few updates of CartFlows Pro
1306
+ * **************************************************************
1307
+ */
1308
+
1309
+ .wcf-embed-checkout-form-two-column
1310
+ .woocommerce
1311
+ .wcf-product-option-wrap.wcf-product-option-before-order {
1312
+ width: 45%;
1313
+ }
1314
+
1315
+ .wcf-embed-checkout-form-two-step
1316
+ .woocommerce.step-one
1317
+ .wcf-product-option-wrap.wcf-product-option-before-order {
1318
+ display: none;
1319
+ }
1320
+
1321
+ /**
1322
+ * **************************************************************
1323
+ * Remove Product variaton CSS after few updates of CartFlows Pro
1324
+ * **************************************************************/
assets/elementor-assets/css/style.css ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'wcf-el';
3
+ src: url('../fonts/wcf-el.eot?hbxe64');
4
+ src: url('../fonts/wcf-el.eot?hbxe64#iefix') format('embedded-opentype'),
5
+ url('../fonts/wcf-el.ttf?hbxe64') format('truetype'),
6
+ url('../fonts/wcf-el.woff?hbxe64') format('woff'),
7
+ url('../fonts/wcf-el.svg?hbxe64#wcf-el') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ font-display: block;
11
+ }
12
+
13
+ [class^="wcf-el-icon-"], [class*=" wcf-el-icon-"] {
14
+ /* use !important to prevent issues with browser extensions that change fonts */
15
+ font-family: 'wcf-el' !important;
16
+ speak: never;
17
+ font-style: normal;
18
+ font-weight: normal;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+
23
+ /* Better Font Rendering =========== */
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+ }
27
+
28
+ .wcf-el-icon-checkout-form:before {
29
+ content: "\e900";
30
+ }
31
+ .wcf-el-icon-next-step:before {
32
+ content: "\e901";
33
+ }
34
+ .wcf-el-icon-optin-form:before {
35
+ content: "\e902";
36
+ }
37
+ .wcf-el-icon-order-detail:before {
38
+ content: "\e903";
39
+ }
assets/elementor-assets/fonts/wcf-el.eot ADDED
Binary file
assets/elementor-assets/fonts/wcf-el.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="wcf-el" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="checkout-form" d="M972.8-64h-921.6c-28.077 0.032-51.168 23.923-51.2 52.966v918.067c0.032 29.043 23.123 52.934 51.2 52.966h921.6c28.077-0.032 51.168-23.923 51.2-52.966v-918.067c-0.032-29.043-23.123-52.934-51.2-52.966zM989.869 783.45h-955.738v-794.483c0.013-9.683 7.712-17.645 17.069-17.658h921.6c9.357 0.013 17.056 7.974 17.069 17.658v794.483zM221.869 41.933h-68.269c-28.090 0-51.2 23.91-51.2 52.966s23.11 52.96 51.2 52.96h68.269c28.083 0 51.2-23.904 51.2-52.96s-23.117-52.966-51.2-52.966zM221.869 112.55h-68.269c-9.363 0-17.069-7.968-17.069-17.651 0-9.69 7.706-17.658 17.069-17.658h68.269c9.363 0 17.062 7.968 17.062 17.658 0 9.683-7.699 17.651-17.062 17.651zM759.411 352.813c46.035-0.435 90.816-27.878 111.859-68.934 17.728-34.592 18.227-77.472 1.363-112.442-23.981-49.734-82.675-80.39-138.746-69.267-51.021 10.118-93.35 54.72-100.602 106.445-5.626 40.173 9.453 82.662 39.123 110.285 22.95 21.363 53.997 33.619 85.37 33.914 0.544 0.006 1.088 0.006 1.632 0zM757.939 327.213c-46.029-0.435-88.979-35.437-98.227-80.589-6.797-33.19 4.442-69.446 28.826-92.966 27.994-27.014 72.147-35.84 108.755-20.614 32.384 13.478 56.685 44.922 61.338 79.75 5.696 42.586-19.072 87.661-58.528 105.51-13.21 5.978-27.635 8.96-42.163 8.909zM812.339 274.374c5.875-0.525 6.714-2.112 8.429-3.891 4.544-4.71 4.525-12.877-0.070-17.843l-69.222-70.63c-1.683-1.619-2.291-1.933-3.469-2.515-4.288-2.118-9.741-1.587-13.549 1.389-0.506 0.39-0.614 0.512-1.082 0.941l-36.704 35.968c-2.074 2.157-2.49 3.13-3.11 4.89-2.867 8.141 4.73 18.278 13.946 16.915 1.933-0.288 3.789-1.018 5.395-2.125 0.602-0.416 1.152-0.896 1.69-1.395l27.558-27.008 60.262 61.491c0 0 5.056 3.974 9.926 3.814zM529.069 253.792h-409.6c-9.363 0-17.069 7.968-17.069 17.658v70.618c0 9.69 7.706 17.658 17.069 17.658h409.6c9.363 0 17.062-7.968 17.062-17.658v-70.618c0-9.683-7.699-17.658-17.062-17.658zM512 324.416h-375.469v-35.315h375.469v35.315zM613.35 634.739c0.096 1.222 0.39 2.458 0.909 3.674 0.755 1.76 1.907 3.347 3.354 4.608 0.614 0.538 1.299 0.992 1.997 1.427l132.026 76.474c4.032 2.17 3.667 1.818 6.63 1.722 0.48 0.013 0.96-0.019 1.44-0.045 1.862-0.218 3.648-0.781 5.325-1.683l129.786-75.488c1.21-0.531 2.33-1.242 3.328-2.093 1.222-0.922 1.728-1.619 2.47-2.688 0.493-0.723 0.896-1.485 1.197-2.285 0.627-1.446 0.998-3.027 1.069-4.678v-150.733c-0.179-4.506-2.502-8.595-6.342-11.053l-132.026-77.197c-5.126-2.72-6.637-2.010-9.19-1.453-0.237 0.051-0.474 0.109-0.704 0.179-0.358 0.096-0.704 0.205-1.050 0.339-0.896 0.333-1.094 0.474-1.939 0.915l-132.39 76.832c-3.821 2.432-6.202 6.528-6.374 11.104l0.358 150.784c0.019 0.454 0.064 0.896 0.128 1.338zM529.069 395.034h-409.6c-9.363 0-17.069 7.968-17.069 17.658v70.618c0 9.69 7.706 17.658 17.069 17.658h409.6c9.363 0 17.062-7.968 17.062-17.658v-70.618c0-9.69-7.699-17.658-17.062-17.658zM638.483 489.946l106.771-61.965v122.566l-106.483 60.806c-0.096-40.467-0.192-80.934-0.288-121.408zM877.28 611.168l-106.426-61.651v-121.453l106.426 62.227v120.877zM512 465.658h-375.469v-35.315h375.469v35.315zM529.069 536.275h-409.6c-9.363 0-17.069 7.968-17.069 17.658v70.618c0 9.69 7.706 17.658 17.069 17.658h409.6c9.363 0 17.062-7.968 17.062-17.658v-70.618c0-9.69-7.699-17.658-17.062-17.658zM512 606.899h-375.469v-35.315h375.469v35.315zM718.182 595.488l40.768-23.277 105.632 61.184-40.397 23.494-106.003-61.402zM651.699 633.453l40.762-23.277 106.24 61.536-40.39 23.494-106.611-61.754zM290.131 677.517h-170.662c-9.363 0-17.069 7.968-17.069 17.658 0 9.683 7.706 17.651 17.069 17.651h170.662c9.363 0 17.069-7.968 17.069-17.651 0-9.69-7.706-17.658-17.069-17.658zM972.8 924.691h-921.6c-9.357-0.013-17.056-7.974-17.069-17.658v-88.275h955.738v88.275c-0.013 9.683-7.712 17.645-17.069 17.658zM221.869 889.382c9.414 0 17.062-7.917 17.062-17.658 0-9.747-7.648-17.658-17.062-17.658-9.421 0-17.069 7.91-17.069 17.658 0 9.741 7.648 17.658 17.069 17.658zM153.6 889.382c9.421 0 17.069-7.917 17.069-17.658 0-9.747-7.648-17.658-17.069-17.658s-17.069 7.91-17.069 17.658c0 9.741 7.648 17.658 17.069 17.658zM85.331 889.382c9.421 0 17.069-7.917 17.069-17.658 0-9.747-7.648-17.658-17.069-17.658-9.414 0-17.062 7.91-17.062 17.658 0 9.741 7.648 17.658 17.062 17.658z" />
11
+ <glyph unicode="&#xe901;" glyph-name="next-step" d="M147.904 427.52c-83.040-8.538-147.904-78.79-147.904-164.070 0-91.034 73.907-164.941 164.941-164.941s164.934 73.907 164.934 164.941c0 85.318-64.915 155.59-148 164.083l0.128 0.832c0.077 51.501 7.616 102.995 26.035 150.848 26.317 68.358 76.403 127.053 140.378 161.76 120.339 65.286 275.514 47.309 377.152-38.778 61.293-51.917 98.112-126.707 111.053-205.318l-18.829 17.926-0.614 0.557-0.634 0.525-0.666 0.493-0.685 0.454-0.704 0.429-0.723 0.39-0.749 0.358-0.755 0.32-0.781 0.282-0.787 0.243-0.794 0.211-0.813 0.166-0.813 0.128-0.819 0.090-0.826 0.051-0.819 0.006-0.826-0.032-0.826-0.070-0.813-0.109-0.813-0.147-0.806-0.186-0.794-0.23-0.781-0.262-0.768-0.301-0.749-0.339-0.736-0.378-0.717-0.41-0.691-0.442-0.672-0.48-0.653-0.506-0.621-0.544-0.602-0.57-0.563-0.595-0.544-0.621-0.506-0.653-0.474-0.672-0.448-0.698-0.41-0.717-0.371-0.736-0.339-0.749-0.301-0.768-0.262-0.781-0.23-0.794-0.186-0.806-0.147-0.806-0.109-0.819-0.070-0.819-0.032-0.826 0.013-0.826 0.051-0.826 0.090-0.819 0.128-0.813 0.173-0.806 0.205-0.8 0.243-0.787 0.288-0.774 0.32-0.762 0.352-0.742 0.397-0.723 0.429-0.71 0.454-0.685 0.499-0.659 0.518-0.634 0.557-0.614 65.389-62.272c-91.034 0-164.934-73.907-164.934-164.941s73.901-164.941 164.934-164.941c91.034 0 164.941 73.907 164.941 164.941s-73.907 164.941-164.941 164.941l11.194 11.757c0.646 0.582 1.152 1.12 1.574 1.651l49.478 52.006 0.525 0.64 0.493 0.659 0.461 0.685 0.422 0.71 0.397 0.723 0.352 0.742 0.32 0.762 0.288 0.774 0.243 0.787 0.205 0.8 0.166 0.806 0.128 0.813 0.090 0.819 0.051 0.826 0.013 0.826-0.032 0.826-0.070 0.819-0.109 0.819-0.154 0.813-0.186 0.8-0.224 0.794-0.269 0.781-0.301 0.768-0.339 0.749-0.371 0.736-0.41 0.717-0.448 0.698-0.474 0.672-0.512 0.646-0.538 0.627-0.57 0.595-0.595 0.57-0.627 0.538-0.646 0.512-0.678 0.474-0.691 0.442-0.717 0.41-0.736 0.378-0.755 0.333-0.768 0.307-0.781 0.262-0.794 0.224-0.8 0.186-0.813 0.154-0.819 0.109-0.819 0.064-0.826 0.032-0.826-0.013-0.819-0.045-0.819-0.090-0.819-0.134-0.806-0.166-0.8-0.205-0.787-0.25-0.774-0.282-0.755-0.32-0.749-0.358-0.723-0.39-0.704-0.429-0.685-0.461-0.659-0.493-0.64-0.525-0.608-0.557-0.582-0.582-24.019-25.229c-5.984 44.768-18.643 88.768-39.123 128.89-61.792 121.043-191.904 193.658-324.685 194.163-0.698 0-1.389 0-2.086 0-102.534-0.448-203.898-43.84-269.632-120.915-60.787-71.27-87.584-166.278-88.582-259.315-0.013-1.485-0.026-2.963-0.032-4.448 0-0.864 0.006-1.638 0.032-2.355zM859.059 393.261c71.648 0 129.811-58.163 129.811-129.811 0-71.642-58.163-129.811-129.811-129.811-71.642 0-129.811 58.17-129.811 129.811 0 71.648 58.17 129.811 129.811 129.811z" />
12
+ <glyph unicode="&#xe902;" glyph-name="optin-form" d="M915.904-64h-807.808c-3.955 0.518-7.93 1.677-10.662 4.416-2.778 2.778-3.891 6.675-4.422 10.662v993.843c0.877 6.624 4.749 12.838 11.181 14.566 1.267 0.339 2.598 0.339 3.904 0.512h807.808c1.306-0.173 2.605-0.346 3.904-0.512 4.96-2.054 9.318-5.645 10.662-10.662 0.339-1.267 0.346-2.605 0.518-3.904v-993.843c-0.877-6.624-4.749-12.838-11.181-14.566-1.267-0.339-2.598-0.339-3.904-0.512zM123.174 929.837v-963.674h777.651v963.674h-777.651zM828.32 52.602l-56.512 56.506 27.718 27.712c2.4 2.4 3.386 5.875 2.605 9.178-0.781 3.309-3.213 5.971-6.438 7.046l-166.278 55.424c-3.52 1.178-7.398 0.262-10.022-2.368-2.624-2.624-3.546-6.502-2.368-10.022l55.424-166.278c1.075-3.226 3.738-5.658 7.046-6.438 3.302-0.781 6.778 0.205 9.178 2.605l27.712 27.718 56.512-56.512c1.907-1.914 4.416-2.867 6.925-2.867s5.018 0.954 6.925 2.867l41.574 41.574c3.827 3.827 3.827 10.029 0 13.856zM779.821 17.958l-56.506 56.506c-3.827 3.827-10.035 3.827-13.856 0l-23.43-23.43-44.218 132.646 132.646-44.211-23.43-23.437c-3.821-3.821-3.827-10.029 0-13.856l56.506-56.506-27.712-27.712zM767.571 330.253c11.776-0.224 22.381-10.285 22.611-22.605 0.134-21.037 0.134-42.080 0-63.123-0.224-11.795-10.291-22.374-22.605-22.605-89.965-0.595-179.936-0.595-269.901 0-11.757 0.224-22.368 10.285-22.598 22.605-0.141 21.043-0.141 42.086 0 63.123 0.218 11.814 10.266 22.374 22.605 22.605 89.958 0.544 179.93 0.544 269.888 0zM760.019 300.096h-254.784v-48.019h254.784v48.019zM389.51 305.888h-190.944c-9.837 0.122-18.566 8.602-18.688 18.688v178.080c0.122 9.766 8.448 18.566 18.688 18.694 63.776 0 127.558 0.794 191.328-0.006 9.69-0.371 18.176-8.627 18.304-18.682v-178.086c-0.122-9.779-8.403-18.56-18.688-18.688zM378.042 491.187h-168.006v-155.142h168.006v155.142zM829.766 392.506h-330.048c-1.472 0.058-1.843 0.026-3.302 0.262-12.896 2.042-21.824 18.042-15.507 30.432 3.501 6.867 10.925 11.219 18.81 11.526h330.048c0.557-0.019 1.107-0.038 1.658-0.064 1.466-0.173 1.837-0.173 3.27-0.518 14.266-3.424 21.254-24.205 10.003-35.456-3.91-3.91-9.35-5.965-14.931-6.182zM829.766 479.366h-330.048c-14.336 0.563-25.779 17.011-18.81 30.694 3.008 5.914 8.947 10.234 15.507 11.27 1.459 0.23 1.83 0.205 3.302 0.262h330.048c0.557-0.026 1.107-0.045 1.658-0.070 1.466-0.173 1.837-0.173 3.27-0.518 14.266-3.424 21.254-24.205 10.003-35.456-3.91-3.91-9.35-5.965-14.931-6.182zM829.766 566.227h-634.81c-8.518 1.037-16.659 5.491-19.744 13.626-4.25 11.219 3.008 25.107 14.688 27.987 1.651 0.403 3.373 0.41 5.056 0.614h634.81c1.683-0.205 3.373-0.41 5.056-0.614 9.53-3.616 17.197-12.384 15.904-23.046-0.826-6.822-5.165-13.005-11.149-16.147-4.051-2.131-5.363-1.875-9.811-2.419zM829.766 649.472h-634.81c-6.861 0.832-13.504 3.507-17.376 9.12-5.837 8.454-4.371 20.934 3.373 27.795 3.802 3.366 8.851 4.685 14.003 5.306h634.81c1.683-0.205 3.373-0.41 5.056-0.614 8.019-3.040 14.854-9.312 15.904-17.952 1.037-8.525-3.635-17.293-11.149-21.235-4.051-2.131-5.363-1.882-9.811-2.419zM829.766 739.949h-634.81c-10.118 1.229-19.667 7.91-20.96 18.566-1.242 10.234 5.939 20.589 15.904 23.046 1.651 0.403 3.373 0.41 5.056 0.614h634.81c1.683-0.205 3.373-0.41 5.056-0.614 4.851-1.837 9.434-4.326 12.32-8.506 6.765-9.798 3.405-24.934-7.565-30.688-4.051-2.125-5.363-1.875-9.811-2.419zM522.272 826.81h-327.315c-1.472 0.058-1.85 0.032-3.302 0.262-12.896 2.042-21.824 18.042-15.507 30.438 3.494 6.861 10.918 11.219 18.81 11.526h327.315c0.55-0.019 1.101-0.045 1.658-0.064 10.035-1.19 18.605-9.414 19.386-19.392 0.826-10.432-7.187-20.838-17.741-22.509-1.459-0.23-1.83-0.205-3.302-0.262z" />
13
+ <glyph unicode="&#xe903;" glyph-name="order-detail" d="M962.131 960c40.736 0 61.869-27.546 61.869-61.395v-901.229c0-33.843-21.133-61.376-61.869-61.376h-902.266c-40.73 0-59.866 27.533-59.866 61.376v901.229c0 33.85 19.136 61.395 59.866 61.395h902.266zM966.246-25.088c10.598 0 19.194 8.589 19.194 19.187 0 121.798 0 786.003 0 907.802 0 10.598-8.595 19.187-19.194 19.187-121.51 0-782.835 0-904.352 0-10.598 0-19.187-8.589-19.187-19.187 0-121.798 0-786.003 0-907.802 0-10.598 8.589-19.187 19.187-19.187 121.517 0 782.842 0 904.352 0zM197.677 92.947h-30.086c-11.398 0-20.646 9.926-20.646 22.17 0 12.25 9.248 22.176 20.646 22.176h30.086c11.405 0 20.646-9.926 20.646-22.176 0-12.243-9.242-22.17-20.646-22.17zM667.68 92.947h-30.093c-11.398 0-20.64 9.926-20.64 22.17 0 12.25 9.242 22.176 20.64 22.176h30.093c11.398 0 20.64-9.926 20.64-22.176 0-12.243-9.242-22.17-20.64-22.17zM559.584 92.947h-291.885c-11.405 0-20.646 9.926-20.646 22.17 0 12.25 9.242 22.176 20.646 22.176h291.885c11.398 0 20.64-9.926 20.64-22.176 0-12.243-9.242-22.17-20.64-22.17zM856.41 92.947h-99.776c-11.398 0-20.646 9.926-20.646 22.17 0 12.25 9.248 22.176 20.646 22.176h99.776c11.398 0 20.646-9.926 20.646-22.176 0-12.243-9.248-22.17-20.646-22.17zM197.677 179.181h-30.086c-11.398 0-20.646 9.926-20.646 22.176 0 12.243 9.248 22.17 20.646 22.17h30.086c11.405 0 20.646-9.926 20.646-22.17 0-12.25-9.242-22.176-20.646-22.176zM667.68 179.181h-30.093c-11.398 0-20.64 9.926-20.64 22.176 0 12.243 9.242 22.17 20.64 22.17h30.093c11.398 0 20.64-9.926 20.64-22.17 0-12.25-9.242-22.176-20.64-22.176zM559.584 179.181h-291.885c-11.405 0-20.646 9.926-20.646 22.176 0 12.243 9.242 22.17 20.646 22.17h291.885c11.398 0 20.64-9.926 20.64-22.17 0-12.25-9.242-22.176-20.64-22.176zM856.41 179.181h-99.776c-11.398 0-20.646 9.926-20.646 22.176 0 12.243 9.248 22.17 20.646 22.17h99.776c11.398 0 20.646-9.926 20.646-22.17 0-12.25-9.248-22.176-20.646-22.176zM197.677 265.414h-30.086c-11.398 0-20.646 9.933-20.646 22.176s9.248 22.176 20.646 22.176h30.086c11.405 0 20.646-9.933 20.646-22.176s-9.242-22.176-20.646-22.176zM667.68 265.414h-30.093c-11.398 0-20.64 9.933-20.64 22.176s9.242 22.176 20.64 22.176h30.093c11.398 0 20.64-9.933 20.64-22.176s-9.242-22.176-20.64-22.176zM559.584 265.414h-291.885c-11.405 0-20.646 9.933-20.646 22.176s9.242 22.176 20.646 22.176h291.885c11.398 0 20.64-9.933 20.64-22.176s-9.242-22.176-20.64-22.176zM856.41 265.414h-99.776c-11.398 0-20.646 9.933-20.646 22.176s9.248 22.176 20.646 22.176h99.776c11.398 0 20.646-9.933 20.646-22.176s-9.248-22.176-20.646-22.176zM197.677 351.654h-30.086c-11.398 0-20.646 9.926-20.646 22.17 0 12.25 9.248 22.176 20.646 22.176h30.086c11.405 0 20.646-9.926 20.646-22.176 0-12.243-9.242-22.17-20.646-22.17zM667.68 351.654h-30.093c-11.398 0-20.64 9.926-20.64 22.17 0 12.25 9.242 22.176 20.64 22.176h30.093c11.398 0 20.64-9.926 20.64-22.176 0-12.243-9.242-22.17-20.64-22.17zM559.584 351.654h-291.885c-11.405 0-20.646 9.926-20.646 22.17 0 12.25 9.242 22.176 20.646 22.176h291.885c11.398 0 20.64-9.926 20.64-22.176 0-12.243-9.242-22.17-20.64-22.17zM856.41 351.654h-99.776c-11.398 0-20.646 9.926-20.646 22.17 0 12.25 9.248 22.176 20.646 22.176h99.776c11.398 0 20.646-9.926 20.646-22.176 0-12.243-9.248-22.17-20.646-22.17zM355.834 729.178c0.205 1.69 0.71 3.379 1.562 5.018 1.018 1.946 2.438 3.686 4.141 5.069 0.736 0.595 1.53 1.101 2.336 1.581l140.448 78.182c4.205 2.189 5.203 2.182 8.358 2.035 0.256 0 0.525 0 0.806-0.006 1.171-0.083 2.33-0.282 3.45-0.582 2.042-0.461 3.36-1.082 4.358-1.811l136.218-76.134c0.826-0.25 1.363-0.544 2.15-0.922l0.045-0.019c1.434-0.576 2.355-1.274 3.142-2.054 3.59-3.040 5.798-7.693 5.978-12.512v-154.099c-0.218-5.792-3.219-11.027-8.262-14.118l-140.442-78.918c-3.514-1.805-4.691-1.901-6.906-2.042-0.973-0.064-1.946-0.019-2.893 0.122-1.306 0.128-2.592 0.416-3.84 0.883-0.998 0.378-1.229 0.531-2.176 1.011l-140.826 78.554c-5.005 3.027-8.109 8.288-8.307 14.176l0.384 154.157c0.032 0.819 0.128 1.632 0.275 2.432zM387.578 582.048l108.422-60.48v118.477l-108.128 59.341c-0.096-39.11-0.198-78.227-0.294-117.338zM636.448 699.162l-108.064-60.16v-117.331l108.064 60.723v116.768zM475.936 687.994l37.203-20.416 106.266 59.155-36.864 20.602-106.605-59.341zM405.216 726.803l37.197-20.416 106.912 59.514-36.858 20.608-107.251-59.706z" />
14
+ </font></defs></svg>
assets/elementor-assets/fonts/wcf-el.ttf ADDED
Binary file
assets/elementor-assets/fonts/wcf-el.woff ADDED
Binary file
assets/min-css/checkout-template-rtl.min.css CHANGED
@@ -1 +1 @@
1
- .cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-left:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:left;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-right-width:2px;border-right-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-right:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;right:0;margin:-1em 2em 0 0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-right:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row select,.wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;right:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 8px 0 0}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:right;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-left:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:right}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:right;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{right:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:right;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-left:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
1
+ .cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-left:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:left;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-right-width:2px;border-right-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:right;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:8px 0 0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-right:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:"";display:block;border:1em solid;border-left-color:transparent;border-right-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;right:0;margin:-1em 2em 0 0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-right:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row select,.wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;right:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:"\e016"}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 8px 0 0}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:right;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-left:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;color:#fff;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:10px 6px}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:right;padding-left:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{margin:1em 0 0;background-color:#f7f7f7;padding:15px}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:right}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:right;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{right:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:""}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:right;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-left:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form-two-column .woocommerce .wcf-product-option-wrap.wcf-product-option-before-order{width:45%}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-wrap.wcf-product-option-before-order{display:none}
assets/min-css/checkout-template.min.css CHANGED
@@ -1 +1 @@
1
- .cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-right:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:right;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-left-width:2px;border-left-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-left:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:'';display:block;border:1em solid;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;left:0;margin:-1em 0 0 2em}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-left:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row select,.wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;left:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:'\e016'}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 0 0 8px}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:left;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-right:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:8px 6px;background-color:#c8c8c8;border:1px #c8c8c8 solid}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{padding:1em 0}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:left}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:left;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{left:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:''}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:left;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-right:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
1
+ .cartflows-container .wcf-embed-checkout-form,.cartflows-container .wcf-embed-checkout-form *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form .wc-backward{display:none!important}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:50%;display:block}.wcf-embed-checkout-form .woocommerce form .form-row-full,.wcf-embed-checkout-form .woocommerce-page form .form-row-full{width:100%;clear:both}.wcf-embed-checkout-form form .form-row-wide{width:100%}.wcf-embed-checkout-form form .wcf-column-33{width:33.33%}.wcf-embed-checkout-form .woocommerce form .form-row-first,.woocommerce-page form .form-row-first{float:left;clear:left}.wcf-embed-checkout-form .woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right;clear:right}.wcf-embed-checkout-form .woocommerce form .form-row .required{color:red;font-weight:700;border:0!important;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove{font-family:cartflows-icon;display:inline-block;font-size:10px;border:1px #4d5763 solid;-webkit-border-radius:50%;border-radius:50%;padding:1px;color:#4d5763!important;line-height:1;margin-right:5px;text-align:center;font-weight:100;width:14px;height:14px;background-color:#fff}.wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover{color:#f1653c!important;border:1px #f1653c solid;background-color:#fff}.wcf-embed-checkout-form form .form-row-first.form-row-one{clear:both}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login{display:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row{margin-bottom:15px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .clear{clear:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label{margin:0;line-height:1em;padding-top:0;position:relative;top:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .login-form-actions{-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:0}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .remember_me{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;font-family:inherit;font-size:13px}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me label{margin-bottom:0;vertical-align:text-top}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me input,.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row .remember_me span{vertical-align:middle}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .lost_password{text-align:right;margin-top:0;margin-bottom:0}.wcf-embed-checkout-form .woocommerce .blockUI.blockOverlay{font-size:15px}.wcf-embed-checkout-form .woocommerce form .form-row.mt20{margin-top:20px}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select{border-width:1px;border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated .select2-container,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-validated select{border-width:1px}.wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,.wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,.wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required{border-color:#e2401c}.wcf-embed-checkout-form .woocommerce form .form-row input.field-validated{border-left-width:2px;border-left-color:#69bf29}.wcf-embed-checkout-form .wcf-checkout-header-image{text-align:center}.wcf-embed-checkout-form .woocommerce #payment [type=radio]:checked+label,.wcf-embed-checkout-form .woocommerce #payment [type=radio]:not(:checked)+label{padding:0}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{content:"\e600";margin:0;color:#f16334}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox],.wcf-embed-checkout-form .woocommerce #payment input[type=radio],.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox],.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:focus,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:focus{border-color:#f16334;-webkit-box-shadow:0 0 2px rgba(241,99,52,.8);box-shadow:0 0 2px rgba(241,99,52,.8)}.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before{background-color:#f16334;-webkit-border-radius:50px;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-account-fields input[type=checkbox]:before,.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields [type=checkbox]:checked:before,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type=checkbox]:checked:before{display:inline-block;float:left;font:normal 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li input[type=checkbox]{min-width:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2{float:none;width:100%;max-width:100%;padding:0;-webkit-border-radius:0;border-radius:0;border:none;border-color:none;margin-bottom:0}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:0;width:100%}.wcf-embed-checkout-form .woocommerce-checkout #payment{background:unset;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row{margin:0;padding:8px 0 0}.wcf-embed-checkout-form .woocommerce-checkout #payment .form-row label.checkbox{display:block;margin-bottom:1.1em}.wcf-embed-checkout-form .woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;margin-left:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 .5em}.wcf-embed-checkout-form .woocommerce-checkout #payment fieldset .form-row .wcf-embed-checkout-form .woocommerce-checkout #payment fieldset p{margin-bottom:10px}.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box{background-color:#eaeaea;font-family:inherit;font-weight:inherit;margin-bottom:.5em}.wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,.wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before{content:"";display:block;border:1em solid;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:#eaeaea;position:absolute;top:-.75em;left:0;margin:-1em 0 0 2em}.wcf-embed-checkout-form .select2-container--default .select2-selection--single{display:block;width:100%;min-height:34px;height:auto;padding:11px 12px;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered{color:#666;line-height:19px;min-height:19px;overflow:visible;padding-left:0}.select2-results__option[data-selected],.wcf-embed-checkout-form .select2-results__option[aria-selected]{font-size:14px}.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow{height:100%}.select2-dropdown{border:1px solid #d4d4d4}.wcf-embed-checkout-form .woocommerce #order_review .input-text,.wcf-embed-checkout-form .woocommerce form .form-row input.input-text,.wcf-embed-checkout-form .woocommerce form .form-row select,.wcf-embed-checkout-form .woocommerce form .form-row textarea{display:block;width:100%;min-height:34px;padding:11px 12px;font-family:inherit;font-weight:inherit;font-size:14px;line-height:1.42857143!important;color:#555;background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;height:auto}.wcf-embed-checkout-form #order_review{padding:3px;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message{padding:0 2em 1.2em 2em;background-color:transparent;border:none;margin:0;width:100%}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{list-style:none!important;margin:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before,.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-message::before{top:0;left:0}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error::before{content:"\e016"}.wcf-embed-checkout-form .woocommerce .wcf-custom-coupon-field .woocommerce-error li{margin:0 0 0 8px}.wcf-embed-checkout-form .woocommerce #order_review .wcf-custom-coupon-field input[type=text]{font-weight:400}.wcf-embed-checkout-form .wcf-custom-coupon-field{clear:left;-js-display:flex;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-bottom:15px;margin-top:25px;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;padding-top:25px;padding-bottom:25px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcf-embed-checkout-form #order_review .wcf-coupon-col-1{width:70%;display:inline-block;padding-right:20px}.wcf-embed-checkout-form #order_review .wcf-coupon-col-2{width:30%}.wcf-embed-checkout-form .select2-container--open,.wcf-embed-checkout-form input[type=email]:focus,.wcf-embed-checkout-form input[type=password]:focus,.wcf-embed-checkout-form input[type=tel]:focus,.wcf-embed-checkout-form input[type=text]:focus,.wcf-embed-checkout-form textarea:focus{border-color:#b3b3b3;-webkit-box-shadow:none;box-shadow:none;outline:0}.wcf-embed-checkout-form button:focus{outline:0;outline-color:none;outline-style:none;outline-width:none}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,.wcf-embed-checkout-form form.checkout_coupon .button{display:block;clear:both;border:none;font-size:15px;font-family:inherit;font-weight:inherit;background-color:#f16334;color:#fff;line-height:9px;padding:18px;margin-bottom:10px;width:100%}.wcf-embed-checkout-form .woocommerce #order_review button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;font-size:18px;letter-spacing:.5px;width:100%;padding:16px 24px;font-size:16px;line-height:1.5;-webkit-border-radius:3px;border-radius:3px;color:#fff}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small{padding:10px 6px}.wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover{border-color:#f16334;background-color:#f16334}.wcf-embed-checkout-form .woocommerce #payment #place_order:hover{background-color:#f16334;border-color:#f16334;color:#fff}.wcf-embed-checkout-form .woocommerce-checkout{display:inline-block;text-align:inherit;width:100%}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:inline-block;width:55%;float:left;padding-right:40px;margin:20px 0 0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0 -7px;-ms-flex-wrap:wrap;flex-wrap:wrap;-js-display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:flex;display:-webkit-flex;flex-wrap:wrap;-webkit-flex-wrap:wrap}.wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper{margin:0 -7px}.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap{display:inline-block;float:none;width:45%;border:none;background-color:inherit;padding:0 10px;-webkit-border-radius:3px;border-radius:3px}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{display:inline-block;font-family:inherit;font-weight:600;width:100%;margin:20px 0 0;padding:3px 3px 20px;border:none;border-bottom:none}.wcf-embed-checkout-form .woocommerce-checkout #payment{background-color:inherit;border:none;-webkit-border-radius:0;border-radius:0}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{margin:1em 0 0;background-color:#f7f7f7;padding:15px}.wcf-embed-checkout-form #add_payment_method #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-cart #payment ul.payment_methods,.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods{border:none}.wcf-embed-checkout-form #payment ul.payment_methods li,.wcf-embed-checkout-form #payment ul.payment_methods li:hover{background-color:transparent}.wcf-embed-checkout-form .woocommerce form .form-row{display:block;margin-bottom:1.1em;padding:3px 7px;position:relative}.wcf-embed-checkout-form .woocommerce form .woocommerce-account-fields .form-row{padding:0}.wcf-embed-checkout-form table.shop_table{border:none;border-bottom:0;background-color:inherit;-webkit-border-radius:0;border-radius:0;font-family:inherit;font-weight:inherit;font-size:.95em;margin:0!important;border-collapse:collapse;text-align:left}.wcf-embed-checkout-form table.shop_table td strong.product-quantity{font-weight:400}.wcf-embed-checkout-form table.shop_table #shipping_method{margin:0;padding:0;list-style:none}.wcf-embed-checkout-form table.shop_table #shipping_method .amount{font-weight:400}.wcf-embed-checkout-form table.shop_table th{border:none;font-weight:400;padding:9px 0;line-height:1.2em}.wcf-embed-checkout-form table.shop_table tfoot tr:last-child .woocommerce-Price-amount{font-size:1em}.wcf-embed-checkout-form table.shop_table td,.wcf-embed-checkout-form table.shop_table td dl dd,.wcf-embed-checkout-form table.shop_table td dl dt,.wcf-embed-checkout-form table.shop_table th{background-color:transparent;border:none;padding:.6em 0;line-height:1.4em}.wcf-embed-checkout-form table.shop_table td dl dd p{margin-top:0}.wcf-embed-checkout-form table.shop_table tbody th,.wcf-embed-checkout-form table.shop_table tfoot td,.wcf-embed-checkout-form table.shop_table tfoot th{border:none;display:table-cell;font-weight:400;width:50%}.wcf-embed-checkout-form table.shop_table thead{background-color:transparent}.wcf-embed-checkout-form table.shop_table tbody{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table th.product-name,.wcf-embed-checkout-form table.shop_table th.product-total{font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) td,.wcf-embed-checkout-form table.shop_table tfoot tr.order-total:not(.recurring-total) th{font-weight:600;border-top:1px dashed #ccc}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{padding-top:1.8em;font-weight:600}.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total td,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-total th,.wcf-embed-checkout-form table.shop_table tfoot tr.recurring-totals th{vertical-align:top}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(1),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(1){width:70%}.wcf-embed-checkout-form table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form table.shop_table thead tr th:nth-child(2){width:30%}.wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row label,.wcf-embed-checkout-form .woocommerce-checkout .form-row label{font-size:13px;line-height:1em;letter-spacing:.3px;font-family:inherit;font-weight:inherit;margin-bottom:8px}.wcf-embed-checkout-form .woocommerce .woocommerce-billing-fields label,.wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields label{display:inherit}.wcf-embed-checkout-form .woocommerce .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text{line-height:20px;text-transform:none}.wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p{font-family:inherit;font-weight:inherit;font-size:11px;color:#777;margin-top:0;text-align:justify}.wcf-embed-checkout-form #payment .wc_payment_methods .payment_box p{margin:0}.wcf-embed-checkout-form .woocommerce a{color:#f16334;background-color:transparent;text-decoration:none}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-info,.wcf-embed-checkout-form .woocommerce .woocommerce-message,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 2em .4em 2em;border-top:none;background-color:inherit;font-size:14px;font-weight:500;text-align:left;margin:0}.wcf-embed-checkout-form .woocommerce-info::before,.wcf-embed-checkout-form .woocommerce-message::before{left:.1em;color:#f16334}.wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-error,.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error{background-color:#fff6f6;border:dashed 1px #a00;padding:25px 25px 20px;color:#a00;margin:1rem 0 1rem;font-size:14px;width:100%}.wcf-embed-checkout-form .woocommerce .woocommerce-error::before{content:""}.wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods li:not(.woocommerce-notice)::before{display:inline}.wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-message{margin:1em 0 1em}.wcf-embed-checkout-form .woocommerce .woocommerce-error li{list-style:disc inside!important;margin:0 0 8px}.wcf-embed-checkout-form .woocommerce .woocommerce-error li strong{font-weight:400}.wcf-embed-checkout-form .woocommerce form.checkout_coupon{border:1px solid #d3ced2;padding:30px 20px 20px;margin:2em 0;text-align:left;-webkit-border-radius:5px;border-radius:5px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-size:14px}.wcf-embed-checkout-form .woocommerce .checkout_coupon p{font-family:inherit;font-weight:500;margin-top:0;margin-bottom:10px}@media only screen and (max-width:768px){.wcf-embed-checkout-form form .wcf-column-33{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review_heading{width:100%}.wcf-embed-checkout-form .woocommerce-checkout #order_review{width:100%}.wcf-embed-checkout-form .woocommerce-checkout .wcf-order-wrap{width:100%}.wcf-embed-checkout-form .woocommerce-checkout{display:block}.wcf-embed-checkout-form .woocommerce-checkout .col2-set,.wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set{display:block;width:100%;padding-right:0;margin:20px 0 0}.wcf-embed-checkout-form form.checkout_coupon .button{font-size:12px}.wcf-bump-order-field-wrap .wcf-bump-order-label{font-size:16px}.wcf-embed-checkout-form .woocommerce .col2-set .col-1,.wcf-embed-checkout-form .woocommerce .col2-set .col-2,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-1,.wcf-embed-checkout-form .woocommerce-page .wcf-col2-set .wcf-col-2,.wcf-embed-checkout-form .woocommerce-page .wcf-order-wrap{padding:15px 18px}.wcf-embed-checkout-form .woocommerce form .form-row-first,.wcf-embed-checkout-form .woocommerce form .form-row-last,.wcf-embed-checkout-form .woocommerce-page form .form-row-first,.wcf-embed-checkout-form .woocommerce-page form .form-row-last{width:100%}.wcf-embed-checkout-form #order_review_heading,.wcf-embed-checkout-form .woocommerce #ship-to-different-address,.wcf-embed-checkout-form .woocommerce-additional-fields>h3,.wcf-embed-checkout-form .woocommerce-billing-fields>h3{font-size:1em}}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_social_icon a.icon:before,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,.woocommerce #content input.button.alt:after,.woocommerce #content input.button:after,.woocommerce #respond input#submit.alt:after,.woocommerce #respond input#submit:after,.woocommerce a.button.alt:after,.woocommerce button.button.alt:after,.woocommerce button.button:after,.woocommerce button.single_add_to_cart_button.button:after,.woocommerce input.button.alt:after,.woocommerce input.button:after,.woocommerce-page #content input.button.alt:after,.woocommerce-page #content input.button:after,.woocommerce-page #respond input#submit.alt:after,.woocommerce-page #respond input#submit:after,.woocommerce-page a.button.alt:after,.woocommerce-page a.button:after,.woocommerce-page button.button.alt:after,.woocommerce-page button.button:after,.woocommerce-page input.button.alt:after,.woocommerce-page input.button:after,a.et_pb_more_button:after{text-shadow:0 0;font-family:none;font-weight:400;font-style:normal;font-variant:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;text-transform:none;speak:none}.comment-reply-link:hover:after,.woocommerce #content input.button.alt:hover:after,.woocommerce #content input.button:hover:after,.woocommerce #respond input#submit.alt:hover:after,.woocommerce #respond input#submit:hover:after,.woocommerce a.button.alt:hover:after,.woocommerce a.button:hover:after,.woocommerce button.button.alt:hover:after,.woocommerce button.button:hover:after,.woocommerce input.button.alt:hover:after,.woocommerce input.button:hover:after,.woocommerce-page #content input.button.alt:hover:after,.woocommerce-page #content input.button:hover:after,.woocommerce-page #respond input#submit.alt:hover:after,.woocommerce-page #respond input#submit:hover:after,.woocommerce-page a.button.alt:hover:after,.woocommerce-page a.button:hover:after,.woocommerce-page button.button.alt:hover:after,.woocommerce-page button.button:hover:after,.woocommerce-page input.button.alt:hover:after,.woocommerce-page input.button:hover:after{opacity:0}.thrv_wrapper .wcf-embed-checkout-form div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wcf-embed-checkout-form-two-column .woocommerce .wcf-product-option-wrap.wcf-product-option-before-order{width:45%}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-wrap.wcf-product-option-before-order{display:none}
cartflows.php CHANGED
@@ -3,12 +3,12 @@
3
  * Plugin Name: CartFlows
4
  * Plugin URI: https://cartflows.com/
5
  * Description: Create beautiful checkout pages & sales flows for WooCommerce.
6
- * Version: 1.5.17
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.4.1
12
  *
13
  * @package CartFlows
14
  */
3
  * Plugin Name: CartFlows
4
  * Plugin URI: https://cartflows.com/
5
  * Description: Create beautiful checkout pages & sales flows for WooCommerce.
6
+ * Version: 1.5.18
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.5.2
12
  *
13
  * @package CartFlows
14
  */
changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  Version 1.5.17 - Tuesday, 8th September 2020
2
  - New: Added Braintree subscription product compatibility. Now, you can select it on the checkout page meta setting.
3
  - Improvement: Added compatibility for a future release of CartFlows Pro.
1
+ Version 1.5.18 - Tuesday, 29th September 2020
2
+ - New: Introduced Elementor widgets.
3
+ - Improvement: Added split test compatibility for a global checkout.
4
+ - Improvement: Added compatibility for a future release of CartFlows Pro.
5
+ - Fix: Place order button text option was not working for the optin page when the optin page was set as homepage.
6
+
7
  Version 1.5.17 - Tuesday, 8th September 2020
8
  - New: Added Braintree subscription product compatibility. Now, you can select it on the checkout page meta setting.
9
  - Improvement: Added compatibility for a future release of CartFlows Pro.
classes/class-cartflows-admin-fields.php CHANGED
@@ -1,271 +1,277 @@
1
- <?php
2
- /**
3
- * CARTFLOWS Admin Fields.
4
- *
5
- * @package CARTFLOWS
6
- */
7
-
8
- /**
9
- * Class Cartflows_Admin_Fields.
10
- */
11
- class Cartflows_Admin_Fields {
12
-
13
- /**
14
- * Title Field
15
- *
16
- * @param array $args Args.
17
- * @return string
18
- */
19
- public static function title_field( $args ) {
20
-
21
- $title = $args['title'];
22
- $description = isset( $args['description'] ) ? $args['description'] : '';
23
-
24
- $output = '<h4 class="form-field wcf-title-field">';
25
- $output .= '<span>' . $title . '</span>';
26
- $output .= '</h4>';
27
-
28
- if ( ! empty( $description ) ) {
29
- $output .= '<div class="form-field-desc">';
30
- $output .= '<p>' . $description . '</p>';
31
- $output .= '</div>';
32
- }
33
-
34
- return $output;
35
- }
36
-
37
- /**
38
- * Text Field
39
- *
40
- * @param array $args Args.
41
- * @return string
42
- */
43
- public static function text_field( $args ) {
44
-
45
- $id = $args['id'];
46
- $name = $args['name'];
47
- $title = $args['title'];
48
- $value = $args['value'];
49
- $description = isset( $args['description'] ) ? $args['description'] : '';
50
- $placeholder = isset( $args['placeholder'] ) ? $args['placeholder'] : '';
51
-
52
- $output = '<div class="form-field" id="form-field-' . $id . '">';
53
- $output .= '<label for="' . $id . '">' . $title . '</label>';
54
- $output .= '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_attr( $value ) . '">';
55
- $output .= '</div>';
56
-
57
- if ( ! empty( $description ) ) {
58
- $output .= '<div class="form-field-desc">';
59
- $output .= '<p>';
60
- $output .= $description;
61
- $output .= '</p>';
62
- $output .= '</div>';
63
- }
64
-
65
- return $output;
66
- }
67
-
68
- /**
69
- * URL Field
70
- *
71
- * @param array $args Args.
72
- * @return string
73
- */
74
- public static function url_field( $args ) {
75
-
76
- $id = $args['id'];
77
- $name = $args['name'];
78
- $title = $args['title'];
79
- $value = $args['value'];
80
-
81
- $output = '<div class="form-field">';
82
- $output .= '<label for="' . $id . '">' . $title . '</label>';
83
- $output .= '<input type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_url( $value ) . '">';
84
- $output .= '</div>';
85
-
86
- return $output;
87
- }
88
-
89
- /**
90
- * Checkbox Field
91
- *
92
- * @param array $args Args.
93
- * @return string
94
- */
95
- public static function checkobox_field( $args ) {
96
-
97
- $id = $args['id'];
98
- $name = $args['name'];
99
- $title = $args['title'];
100
- $value = $args['value'];
101
-
102
- $output = '<div class="form-field" id="form-field-' . $id . '">';
103
- $output .= '<label for="' . $id . '">';
104
- $output .= '<input type="hidden" id="wcf_hid_' . $id . '" name="' . $name . '" value="disable">';
105
- $output .= '<input type="checkbox" id="wcf_' . $id . '" name="' . $name . '" value="enable" ' . checked( $value, 'enable', false ) . '>';
106
- $output .= $title;
107
- $output .= '</label>';
108
- $output .= '</div>';
109
-
110
- return $output;
111
- }
112
-
113
- /**
114
- * Radio Field
115
- *
116
- * @param array $args Args.
117
- * @return string
118
- */
119
- public static function radio_field( $args ) {
120
-
121
- $name = $args['name'];
122
- $id = $args['id'];
123
- $options = $args['options'];
124
- $value = $args['value'];
125
-
126
- $output = '';
127
-
128
- if ( isset( $args['title'] ) ) {
129
- $output .= '<h4 class="form-field-label">';
130
- $output .= '<span>' . $args['title'] . '</span>';
131
- $output .= '</h4>';
132
- }
133
-
134
- foreach ( $options as $type => $data ) {
135
-
136
- $output .= '<div class="form-field">';
137
- $output .= '<label for="' . $id . '">';
138
- $output .= '<input type="radio" class="wcf_permalink_structure" name="' . $name . '" value="' . $type . '" ' . checked( $value, $type, false ) . '>' . $data['label'] . '</label>';
139
- $output .= '<div class="form-field-desc">';
140
- $output .= '<p>';
141
-
142
- $output .= $data['description'];
143
-
144
- $output .= '</p>';
145
- $output .= '</div>';
146
- $output .= '</div>';
147
- }
148
-
149
- return $output;
150
- }
151
-
152
- /**
153
- * Select Field
154
- *
155
- * @since 1.1.4
156
- *
157
- * @param array $args Args.
158
- * @return string
159
- */
160
- public static function select_field( $args ) {
161
-
162
- $id = $args['id'];
163
- $name = $args['name'];
164
- $title = $args['title'];
165
- $description = $args['description'];
166
- $value = $args['value'];
167
- $options = $args['options'];
168
-
169
- $output = '<div class="form-field" id="form-field-' . $id . '">';
170
-
171
- $output .= '<div class="form-field-label">';
172
- $output .= $title;
173
- $output .= '</div>';
174
-
175
- $output .= '<div class="form-field-data">';
176
- $output .= '<select id="wcf_' . $id . '" name="' . $name . '">';
177
- foreach ( $options as $option_value => $option_title ) {
178
- $output .= '<option value="' . $option_value . '" ' . selected( $value, $option_value, false ) . '>' . $option_title . '</option>';
179
- }
180
- $output .= '</select>';
181
- $output .= '</div>';
182
-
183
- $output .= '<div class="form-field-desc">';
184
- $output .= '<p>';
185
- $output .= $description;
186
- $output .= '</p>';
187
- $output .= '</div>';
188
- $output .= '</div>';
189
-
190
- return $output;
191
- }
192
-
193
- /**
194
- * Checkout Selection Field
195
- *
196
- * @param array $args Args.
197
- * @return string
198
- */
199
- public static function flow_checkout_selection_field( $args ) {
200
-
201
- $id = $args['id'];
202
- $name = $args['name'];
203
- $title = $args['title'];
204
- $value = $args['value'];
205
-
206
- $checkout_steps = get_posts(
207
- array(
208
- 'posts_per_page' => -1,
209
- 'post_type' => CARTFLOWS_STEP_POST_TYPE,
210
- 'post_status' => 'publish',
211
- 'orderby' => 'ID',
212
- 'order' => 'ASC',
213
- 'tax_query' => array( //phpcs:ignore
214
- array(
215
- 'taxonomy' => CARTFLOWS_TAXONOMY_STEP_TYPE,
216
- 'field' => 'slug',
217
- 'terms' => 'checkout',
218
- ),
219
- ),
220
- )
221
- );
222
-
223
- $output = '<div class="form-field" id="form-field-' . $id . '">';
224
-
225
- $output .= '<div class="form-field-label">';
226
- $output .= '<label for="' . $id . '">';
227
- $output .= $title;
228
- $output .= '</label>';
229
- $output .= '</div>';
230
-
231
- $output .= '<div class="form-field-data">';
232
- $output .= '<select id="wcf_' . $id . '" name="' . $name . '">';
233
-
234
- if ( ! empty( $checkout_steps ) ) {
235
- $output .= '<option value="">' . __( 'Select', 'cartflows' ) . '</option>';
236
- } else {
237
-
238
- $output .= '<option value="">' . __( 'No Checkout Steps', 'cartflows' ) . '</option>';
239
- }
240
-
241
- foreach ( $checkout_steps as $index => $step_data ) {
242
-
243
- $output .= '<option value="' . $step_data->ID . '" ' . selected( $value, $step_data->ID, false ) . '>' . $step_data->post_title . ' (#' . $step_data->ID . ') </option>';
244
- }
245
-
246
- $output .= '</select>';
247
- $output .= '</div>';
248
-
249
- if ( '' !== $value ) {
250
- $output .= '<div class="form-field-actions">';
251
- $output .= '<a href="' . get_edit_post_link( $value ) . '" target="_blank" class="" title="Edit">';
252
- $output .= '<span class="dashicons dashicons-edit"></span>';
253
- $output .= '<span class="">Edit</span>';
254
- $output .= '</a>';
255
- $output .= '<a href="' . get_permalink( $value ) . '" target="_blank" class="" title="View">';
256
- $output .= '<span class="dashicons dashicons-visibility"></span>';
257
- $output .= '<span class="">View</span>';
258
- $output .= '</a>';
259
- $output .= '</div>';
260
- }
261
-
262
- $output .= '<div class="form-field-desc">';
263
- /* translators: %s: link */
264
- $output .= '<p>' . sprintf( __( 'Be sure not to add any product in above selected Global Checkout step. Please read information about how to set up Global Checkout %1$shere%2$s.', 'cartflows' ), '<a href="https://cartflows.com/docs/global-checkout/" target="_blank">', '</a>' ) . '</p>';
265
- $output .= '</div>';
266
-
267
- $output .= '</div>';
268
-
269
- return $output;
270
- }
271
- }
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CARTFLOWS Admin Fields.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ /**
9
+ * Class Cartflows_Admin_Fields.
10
+ */
11
+ class Cartflows_Admin_Fields {
12
+
13
+ /**
14
+ * Title Field
15
+ *
16
+ * @param array $args Args.
17
+ * @return string
18
+ */
19
+ public static function title_field( $args ) {
20
+
21
+ $title = $args['title'];
22
+ $description = isset( $args['description'] ) ? $args['description'] : '';
23
+
24
+ $output = '<h4 class="form-field wcf-title-field">';
25
+ $output .= '<span>' . $title . '</span>';
26
+ $output .= '</h4>';
27
+
28
+ if ( ! empty( $description ) ) {
29
+ $output .= '<div class="form-field-desc">';
30
+ $output .= '<p>' . $description . '</p>';
31
+ $output .= '</div>';
32
+ }
33
+
34
+ return $output;
35
+ }
36
+
37
+ /**
38
+ * Text Field
39
+ *
40
+ * @param array $args Args.
41
+ * @return string
42
+ */
43
+ public static function text_field( $args ) {
44
+
45
+ $id = $args['id'];
46
+ $name = $args['name'];
47
+ $title = $args['title'];
48
+ $value = $args['value'];
49
+ $description = isset( $args['description'] ) ? $args['description'] : '';
50
+ $placeholder = isset( $args['placeholder'] ) ? $args['placeholder'] : '';
51
+
52
+ $output = '<div class="form-field" id="form-field-' . $id . '">';
53
+ $output .= '<label for="' . $id . '">' . $title . '</label>';
54
+ $output .= '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_attr( $value ) . '">';
55
+ $output .= '</div>';
56
+
57
+ if ( ! empty( $description ) ) {
58
+ $output .= '<div class="form-field-desc">';
59
+ $output .= '<p>';
60
+ $output .= $description;
61
+ $output .= '</p>';
62
+ $output .= '</div>';
63
+ }
64
+
65
+ return $output;
66
+ }
67
+
68
+ /**
69
+ * URL Field
70
+ *
71
+ * @param array $args Args.
72
+ * @return string
73
+ */
74
+ public static function url_field( $args ) {
75
+
76
+ $id = $args['id'];
77
+ $name = $args['name'];
78
+ $title = $args['title'];
79
+ $value = $args['value'];
80
+
81
+ $output = '<div class="form-field">';
82
+ $output .= '<label for="' . $id . '">' . $title . '</label>';
83
+ $output .= '<input type="text" name="' . $name . '" id="' . $id . '" class="placeholder placeholder-active" value="' . esc_url( $value ) . '">';
84
+ $output .= '</div>';
85
+
86
+ return $output;
87
+ }
88
+
89
+ /**
90
+ * Checkbox Field
91
+ *
92
+ * @param array $args Args.
93
+ * @return string
94
+ */
95
+ public static function checkobox_field( $args ) {
96
+
97
+ $id = $args['id'];
98
+ $name = $args['name'];
99
+ $title = $args['title'];
100
+ $value = $args['value'];
101
+
102
+ $output = '<div class="form-field" id="form-field-' . $id . '">';
103
+ $output .= '<label for="' . $id . '">';
104
+ $output .= '<input type="hidden" id="wcf_hid_' . $id . '" name="' . $name . '" value="disable">';
105
+ $output .= '<input type="checkbox" id="wcf_' . $id . '" name="' . $name . '" value="enable" ' . checked( $value, 'enable', false ) . '>';
106
+ $output .= $title;
107
+ $output .= '</label>';
108
+ $output .= '</div>';
109
+
110
+ return $output;
111
+ }
112
+
113
+ /**
114
+ * Radio Field
115
+ *
116
+ * @param array $args Args.
117
+ * @return string
118
+ */
119
+ public static function radio_field( $args ) {
120
+
121
+ $name = $args['name'];
122
+ $id = $args['id'];
123
+ $options = $args['options'];
124
+ $value = $args['value'];
125
+
126
+ $output = '';
127
+
128
+ if ( isset( $args['title'] ) ) {
129
+ $output .= '<h4 class="form-field-label">';
130
+ $output .= '<span>' . $args['title'] . '</span>';
131
+ $output .= '</h4>';
132
+ }
133
+
134
+ foreach ( $options as $type => $data ) {
135
+
136
+ $output .= '<div class="form-field">';
137
+ $output .= '<label for="' . $id . '">';
138
+ $output .= '<input type="radio" class="wcf_permalink_structure" name="' . $name . '" value="' . $type . '" ' . checked( $value, $type, false ) . '>' . $data['label'] . '</label>';
139
+ $output .= '<div class="form-field-desc">';
140
+ $output .= '<p>';
141
+
142
+ $output .= $data['description'];
143
+
144
+ $output .= '</p>';
145
+ $output .= '</div>';
146
+ $output .= '</div>';
147
+ }
148
+
149
+ return $output;
150
+ }
151
+
152
+ /**
153
+ * Select Field
154
+ *
155
+ * @since 1.1.4
156
+ *
157
+ * @param array $args Args.
158
+ * @return string
159
+ */
160
+ public static function select_field( $args ) {
161
+
162
+ $id = $args['id'];
163
+ $name = $args['name'];
164
+ $title = $args['title'];
165
+ $description = $args['description'];
166
+ $value = $args['value'];
167
+ $options = $args['options'];
168
+
169
+ $output = '<div class="form-field" id="form-field-' . $id . '">';
170
+
171
+ $output .= '<div class="form-field-label">';
172
+ $output .= $title;
173
+ $output .= '</div>';
174
+
175
+ $output .= '<div class="form-field-data">';
176
+ $output .= '<select id="wcf_' . $id . '" name="' . $name . '">';
177
+ foreach ( $options as $option_value => $option_title ) {
178
+ $output .= '<option value="' . $option_value . '" ' . selected( $value, $option_value, false ) . '>' . $option_title . '</option>';
179
+ }
180
+ $output .= '</select>';
181
+ $output .= '</div>';
182
+
183
+ $output .= '<div class="form-field-desc">';
184
+ $output .= '<p>';
185
+ $output .= $description;
186
+ $output .= '</p>';
187
+ $output .= '</div>';
188
+ $output .= '</div>';
189
+
190
+ return $output;
191
+ }
192
+
193
+ /**
194
+ * Checkout Selection Field
195
+ *
196
+ * @param array $args Args.
197
+ * @return string
198
+ */
199
+ public static function flow_checkout_selection_field( $args ) {
200
+
201
+ $id = $args['id'];
202
+ $name = $args['name'];
203
+ $title = $args['title'];
204
+ $value = $args['value'];
205
+
206
+ $checkout_steps = get_posts(
207
+ array(
208
+ 'posts_per_page' => -1,
209
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
210
+ 'post_status' => 'publish',
211
+ 'orderby' => 'ID',
212
+ 'order' => 'ASC',
213
+ 'tax_query' => array( //phpcs:ignore
214
+ array(
215
+ 'taxonomy' => CARTFLOWS_TAXONOMY_STEP_TYPE,
216
+ 'field' => 'slug',
217
+ 'terms' => 'checkout',
218
+ ),
219
+ ),
220
+ 'meta_query' => array( //phpcs:ignore
221
+ array(
222
+ 'key' => 'wcf-control-step',
223
+ 'compare' => 'NOT EXISTS',
224
+ ),
225
+ ),
226
+ )
227
+ );
228
+
229
+ $output = '<div class="form-field" id="form-field-' . $id . '">';
230
+
231
+ $output .= '<div class="form-field-label">';
232
+ $output .= '<label for="' . $id . '">';
233
+ $output .= $title;
234
+ $output .= '</label>';
235
+ $output .= '</div>';
236
+
237
+ $output .= '<div class="form-field-data">';
238
+ $output .= '<select id="wcf_' . $id . '" name="' . $name . '">';
239
+
240
+ if ( ! empty( $checkout_steps ) ) {
241
+ $output .= '<option value="">' . __( 'Select', 'cartflows' ) . '</option>';
242
+ } else {
243
+
244
+ $output .= '<option value="">' . __( 'No Checkout Steps', 'cartflows' ) . '</option>';
245
+ }
246
+
247
+ foreach ( $checkout_steps as $index => $step_data ) {
248
+
249
+ $output .= '<option value="' . $step_data->ID . '" ' . selected( $value, $step_data->ID, false ) . '>' . $step_data->post_title . ' (#' . $step_data->ID . ') </option>';
250
+ }
251
+
252
+ $output .= '</select>';
253
+ $output .= '</div>';
254
+
255
+ if ( '' !== $value ) {
256
+ $output .= '<div class="form-field-actions">';
257
+ $output .= '<a href="' . get_edit_post_link( $value ) . '" target="_blank" class="" title="Edit">';
258
+ $output .= '<span class="dashicons dashicons-edit"></span>';
259
+ $output .= '<span class="">Edit</span>';
260
+ $output .= '</a>';
261
+ $output .= '<a href="' . get_permalink( $value ) . '" target="_blank" class="" title="View">';
262
+ $output .= '<span class="dashicons dashicons-visibility"></span>';
263
+ $output .= '<span class="">View</span>';
264
+ $output .= '</a>';
265
+ $output .= '</div>';
266
+ }
267
+
268
+ $output .= '<div class="form-field-desc">';
269
+ /* translators: %s: link */
270
+ $output .= '<p>' . sprintf( __( 'Be sure not to add any product in above selected Global Checkout step. Please read information about how to set up Global Checkout %1$shere%2$s.', 'cartflows' ), '<a href="https://cartflows.com/docs/global-checkout/" target="_blank">', '</a>' ) . '</p>';
271
+ $output .= '</div>';
272
+
273
+ $output .= '</div>';
274
+
275
+ return $output;
276
+ }
277
+ }
classes/class-cartflows-admin.php CHANGED
@@ -1,740 +1,740 @@
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
- add_filter( 'get_user_option_meta-box-order_' . CARTFLOWS_STEP_POST_TYPE, __CLASS__ . '::metabox_order' );
64
- }
65
-
66
- /**
67
- * Metabox fixed orders.
68
- *
69
- * @param array $metabox_orders Orders.
70
- * @return array
71
- */
72
- public static function metabox_order( $metabox_orders ) {
73
-
74
- if ( isset( $metabox_orders['side'] ) ) {
75
-
76
- $metabox_orders['side'] = str_replace(
77
- array(
78
- 'wcf-checkout-settings',
79
- 'wcf-ladning-settings',
80
- 'wcf-optin-settings',
81
- 'wcf-thankyou-settings',
82
- ),
83
- '',
84
- $metabox_orders['side']
85
- );
86
- }
87
-
88
- return $metabox_orders;
89
- }
90
-
91
- /**
92
- * After save of permalinks.
93
- */
94
- public static function cartflows_after_save_permalinks() {
95
-
96
- $has_saved_permalinks = get_option( 'cartflows_permalink_saved' );
97
- if ( $has_saved_permalinks ) {
98
- flush_rewrite_rules();
99
- delete_option( 'cartflows_permalink_saved' );
100
- }
101
- }
102
-
103
-
104
- /**
105
- * Initialize after Cartflows pro get loaded.
106
- */
107
- public static function settings_admin_scripts() {
108
- // Enqueue admin scripts.
109
- if ( isset( $_GET['page'] ) && ( 'cartflows' === $_GET['page'] || false !== strpos( $_GET['page'], 'cartflows_' ) ) ) { //phpcs:ignore
110
- add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
111
-
112
- self::save_settings();
113
- }
114
- }
115
- /**
116
- * Show action on plugin page.
117
- *
118
- * @param array $links links.
119
- * @return array
120
- */
121
- public static function add_action_links( $links ) {
122
- $mylinks = array(
123
- '<a href="' . admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS ) . '">Settings</a>',
124
- '<a target="_blank" href="' . esc_url( 'https://cartflows.com/docs' ) . '">Docs</a>',
125
- );
126
-
127
- if ( ! _is_cartflows_pro() ) {
128
- array_push( $mylinks, '<a style="color: #39b54a; font-weight: bold;" target="_blank" href="' . esc_url( 'https://cartflows.com/pricing/' ) . '"> Go Pro </a>' );
129
- }
130
-
131
- return array_merge( $links, $mylinks );
132
- }
133
-
134
- /**
135
- * Initialises the Plugin Name.
136
- *
137
- * @since 1.0.0
138
- * @return void
139
- */
140
- public static function initialise_plugin() {
141
-
142
- $name = 'Cartflows';
143
- $short_name = 'Cflows';
144
-
145
- define( 'CARTFLOWS_PLUGIN_NAME', $name );
146
- define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
147
- }
148
-
149
- /**
150
- * Renders the admin settings menu.
151
- *
152
- * @since 1.0.0
153
- * @return void
154
- */
155
- public static function menu() {
156
-
157
- if ( ! current_user_can( 'manage_options' ) ) {
158
- return;
159
- }
160
-
161
- add_menu_page(
162
- 'CartFlows',
163
- 'CartFlows',
164
- 'manage_options',
165
- CARTFLOWS_SLUG,
166
- __CLASS__ . '::render',
167
- 'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore
168
- 39.7
169
- );
170
-
171
- }
172
-
173
- /**
174
- * Add submenu to admin menu.
175
- *
176
- * @since 1.0.0
177
- */
178
- public static function submenu() {
179
-
180
- global $submenu;
181
-
182
- $parent_slug = CARTFLOWS_SLUG;
183
- $capability = 'manage_options';
184
-
185
- // Home menu.
186
- $submenu[ $parent_slug ][0][0] = __( 'Home', 'cartflows' ); //phpcs:ignore
187
-
188
- // Add settings menu.
189
- add_submenu_page(
190
- $parent_slug,
191
- __( 'Settings', 'cartflows' ),
192
- __( 'Settings', 'cartflows' ),
193
- $capability,
194
- 'cartflows_settings',
195
- __CLASS__ . '::render'
196
- );
197
- }
198
-
199
- /**
200
- * Renders the admin settings.
201
- *
202
- * @since 1.0.0
203
- * @return void
204
- */
205
- public static function render() {
206
- $menu_page_slug = ( isset( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : CARTFLOWS_SETTINGS; //phpcs:ignore
207
- $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
208
- $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
209
- $action = str_replace( '_', '-', $action );
210
-
211
- // Enable header icon filter below.
212
- $header_wrapper_class = apply_filters( 'cartflows_admin_header_wrapper_class', array( $action, $menu_page_slug ) );
213
-
214
- include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
215
- }
216
-
217
- /**
218
- * Renders the admin settings content.
219
- *
220
- * @since 1.0.0
221
- * @param sting $menu_page_slug current page name.
222
- *
223
- * @return void
224
- */
225
- public static function render_content( $menu_page_slug ) {
226
-
227
- if ( CARTFLOWS_SETTINGS === $menu_page_slug ) {
228
-
229
- $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
230
- $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
231
- $action = str_replace( '_', '-', $action );
232
- $action = 'general';
233
-
234
- include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
235
- }
236
-
237
- if ( 'cartflows' === $menu_page_slug ) {
238
-
239
- $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
240
- $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
241
- $action = str_replace( '_', '-', $action );
242
- $action = 'general';
243
-
244
- include_once CARTFLOWS_DIR . 'includes/admin/cartflows-home.php';
245
- }
246
- }
247
-
248
- /**
249
- * Save Global Setting options.
250
- *
251
- * @since 1.0.0
252
- */
253
- public static function save_common_settings() {
254
-
255
- if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-common-settings-nonce'] ) ), 'cartflows-common-settings' ) ) {
256
-
257
- $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
258
- $new_settings = array();
259
-
260
- if ( isset( $_POST['_cartflows_common'] ) ) {
261
- // Loop through the input and sanitize each of the values.
262
- $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_common'] ) ); //phpcs:ignore
263
- }
264
-
265
- Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, false );
266
-
267
- $query = array(
268
- 'message' => 'saved',
269
- );
270
-
271
- $redirect_to = add_query_arg( $query, $url );
272
-
273
- wp_safe_redirect( $redirect_to );
274
- exit;
275
- } // End if statement.
276
- }
277
-
278
- /**
279
- * Save Debug Setting options.
280
- *
281
- * @since 1.1.14
282
- */
283
- public static function save_debug_settings() {
284
-
285
- if ( isset( $_POST['cartflows-debug-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-debug-settings-nonce'] ) ), 'cartflows-debug-settings' ) ) {
286
-
287
- $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
288
- $new_settings = array();
289
-
290
- if ( isset( $_POST['_cartflows_debug_data'] ) ) {
291
- $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_debug_data'] ) ); //phpcs:ignore
292
- }
293
-
294
- Cartflows_Helper::update_admin_settings_option( '_cartflows_debug_data', $new_settings, false );
295
-
296
- $query = array(
297
- 'message' => 'saved',
298
- );
299
-
300
- $redirect_to = add_query_arg( $query, $url );
301
-
302
- wp_safe_redirect( $redirect_to );
303
- exit;
304
-
305
- }
306
- }
307
-
308
-
309
- /**
310
- * Save permalink Setting options.
311
- *
312
- * @since 1.1.14
313
- */
314
- public static function save_permalink_settings() {
315
-
316
- if ( isset( $_POST['cartflows-permalink-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-permalink-settings-nonce'] ) ), 'cartflows-permalink-settings' ) ) {
317
-
318
- $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
319
- $new_settings = array();
320
-
321
- if ( isset( $_POST['reset'] ) ) {
322
- $_POST['_cartflows_permalink'] = array(
323
- 'permalink' => CARTFLOWS_STEP_POST_TYPE,
324
- 'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
325
- 'permalink_structure' => '',
326
- );
327
-
328
- }
329
-
330
- if ( isset( $_POST['_cartflows_permalink'] ) ) {
331
- $cartflows_permalink_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_permalink'] ) ); //phpcs:ignore
332
-
333
- if ( empty( $cartflows_permalink_settings['permalink'] ) ) {
334
- $new_settings['permalink'] = CARTFLOWS_STEP_POST_TYPE;
335
- } else {
336
- $new_settings['permalink'] = $cartflows_permalink_settings['permalink'];
337
- }
338
-
339
- if ( empty( $cartflows_permalink_settings['permalink_flow_base'] ) ) {
340
- $new_settings['permalink_flow_base'] = CARTFLOWS_FLOW_POST_TYPE;
341
- } else {
342
- $new_settings['permalink_flow_base'] = $cartflows_permalink_settings['permalink_flow_base'];
343
- }
344
-
345
- $new_settings['permalink_structure'] = $cartflows_permalink_settings['permalink_structure'];
346
-
347
- }
348
-
349
- Cartflows_Helper::update_admin_settings_option( '_cartflows_permalink', $new_settings, false );
350
-
351
- $query = array(
352
- 'message' => 'saved',
353
- );
354
-
355
- $redirect_to = add_query_arg( $query, $url );
356
-
357
- update_option( 'cartflows_permalink_saved', true );
358
-
359
- wp_safe_redirect( $redirect_to );
360
- exit;
361
-
362
- }
363
- }
364
-
365
- /**
366
- * Save google analytics Setting options.
367
- *
368
- * @since 1.1.14
369
- */
370
- public static function save_google_analytics_settings() {
371
-
372
- 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' ) ) {
373
-
374
- $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
375
- $new_settings = array();
376
-
377
- if ( isset( $_POST['_cartflows_google_analytics'] ) ) {
378
- $new_settings = self::sanitize_form_inputs( $_POST['_cartflows_google_analytics'] ); //phpcs:ignore
379
-
380
- }
381
-
382
- Cartflows_Helper::update_admin_settings_option( '_cartflows_google_analytics', $new_settings, true );
383
-
384
- $query = array(
385
- 'message' => 'saved',
386
- );
387
-
388
- $redirect_to = add_query_arg( $query, $url );
389
-
390
- wp_safe_redirect( $redirect_to );
391
- exit;
392
-
393
- }
394
- }
395
-
396
- /**
397
- * Loop through the input and sanitize each of the values.
398
- *
399
- * @param array $input_settings input settings.
400
- * @return array
401
- */
402
- public static function sanitize_form_inputs( $input_settings = array() ) {
403
- $new_settings = array();
404
- foreach ( $input_settings as $key => $val ) {
405
-
406
- if ( is_array( $val ) ) {
407
- foreach ( $val as $k => $v ) {
408
- $new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
409
- }
410
- } else {
411
- $new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
412
- }
413
- }
414
- return $new_settings;
415
- }
416
-
417
- /**
418
- * Check is cartflows admin.
419
- *
420
- * @since 1.0.0
421
- * @return boolean
422
- */
423
- public static function is_global_admin() {
424
-
425
- $current_screen = get_current_screen();
426
-
427
- if (
428
- is_object( $current_screen ) &&
429
- isset( $current_screen->post_type ) &&
430
- ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
431
- CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
432
- )
433
- ) {
434
- return true;
435
- }
436
- return false;
437
- }
438
-
439
- /**
440
- * Check is flow admin.
441
- *
442
- * @since 1.0.0
443
- * @return boolean
444
- */
445
- public static function is_flow_edit_admin() {
446
-
447
- $current_screen = get_current_screen();
448
-
449
- if (
450
- is_object( $current_screen ) &&
451
- isset( $current_screen->post_type ) &&
452
- ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
453
- isset( $current_screen->base ) &&
454
- ( 'post' === $current_screen->base )
455
- ) {
456
- return true;
457
- }
458
- return false;
459
- }
460
-
461
- /**
462
- * Global Admin Scripts.
463
- *
464
- * @since 1.0.0
465
- */
466
- public static function global_admin_scripts() {
467
-
468
- $installed_plugins = get_plugins();
469
- $is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? true : false;
470
- $edit_test_mode = filter_input( INPUT_GET, 'edit_test_mode', FILTER_SANITIZE_STRING );
471
- $edit_test_mode = 'yes' === $edit_test_mode ? true : false;
472
-
473
- $localize = array(
474
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
475
- 'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
476
- 'wc_status' => array(
477
- 'installed' => $is_wc_installed,
478
- 'active' => wcf()->is_woo_active,
479
- ),
480
- 'wc_activating_message' => __( 'Installing and activating..', 'cartflows' ),
481
- 'wc_install_error' => __( 'There was an error with the installation of plugin.', 'cartflows' ),
482
- 'wcf_edit_test_mode' => $edit_test_mode,
483
- 'wcf_fetch_stats_nonce' => wp_create_nonce( 'wcf-fetch-stats' ),
484
- );
485
-
486
- $localize = apply_filters( 'cartflows_admin_js_localize', $localize );
487
-
488
- $localize_script = '<!-- script to print the admin localized variables -->';
489
- $localize_script .= '<script type="text/javascript">';
490
- $localize_script .= 'var cartflows_admin = ' . wp_json_encode( $localize ) . ';';
491
- $localize_script .= '</script>';
492
-
493
- echo $localize_script;
494
-
495
- if ( self::is_global_admin() ) {
496
-
497
- // Styles.
498
- wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
499
- wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
500
-
501
- wp_enqueue_script(
502
- 'wcf-global-admin',
503
- CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
504
- array( 'jquery' ),
505
- CARTFLOWS_VER,
506
- true
507
- );
508
-
509
- do_action( 'cartflows_global_admin_scripts' );
510
- }
511
- }
512
-
513
- /**
514
- * Global Admin Data.
515
- *
516
- * @since 1.0.0
517
- */
518
- public static function global_admin_data() {
519
-
520
- $current_screen = get_current_screen();
521
-
522
- if ( ! $current_screen ) {
523
- return;
524
- }
525
-
526
- if ( 'edit-' . CARTFLOWS_FLOW_POST_TYPE != $current_screen->id ) {
527
- return;
528
- }
529
-
530
- $default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
531
- ?>
532
-
533
- <div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
534
- <div class="wcf-templates-popup-content">
535
- <div class="spinner"></div>
536
- <div class="wcf-templates-wrap wcf-templates-wrap-flows">
537
-
538
- <div id="wcf-remote-flow-actions" class="wcf-template-header">
539
- <div class="wcf-template-logo-wrap">
540
- <span class="wcf-cartflows-logo-img">
541
- <span class="cartflows-logo-icon"></span>
542
- </span>
543
- <span class="wcf-cartflows-title"><?php esc_html_e( 'Flows Library', 'cartflows' ); ?></span>
544
- </div>
545
- <div class="wcf-tab-wrapper">
546
- <?php if ( 'other' !== $default_page_builder ) { ?>
547
- <div id="wcf-get-started-steps">
548
- <ul class="filter-links ">
549
- <li>
550
- <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>
551
- </li>
552
- <li>
553
- <a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
554
- </li>
555
- </ul>
556
- </div>
557
- <?php } ?>
558
- </div>
559
- <div class="wcf-popup-close-wrap">
560
- <span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
561
- </div>
562
- </div>
563
- <!-- <div class="wcf-search-form">
564
- <label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
565
- <input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
566
- </div> -->
567
-
568
- <div id="wcf-remote-content">
569
- <?php if ( 'other' !== $default_page_builder ) { ?>
570
- <div id="wcf-ready-templates">
571
- <div id="wcf-remote-filters">
572
- <div id="wcf-page-builders"></div>
573
- <div id="wcf-categories"></div>
574
- </div>
575
- <div class="wcf-page-builder-notice"></div>
576
- <div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
577
- <div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
578
- </div>
579
- <?php } ?>
580
- <div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
581
- <div class="inner">
582
- <a href="#" class="button button-hero button-primary cartflows-flow-import-blank"><?php esc_html_e( 'Design Your Flow', 'cartflows' ); ?></a>
583
- <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>
584
- </div>
585
- </div>
586
- </div>
587
- </div>
588
- </div>
589
- </div>
590
-
591
- <?php
592
- }
593
-
594
- /**
595
- * Enqueues the needed CSS/JS for the builder's admin settings page.
596
- *
597
- * @since 1.0.0
598
- */
599
- public static function styles_scripts() {
600
-
601
- // Styles.
602
- wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
603
- wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
604
-
605
- // Script.
606
- wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
607
-
608
- $localize = array(
609
- 'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
610
- );
611
-
612
- wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
613
-
614
- do_action( 'cartflows_admin_settings_after_enqueue_scripts' );
615
- }
616
-
617
- /**
618
- * Save All admin settings here
619
- */
620
- public static function save_settings() {
621
-
622
- // Only admins can save settings.
623
- if ( ! current_user_can( 'manage_options' ) ) {
624
- return;
625
- }
626
-
627
- self::save_common_settings();
628
- self::save_debug_settings();
629
- self::save_permalink_settings();
630
-
631
- self::save_google_analytics_settings();
632
- self::save_facebook_settings();
633
-
634
- // Let extensions hook into saving.
635
- do_action( 'cartflows_admin_settings_save' );
636
- }
637
-
638
- /**
639
- * Get and return page URL
640
- *
641
- * @param string $menu_slug Menu name.
642
- * @since 1.0.0
643
- * @return string page url
644
- */
645
- public static function get_page_url( $menu_slug ) {
646
-
647
- $parent_page = self::$default_menu_position;
648
-
649
- if ( strpos( $parent_page, '?' ) !== false ) {
650
- $query_var = '&page=' . self::$plugin_slug;
651
- } else {
652
- $query_var = '?page=' . self::$plugin_slug;
653
- }
654
-
655
- $parent_page_url = admin_url( $parent_page . $query_var );
656
-
657
- $url = $parent_page_url . '&action=' . $menu_slug;
658
-
659
- return esc_url( $url );
660
- }
661
-
662
- /**
663
- * Admin body classes.
664
- *
665
- * Body classes to be added to <body> tag in admin page
666
- *
667
- * @param String $classes body classes returned from the filter.
668
- * @return String body classes to be added to <body> tag in admin page
669
- */
670
- public static function add_admin_body_class( $classes ) {
671
-
672
- $classes .= ' cartflows-' . CARTFLOWS_VER;
673
-
674
- return $classes;
675
- }
676
-
677
- /**
678
- * Save Global Setting options.
679
- *
680
- * @since 1.0.0
681
- */
682
- public static function save_facebook_settings() {
683
-
684
- if ( isset( $_POST['cartflows-facebook-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-facebook-settings-nonce'] ) ), 'cartflows-facebook-settings' ) ) {
685
-
686
- $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
687
- $new_settings = array();
688
-
689
- if ( isset( $_POST['_cartflows_facebook'] ) ) {
690
- $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_facebook'] ) ); //phpcs:ignore
691
- }
692
-
693
- Cartflows_Helper::update_admin_settings_option( '_cartflows_facebook', $new_settings, false );
694
- $query = array(
695
- 'message' => 'saved',
696
- );
697
- $redirect_to = add_query_arg( $query, $url );
698
- wp_safe_redirect( $redirect_to );
699
- exit;
700
- }
701
- }
702
-
703
- /**
704
- * Show embed header.
705
- *
706
- * @since 1.0.0
707
- */
708
- public static function show_embed_header() {
709
-
710
- $current_screen = get_current_screen();
711
-
712
- if (
713
- is_object( $current_screen ) &&
714
- isset( $current_screen->post_type ) &&
715
- ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
716
- isset( $current_screen->base ) &&
717
- ( 'post' === $current_screen->base || 'edit' === $current_screen->base )
718
- ) {
719
- return true;
720
- }
721
-
722
- return false;
723
- }
724
- /**
725
- * Set up a div for the header embed to render into.
726
- * The initial contents here are meant as a place loader for when the PHP page initialy loads.
727
- */
728
- public static function embed_page_header() {
729
-
730
- if ( ! is_admin() || ! self::show_embed_header() ) {
731
- return;
732
- }
733
-
734
- wp_enqueue_style( 'cartflows-admin-embed-header', CARTFLOWS_URL . 'admin/assets/css/admin-embed-header.css', array(), CARTFLOWS_VER );
735
-
736
- include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin-header.php';
737
- }
738
- }
739
-
740
- Cartflows_Admin::init();
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
+ add_filter( 'get_user_option_meta-box-order_' . CARTFLOWS_STEP_POST_TYPE, __CLASS__ . '::metabox_order' );
64
+ }
65
+
66
+ /**
67
+ * Metabox fixed orders.
68
+ *
69
+ * @param array $metabox_orders Orders.
70
+ * @return array
71
+ */
72
+ public static function metabox_order( $metabox_orders ) {
73
+
74
+ if ( isset( $metabox_orders['side'] ) ) {
75
+
76
+ $metabox_orders['side'] = str_replace(
77
+ array(
78
+ 'wcf-checkout-settings',
79
+ 'wcf-ladning-settings',
80
+ 'wcf-optin-settings',
81
+ 'wcf-thankyou-settings',
82
+ ),
83
+ '',
84
+ $metabox_orders['side']
85
+ );
86
+ }
87
+
88
+ return $metabox_orders;
89
+ }
90
+
91
+ /**
92
+ * After save of permalinks.
93
+ */
94
+ public static function cartflows_after_save_permalinks() {
95
+
96
+ $has_saved_permalinks = get_option( 'cartflows_permalink_saved' );
97
+ if ( $has_saved_permalinks ) {
98
+ flush_rewrite_rules();
99
+ delete_option( 'cartflows_permalink_saved' );
100
+ }
101
+ }
102
+
103
+
104
+ /**
105
+ * Initialize after Cartflows pro get loaded.
106
+ */
107
+ public static function settings_admin_scripts() {
108
+ // Enqueue admin scripts.
109
+ if ( isset( $_GET['page'] ) && ( 'cartflows' === $_GET['page'] || false !== strpos( $_GET['page'], 'cartflows_' ) ) ) { //phpcs:ignore
110
+ add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
111
+
112
+ self::save_settings();
113
+ }
114
+ }
115
+ /**
116
+ * Show action on plugin page.
117
+ *
118
+ * @param array $links links.
119
+ * @return array
120
+ */
121
+ public static function add_action_links( $links ) {
122
+ $mylinks = array(
123
+ '<a href="' . admin_url( 'admin.php?page=' . CARTFLOWS_SETTINGS ) . '">Settings</a>',
124
+ '<a target="_blank" href="' . esc_url( 'https://cartflows.com/docs' ) . '">Docs</a>',
125
+ );
126
+
127
+ if ( ! _is_cartflows_pro() ) {
128
+ array_push( $mylinks, '<a style="color: #39b54a; font-weight: bold;" target="_blank" href="' . esc_url( 'https://cartflows.com/pricing/' ) . '"> Go Pro </a>' );
129
+ }
130
+
131
+ return array_merge( $links, $mylinks );
132
+ }
133
+
134
+ /**
135
+ * Initialises the Plugin Name.
136
+ *
137
+ * @since 1.0.0
138
+ * @return void
139
+ */
140
+ public static function initialise_plugin() {
141
+
142
+ $name = 'Cartflows';
143
+ $short_name = 'Cflows';
144
+
145
+ define( 'CARTFLOWS_PLUGIN_NAME', $name );
146
+ define( 'CARTFLOWS_PLUGIN_SHORT_NAME', $short_name );
147
+ }
148
+
149
+ /**
150
+ * Renders the admin settings menu.
151
+ *
152
+ * @since 1.0.0
153
+ * @return void
154
+ */
155
+ public static function menu() {
156
+
157
+ if ( ! current_user_can( 'manage_options' ) ) {
158
+ return;
159
+ }
160
+
161
+ add_menu_page(
162
+ 'CartFlows',
163
+ 'CartFlows',
164
+ 'manage_options',
165
+ CARTFLOWS_SLUG,
166
+ __CLASS__ . '::render',
167
+ 'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore
168
+ 39.7
169
+ );
170
+
171
+ }
172
+
173
+ /**
174
+ * Add submenu to admin menu.
175
+ *
176
+ * @since 1.0.0
177
+ */
178
+ public static function submenu() {
179
+
180
+ global $submenu;
181
+
182
+ $parent_slug = CARTFLOWS_SLUG;
183
+ $capability = 'manage_options';
184
+
185
+ // Home menu.
186
+ $submenu[ $parent_slug ][0][0] = __( 'Home', 'cartflows' ); //phpcs:ignore
187
+
188
+ // Add settings menu.
189
+ add_submenu_page(
190
+ $parent_slug,
191
+ __( 'Settings', 'cartflows' ),
192
+ __( 'Settings', 'cartflows' ),
193
+ $capability,
194
+ 'cartflows_settings',
195
+ __CLASS__ . '::render'
196
+ );
197
+ }
198
+
199
+ /**
200
+ * Renders the admin settings.
201
+ *
202
+ * @since 1.0.0
203
+ * @return void
204
+ */
205
+ public static function render() {
206
+ $menu_page_slug = ( isset( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : CARTFLOWS_SETTINGS; //phpcs:ignore
207
+ $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
208
+ $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
209
+ $action = str_replace( '_', '-', $action );
210
+
211
+ // Enable header icon filter below.
212
+ $header_wrapper_class = apply_filters( 'cartflows_admin_header_wrapper_class', array( $action, $menu_page_slug ) );
213
+
214
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin.php';
215
+ }
216
+
217
+ /**
218
+ * Renders the admin settings content.
219
+ *
220
+ * @since 1.0.0
221
+ * @param sting $menu_page_slug current page name.
222
+ *
223
+ * @return void
224
+ */
225
+ public static function render_content( $menu_page_slug ) {
226
+
227
+ if ( CARTFLOWS_SETTINGS === $menu_page_slug ) {
228
+
229
+ $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
230
+ $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
231
+ $action = str_replace( '_', '-', $action );
232
+ $action = 'general';
233
+
234
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-general.php';
235
+ }
236
+
237
+ if ( 'cartflows' === $menu_page_slug ) {
238
+
239
+ $action = ( isset( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; //phpcs:ignore
240
+ $action = ( ! empty( $action ) && '' != $action ) ? $action : 'general';
241
+ $action = str_replace( '_', '-', $action );
242
+ $action = 'general';
243
+
244
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-home.php';
245
+ }
246
+ }
247
+
248
+ /**
249
+ * Save Global Setting options.
250
+ *
251
+ * @since 1.0.0
252
+ */
253
+ public static function save_common_settings() {
254
+
255
+ if ( isset( $_POST['cartflows-common-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-common-settings-nonce'] ) ), 'cartflows-common-settings' ) ) {
256
+
257
+ $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
258
+ $new_settings = array();
259
+
260
+ if ( isset( $_POST['_cartflows_common'] ) ) {
261
+ // Loop through the input and sanitize each of the values.
262
+ $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_common'] ) ); //phpcs:ignore
263
+ }
264
+
265
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_common', $new_settings, false );
266
+
267
+ $query = array(
268
+ 'message' => 'saved',
269
+ );
270
+
271
+ $redirect_to = add_query_arg( $query, $url );
272
+
273
+ wp_safe_redirect( $redirect_to );
274
+ exit;
275
+ } // End if statement.
276
+ }
277
+
278
+ /**
279
+ * Save Debug Setting options.
280
+ *
281
+ * @since 1.1.14
282
+ */
283
+ public static function save_debug_settings() {
284
+
285
+ if ( isset( $_POST['cartflows-debug-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-debug-settings-nonce'] ) ), 'cartflows-debug-settings' ) ) {
286
+
287
+ $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
288
+ $new_settings = array();
289
+
290
+ if ( isset( $_POST['_cartflows_debug_data'] ) ) {
291
+ $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_debug_data'] ) ); //phpcs:ignore
292
+ }
293
+
294
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_debug_data', $new_settings, false );
295
+
296
+ $query = array(
297
+ 'message' => 'saved',
298
+ );
299
+
300
+ $redirect_to = add_query_arg( $query, $url );
301
+
302
+ wp_safe_redirect( $redirect_to );
303
+ exit;
304
+
305
+ }
306
+ }
307
+
308
+
309
+ /**
310
+ * Save permalink Setting options.
311
+ *
312
+ * @since 1.1.14
313
+ */
314
+ public static function save_permalink_settings() {
315
+
316
+ if ( isset( $_POST['cartflows-permalink-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-permalink-settings-nonce'] ) ), 'cartflows-permalink-settings' ) ) {
317
+
318
+ $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
319
+ $new_settings = array();
320
+
321
+ if ( isset( $_POST['reset'] ) ) {
322
+ $_POST['_cartflows_permalink'] = array(
323
+ 'permalink' => CARTFLOWS_STEP_POST_TYPE,
324
+ 'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
325
+ 'permalink_structure' => '',
326
+ );
327
+
328
+ }
329
+
330
+ if ( isset( $_POST['_cartflows_permalink'] ) ) {
331
+ $cartflows_permalink_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_permalink'] ) ); //phpcs:ignore
332
+
333
+ if ( empty( $cartflows_permalink_settings['permalink'] ) ) {
334
+ $new_settings['permalink'] = CARTFLOWS_STEP_POST_TYPE;
335
+ } else {
336
+ $new_settings['permalink'] = $cartflows_permalink_settings['permalink'];
337
+ }
338
+
339
+ if ( empty( $cartflows_permalink_settings['permalink_flow_base'] ) ) {
340
+ $new_settings['permalink_flow_base'] = CARTFLOWS_FLOW_POST_TYPE;
341
+ } else {
342
+ $new_settings['permalink_flow_base'] = $cartflows_permalink_settings['permalink_flow_base'];
343
+ }
344
+
345
+ $new_settings['permalink_structure'] = $cartflows_permalink_settings['permalink_structure'];
346
+
347
+ }
348
+
349
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_permalink', $new_settings, false );
350
+
351
+ $query = array(
352
+ 'message' => 'saved',
353
+ );
354
+
355
+ $redirect_to = add_query_arg( $query, $url );
356
+
357
+ update_option( 'cartflows_permalink_saved', true );
358
+
359
+ wp_safe_redirect( $redirect_to );
360
+ exit;
361
+
362
+ }
363
+ }
364
+
365
+ /**
366
+ * Save google analytics Setting options.
367
+ *
368
+ * @since 1.1.14
369
+ */
370
+ public static function save_google_analytics_settings() {
371
+
372
+ 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' ) ) {
373
+
374
+ $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
375
+ $new_settings = array();
376
+
377
+ if ( isset( $_POST['_cartflows_google_analytics'] ) ) {
378
+ $new_settings = self::sanitize_form_inputs( $_POST['_cartflows_google_analytics'] ); //phpcs:ignore
379
+
380
+ }
381
+
382
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_google_analytics', $new_settings, true );
383
+
384
+ $query = array(
385
+ 'message' => 'saved',
386
+ );
387
+
388
+ $redirect_to = add_query_arg( $query, $url );
389
+
390
+ wp_safe_redirect( $redirect_to );
391
+ exit;
392
+
393
+ }
394
+ }
395
+
396
+ /**
397
+ * Loop through the input and sanitize each of the values.
398
+ *
399
+ * @param array $input_settings input settings.
400
+ * @return array
401
+ */
402
+ public static function sanitize_form_inputs( $input_settings = array() ) {
403
+ $new_settings = array();
404
+ foreach ( $input_settings as $key => $val ) {
405
+
406
+ if ( is_array( $val ) ) {
407
+ foreach ( $val as $k => $v ) {
408
+ $new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : '';
409
+ }
410
+ } else {
411
+ $new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : '';
412
+ }
413
+ }
414
+ return $new_settings;
415
+ }
416
+
417
+ /**
418
+ * Check is cartflows admin.
419
+ *
420
+ * @since 1.0.0
421
+ * @return boolean
422
+ */
423
+ public static function is_global_admin() {
424
+
425
+ $current_screen = get_current_screen();
426
+
427
+ if (
428
+ is_object( $current_screen ) &&
429
+ isset( $current_screen->post_type ) &&
430
+ ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ||
431
+ CARTFLOWS_STEP_POST_TYPE === $current_screen->post_type
432
+ )
433
+ ) {
434
+ return true;
435
+ }
436
+ return false;
437
+ }
438
+
439
+ /**
440
+ * Check is flow admin.
441
+ *
442
+ * @since 1.0.0
443
+ * @return boolean
444
+ */
445
+ public static function is_flow_edit_admin() {
446
+
447
+ $current_screen = get_current_screen();
448
+
449
+ if (
450
+ is_object( $current_screen ) &&
451
+ isset( $current_screen->post_type ) &&
452
+ ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
453
+ isset( $current_screen->base ) &&
454
+ ( 'post' === $current_screen->base )
455
+ ) {
456
+ return true;
457
+ }
458
+ return false;
459
+ }
460
+
461
+ /**
462
+ * Global Admin Scripts.
463
+ *
464
+ * @since 1.0.0
465
+ */
466
+ public static function global_admin_scripts() {
467
+
468
+ $installed_plugins = get_plugins();
469
+ $is_wc_installed = isset( $installed_plugins['woocommerce/woocommerce.php'] ) ? true : false;
470
+ $edit_test_mode = filter_input( INPUT_GET, 'edit_test_mode', FILTER_SANITIZE_STRING );
471
+ $edit_test_mode = 'yes' === $edit_test_mode ? true : false;
472
+
473
+ $localize = array(
474
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
475
+ 'ajax_nonce' => wp_create_nonce( 'cartflows-nonce' ),
476
+ 'wc_status' => array(
477
+ 'installed' => $is_wc_installed,
478
+ 'active' => wcf()->is_woo_active,
479
+ ),
480
+ 'wc_activating_message' => __( 'Installing and activating..', 'cartflows' ),
481
+ 'wc_install_error' => __( 'There was an error with the installation of plugin.', 'cartflows' ),
482
+ 'wcf_edit_test_mode' => $edit_test_mode,
483
+ 'wcf_fetch_stats_nonce' => wp_create_nonce( 'wcf-fetch-stats' ),
484
+ );
485
+
486
+ $localize = apply_filters( 'cartflows_admin_js_localize', $localize );
487
+
488
+ $localize_script = '<!-- script to print the admin localized variables -->';
489
+ $localize_script .= '<script type="text/javascript">';
490
+ $localize_script .= 'var cartflows_admin = ' . wp_json_encode( $localize ) . ';';
491
+ $localize_script .= '</script>';
492
+
493
+ echo $localize_script;
494
+
495
+ if ( self::is_global_admin() ) {
496
+
497
+ // Styles.
498
+ wp_enqueue_style( 'cartflows-global-admin', CARTFLOWS_URL . 'admin/assets/css/global-admin.css', array(), CARTFLOWS_VER );
499
+ wp_style_add_data( 'cartflows-global-admin', 'rtl', 'replace' );
500
+
501
+ wp_enqueue_script(
502
+ 'wcf-global-admin',
503
+ CARTFLOWS_URL . 'admin/assets/js/global-admin.js',
504
+ array( 'jquery' ),
505
+ CARTFLOWS_VER,
506
+ true
507
+ );
508
+
509
+ do_action( 'cartflows_global_admin_scripts' );
510
+ }
511
+ }
512
+
513
+ /**
514
+ * Global Admin Data.
515
+ *
516
+ * @since 1.0.0
517
+ */
518
+ public static function global_admin_data() {
519
+
520
+ $current_screen = get_current_screen();
521
+
522
+ if ( ! $current_screen ) {
523
+ return;
524
+ }
525
+
526
+ if ( 'edit-' . CARTFLOWS_FLOW_POST_TYPE != $current_screen->id ) {
527
+ return;
528
+ }
529
+
530
+ $default_page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
531
+ ?>
532
+
533
+ <div id="wcf-remote-flow-importer" class="wcf-templates-popup-overlay">
534
+ <div class="wcf-templates-popup-content">
535
+ <div class="spinner"></div>
536
+ <div class="wcf-templates-wrap wcf-templates-wrap-flows">
537
+
538
+ <div id="wcf-remote-flow-actions" class="wcf-template-header">
539
+ <div class="wcf-template-logo-wrap">
540
+ <span class="wcf-cartflows-logo-img">
541
+ <span class="cartflows-logo-icon"></span>
542
+ </span>
543
+ <span class="wcf-cartflows-title"><?php esc_html_e( 'Flows Library', 'cartflows' ); ?></span>
544
+ </div>
545
+ <div class="wcf-tab-wrapper">
546
+ <?php if ( 'other' !== $default_page_builder ) { ?>
547
+ <div id="wcf-get-started-steps">
548
+ <ul class="filter-links ">
549
+ <li>
550
+ <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>
551
+ </li>
552
+ <li>
553
+ <a href="#" data-slug="canvas" data-title="<?php esc_html_e( 'Create Your Own', 'cartflows' ); ?>"><?php esc_html_e( 'Create Your Own', 'cartflows' ); ?></a>
554
+ </li>
555
+ </ul>
556
+ </div>
557
+ <?php } ?>
558
+ </div>
559
+ <div class="wcf-popup-close-wrap">
560
+ <span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
561
+ </div>
562
+ </div>
563
+ <!-- <div class="wcf-search-form">
564
+ <label class="screen-reader-text" for="wp-filter-search-input"><?php esc_html_e( 'Search Sites', 'cartflows' ); ?> </label>
565
+ <input placeholder="<?php esc_html_e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
566
+ </div> -->
567
+
568
+ <div id="wcf-remote-content">
569
+ <?php if ( 'other' !== $default_page_builder ) { ?>
570
+ <div id="wcf-ready-templates">
571
+ <div id="wcf-remote-filters">
572
+ <div id="wcf-page-builders"></div>
573
+ <div id="wcf-categories"></div>
574
+ </div>
575
+ <div class="wcf-page-builder-notice"></div>
576
+ <div id="wcf-remote-flow-list" class="wcf-remote-list wcf-template-list-wrap"><span class="spinner is-active"></span></div>
577
+ <div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
578
+ </div>
579
+ <?php } ?>
580
+ <div id="wcf-start-from-scratch" style="<?php echo ( 'other' !== $default_page_builder ) ? 'display: none;' : ''; ?>">
581
+ <div class="inner">
582
+ <a href="#" class="button button-hero button-primary cartflows-flow-import-blank"><?php esc_html_e( 'Design Your Flow', 'cartflows' ); ?></a>
583
+ <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>
584
+ </div>
585
+ </div>
586
+ </div>
587
+ </div>
588
+ </div>
589
+ </div>
590
+
591
+ <?php
592
+ }
593
+
594
+ /**
595
+ * Enqueues the needed CSS/JS for the builder's admin settings page.
596
+ *
597
+ * @since 1.0.0
598
+ */
599
+ public static function styles_scripts() {
600
+
601
+ // Styles.
602
+ wp_enqueue_style( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/css/admin-menu-settings.css', array(), CARTFLOWS_VER );
603
+ wp_style_add_data( 'cartflows-admin-settings', 'rtl', 'replace' );
604
+
605
+ // Script.
606
+ wp_enqueue_script( 'cartflows-admin-settings', CARTFLOWS_URL . 'admin/assets/js/admin-menu-settings.js', array( 'jquery', 'wp-util', 'updates' ), CARTFLOWS_VER, false );
607
+
608
+ $localize = array(
609
+ 'ajax_nonce' => wp_create_nonce( 'cartflows-widget-nonce' ),
610
+ );
611
+
612
+ wp_localize_script( 'cartflows-admin-settings', 'cartflows', apply_filters( 'cartflows_js_localize', $localize ) );
613
+
614
+ do_action( 'cartflows_admin_settings_after_enqueue_scripts' );
615
+ }
616
+
617
+ /**
618
+ * Save All admin settings here
619
+ */
620
+ public static function save_settings() {
621
+
622
+ // Only admins can save settings.
623
+ if ( ! current_user_can( 'manage_options' ) ) {
624
+ return;
625
+ }
626
+
627
+ self::save_common_settings();
628
+ self::save_debug_settings();
629
+ self::save_permalink_settings();
630
+
631
+ self::save_google_analytics_settings();
632
+ self::save_facebook_settings();
633
+
634
+ // Let extensions hook into saving.
635
+ do_action( 'cartflows_admin_settings_save' );
636
+ }
637
+
638
+ /**
639
+ * Get and return page URL
640
+ *
641
+ * @param string $menu_slug Menu name.
642
+ * @since 1.0.0
643
+ * @return string page url
644
+ */
645
+ public static function get_page_url( $menu_slug ) {
646
+
647
+ $parent_page = self::$default_menu_position;
648
+
649
+ if ( strpos( $parent_page, '?' ) !== false ) {
650
+ $query_var = '&page=' . self::$plugin_slug;
651
+ } else {
652
+ $query_var = '?page=' . self::$plugin_slug;
653
+ }
654
+
655
+ $parent_page_url = admin_url( $parent_page . $query_var );
656
+
657
+ $url = $parent_page_url . '&action=' . $menu_slug;
658
+
659
+ return esc_url( $url );
660
+ }
661
+
662
+ /**
663
+ * Admin body classes.
664
+ *
665
+ * Body classes to be added to <body> tag in admin page
666
+ *
667
+ * @param String $classes body classes returned from the filter.
668
+ * @return String body classes to be added to <body> tag in admin page
669
+ */
670
+ public static function add_admin_body_class( $classes ) {
671
+
672
+ $classes .= ' cartflows-' . CARTFLOWS_VER;
673
+
674
+ return $classes;
675
+ }
676
+
677
+ /**
678
+ * Save Global Setting options.
679
+ *
680
+ * @since 1.0.0
681
+ */
682
+ public static function save_facebook_settings() {
683
+
684
+ if ( isset( $_POST['cartflows-facebook-settings-nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['cartflows-facebook-settings-nonce'] ) ), 'cartflows-facebook-settings' ) ) {
685
+
686
+ $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
687
+ $new_settings = array();
688
+
689
+ if ( isset( $_POST['_cartflows_facebook'] ) ) {
690
+ $new_settings = self::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_facebook'] ) ); //phpcs:ignore
691
+ }
692
+
693
+ Cartflows_Helper::update_admin_settings_option( '_cartflows_facebook', $new_settings, false );
694
+ $query = array(
695
+ 'message' => 'saved',
696
+ );
697
+ $redirect_to = add_query_arg( $query, $url );
698
+ wp_safe_redirect( $redirect_to );
699
+ exit;
700
+ }
701
+ }
702
+
703
+ /**
704
+ * Show embed header.
705
+ *
706
+ * @since 1.0.0
707
+ */
708
+ public static function show_embed_header() {
709
+
710
+ $current_screen = get_current_screen();
711
+
712
+ if (
713
+ is_object( $current_screen ) &&
714
+ isset( $current_screen->post_type ) &&
715
+ ( CARTFLOWS_FLOW_POST_TYPE === $current_screen->post_type ) &&
716
+ isset( $current_screen->base ) &&
717
+ ( 'post' === $current_screen->base || 'edit' === $current_screen->base )
718
+ ) {
719
+ return true;
720
+ }
721
+
722
+ return false;
723
+ }
724
+ /**
725
+ * Set up a div for the header embed to render into.
726
+ * The initial contents here are meant as a place loader for when the PHP page initialy loads.
727
+ */
728
+ public static function embed_page_header() {
729
+
730
+ if ( ! is_admin() || ! self::show_embed_header() ) {
731
+ return;
732
+ }
733
+
734
+ wp_enqueue_style( 'cartflows-admin-embed-header', CARTFLOWS_URL . 'admin/assets/css/admin-embed-header.css', array(), CARTFLOWS_VER );
735
+
736
+ include_once CARTFLOWS_DIR . 'includes/admin/cartflows-admin-header.php';
737
+ }
738
+ }
739
+
740
+ Cartflows_Admin::init();
classes/class-cartflows-default-meta.php CHANGED
@@ -1,871 +1,855 @@
1
- <?php
2
- /**
3
- * Cartflow default options.
4
- *
5
- * @package Cartflows
6
- */
7
-
8
- /**
9
- * Initialization
10
- *
11
- * @since 1.0.0
12
- */
13
- class Cartflows_Default_Meta {
14
-
15
-
16
-
17
- /**
18
- * Member Variable
19
- *
20
- * @var instance
21
- */
22
- private static $instance;
23
-
24
- /**
25
- * Member Variable
26
- *
27
- * @var checkout_fields
28
- */
29
- private static $checkout_fields = null;
30
-
31
- /**
32
- * Member Variable
33
- *
34
- * @var checkout_fields
35
- */
36
- private static $thankyou_fields = null;
37
-
38
- /**
39
- * Member Variable
40
- *
41
- * @var flow_fields
42
- */
43
- private static $flow_fields = null;
44
-
45
- /**
46
- * Member Variable
47
- *
48
- * @var landing_fields
49
- */
50
- private static $landing_fields = null;
51
-
52
- /**
53
- * Member Variable
54
- *
55
- * @var optin_fields
56
- */
57
- private static $optin_fields = null;
58
-
59
- /**
60
- * Initiator
61
- */
62
- public static function get_instance() {
63
- if ( ! isset( self::$instance ) ) {
64
- self::$instance = new self();
65
- }
66
- return self::$instance;
67
- }
68
-
69
- /**
70
- * Constructor
71
- */
72
- public function __construct() {
73
- }
74
-
75
- /**
76
- * Checkout Default fields.
77
- *
78
- * @param int $post_id post id.
79
- * @return array
80
- */
81
- public function get_checkout_fields( $post_id ) {
82
-
83
- if ( null === self::$checkout_fields ) {
84
- self::$checkout_fields = array(
85
- 'wcf-field-google-font-url' => array(
86
- 'default' => '',
87
- 'sanitize' => 'FILTER_DEFAULT',
88
- ),
89
- 'wcf-checkout-products' => array(
90
- 'default' => array(),
91
- 'sanitize' => 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS',
92
- ),
93
- 'wcf-checkout-layout' => array(
94
- 'default' => 'two-column',
95
- 'sanitize' => 'FILTER_DEFAULT',
96
- ),
97
- 'wcf-input-font-family' => array(
98
- 'default' => '',
99
- 'sanitize' => 'FILTER_DEFAULT',
100
- ),
101
- 'wcf-input-font-weight' => array(
102
- 'default' => '',
103
- 'sanitize' => 'FILTER_DEFAULT',
104
- ),
105
- 'wcf-heading-font-family' => array(
106
- 'default' => '',
107
- 'sanitize' => 'FILTER_DEFAULT',
108
- ),
109
- 'wcf-heading-font-weight' => array(
110
- 'default' => '',
111
- 'sanitize' => 'FILTER_DEFAULT',
112
- ),
113
- 'wcf-base-font-family' => array(
114
- 'default' => '',
115
- 'sanitize' => 'FILTER_DEFAULT',
116
- ),
117
- 'wcf-advance-options-fields' => array(
118
- 'default' => '',
119
- 'sanitize' => 'FILTER_DEFAULT',
120
- ),
121
- 'wcf-remove-product-field' => array(
122
- 'default' => '',
123
- 'sanitize' => 'FILTER_DEFAULT',
124
- ),
125
- 'wcf-checkout-place-order-button-text' => array(
126
- 'default' => '',
127
- 'sanitize' => 'FILTER_SANITIZE_STRING',
128
- ),
129
- 'wcf-base-font-weight' => array(
130
- 'default' => '',
131
- 'sanitize' => 'FILTER_DEFAULT',
132
- ),
133
- 'wcf-button-font-family' => array(
134
- 'default' => '',
135
- 'sanitize' => 'FILTER_DEFAULT',
136
- ),
137
- 'wcf-button-font-weight' => array(
138
- 'default' => '',
139
- 'sanitize' => 'FILTER_DEFAULT',
140
- ),
141
- 'wcf-primary-color' => array(
142
- 'default' => '',
143
- 'sanitize' => 'FILTER_DEFAULT',
144
- ),
145
- 'wcf-heading-color' => array(
146
- 'default' => '',
147
- 'sanitize' => 'FILTER_DEFAULT',
148
- ),
149
- 'wcf-section-bg-color' => array(
150
- 'default' => '',
151
- 'sanitize' => 'FILTER_DEFAULT',
152
- ),
153
- 'wcf-hl-bg-color' => array(
154
- 'default' => '',
155
- 'sanitize' => 'FILTER_DEFAULT',
156
- ),
157
- 'wcf-field-tb-padding' => array(
158
- 'default' => '',
159
- 'sanitize' => 'FILTER_DEFAULT',
160
- ),
161
- 'wcf-field-lr-padding' => array(
162
- 'default' => '',
163
- 'sanitize' => 'FILTER_DEFAULT',
164
- ),
165
- 'wcf-fields-skins' => array(
166
- 'default' => '',
167
- 'sanitize' => 'FILTER_DEFAULT',
168
- ),
169
- 'wcf-input-field-size' => array(
170
- 'default' => '33px',
171
- 'sanitize' => 'FILTER_DEFAULT',
172
- ),
173
- 'wcf-field-color' => array(
174
- 'default' => '',
175
- 'sanitize' => 'FILTER_DEFAULT',
176
- ),
177
- 'wcf-field-bg-color' => array(
178
- 'default' => '',
179
- 'sanitize' => 'FILTER_DEFAULT',
180
- ),
181
- 'wcf-field-border-color' => array(
182
- 'default' => '',
183
- 'sanitize' => 'FILTER_DEFAULT',
184
- ),
185
- 'wcf-box-border-color' => array(
186
- 'default' => '',
187
- 'sanitize' => 'FILTER_DEFAULT',
188
- ),
189
- 'wcf-field-label-color' => array(
190
- 'default' => '',
191
- 'sanitize' => 'FILTER_DEFAULT',
192
- ),
193
- 'wcf-submit-tb-padding' => array(
194
- 'default' => '',
195
- 'sanitize' => 'FILTER_DEFAULT',
196
- ),
197
- 'wcf-submit-lr-padding' => array(
198
- 'default' => '',
199
- 'sanitize' => 'FILTER_DEFAULT',
200
- ),
201
- 'wcf-input-button-size' => array(
202
- 'default' => '33px',
203
- 'sanitize' => 'FILTER_DEFAULT',
204
- ),
205
- 'wcf-submit-color' => array(
206
- 'default' => '',
207
- 'sanitize' => 'FILTER_DEFAULT',
208
- ),
209
- 'wcf-submit-hover-color' => array(
210
- 'default' => '',
211
- 'sanitize' => 'FILTER_DEFAULT',
212
- ),
213
- 'wcf-submit-bg-color' => array(
214
- 'default' => '',
215
- 'sanitize' => 'FILTER_DEFAULT',
216
- ),
217
- 'wcf-submit-bg-hover-color' => array(
218
- 'default' => '',
219
- 'sanitize' => 'FILTER_DEFAULT',
220
- ),
221
- 'wcf-submit-border-color' => array(
222
- 'default' => '',
223
- 'sanitize' => 'FILTER_DEFAULT',
224
- ),
225
- 'wcf-submit-border-hover-color' => array(
226
- 'default' => '',
227
- 'sanitize' => 'FILTER_DEFAULT',
228
- ),
229
- 'wcf-active-tab' => array(
230
- 'default' => '',
231
- 'sanitize' => 'FILTER_DEFAULT',
232
- ),
233
- 'wcf-header-logo-image' => array(
234
- 'default' => '',
235
- 'sanitize' => 'FILTER_DEFAULT',
236
- ),
237
- 'wcf-header-logo-width' => array(
238
- 'default' => '',
239
- 'sanitize' => 'FILTER_DEFAULT',
240
- ),
241
- 'wcf-custom-script' => array(
242
- 'default' => '',
243
- 'sanitize' => 'FILTER_DEFAULT',
244
- ),
245
- );
246
-
247
- self::$checkout_fields = apply_filters( 'cartflows_checkout_meta_options', self::$checkout_fields, $post_id );
248
- }
249
-
250
- return self::$checkout_fields;
251
- }
252
-
253
- /**
254
- * Save Checkout Meta fields.
255
- *
256
- * @param int $post_id post id.
257
- * @return void
258
- */
259
- public function save_checkout_fields( $post_id ) {
260
-
261
- $post_meta = $this->get_checkout_fields( $post_id );
262
-
263
- $this->save_meta_fields( $post_id, $post_meta );
264
- }
265
-
266
- /**
267
- * Save Landing Meta fields.
268
- *
269
- * @param int $post_id post id.
270
- * @return void
271
- */
272
- public function save_landing_fields( $post_id ) {
273
-
274
- $post_meta = $this->get_landing_fields( $post_id );
275
-
276
- $this->save_meta_fields( $post_id, $post_meta );
277
- }
278
-
279
- /**
280
- * Save ThankYou Meta fields.
281
- *
282
- * @param int $post_id post id.
283
- * @return void
284
- */
285
- public function save_thankyou_fields( $post_id ) {
286
-
287
- $post_meta = $this->get_thankyou_fields( $post_id );
288
-
289
- $this->save_meta_fields( $post_id, $post_meta );
290
- }
291
-
292
- /**
293
- * Flow Default fields.
294
- *
295
- * @param int $post_id post id.
296
- * @return array
297
- */
298
- public function get_flow_fields( $post_id ) {
299
-
300
- if ( null === self::$flow_fields ) {
301
- self::$flow_fields = array(
302
- 'wcf-steps' => array(
303
- 'default' => array(),
304
- 'sanitize' => 'FILTER_DEFAULT',
305
- ),
306
-
307
- 'wcf-testing' => array(
308
- 'default' => 'no',
309
- 'sanitize' => 'FILTER_DEFAULT',
310
- ),
311
- );
312
- }
313
-
314
- return apply_filters( 'cartflows_flow_meta_options', self::$flow_fields );
315
- }
316
-
317
- /**
318
- * Save Flow Meta fields.
319
- *
320
- * @param int $post_id post id.
321
- * @return void
322
- */
323
- public function save_flow_fields( $post_id ) {
324
-
325
- $post_meta = $this->get_flow_fields( $post_id );
326
-
327
- if ( isset( $post_meta['wcf-steps'] ) ) {
328
- unset( $post_meta['wcf-steps'] );
329
- }
330
-
331
- $this->save_meta_fields( $post_id, $post_meta );
332
- }
333
-
334
- /**
335
- * Save Meta fields - Common Function.
336
- *
337
- * @param int $post_id post id.
338
- * @param array $post_meta options to store.
339
- * @return void
340
- */
341
- public function save_meta_fields( $post_id, $post_meta ) {
342
-
343
- if ( ! ( $post_id && is_array( $post_meta ) ) ) {
344
- return;
345
- }
346
-
347
- foreach ( $post_meta as $key => $data ) {
348
- $meta_value = false;
349
-
350
- // Sanitize values.
351
- $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT';
352
-
353
- switch ( $sanitize_filter ) {
354
- case 'FILTER_SANITIZE_STRING':
355
- $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
356
- break;
357
-
358
- case 'FILTER_SANITIZE_URL':
359
- $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL );
360
- break;
361
-
362
- case 'FILTER_SANITIZE_NUMBER_INT':
363
- $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT );
364
- break;
365
-
366
- case 'FILTER_CARTFLOWS_ARRAY':
367
- if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { //phpcs:ignore
368
- $meta_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $key ] ) ); //phpcs:ignore
369
- }
370
- break;
371
-
372
- case 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS':
373
- if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { //phpcs:ignore
374
- $i = 0;
375
- $q = 0;
376
-
377
- foreach ( $_POST[ $key ] as $p_index => $p_data ) { // phpcs:ignore
378
- if ( ! array_key_exists( 'product', $p_data ) ) {
379
- continue;
380
- }
381
- foreach ( $p_data as $i_key => $i_value ) {
382
-
383
- if ( is_array( $i_value ) ) {
384
- foreach ( $i_value as $q_key => $q_value ) {
385
- $meta_value[ $i ][ $i_key ][ $q ] = array_map( 'sanitize_text_field', $q_value );
386
-
387
- $q++;
388
- }
389
- } else {
390
- $meta_value[ $i ][ $i_key ] = sanitize_text_field( $i_value );
391
- }
392
- }
393
-
394
- $i++;
395
- }
396
- }
397
- break;
398
-
399
- case 'FILTER_CARTFLOWS_IMAGES':
400
- $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
401
-
402
- if ( isset( $_POST[ $key . '-obj' ] )) { //phpcs:ignore
403
-
404
- if ( ! is_serialized( $_POST[ $key . '-obj' ] ) ) { //phpcs:ignore
405
-
406
- $image_obj = json_decode( stripcslashes( wp_unslash( $_POST[ $key . '-obj' ] ) ), true ); //phpcs:ignore
407
- $image_url = isset( $image_obj['sizes'] ) ? $image_obj['sizes'] : array();
408
-
409
- $image_data = array(
410
- 'id' => isset( $image_obj['id'] ) ? intval( $image_obj['id'] ) : 0,
411
- 'url' => array(
412
- 'thumbnail' => isset( $image_url['thumbnail']['url'] ) ? esc_url_raw( $image_url['thumbnail']['url'] ) : '',
413
- 'medium' => isset( $image_url['medium']['url'] ) ? esc_url_raw( $image_url['medium']['url'] ) : '',
414
- 'full' => isset( $image_url['full']['url'] ) ? esc_url_raw( $image_url['full']['url'] ) : '',
415
- ),
416
- );
417
-
418
- $new_meta_value = 0 !== $image_data['id'] ? $image_data : '';
419
- update_post_meta( $post_id, $key . '-obj', $new_meta_value );
420
- }
421
- }
422
-
423
- break;
424
-
425
- default:
426
- if ( 'FILTER_DEFAULT' === $sanitize_filter ) {
427
- $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
428
- } else {
429
- $meta_value = apply_filters( 'cartflows_save_meta_field_values', $meta_value, $post_id, $key, $sanitize_filter );
430
- }
431
-
432
- break;
433
- }
434
-
435
- if ( false !== $meta_value ) {
436
- update_post_meta( $post_id, $key, $meta_value );
437
- } else {
438
- delete_post_meta( $post_id, $key );
439
- }
440
- }
441
- }
442
-
443
- /**
444
- * Get checkout meta.
445
- *
446
- * @param int $post_id post id.
447
- * @param string $key options key.
448
- * @param mix $default options default value.
449
- * @return string
450
- */
451
- public function get_flow_meta_value( $post_id, $key, $default = false ) {
452
-
453
- $value = $this->get_save_meta( $post_id, $key );
454
-
455
- if ( ! $value ) {
456
- if ( $default ) {
457
- $value = $default;
458
- } else {
459
- $fields = $this->get_flow_fields( $post_id );
460
-
461
- if ( isset( $fields[ $key ]['default'] ) ) {
462
- $value = $fields[ $key ]['default'];
463
- }
464
- }
465
- }
466
-
467
- return $value;
468
- }
469
-
470
- /**
471
- * Get checkout meta.
472
- *
473
- * @param int $post_id post id.
474
- * @param string $key options key.
475
- * @param mix $default options default value.
476
- * @return string
477
- */
478
- public function get_checkout_meta_value( $post_id = 0, $key = '', $default = false ) {
479
-
480
- $value = $this->get_save_meta( $post_id, $key );
481
-
482
- if ( ! $value ) {
483
- if ( false !== $default ) {
484
- $value = $default;
485
- } else {
486
- $fields = $this->get_checkout_fields( $post_id );
487
-
488
- if ( isset( $fields[ $key ]['default'] ) ) {
489
- $value = $fields[ $key ]['default'];
490
- }
491
- }
492
- }
493
-
494
- return $value;
495
- }
496
-
497
- /**
498
- * Get post meta.
499
- *
500
- * @param int $post_id post id.
501
- * @param string $key options key.
502
- * @return string
503
- */
504
- public function get_save_meta( $post_id, $key ) {
505
-
506
- $value = get_post_meta( $post_id, $key, true );
507
-
508
- return $value;
509
- }
510
-
511
- /**
512
- * Thank You Default fields.
513
- *
514
- * @param int $post_id post id.
515
- * @return array
516
- */
517
- public function get_thankyou_fields( $post_id ) {
518
-
519
- if ( null === self::$thankyou_fields ) {
520
- self::$thankyou_fields = array(
521
- 'wcf-field-google-font-url' => array(
522
- 'default' => '',
523
- 'sanitize' => 'FILTER_DEFAULT',
524
- ),
525
- 'wcf-active-tab' => array(
526
- 'default' => '',
527
- 'sanitize' => 'FILTER_DEFAULT',
528
- ),
529
- 'wcf-tq-text-color' => array(
530
- 'default' => '',
531
- 'sanitize' => 'FILTER_DEFAULT',
532
- ),
533
- 'wcf-tq-font-family' => array(
534
- 'default' => '',
535
- 'sanitize' => 'FILTER_DEFAULT',
536
- ),
537
- 'wcf-tq-font-size' => array(
538
- 'default' => '',
539
- 'sanitize' => 'FILTER_DEFAULT',
540
- ),
541
- 'wcf-tq-heading-color' => array(
542
- 'default' => '',
543
- 'sanitize' => 'FILTER_DEFAULT',
544
- ),
545
- 'wcf-tq-heading-font-family' => array(
546
- 'default' => '',
547
- 'sanitize' => 'FILTER_DEFAULT',
548
- ),
549
- 'wcf-tq-heading-font-wt' => array(
550
- 'default' => '',
551
- 'sanitize' => 'FILTER_DEFAULT',
552
- ),
553
- 'wcf-tq-container-width' => array(
554
- 'default' => '',
555
- 'sanitize' => 'FILTER_DEFAULT',
556
- ),
557
- 'wcf-tq-section-bg-color' => array(
558
- 'default' => '',
559
- 'sanitize' => 'FILTER_DEFAULT',
560
- ),
561
- 'wcf-tq-advance-options-fields' => array(
562
- 'default' => '',
563
- 'sanitize' => 'FILTER_DEFAULT',
564
- ),
565
- 'wcf-show-overview-section' => array(
566
- 'default' => 'yes',
567
- 'sanitize' => 'FILTER_DEFAULT',
568
- ),
569
- 'wcf-show-details-section' => array(
570
- 'default' => 'yes',
571
- 'sanitize' => 'FILTER_DEFAULT',
572
- ),
573
- 'wcf-show-billing-section' => array(
574
- 'default' => 'yes',
575
- 'sanitize' => 'FILTER_DEFAULT',
576
- ),
577
- 'wcf-show-shipping-section' => array(
578
- 'default' => 'yes',
579
- 'sanitize' => 'FILTER_DEFAULT',
580
- ),
581
- 'wcf-show-tq-redirect-section' => array(
582
- 'default' => '',
583
- 'sanitize' => 'FILTER_DEFAULT',
584
- ),
585
- 'wcf-tq-redirect-link' => array(
586
- 'default' => '',
587
- 'sanitize' => 'FILTER_SANITIZE_URL',
588
- ),
589
- 'wcf-tq-text' => array(
590
- 'default' => '',
591
- 'sanitize' => 'FILTER_DEFAULT',
592
- ),
593
- 'wcf-custom-script' => array(
594
- 'default' => '',
595
- 'sanitize' => 'FILTER_DEFAULT',
596
- ),
597
- );
598
- }
599
-
600
- return apply_filters( 'cartflows_thankyou_meta_options', self::$thankyou_fields, $post_id );
601
- }
602
-
603
- /**
604
- * Get Thank you section meta.
605
- *
606
- * @param int $post_id post id.
607
- * @param string $key options key.
608
- * @param mix $default options default value.
609
- * @return string
610
- */
611
- public function get_thankyou_meta_value( $post_id, $key, $default = false ) {
612
-
613
- $value = $this->get_save_meta( $post_id, $key );
614
-
615
- if ( ! $value ) {
616
- if ( $default ) {
617
- $value = $default;
618
- } else {
619
- $fields = $this->get_thankyou_fields( $post_id );
620
-
621
- if ( isset( $fields[ $key ]['default'] ) ) {
622
- $value = $fields[ $key ]['default'];
623
- }
624
- }
625
- }
626
-
627
- return $value;
628
- }
629
-
630
- /**
631
- * Get Landing section meta.
632
- *
633
- * @param int $post_id post id.
634
- * @param string $key options key.
635
- * @param mix $default options default value.
636
- * @return string
637
- */
638
- public function get_landing_meta_value( $post_id, $key, $default = false ) {
639
-
640
- $value = $this->get_save_meta( $post_id, $key );
641
- if ( ! $value ) {
642
- if ( $default ) {
643
- $value = $default;
644
- } else {
645
- $fields = $this->get_landing_fields( $post_id );
646
-
647
- if ( isset( $fields[ $key ]['default'] ) ) {
648
- $value = $fields[ $key ]['default'];
649
- }
650
- }
651
- }
652
-
653
- return $value;
654
- }
655
-
656
- /**
657
- * Landing Default fields.
658
- *
659
- * @param int $post_id post id.
660
- * @return array
661
- */
662
- public function get_landing_fields( $post_id ) {
663
-
664
- if ( null === self::$landing_fields ) {
665
- self::$landing_fields = array(
666
- 'wcf-custom-script' => array(
667
- 'default' => '',
668
- 'sanitize' => 'FILTER_DEFAULT',
669
- ),
670
- );
671
- }
672
- return apply_filters( 'cartflows_landing_meta_options', self::$landing_fields, $post_id );
673
- }
674
-
675
- /**
676
- * Optin Default fields.
677
- *
678
- * @param int $post_id post id.
679
- * @return array
680
- */
681
- public function get_optin_fields( $post_id ) {
682
-
683
- if ( null === self::$optin_fields ) {
684
- self::$optin_fields = array(
685
-
686
- 'wcf-optin-product' => array(
687
- 'default' => array(),
688
- 'sanitize' => 'FILTER_CARTFLOWS_ARRAY',
689
- ),
690
-
691
- /* Style */
692
- 'wcf-field-google-font-url' => array(
693
- 'default' => '',
694
- 'sanitize' => 'FILTER_DEFAULT',
695
- ),
696
- 'wcf-primary-color' => array(
697
- 'default' => '',
698
- 'sanitize' => 'FILTER_DEFAULT',
699
- ),
700
- 'wcf-base-font-family' => array(
701
- 'default' => '',
702
- 'sanitize' => 'FILTER_DEFAULT',
703
- ),
704
- 'wcf-input-fields-skins' => array(
705
- 'default' => '',
706
- 'sanitize' => 'FILTER_DEFAULT',
707
- ),
708
- 'wcf-input-font-family' => array(
709
- 'default' => '',
710
- 'sanitize' => 'FILTER_DEFAULT',
711
- ),
712
- 'wcf-input-font-weight' => array(
713
- 'default' => '',
714
- 'sanitize' => 'FILTER_DEFAULT',
715
- ),
716
- 'wcf-input-field-size' => array(
717
- 'default' => '33px',
718
- 'sanitize' => 'FILTER_DEFAULT',
719
- ),
720
- 'wcf-field-tb-padding' => array(
721
- 'default' => '',
722
- 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
723
- ),
724
- 'wcf-field-lr-padding' => array(
725
- 'default' => '',
726
- 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
727
- ),
728
- 'wcf-field-color' => array(
729
- 'default' => '',
730
- 'sanitize' => 'FILTER_DEFAULT',
731
- ),
732
- 'wcf-field-bg-color' => array(
733
- 'default' => '',
734
- 'sanitize' => 'FILTER_DEFAULT',
735
- ),
736
- 'wcf-field-border-color' => array(
737
- 'default' => '',
738
- 'sanitize' => 'FILTER_DEFAULT',
739
- ),
740
- 'wcf-field-label-color' => array(
741
- 'default' => '',
742
- 'sanitize' => 'FILTER_DEFAULT',
743
- ),
744
- 'wcf-submit-button-text' => array(
745
- 'default' => __( 'Submit', 'cartflows' ),
746
- 'sanitize' => 'FILTER_DEFAULT',
747
- ),
748
- 'wcf-submit-font-size' => array(
749
- 'default' => '',
750
- 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
751
- ),
752
- 'wcf-button-font-family' => array(
753
- 'default' => '',
754
- 'sanitize' => 'FILTER_DEFAULT',
755
- ),
756
- 'wcf-button-font-weight' => array(
757
- 'default' => '',
758
- 'sanitize' => 'FILTER_DEFAULT',
759
- ),
760
- 'wcf-submit-button-size' => array(
761
- 'default' => '33px',
762
- 'sanitize' => 'FILTER_DEFAULT',
763
- ),
764
- 'wcf-submit-tb-padding' => array(
765
- 'default' => '',
766
- 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
767
- ),
768
- 'wcf-submit-lr-padding' => array(
769
- 'default' => '',
770
- 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
771
- ),
772
- 'wcf-submit-button-position' => array(
773
- 'default' => 'center',
774
- 'sanitize' => 'FILTER_DEFAULT',
775
- ),
776
- 'wcf-submit-color' => array(
777
- 'default' => '',
778
- 'sanitize' => 'FILTER_DEFAULT',
779
- ),
780
- 'wcf-submit-hover-color' => array(
781
- 'default' => '',
782
- 'sanitize' => 'FILTER_DEFAULT',
783
- ),
784
- 'wcf-submit-bg-color' => array(
785
- 'default' => '',
786
- 'sanitize' => 'FILTER_DEFAULT',
787
- ),
788
- 'wcf-submit-bg-hover-color' => array(
789
- 'default' => '',
790
- 'sanitize' => 'FILTER_DEFAULT',
791
- ),
792
- 'wcf-submit-border-color' => array(
793
- 'default' => '',
794
- 'sanitize' => 'FILTER_DEFAULT',
795
- ),
796
- 'wcf-submit-border-hover-color' => array(
797
- 'default' => '',
798
- 'sanitize' => 'FILTER_DEFAULT',
799
- ),
800
-
801
- /* Settings */
802
- 'wcf-optin-pass-fields' => array(
803
- 'default' => '',
804
- 'sanitize' => 'FILTER_DEFAULT',
805
- ),
806
- 'wcf-optin-pass-specific-fields' => array(
807
- 'default' => 'first_name',
808
- 'sanitize' => 'FILTER_DEFAULT',
809
- ),
810
-
811
- /* Script */
812
- 'wcf-custom-script' => array(
813
- 'default' => '',
814
- 'sanitize' => 'FILTER_DEFAULT',
815
- ),
816
-
817
- /* Hidden */
818
- 'wcf-active-tab' => array(
819
- 'default' => '',
820
- 'sanitize' => 'FILTER_DEFAULT',
821
- ),
822
- );
823
- }
824
- return apply_filters( 'cartflows_optin_meta_options', self::$optin_fields, $post_id );
825
- }
826
-
827
- /**
828
- * Save Optin Meta fields.
829
- *
830
- * @param int $post_id post id.
831
- * @return void
832
- */
833
- public function save_optin_fields( $post_id ) {
834
-
835
- $post_meta = $this->get_optin_fields( $post_id );
836
-
837
- $this->save_meta_fields( $post_id, $post_meta );
838
- }
839
-
840
- /**
841
- * Get optin meta.
842
- *
843
- * @param int $post_id post id.
844
- * @param string $key options key.
845
- * @param mix $default options default value.
846
- * @return string
847
- */
848
- public function get_optin_meta_value( $post_id = 0, $key = '', $default = false ) {
849
-
850
- $value = $this->get_save_meta( $post_id, $key );
851
-
852
- if ( ! $value ) {
853
- if ( false !== $default ) {
854
- $value = $default;
855
- } else {
856
- $fields = $this->get_optin_fields( $post_id );
857
-
858
- if ( isset( $fields[ $key ]['default'] ) ) {
859
- $value = $fields[ $key ]['default'];
860
- }
861
- }
862
- }
863
-
864
- return $value;
865
- }
866
- }
867
-
868
- /**
869
- * Kicking this off by calling 'get_instance()' method
870
- */
871
- Cartflows_Default_Meta::get_instance();
1
+ <?php
2
+ /**
3
+ * Cartflow default options.
4
+ *
5
+ * @package Cartflows
6
+ */
7
+
8
+ /**
9
+ * Initialization
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Default_Meta {
14
+
15
+
16
+
17
+ /**
18
+ * Member Variable
19
+ *
20
+ * @var instance
21
+ */
22
+ private static $instance;
23
+
24
+ /**
25
+ * Member Variable
26
+ *
27
+ * @var checkout_fields
28
+ */
29
+ private static $checkout_fields = null;
30
+
31
+ /**
32
+ * Member Variable
33
+ *
34
+ * @var checkout_fields
35
+ */
36
+ private static $thankyou_fields = null;
37
+
38
+ /**
39
+ * Member Variable
40
+ *
41
+ * @var flow_fields
42
+ */
43
+ private static $flow_fields = null;
44
+
45
+ /**
46
+ * Member Variable
47
+ *
48
+ * @var landing_fields
49
+ */
50
+ private static $landing_fields = null;
51
+
52
+ /**
53
+ * Member Variable
54
+ *
55
+ * @var optin_fields
56
+ */
57
+ private static $optin_fields = null;
58
+
59
+ /**
60
+ * Initiator
61
+ */
62
+ public static function get_instance() {
63
+ if ( ! isset( self::$instance ) ) {
64
+ self::$instance = new self();
65
+ }
66
+ return self::$instance;
67
+ }
68
+
69
+ /**
70
+ * Constructor
71
+ */
72
+ public function __construct() {
73
+ }
74
+
75
+ /**
76
+ * Checkout Default fields.
77
+ *
78
+ * @param int $post_id post id.
79
+ * @return array
80
+ */
81
+ public function get_checkout_fields( $post_id ) {
82
+
83
+ if ( null === self::$checkout_fields ) {
84
+ self::$checkout_fields = array(
85
+ 'wcf-field-google-font-url' => array(
86
+ 'default' => '',
87
+ 'sanitize' => 'FILTER_DEFAULT',
88
+ ),
89
+ 'wcf-checkout-products' => array(
90
+ 'default' => array(),
91
+ 'sanitize' => 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS',
92
+ ),
93
+ 'wcf-checkout-layout' => array(
94
+ 'default' => 'two-column',
95
+ 'sanitize' => 'FILTER_DEFAULT',
96
+ ),
97
+ 'wcf-input-font-family' => array(
98
+ 'default' => '',
99
+ 'sanitize' => 'FILTER_DEFAULT',
100
+ ),
101
+ 'wcf-input-font-weight' => array(
102
+ 'default' => '',
103
+ 'sanitize' => 'FILTER_DEFAULT',
104
+ ),
105
+ 'wcf-heading-font-family' => array(
106
+ 'default' => '',
107
+ 'sanitize' => 'FILTER_DEFAULT',
108
+ ),
109
+ 'wcf-heading-font-weight' => array(
110
+ 'default' => '',
111
+ 'sanitize' => 'FILTER_DEFAULT',
112
+ ),
113
+ 'wcf-base-font-family' => array(
114
+ 'default' => '',
115
+ 'sanitize' => 'FILTER_DEFAULT',
116
+ ),
117
+ 'wcf-advance-options-fields' => array(
118
+ 'default' => '',
119
+ 'sanitize' => 'FILTER_DEFAULT',
120
+ ),
121
+ 'wcf-remove-product-field' => array(
122
+ 'default' => '',
123
+ 'sanitize' => 'FILTER_DEFAULT',
124
+ ),
125
+ 'wcf-checkout-place-order-button-text' => array(
126
+ 'default' => '',
127
+ 'sanitize' => 'FILTER_SANITIZE_STRING',
128
+ ),
129
+ 'wcf-base-font-weight' => array(
130
+ 'default' => '',
131
+ 'sanitize' => 'FILTER_DEFAULT',
132
+ ),
133
+ 'wcf-button-font-family' => array(
134
+ 'default' => '',
135
+ 'sanitize' => 'FILTER_DEFAULT',
136
+ ),
137
+ 'wcf-button-font-weight' => array(
138
+ 'default' => '',
139
+ 'sanitize' => 'FILTER_DEFAULT',
140
+ ),
141
+ 'wcf-primary-color' => array(
142
+ 'default' => '',
143
+ 'sanitize' => 'FILTER_DEFAULT',
144
+ ),
145
+ 'wcf-heading-color' => array(
146
+ 'default' => '',
147
+ 'sanitize' => 'FILTER_DEFAULT',
148
+ ),
149
+ 'wcf-section-bg-color' => array(
150
+ 'default' => '',
151
+ 'sanitize' => 'FILTER_DEFAULT',
152
+ ),
153
+ 'wcf-hl-bg-color' => array(
154
+ 'default' => '',
155
+ 'sanitize' => 'FILTER_DEFAULT',
156
+ ),
157
+ 'wcf-field-tb-padding' => array(
158
+ 'default' => '',
159
+ 'sanitize' => 'FILTER_DEFAULT',
160
+ ),
161
+ 'wcf-field-lr-padding' => array(
162
+ 'default' => '',
163
+ 'sanitize' => 'FILTER_DEFAULT',
164
+ ),
165
+ 'wcf-fields-skins' => array(
166
+ 'default' => '',
167
+ 'sanitize' => 'FILTER_DEFAULT',
168
+ ),
169
+ 'wcf-input-field-size' => array(
170
+ 'default' => '33px',
171
+ 'sanitize' => 'FILTER_DEFAULT',
172
+ ),
173
+ 'wcf-field-color' => array(
174
+ 'default' => '',
175
+ 'sanitize' => 'FILTER_DEFAULT',
176
+ ),
177
+ 'wcf-field-bg-color' => array(
178
+ 'default' => '',
179
+ 'sanitize' => 'FILTER_DEFAULT',
180
+ ),
181
+ 'wcf-field-border-color' => array(
182
+ 'default' => '',
183
+ 'sanitize' => 'FILTER_DEFAULT',
184
+ ),
185
+ 'wcf-box-border-color' => array(
186
+ 'default' => '',
187
+ 'sanitize' => 'FILTER_DEFAULT',
188
+ ),
189
+ 'wcf-field-label-color' => array(
190
+ 'default' => '',
191
+ 'sanitize' => 'FILTER_DEFAULT',
192
+ ),
193
+ 'wcf-submit-tb-padding' => array(
194
+ 'default' => '',
195
+ 'sanitize' => 'FILTER_DEFAULT',
196
+ ),
197
+ 'wcf-submit-lr-padding' => array(
198
+ 'default' => '',
199
+ 'sanitize' => 'FILTER_DEFAULT',
200
+ ),
201
+ 'wcf-input-button-size' => array(
202
+ 'default' => '33px',
203
+ 'sanitize' => 'FILTER_DEFAULT',
204
+ ),
205
+ 'wcf-submit-color' => array(
206
+ 'default' => '',
207
+ 'sanitize' => 'FILTER_DEFAULT',
208
+ ),
209
+ 'wcf-submit-hover-color' => array(
210
+ 'default' => '',
211
+ 'sanitize' => 'FILTER_DEFAULT',
212
+ ),
213
+ 'wcf-submit-bg-color' => array(
214
+ 'default' => '',
215
+ 'sanitize' => 'FILTER_DEFAULT',
216
+ ),
217
+ 'wcf-submit-bg-hover-color' => array(
218
+ 'default' => '',
219
+ 'sanitize' => 'FILTER_DEFAULT',
220
+ ),
221
+ 'wcf-submit-border-color' => array(
222
+ 'default' => '',
223
+ 'sanitize' => 'FILTER_DEFAULT',
224
+ ),
225
+ 'wcf-submit-border-hover-color' => array(
226
+ 'default' => '',
227
+ 'sanitize' => 'FILTER_DEFAULT',
228
+ ),
229
+ 'wcf-header-logo-image' => array(
230
+ 'default' => '',
231
+ 'sanitize' => 'FILTER_DEFAULT',
232
+ ),
233
+ 'wcf-header-logo-width' => array(
234
+ 'default' => '',
235
+ 'sanitize' => 'FILTER_DEFAULT',
236
+ ),
237
+ 'wcf-custom-script' => array(
238
+ 'default' => '',
239
+ 'sanitize' => 'FILTER_DEFAULT',
240
+ ),
241
+ );
242
+
243
+ self::$checkout_fields = apply_filters( 'cartflows_checkout_meta_options', self::$checkout_fields, $post_id );
244
+ }
245
+
246
+ return self::$checkout_fields;
247
+ }
248
+
249
+ /**
250
+ * Save Checkout Meta fields.
251
+ *
252
+ * @param int $post_id post id.
253
+ * @return void
254
+ */
255
+ public function save_checkout_fields( $post_id ) {
256
+
257
+ $post_meta = $this->get_checkout_fields( $post_id );
258
+
259
+ $this->save_meta_fields( $post_id, $post_meta );
260
+ }
261
+
262
+ /**
263
+ * Save Landing Meta fields.
264
+ *
265
+ * @param int $post_id post id.
266
+ * @return void
267
+ */
268
+ public function save_landing_fields( $post_id ) {
269
+
270
+ $post_meta = $this->get_landing_fields( $post_id );
271
+
272
+ $this->save_meta_fields( $post_id, $post_meta );
273
+ }
274
+
275
+ /**
276
+ * Save ThankYou Meta fields.
277
+ *
278
+ * @param int $post_id post id.
279
+ * @return void
280
+ */
281
+ public function save_thankyou_fields( $post_id ) {
282
+
283
+ $post_meta = $this->get_thankyou_fields( $post_id );
284
+
285
+ $this->save_meta_fields( $post_id, $post_meta );
286
+ }
287
+
288
+ /**
289
+ * Flow Default fields.
290
+ *
291
+ * @param int $post_id post id.
292
+ * @return array
293
+ */
294
+ public function get_flow_fields( $post_id ) {
295
+
296
+ if ( null === self::$flow_fields ) {
297
+ self::$flow_fields = array(
298
+ 'wcf-steps' => array(
299
+ 'default' => array(),
300
+ 'sanitize' => 'FILTER_DEFAULT',
301
+ ),
302
+
303
+ 'wcf-testing' => array(
304
+ 'default' => 'no',
305
+ 'sanitize' => 'FILTER_DEFAULT',
306
+ ),
307
+ );
308
+ }
309
+
310
+ return apply_filters( 'cartflows_flow_meta_options', self::$flow_fields );
311
+ }
312
+
313
+ /**
314
+ * Save Flow Meta fields.
315
+ *
316
+ * @param int $post_id post id.
317
+ * @return void
318
+ */
319
+ public function save_flow_fields( $post_id ) {
320
+
321
+ $post_meta = $this->get_flow_fields( $post_id );
322
+
323
+ if ( isset( $post_meta['wcf-steps'] ) ) {
324
+ unset( $post_meta['wcf-steps'] );
325
+ }
326
+
327
+ $this->save_meta_fields( $post_id, $post_meta );
328
+ }
329
+
330
+ /**
331
+ * Save Meta fields - Common Function.
332
+ *
333
+ * @param int $post_id post id.
334
+ * @param array $post_meta options to store.
335
+ * @return void
336
+ */
337
+ public function save_meta_fields( $post_id, $post_meta ) {
338
+
339
+ if ( ! ( $post_id && is_array( $post_meta ) ) ) {
340
+ return;
341
+ }
342
+
343
+ foreach ( $post_meta as $key => $data ) {
344
+ $meta_value = false;
345
+
346
+ // Sanitize values.
347
+ $sanitize_filter = ( isset( $data['sanitize'] ) ) ? $data['sanitize'] : 'FILTER_DEFAULT';
348
+
349
+ switch ( $sanitize_filter ) {
350
+ case 'FILTER_SANITIZE_STRING':
351
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING );
352
+ break;
353
+
354
+ case 'FILTER_SANITIZE_URL':
355
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL );
356
+ break;
357
+
358
+ case 'FILTER_SANITIZE_NUMBER_INT':
359
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT );
360
+ break;
361
+
362
+ case 'FILTER_CARTFLOWS_ARRAY':
363
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { //phpcs:ignore
364
+ $meta_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $key ] ) ); //phpcs:ignore
365
+ }
366
+ break;
367
+
368
+ case 'FILTER_CARTFLOWS_CHECKOUT_PRODUCTS':
369
+ if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { //phpcs:ignore
370
+ $i = 0;
371
+ $q = 0;
372
+
373
+ foreach ( $_POST[ $key ] as $p_index => $p_data ) { // phpcs:ignore
374
+ if ( ! array_key_exists( 'product', $p_data ) ) {
375
+ continue;
376
+ }
377
+ foreach ( $p_data as $i_key => $i_value ) {
378
+
379
+ if ( is_array( $i_value ) ) {
380
+ foreach ( $i_value as $q_key => $q_value ) {
381
+ $meta_value[ $i ][ $i_key ][ $q ] = array_map( 'sanitize_text_field', $q_value );
382
+
383
+ $q++;
384
+ }
385
+ } else {
386
+ $meta_value[ $i ][ $i_key ] = sanitize_text_field( $i_value );
387
+ }
388
+ }
389
+
390
+ $i++;
391
+ }
392
+ }
393
+ break;
394
+
395
+ case 'FILTER_CARTFLOWS_IMAGES':
396
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
397
+
398
+ if ( isset( $_POST[ $key . '-obj' ] )) { //phpcs:ignore
399
+
400
+ if ( ! is_serialized( $_POST[ $key . '-obj' ] ) ) { //phpcs:ignore
401
+
402
+ $image_obj = json_decode( stripcslashes( wp_unslash( $_POST[ $key . '-obj' ] ) ), true ); //phpcs:ignore
403
+ $image_url = isset( $image_obj['sizes'] ) ? $image_obj['sizes'] : array();
404
+
405
+ $image_data = array(
406
+ 'id' => isset( $image_obj['id'] ) ? intval( $image_obj['id'] ) : 0,
407
+ 'url' => array(
408
+ 'thumbnail' => isset( $image_url['thumbnail']['url'] ) ? esc_url_raw( $image_url['thumbnail']['url'] ) : '',
409
+ 'medium' => isset( $image_url['medium']['url'] ) ? esc_url_raw( $image_url['medium']['url'] ) : '',
410
+ 'full' => isset( $image_url['full']['url'] ) ? esc_url_raw( $image_url['full']['url'] ) : '',
411
+ ),
412
+ );
413
+
414
+ $new_meta_value = 0 !== $image_data['id'] ? $image_data : '';
415
+ update_post_meta( $post_id, $key . '-obj', $new_meta_value );
416
+ }
417
+ }
418
+
419
+ break;
420
+
421
+ default:
422
+ if ( 'FILTER_DEFAULT' === $sanitize_filter ) {
423
+ $meta_value = filter_input( INPUT_POST, $key, FILTER_DEFAULT );
424
+ } else {
425
+ $meta_value = apply_filters( 'cartflows_save_meta_field_values', $meta_value, $post_id, $key, $sanitize_filter );
426
+ }
427
+
428
+ break;
429
+ }
430
+
431
+ if ( false !== $meta_value ) {
432
+ update_post_meta( $post_id, $key, $meta_value );
433
+ } else {
434
+ delete_post_meta( $post_id, $key );
435
+ }
436
+ }
437
+ }
438
+
439
+ /**
440
+ * Get checkout meta.
441
+ *
442
+ * @param int $post_id post id.
443
+ * @param string $key options key.
444
+ * @param mix $default options default value.
445
+ * @return string
446
+ */
447
+ public function get_flow_meta_value( $post_id, $key, $default = false ) {
448
+
449
+ $value = $this->get_save_meta( $post_id, $key );
450
+
451
+ if ( ! $value ) {
452
+ if ( $default ) {
453
+ $value = $default;
454
+ } else {
455
+ $fields = $this->get_flow_fields( $post_id );
456
+
457
+ if ( isset( $fields[ $key ]['default'] ) ) {
458
+ $value = $fields[ $key ]['default'];
459
+ }
460
+ }
461
+ }
462
+
463
+ return $value;
464
+ }
465
+
466
+ /**
467
+ * Get checkout meta.
468
+ *
469
+ * @param int $post_id post id.
470
+ * @param string $key options key.
471
+ * @param mix $default options default value.
472
+ * @return string
473
+ */
474
+ public function get_checkout_meta_value( $post_id = 0, $key = '', $default = false ) {
475
+
476
+ $value = $this->get_save_meta( $post_id, $key );
477
+
478
+ if ( ! $value ) {
479
+ if ( false !== $default ) {
480
+ $value = $default;
481
+ } else {
482
+ $fields = $this->get_checkout_fields( $post_id );
483
+
484
+ if ( isset( $fields[ $key ]['default'] ) ) {
485
+ $value = $fields[ $key ]['default'];
486
+ }
487
+ }
488
+ }
489
+
490
+ return apply_filters( "cartflows_checkout_meta_{$key}", $value );
491
+ }
492
+
493
+ /**
494
+ * Get post meta.
495
+ *
496
+ * @param int $post_id post id.
497
+ * @param string $key options key.
498
+ * @return string
499
+ */
500
+ public function get_save_meta( $post_id, $key ) {
501
+
502
+ return get_post_meta( $post_id, $key, true );
503
+ }
504
+
505
+ /**
506
+ * Thank You Default fields.
507
+ *
508
+ * @param int $post_id post id.
509
+ * @return array
510
+ */
511
+ public function get_thankyou_fields( $post_id ) {
512
+
513
+ if ( null === self::$thankyou_fields ) {
514
+ self::$thankyou_fields = array(
515
+ 'wcf-field-google-font-url' => array(
516
+ 'default' => '',
517
+ 'sanitize' => 'FILTER_DEFAULT',
518
+ ),
519
+ 'wcf-tq-text-color' => array(
520
+ 'default' => '',
521
+ 'sanitize' => 'FILTER_DEFAULT',
522
+ ),
523
+ 'wcf-tq-font-family' => array(
524
+ 'default' => '',
525
+ 'sanitize' => 'FILTER_DEFAULT',
526
+ ),
527
+ 'wcf-tq-font-size' => array(
528
+ 'default' => '',
529
+ 'sanitize' => 'FILTER_DEFAULT',
530
+ ),
531
+ 'wcf-tq-heading-color' => array(
532
+ 'default' => '',
533
+ 'sanitize' => 'FILTER_DEFAULT',
534
+ ),
535
+ 'wcf-tq-heading-font-family' => array(
536
+ 'default' => '',
537
+ 'sanitize' => 'FILTER_DEFAULT',
538
+ ),
539
+ 'wcf-tq-heading-font-wt' => array(
540
+ 'default' => '',
541
+ 'sanitize' => 'FILTER_DEFAULT',
542
+ ),
543
+ 'wcf-tq-container-width' => array(
544
+ 'default' => '',
545
+ 'sanitize' => 'FILTER_DEFAULT',
546
+ ),
547
+ 'wcf-tq-section-bg-color' => array(
548
+ 'default' => '',
549
+ 'sanitize' => 'FILTER_DEFAULT',
550
+ ),
551
+ 'wcf-tq-advance-options-fields' => array(
552
+ 'default' => '',
553
+ 'sanitize' => 'FILTER_DEFAULT',
554
+ ),
555
+ 'wcf-show-overview-section' => array(
556
+ 'default' => 'yes',
557
+ 'sanitize' => 'FILTER_DEFAULT',
558
+ ),
559
+ 'wcf-show-details-section' => array(
560
+ 'default' => 'yes',
561
+ 'sanitize' => 'FILTER_DEFAULT',
562
+ ),
563
+ 'wcf-show-billing-section' => array(
564
+ 'default' => 'yes',
565
+ 'sanitize' => 'FILTER_DEFAULT',
566
+ ),
567
+ 'wcf-show-shipping-section' => array(
568
+ 'default' => 'yes',
569
+ 'sanitize' => 'FILTER_DEFAULT',
570
+ ),
571
+ 'wcf-show-tq-redirect-section' => array(
572
+ 'default' => '',
573
+ 'sanitize' => 'FILTER_DEFAULT',
574
+ ),
575
+ 'wcf-tq-redirect-link' => array(
576
+ 'default' => '',
577
+ 'sanitize' => 'FILTER_SANITIZE_URL',
578
+ ),
579
+ 'wcf-tq-text' => array(
580
+ 'default' => '',
581
+ 'sanitize' => 'FILTER_DEFAULT',
582
+ ),
583
+ 'wcf-custom-script' => array(
584
+ 'default' => '',
585
+ 'sanitize' => 'FILTER_DEFAULT',
586
+ ),
587
+ );
588
+ }
589
+
590
+ return apply_filters( 'cartflows_thankyou_meta_options', self::$thankyou_fields, $post_id );
591
+ }
592
+
593
+ /**
594
+ * Get Thank you section meta.
595
+ *
596
+ * @param int $post_id post id.
597
+ * @param string $key options key.
598
+ * @param mix $default options default value.
599
+ * @return string
600
+ */
601
+ public function get_thankyou_meta_value( $post_id, $key, $default = false ) {
602
+
603
+ $value = $this->get_save_meta( $post_id, $key );
604
+
605
+ if ( ! $value ) {
606
+ if ( $default ) {
607
+ $value = $default;
608
+ } else {
609
+ $fields = $this->get_thankyou_fields( $post_id );
610
+
611
+ if ( isset( $fields[ $key ]['default'] ) ) {
612
+ $value = $fields[ $key ]['default'];
613
+ }
614
+ }
615
+ }
616
+
617
+ return apply_filters( "cartflows_thankyou_meta_{$key}", $value );
618
+ }
619
+
620
+ /**
621
+ * Get Landing section meta.
622
+ *
623
+ * @param int $post_id post id.
624
+ * @param string $key options key.
625
+ * @param mix $default options default value.
626
+ * @return string
627
+ */
628
+ public function get_landing_meta_value( $post_id, $key, $default = false ) {
629
+
630
+ $value = $this->get_save_meta( $post_id, $key );
631
+ if ( ! $value ) {
632
+ if ( $default ) {
633
+ $value = $default;
634
+ } else {
635
+ $fields = $this->get_landing_fields( $post_id );
636
+
637
+ if ( isset( $fields[ $key ]['default'] ) ) {
638
+ $value = $fields[ $key ]['default'];
639
+ }
640
+ }
641
+ }
642
+
643
+ return $value;
644
+ }
645
+
646
+ /**
647
+ * Landing Default fields.
648
+ *
649
+ * @param int $post_id post id.
650
+ * @return array
651
+ */
652
+ public function get_landing_fields( $post_id ) {
653
+
654
+ if ( null === self::$landing_fields ) {
655
+ self::$landing_fields = array(
656
+ 'wcf-custom-script' => array(
657
+ 'default' => '',
658
+ 'sanitize' => 'FILTER_DEFAULT',
659
+ ),
660
+ );
661
+ }
662
+ return apply_filters( 'cartflows_landing_meta_options', self::$landing_fields, $post_id );
663
+ }
664
+
665
+ /**
666
+ * Optin Default fields.
667
+ *
668
+ * @param int $post_id post id.
669
+ * @return array
670
+ */
671
+ public function get_optin_fields( $post_id ) {
672
+
673
+ if ( null === self::$optin_fields ) {
674
+ self::$optin_fields = array(
675
+
676
+ 'wcf-optin-product' => array(
677
+ 'default' => array(),
678
+ 'sanitize' => 'FILTER_CARTFLOWS_ARRAY',
679
+ ),
680
+
681
+ /* Style */
682
+ 'wcf-field-google-font-url' => array(
683
+ 'default' => '',
684
+ 'sanitize' => 'FILTER_DEFAULT',
685
+ ),
686
+ 'wcf-primary-color' => array(
687
+ 'default' => '',
688
+ 'sanitize' => 'FILTER_DEFAULT',
689
+ ),
690
+ 'wcf-base-font-family' => array(
691
+ 'default' => '',
692
+ 'sanitize' => 'FILTER_DEFAULT',
693
+ ),
694
+ 'wcf-input-fields-skins' => array(
695
+ 'default' => '',
696
+ 'sanitize' => 'FILTER_DEFAULT',
697
+ ),
698
+ 'wcf-input-font-family' => array(
699
+ 'default' => '',
700
+ 'sanitize' => 'FILTER_DEFAULT',
701
+ ),
702
+ 'wcf-input-font-weight' => array(
703
+ 'default' => '',
704
+ 'sanitize' => 'FILTER_DEFAULT',
705
+ ),
706
+ 'wcf-input-field-size' => array(
707
+ 'default' => '33px',
708
+ 'sanitize' => 'FILTER_DEFAULT',
709
+ ),
710
+ 'wcf-field-tb-padding' => array(
711
+ 'default' => '',
712
+ 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
713
+ ),
714
+ 'wcf-field-lr-padding' => array(
715
+ 'default' => '',
716
+ 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
717
+ ),
718
+ 'wcf-field-color' => array(
719
+ 'default' => '',
720
+ 'sanitize' => 'FILTER_DEFAULT',
721
+ ),
722
+ 'wcf-field-bg-color' => array(
723
+ 'default' => '',
724
+ 'sanitize' => 'FILTER_DEFAULT',
725
+ ),
726
+ 'wcf-field-border-color' => array(
727
+ 'default' => '',
728
+ 'sanitize' => 'FILTER_DEFAULT',
729
+ ),
730
+ 'wcf-field-label-color' => array(
731
+ 'default' => '',
732
+ 'sanitize' => 'FILTER_DEFAULT',
733
+ ),
734
+ 'wcf-submit-button-text' => array(
735
+ 'default' => __( 'Submit', 'cartflows' ),
736
+ 'sanitize' => 'FILTER_DEFAULT',
737
+ ),
738
+ 'wcf-submit-font-size' => array(
739
+ 'default' => '',
740
+ 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
741
+ ),
742
+ 'wcf-button-font-family' => array(
743
+ 'default' => '',
744
+ 'sanitize' => 'FILTER_DEFAULT',
745
+ ),
746
+ 'wcf-button-font-weight' => array(
747
+ 'default' => '',
748
+ 'sanitize' => 'FILTER_DEFAULT',
749
+ ),
750
+ 'wcf-submit-button-size' => array(
751
+ 'default' => '33px',
752
+ 'sanitize' => 'FILTER_DEFAULT',
753
+ ),
754
+ 'wcf-submit-tb-padding' => array(
755
+ 'default' => '',
756
+ 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
757
+ ),
758
+ 'wcf-submit-lr-padding' => array(
759
+ 'default' => '',
760
+ 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT',
761
+ ),
762
+ 'wcf-submit-button-position' => array(
763
+ 'default' => 'center',
764
+ 'sanitize' => 'FILTER_DEFAULT',
765
+ ),
766
+ 'wcf-submit-color' => array(
767
+ 'default' => '',
768
+ 'sanitize' => 'FILTER_DEFAULT',
769
+ ),
770
+ 'wcf-submit-hover-color' => array(
771
+ 'default' => '',
772
+ 'sanitize' => 'FILTER_DEFAULT',
773
+ ),
774
+ 'wcf-submit-bg-color' => array(
775
+ 'default' => '',
776
+ 'sanitize' => 'FILTER_DEFAULT',
777
+ ),
778
+ 'wcf-submit-bg-hover-color' => array(
779
+ 'default' => '',
780
+ 'sanitize' => 'FILTER_DEFAULT',
781
+ ),
782
+ 'wcf-submit-border-color' => array(
783
+ 'default' => '',
784
+ 'sanitize' => 'FILTER_DEFAULT',
785
+ ),
786
+ 'wcf-submit-border-hover-color' => array(
787
+ 'default' => '',
788
+ 'sanitize' => 'FILTER_DEFAULT',
789
+ ),
790
+
791
+ /* Settings */
792
+ 'wcf-optin-pass-fields' => array(
793
+ 'default' => '',
794
+ 'sanitize' => 'FILTER_DEFAULT',
795
+ ),
796
+ 'wcf-optin-pass-specific-fields' => array(
797
+ 'default' => 'first_name',
798
+ 'sanitize' => 'FILTER_DEFAULT',
799
+ ),
800
+
801
+ /* Script */
802
+ 'wcf-custom-script' => array(
803
+ 'default' => '',
804
+ 'sanitize' => 'FILTER_DEFAULT',
805
+ ),
806
+ );
807
+ }
808
+ return apply_filters( 'cartflows_optin_meta_options', self::$optin_fields, $post_id );
809
+ }
810
+
811
+ /**
812
+ * Save Optin Meta fields.
813
+ *
814
+ * @param int $post_id post id.
815
+ * @return void
816
+ */
817
+ public function save_optin_fields( $post_id ) {
818
+
819
+ $post_meta = $this->get_optin_fields( $post_id );
820
+
821
+ $this->save_meta_fields( $post_id, $post_meta );
822
+ }
823
+
824
+ /**
825
+ * Get optin meta.
826
+ *
827
+ * @param int $post_id post id.
828
+ * @param string $key options key.
829
+ * @param mix $default options default value.
830
+ * @return string
831
+ */
832
+ public function get_optin_meta_value( $post_id = 0, $key = '', $default = false ) {
833
+
834
+ $value = $this->get_save_meta( $post_id, $key );
835
+
836
+ if ( ! $value ) {
837
+ if ( false !== $default ) {
838
+ $value = $default;
839
+ } else {
840
+ $fields = $this->get_optin_fields( $post_id );
841
+
842
+ if ( isset( $fields[ $key ]['default'] ) ) {
843
+ $value = $fields[ $key ]['default'];
844
+ }
845
+ }
846
+ }
847
+
848
+ return apply_filters( "cartflows_optin_meta_{$key}", $value );
849
+ }
850
+ }
851
+
852
+ /**
853
+ * Kicking this off by calling 'get_instance()' method
854
+ */
855
+ Cartflows_Default_Meta::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class-cartflows-functions.php CHANGED
@@ -1,555 +1,589 @@
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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Display design Metabox Notice.
543
+ *
544
+ * @return string
545
+ * @since x.x.x
546
+ */
547
+ function wcf_get_page_builder_notice() {
548
+
549
+ $notice = '';
550
+ $page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' );
551
+
552
+ $page_builder_data = array(
553
+ 'elementor' => array(
554
+ 'name' => 'Elementor',
555
+ 'doc' => 'https://cartflows.com/docs/elementor-widgets-of-cartflows/',
556
+ ),
557
+ );
558
+
559
+ if ( isset( $page_builder_data[ $page_builder ] ) ) {
560
+
561
+ $page_builder_name = $page_builder_data[ $page_builder ]['name'];
562
+ $doc_link = $page_builder_data[ $page_builder ]['doc'];
563
+
564
+ $notice = '<div class="wcf-metabox-notice-wrap"><p class="wcf-metabox-notice wcf-pb-modules-notice">';
565
+ $notice .= '<span class="dashicons dashicons-info"></span> ';
566
+ /* translators: %1$s page builder name "string" */
567
+ $notice .= sprintf( __( 'We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can add/change/update design settings directly from the page builder as well.', 'cartflows' ), $page_builder_name );
568
+ $notice .= ' <a href="' . $doc_link . '" target="_blank">' . __( 'Learn More »', 'cartflows' ) . '</span></a>';
569
+ $notice .= '</p></div>';
570
+ }
571
+
572
+ return $notice;
573
+ }
574
+
575
+ /**
576
+ * Get get step object.
577
+ *
578
+ * @param int $step_id current step ID.
579
+ * @since 1.5.9
580
+ */
581
+ function wcf_get_step( $step_id ) {
582
+
583
+ if ( ! isset( wcf()->wcf_step_objs[ $step_id ] ) ) {
584
+
585
+ wcf()->wcf_step_objs[ $step_id ] = new Cartflows_Step_Factory( $step_id );
586
+ }
587
+
588
+ return wcf()->wcf_step_objs[ $step_id ];
589
+ }
classes/class-cartflows-helper.php CHANGED
@@ -1,793 +1,813 @@
1
- <?php
2
- /**
3
- * CARTFLOWS Helper.
4
- *
5
- * @package CARTFLOWS
6
- */
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit; // Exit if accessed directly.
10
- }
11
-
12
- /**
13
- * Class Cartflows_Helper.
14
- */
15
- class Cartflows_Helper {
16
-
17
- /**
18
- * Common global data
19
- *
20
- * @var zapier
21
- */
22
- private static $common = null;
23
-
24
- /**
25
- * Common Debug data
26
- *
27
- * @var zapier
28
- */
29
- private static $debug_data = null;
30
-
31
-
32
- /**
33
- * Permalink settings
34
- *
35
- * @var permalink_setting
36
- */
37
- private static $permalink_setting = null;
38
-
39
- /**
40
- * Google Analytics Settings
41
- *
42
- * @var permalink_setting
43
- */
44
- private static $google_analytics_settings = null;
45
-
46
- /**
47
- * Installed Plugins
48
- *
49
- * @since 1.1.4
50
- *
51
- * @access private
52
- * @var array Installed plugins list.
53
- */
54
- private static $installed_plugins = null;
55
-
56
- /**
57
- * Checkout Fields
58
- *
59
- * @var checkout_fields
60
- */
61
- private static $checkout_fields = null;
62
-
63
- /**
64
- * Facebook pixel global data
65
- *
66
- * @var faceboook
67
- */
68
- private static $facebook = null;
69
-
70
-
71
- /**
72
- * Returns an option from the database for
73
- * the admin settings page.
74
- *
75
- * @param string $key The option key.
76
- * @param mixed $default Option default value if option is not available.
77
- * @param boolean $network_override Whether to allow the network admin setting to be overridden on subsites.
78
- * @return string Return the option value
79
- */
80
- public static function get_admin_settings_option( $key, $default = false, $network_override = false ) {
81
-
82
- // Get the site-wide option if we're in the network admin.
83
- if ( $network_override && is_multisite() ) {
84
- $value = get_site_option( $key, $default );
85
- } else {
86
- $value = get_option( $key, $default );
87
- }
88
-
89
- return $value;
90
- }
91
-
92
- /**
93
- * Updates an option from the admin settings page.
94
- *
95
- * @param string $key The option key.
96
- * @param mixed $value The value to update.
97
- * @param bool $network Whether to allow the network admin setting to be overridden on subsites.
98
- * @return mixed
99
- */
100
- public static function update_admin_settings_option( $key, $value, $network = false ) {
101
-
102
- // Update the site-wide option since we're in the network admin.
103
- if ( $network && is_multisite() ) {
104
- update_site_option( $key, $value );
105
- } else {
106
- update_option( $key, $value );
107
- }
108
-
109
- }
110
-
111
- /**
112
- * Get single setting
113
- *
114
- * @since 1.1.4
115
- *
116
- * @param string $key Option key.
117
- * @param string $default Option default value if not exist.
118
- * @return mixed
119
- */
120
- public static function get_common_setting( $key = '', $default = '' ) {
121
- $settings = self::get_common_settings();
122
-
123
- if ( $settings && array_key_exists( $key, $settings ) ) {
124
- return $settings[ $key ];
125
- }
126
-
127
- return $default;
128
- }
129
-
130
- /**
131
- * Get single debug options
132
- *
133
- * @since 1.1.4
134
- *
135
- * @param string $key Option key.
136
- * @param string $default Option default value if not exist.
137
- * @return mixed
138
- */
139
- public static function get_debug_setting( $key = '', $default = '' ) {
140
- $debug_data = self::get_debug_settings();
141
-
142
- if ( $debug_data && array_key_exists( $key, $debug_data ) ) {
143
- return $debug_data[ $key ];
144
- }
145
-
146
- return $default;
147
- }
148
-
149
- /**
150
- * Get required plugins for page builder
151
- *
152
- * @since 1.1.4
153
- *
154
- * @param string $page_builder_slug Page builder slug.
155
- * @param string $default Default page builder.
156
- * @return array selected page builder required plugins list.
157
- */
158
- public static function get_required_plugins_for_page_builder( $page_builder_slug = '', $default = 'elementor' ) {
159
- $plugins = self::get_plugins_groupby_page_builders();
160
-
161
- if ( array_key_exists( $page_builder_slug, $plugins ) ) {
162
- return $plugins[ $page_builder_slug ];
163
- }
164
-
165
- return $plugins[ $default ];
166
- }
167
-
168
- /**
169
- * Get Plugins list by page builder.
170
- *
171
- * @since 1.1.4
172
- *
173
- * @return array Required Plugins list.
174
- */
175
- public static function get_plugins_groupby_page_builders() {
176
-
177
- $divi_status = self::get_plugin_status( 'divi-builder/divi-builder.php' );
178
- $theme_status = 'not-installed';
179
- if ( $divi_status ) {
180
- if ( true === Cartflows_Compatibility::get_instance()->is_divi_theme_installed() ) {
181
- $theme_status = 'installed';
182
- if ( false === Cartflows_Compatibility::get_instance()->is_divi_enabled() ) {
183
- $theme_status = 'deactivate';
184
- $divi_status = 'activate';
185
- } else {
186
- $divi_status = '';
187
- }
188
- }
189
- }
190
-
191
- $plugins = array(
192
- 'elementor' => array(
193
- 'title' => 'Elementor',
194
- 'plugins' => array(
195
- array(
196
- 'slug' => 'elementor', // For download from wp.org.
197
- 'init' => 'elementor/elementor.php',
198
- 'status' => self::get_plugin_status( 'elementor/elementor.php' ),
199
- ),
200
- ),
201
- ),
202
- 'gutenberg' => array(
203
- 'title' => 'Ultimate Addons for Gutenberg',
204
- 'plugins' => array(
205
- array(
206
- 'slug' => 'ultimate-addons-for-gutenberg', // For download from wp.org.
207
- 'init' => 'ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php',
208
- 'status' => self::get_plugin_status( 'ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php' ),
209
- ),
210
- ),
211
- ),
212
- 'divi' => array(
213
- 'title' => 'Divi',
214
- 'theme-status' => $theme_status,
215
- 'plugin-status' => $divi_status,
216
- 'plugins' => array(
217
- array(
218
- 'slug' => 'divi-builder', // For download from wp.org.
219
- 'init' => 'divi-builder/divi-builder.php',
220
- 'status' => $divi_status,
221
- ),
222
- ),
223
- ),
224
- );
225
-
226
- $plugins['beaver-builder'] = array(
227
- 'title' => 'Beaver Builder',
228
- 'plugins' => array(),
229
- );
230
-
231
- // Check Pro Exist.
232
- if ( file_exists( WP_PLUGIN_DIR . '/bb-plugin/fl-builder.php' ) && ! is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) ) {
233
- $plugins['beaver-builder']['plugins'][] = array(
234
- 'slug' => 'bb-plugin',
235
- 'init' => 'bb-plugin/fl-builder.php',
236
- 'status' => self::get_plugin_status( 'bb-plugin/fl-builder.php' ),
237
- );
238
- } else {
239
- $plugins['beaver-builder']['plugins'][] = array(
240
- 'slug' => 'beaver-builder-lite-version', // For download from wp.org.
241
- 'init' => 'beaver-builder-lite-version/fl-builder.php',
242
- 'status' => self::get_plugin_status( 'beaver-builder-lite-version/fl-builder.php' ),
243
- );
244
- }
245
-
246
- if ( file_exists( WP_PLUGIN_DIR . '/bb-ultimate-addon/bb-ultimate-addon.php' ) && ! is_plugin_active( 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' ) ) {
247
- $plugins['beaver-builder']['plugins'][] = array(
248
- 'slug' => 'bb-ultimate-addon',
249
- 'init' => 'bb-ultimate-addon/bb-ultimate-addon.php',
250
- 'status' => self::get_plugin_status( 'bb-ultimate-addon/bb-ultimate-addon.php' ),
251
- );
252
- } else {
253
- $plugins['beaver-builder']['plugins'][] = array(
254
- 'slug' => 'ultimate-addons-for-beaver-builder-lite', // For download from wp.org.
255
- 'init' => 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php',
256
- 'status' => self::get_plugin_status( 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' ),
257
- );
258
- }
259
-
260
- return $plugins;
261
- }
262
-
263
- /**
264
- * Get plugin status
265
- *
266
- * @since 1.1.4
267
- *
268
- * @param string $plugin_init_file Plguin init file.
269
- * @return mixed
270
- */
271
- public static function get_plugin_status( $plugin_init_file ) {
272
-
273
- if ( null == self::$installed_plugins ) {
274
- self::$installed_plugins = get_plugins();
275
- }
276
-
277
- if ( ! isset( self::$installed_plugins[ $plugin_init_file ] ) ) {
278
- return 'install';
279
- } elseif ( ! is_plugin_active( $plugin_init_file ) ) {
280
- return 'activate';
281
- } else {
282
- return;
283
- }
284
- }
285
-
286
- /**
287
- * Get zapier settings.
288
- *
289
- * @return array.
290
- */
291
- public static function get_common_settings() {
292
-
293
- if ( null === self::$common ) {
294
-
295
- $common_default = apply_filters(
296
- 'cartflows_common_settings_default',
297
- array(
298
- 'disallow_indexing' => 'disable',
299
- 'global_checkout' => '',
300
- 'default_page_builder' => 'elementor',
301
- )
302
- );
303
-
304
- $common = self::get_admin_settings_option( '_cartflows_common', false, false );
305
-
306
- $common = wp_parse_args( $common, $common_default );
307
-
308
- if ( ! did_action( 'wp' ) ) {
309
- return $common;
310
- } else {
311
- self::$common = $common;
312
- }
313
- }
314
-
315
- return self::$common;
316
- }
317
-
318
- /**
319
- * Get debug settings data.
320
- *
321
- * @return array.
322
- */
323
- public static function get_debug_settings() {
324
-
325
- if ( null === self::$debug_data ) {
326
-
327
- $debug_data_default = apply_filters(
328
- 'cartflows_debug_settings_default',
329
- array(
330
- 'allow_minified_files' => 'disable',
331
- )
332
- );
333
-
334
- $debug_data = self::get_admin_settings_option( '_cartflows_debug_data', false, false );
335
-
336
- $debug_data = wp_parse_args( $debug_data, $debug_data_default );
337
-
338
- if ( ! did_action( 'wp' ) ) {
339
- return $debug_data;
340
- } else {
341
- self::$debug_data = $debug_data;
342
- }
343
- }
344
-
345
- return self::$debug_data;
346
- }
347
-
348
-
349
- /**
350
- * Get debug settings data.
351
- *
352
- * @return array.
353
- */
354
- public static function get_permalink_settings() {
355
-
356
- if ( null === self::$permalink_setting ) {
357
-
358
- $permalink_default = apply_filters(
359
- 'cartflows_permalink_settings_default',
360
- array(
361
- 'permalink' => CARTFLOWS_STEP_POST_TYPE,
362
- 'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
363
- 'permalink_structure' => '',
364
-
365
- )
366
- );
367
-
368
- $permalink_data = self::get_admin_settings_option( '_cartflows_permalink', false, false );
369
-
370
- $permalink_data = wp_parse_args( $permalink_data, $permalink_default );
371
-
372
- if ( ! did_action( 'wp' ) ) {
373
- return $permalink_data;
374
- } else {
375
- self::$permalink_setting = $permalink_data;
376
- }
377
- }
378
-
379
- return self::$permalink_setting;
380
- }
381
-
382
-
383
- /**
384
- * Get debug settings data.
385
- *
386
- * @return array.
387
- */
388
- public static function get_google_analytics_settings() {
389
-
390
- if ( null === self::$google_analytics_settings ) {
391
-
392
- $google_analytics_settings_default = apply_filters(
393
- 'cartflows_google_analytics_settings_default',
394
- array(
395
- 'enable_google_analytics' => 'disable',
396
- 'enable_google_analytics_for_site' => 'disable',
397
- 'google_analytics_id' => '',
398
- 'enable_begin_checkout' => 'disable',
399
- 'enable_add_to_cart' => 'disable',
400
- 'enable_add_payment_info' => 'disable',
401
- 'enable_purchase_event' => 'disable',
402
- )
403
- );
404
-
405
- $google_analytics_settings_data = self::get_admin_settings_option( '_cartflows_google_analytics', false, true );
406
-
407
- $google_analytics_settings_data = wp_parse_args( $google_analytics_settings_data, $google_analytics_settings_default );
408
-
409
- if ( ! did_action( 'wp' ) ) {
410
- return $google_analytics_settings_data;
411
- } else {
412
- self::$google_analytics_settings = $google_analytics_settings_data;
413
- }
414
- }
415
-
416
- return self::$google_analytics_settings = $google_analytics_settings_data; //phpcs:ignore
417
- }
418
-
419
- /**
420
- * Get Checkout field.
421
- *
422
- * @param string $key Field key.
423
- * @param int $post_id Post id.
424
- * @return array.
425
- */
426
- public static function get_checkout_fields( $key, $post_id ) {
427
-
428
- $saved_fields = get_post_meta( $post_id, 'wcf_fields_' . $key, true );
429
-
430
- if ( ! $saved_fields ) {
431
- $saved_fields = array();
432
- }
433
-
434
- $fields = array_filter( $saved_fields );
435
-
436
- if ( empty( $fields ) ) {
437
- if ( 'billing' === $key || 'shipping' === $key ) {
438
-
439
- $fields = WC()->countries->get_address_fields( WC()->countries->get_base_country(), $key . '_' );
440
-
441
- update_post_meta( $post_id, 'wcf_fields_' . $key, $fields );
442
- }
443
- }
444
-
445
- return $fields;
446
- }
447
-
448
- /**
449
- * Add Checkout field.
450
- *
451
- * @param string $type Field type.
452
- * @param string $field_key Field key.
453
- * @param array $field_data Field data.
454
- * @param int $post_id Post id.
455
- * @return boolean.
456
- */
457
- public static function add_checkout_field( $type, $field_key, $field_data = array(), $post_id ) {
458
-
459
- $fields = self::get_checkout_fields( $type, $post_id );
460
-
461
- $fields[ $field_key ] = $field_data;
462
-
463
- update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
464
-
465
- return true;
466
- }
467
-
468
- /**
469
- * Get checkout fields settings.
470
- *
471
- * @param string $type Field type.
472
- * @param string $field_key Field key.
473
- * @param int $post_id Post id.
474
- * @return array.
475
- */
476
- public static function delete_checkout_field( $type, $field_key, $post_id ) {
477
-
478
- $fields = self::get_checkout_fields( $type, $post_id );
479
-
480
- if ( isset( $fields[ $field_key ] ) ) {
481
- unset( $fields[ $field_key ] );
482
- }
483
-
484
- update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
485
-
486
- return true;
487
- }
488
-
489
- /**
490
- * Get checkout fields settings.
491
- *
492
- * @return array.
493
- */
494
- public static function get_checkout_fields_settings() {
495
-
496
- if ( null === self::$checkout_fields ) {
497
- $checkout_fields_default = array(
498
- 'enable_customization' => 'disable',
499
- 'enable_billing_fields' => 'disable',
500
- );
501
-
502
- $billing_fields = self::get_checkout_fields( 'billing' );
503
-
504
- if ( is_array( $billing_fields ) && ! empty( $billing_fields ) ) {
505
-
506
- foreach ( $billing_fields as $key => $value ) {
507
-
508
- $checkout_fields_default[ $key ] = 'enable';
509
- }
510
- }
511
-
512
- $checkout_fields = self::get_admin_settings_option( '_wcf_checkout_fields', false, false );
513
-
514
- self::$checkout_fields = wp_parse_args( $checkout_fields, $checkout_fields_default );
515
- }
516
-
517
- return self::$checkout_fields;
518
- }
519
-
520
- /**
521
- * Get meta options
522
- *
523
- * @since 1.0.0
524
- * @param int $post_id Product ID.
525
- * @param string $key Meta Key.
526
- * @param string $default Default value.
527
- * @return string Meta Value.
528
- */
529
- public static function get_meta_option( $post_id, $key, $default = '' ) {
530
-
531
- $value = get_post_meta( $post_id, $key, true );
532
-
533
- if ( ! $value ) {
534
- $value = $default;
535
- }
536
-
537
- return $value;
538
- }
539
-
540
- /**
541
- * Save meta option
542
- *
543
- * @since 1.0.0
544
- * @param int $post_id Product ID.
545
- * @param array $args Arguments array.
546
- */
547
- public static function save_meta_option( $post_id, $args = array() ) {
548
-
549
- if ( is_array( $args ) && ! empty( $args ) ) {
550
-
551
- foreach ( $args as $key => $value ) {
552
-
553
- update_post_meta( $post_id, $key, $value );
554
- }
555
- }
556
- }
557
-
558
- /**
559
- * Check if Elementor page builder is installed
560
- *
561
- * @since 1.0.0
562
- *
563
- * @access public
564
- */
565
- public static function is_elementor_installed() {
566
- $path = 'elementor/elementor.php';
567
- $plugins = get_plugins();
568
-
569
- return isset( $plugins[ $path ] );
570
- }
571
-
572
- /**
573
- * Check if Step has product assigned.
574
- *
575
- * @since 1.0.0
576
- * @param int $step_id step ID.
577
- *
578
- * @access public
579
- */
580
- public static function has_product_assigned( $step_id ) {
581
-
582
- $step_type = get_post_meta( $step_id, 'wcf-step-type', true );
583
-
584
- $has_product_assigned = false;
585
-
586
- if ( 'checkout' == $step_type ) {
587
- $product = get_post_meta( $step_id, 'wcf-checkout-products', true );
588
-
589
- if ( ! empty( $product ) && isset( $product[0]['product'] ) ) {
590
- $has_product_assigned = true;
591
- }
592
- } else {
593
- $product = get_post_meta( $step_id, 'wcf-offer-product', true );
594
- if ( ! empty( $product ) ) {
595
- $has_product_assigned = true;
596
- }
597
- }
598
-
599
- return $has_product_assigned;
600
-
601
- }
602
-
603
- /**
604
- * Get attributes for cartflows wrap.
605
- *
606
- * @since 1.1.4
607
- *
608
- * @access public
609
- */
610
- public static function get_cartflows_container_atts() {
611
-
612
- $attributes = apply_filters( 'cartflows_container_atts', array() );
613
- $atts_string = '';
614
-
615
- foreach ( $attributes as $key => $value ) {
616
-
617
- if ( ! $value ) {
618
- continue;
619
- }
620
-
621
- if ( true === $value ) {
622
- $atts_string .= esc_html( $key ) . ' ';
623
- } else {
624
- $atts_string .= sprintf( '%s="%s" ', esc_html( $key ), esc_attr( $value ) );
625
- }
626
- }
627
-
628
- return $atts_string;
629
- }
630
-
631
- /**
632
- * Get facebook pixel settings.
633
- *
634
- * @return facebook array.
635
- */
636
- public static function get_facebook_settings() {
637
-
638
- if ( null === self::$facebook ) {
639
-
640
- $facebook_default = array(
641
- 'facebook_pixel_id' => '',
642
- 'facebook_pixel_add_to_cart' => 'enable',
643
- 'facebook_pixel_initiate_checkout' => 'enable',
644
- 'facebook_pixel_add_payment_info' => 'enable',
645
- 'facebook_pixel_purchase_complete' => 'enable',
646
- 'facebook_pixel_tracking' => 'disable',
647
- 'facebook_pixel_tracking_for_site' => 'disable',
648
- );
649
-
650
- $facebook = self::get_admin_settings_option( '_cartflows_facebook', false, false );
651
-
652
- $facebook = wp_parse_args( $facebook, $facebook_default );
653
-
654
- self::$facebook = apply_filters( 'cartflows_facebook_settings_default', $facebook );
655
-
656
- }
657
-
658
- return self::$facebook;
659
- }
660
-
661
-
662
- /**
663
- * Prepare response data for facebook.
664
- *
665
- * @param int $order_id order_id.
666
- * @param array $offer_data offer data.
667
- */
668
- public static function send_fb_response_if_enabled( $order_id, $offer_data = array() ) {
669
-
670
- // Stop Execution if WooCommerce is not installed & don't set the cookie.
671
- if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
672
- return;
673
- }
674
-
675
- $fb_settings = self::get_facebook_settings();
676
- if ( 'enable' === $fb_settings['facebook_pixel_tracking'] ) {
677
- setcookie( 'wcf_order_details', wp_json_encode( self::prepare_purchase_data_fb_response( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
678
- }
679
-
680
- }
681
-
682
- /**
683
- * Prepare purchase response for facebook purcase event.
684
- *
685
- * @param integer $order_id order id.
686
- * @param array $offer_data offer data.
687
- * @return mixed
688
- */
689
- public static function prepare_purchase_data_fb_response( $order_id, $offer_data = array() ) {
690
-
691
- $thankyou = array();
692
-
693
- if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
694
- return $thankyou;
695
- }
696
-
697
- $thankyou['order_id'] = $order_id;
698
- $thankyou['content_type'] = 'product';
699
- $thankyou['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' );
700
- $thankyou['userAgent'] = wcf()->options->get_checkout_meta_value( $order_id, '_customer_user_agent' );
701
- $thankyou['plugin'] = 'CartFlows';
702
- $order = wc_get_order( $order_id );
703
- if ( empty( $offer_data ) ) {
704
- // Iterating through each WC_Order_Item_Product objects.
705
- foreach ( $order->get_items() as $item_key => $item ) {
706
- $product = $item->get_product(); // Get the WC_Product object.
707
- $thankyou['content_ids'][] = (string) $product->get_id();
708
- }
709
- $thankyou['value'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_total' );
710
- } else {
711
- $thankyou['content_ids'][] = (string) $offer_data['id'];
712
- $thankyou['value'] = $offer_data['total'];
713
- }
714
-
715
- return $thankyou;
716
- }
717
-
718
- /**
719
- * Prepare cart data for fb response.
720
- *
721
- * @return array
722
- */
723
- public static function prepare_cart_data_fb_response() {
724
-
725
- $params = array();
726
-
727
- if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
728
- return $params;
729
- }
730
-
731
- $cart_total = WC()->cart->get_cart_contents_total();
732
- $cart_items_count = WC()->cart->get_cart_contents_count();
733
- $items = WC()->cart->get_cart();
734
- $product_names = '';
735
- $category_names = '';
736
- $cart_contents = array();
737
- foreach ( $items as $item => $value ) {
738
-
739
- $_product = wc_get_product( $value['product_id'] );
740
- $params['content_ids'][] = (string) $_product->get_id();
741
- $product_names = $product_names . ', ' . $_product->get_title();
742
- $category_names = $category_names . ', ' . wp_strip_all_tags( wc_get_product_category_list( $_product->get_id() ) );
743
- array_push(
744
- $cart_contents,
745
- array(
746
- 'id' => $_product->get_id(),
747
- 'name' => $_product->get_title(),
748
- 'quantity' => $value['quantity'],
749
- 'item_price' => $_product->get_price(),
750
- )
751
- );
752
- }
753
-
754
- $user = wp_get_current_user();
755
- $roles = implode( ', ', $user->roles );
756
- $params['content_name'] = substr( $product_names, 2 );
757
- $params['categoey_name'] = substr( $category_names, 2 );
758
- $params['user_roles'] = $roles;
759
- $params['plugin'] = 'CartFlows';
760
- $params['contents'] = wp_json_encode( $cart_contents );
761
- $params['content_type'] = 'product';
762
- $params['value'] = $cart_total;
763
- $params['num_items'] = $cart_items_count;
764
- $params['currency'] = get_woocommerce_currency();
765
- $params['language'] = get_bloginfo( 'language' );
766
- $params['userAgent'] = wp_unslash( $_SERVER['HTTP_USER_AGENT'] ); //phpcs:ignore
767
- $params['product_catalog_id'] = '';
768
- $params['domain'] = get_site_url();
769
- return $params;
770
- }
771
-
772
- /**
773
- * Get the image url of size.
774
- *
775
- * @param int $post_id post id.
776
- * @param array $key key.
777
- * @param string $size image size.
778
- *
779
- * @return array
780
- */
781
- public static function get_image_url( $post_id, $key, $size = false ) {
782
-
783
- $url = get_post_meta( $post_id, $key, true );
784
- $img_obj = get_post_meta( $post_id, $key . '-obj', true );
785
- if ( is_array( $img_obj ) && ! empty( $img_obj ) && false !== $size ) {
786
-
787
- $url = ! empty( $img_obj['url'][ $size ] ) ? $img_obj['url'][ $size ] : $url;
788
- }
789
-
790
- return $url;
791
- }
792
-
793
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CARTFLOWS Helper.
4
+ *
5
+ * @package CARTFLOWS
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Class Cartflows_Helper.
14
+ */
15
+ class Cartflows_Helper {
16
+
17
+ /**
18
+ * Common global data
19
+ *
20
+ * @var zapier
21
+ */
22
+ private static $common = null;
23
+
24
+ /**
25
+ * Common Debug data
26
+ *
27
+ * @var zapier
28
+ */
29
+ private static $debug_data = null;
30
+
31
+
32
+ /**
33
+ * Permalink settings
34
+ *
35
+ * @var permalink_setting
36
+ */
37
+ private static $permalink_setting = null;
38
+
39
+ /**
40
+ * Google Analytics Settings
41
+ *
42
+ * @var permalink_setting
43
+ */
44
+ private static $google_analytics_settings = null;
45
+
46
+ /**
47
+ * Installed Plugins
48
+ *
49
+ * @since 1.1.4
50
+ *
51
+ * @access private
52
+ * @var array Installed plugins list.
53
+ */
54
+ private static $installed_plugins = null;
55
+
56
+ /**
57
+ * Checkout Fields
58
+ *
59
+ * @var checkout_fields
60
+ */
61
+ private static $checkout_fields = null;
62
+
63
+ /**
64
+ * Facebook pixel global data
65
+ *
66
+ * @var faceboook
67
+ */
68
+ private static $facebook = null;
69
+
70
+
71
+ /**
72
+ * Returns an option from the database for
73
+ * the admin settings page.
74
+ *
75
+ * @param string $key The option key.
76
+ * @param mixed $default Option default value if option is not available.
77
+ * @param boolean $network_override Whether to allow the network admin setting to be overridden on subsites.
78
+ * @return string Return the option value
79
+ */
80
+ public static function get_admin_settings_option( $key, $default = false, $network_override = false ) {
81
+
82
+ // Get the site-wide option if we're in the network admin.
83
+ if ( $network_override && is_multisite() ) {
84
+ $value = get_site_option( $key, $default );
85
+ } else {
86
+ $value = get_option( $key, $default );
87
+ }
88
+
89
+ return $value;
90
+ }
91
+
92
+ /**
93
+ * Updates an option from the admin settings page.
94
+ *
95
+ * @param string $key The option key.
96
+ * @param mixed $value The value to update.
97
+ * @param bool $network Whether to allow the network admin setting to be overridden on subsites.
98
+ * @return mixed
99
+ */
100
+ public static function update_admin_settings_option( $key, $value, $network = false ) {
101
+
102
+ // Update the site-wide option since we're in the network admin.
103
+ if ( $network && is_multisite() ) {
104
+ update_site_option( $key, $value );
105
+ } else {
106
+ update_option( $key, $value );
107
+ }
108
+
109
+ }
110
+
111
+ /**
112
+ * Get single setting
113
+ *
114
+ * @since 1.1.4
115
+ *
116
+ * @param string $key Option key.
117
+ * @param string $default Option default value if not exist.
118
+ * @return mixed
119
+ */
120
+ public static function get_common_setting( $key = '', $default = '' ) {
121
+ $settings = self::get_common_settings();
122
+
123
+ if ( $settings && array_key_exists( $key, $settings ) ) {
124
+ return $settings[ $key ];
125
+ }
126
+
127
+ return $default;
128
+ }
129
+
130
+ /**
131
+ * Get single debug options
132
+ *
133
+ * @since 1.1.4
134
+ *
135
+ * @param string $key Option key.
136
+ * @param string $default Option default value if not exist.
137
+ * @return mixed
138
+ */
139
+ public static function get_debug_setting( $key = '', $default = '' ) {
140
+ $debug_data = self::get_debug_settings();
141
+
142
+ if ( $debug_data && array_key_exists( $key, $debug_data ) ) {
143
+ return $debug_data[ $key ];
144
+ }
145
+
146
+ return $default;
147
+ }
148
+
149
+ /**
150
+ * Get required plugins for page builder
151
+ *
152
+ * @since 1.1.4
153
+ *
154
+ * @param string $page_builder_slug Page builder slug.
155
+ * @param string $default Default page builder.
156
+ * @return array selected page builder required plugins list.
157
+ */
158
+ public static function get_required_plugins_for_page_builder( $page_builder_slug = '', $default = 'elementor' ) {
159
+ $plugins = self::get_plugins_groupby_page_builders();
160
+
161
+ if ( array_key_exists( $page_builder_slug, $plugins ) ) {
162
+ return $plugins[ $page_builder_slug ];
163
+ }
164
+
165
+ return $plugins[ $default ];
166
+ }
167
+
168
+ /**
169
+ * Get Plugins list by page builder.
170
+ *
171
+ * @since 1.1.4
172
+ *
173
+ * @return array Required Plugins list.
174
+ */
175
+ public static function get_plugins_groupby_page_builders() {
176
+
177
+ $divi_status = self::get_plugin_status( 'divi-builder/divi-builder.php' );
178
+ $theme_status = 'not-installed';
179
+ if ( $divi_status ) {
180
+ if ( true === Cartflows_Compatibility::get_instance()->is_divi_theme_installed() ) {
181
+ $theme_status = 'installed';
182
+ if ( false === Cartflows_Compatibility::get_instance()->is_divi_enabled() ) {
183
+ $theme_status = 'deactivate';
184
+ $divi_status = 'activate';
185
+ } else {
186
+ $divi_status = '';
187
+ }
188
+ }
189
+ }
190
+
191
+ $plugins = array(
192
+ 'elementor' => array(
193
+ 'title' => 'Elementor',
194
+ 'plugins' => array(
195
+ array(
196
+ 'slug' => 'elementor', // For download from wp.org.
197
+ 'init' => 'elementor/elementor.php',
198
+ 'status' => self::get_plugin_status( 'elementor/elementor.php' ),
199
+ ),
200
+ ),
201
+ ),
202
+ 'gutenberg' => array(
203
+ 'title' => 'Ultimate Addons for Gutenberg',
204
+ 'plugins' => array(
205
+ array(
206
+ 'slug' => 'ultimate-addons-for-gutenberg', // For download from wp.org.
207
+ 'init' => 'ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php',
208
+ 'status' => self::get_plugin_status( 'ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php' ),
209
+ ),
210
+ ),
211
+ ),
212
+ 'divi' => array(
213
+ 'title' => 'Divi',
214
+ 'theme-status' => $theme_status,
215
+ 'plugin-status' => $divi_status,
216
+ 'plugins' => array(
217
+ array(
218
+ 'slug' => 'divi-builder', // For download from wp.org.
219
+ 'init' => 'divi-builder/divi-builder.php',
220
+ 'status' => $divi_status,
221
+ ),
222
+ ),
223
+ ),
224
+ );
225
+
226
+ $plugins['beaver-builder'] = array(
227
+ 'title' => 'Beaver Builder',
228
+ 'plugins' => array(),
229
+ );
230
+
231
+ // Check Pro Exist.
232
+ if ( file_exists( WP_PLUGIN_DIR . '/bb-plugin/fl-builder.php' ) && ! is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) ) {
233
+ $plugins['beaver-builder']['plugins'][] = array(
234
+ 'slug' => 'bb-plugin',
235
+ 'init' => 'bb-plugin/fl-builder.php',
236
+ 'status' => self::get_plugin_status( 'bb-plugin/fl-builder.php' ),
237
+ );
238
+ } else {
239
+ $plugins['beaver-builder']['plugins'][] = array(
240
+ 'slug' => 'beaver-builder-lite-version', // For download from wp.org.
241
+ 'init' => 'beaver-builder-lite-version/fl-builder.php',
242
+ 'status' => self::get_plugin_status( 'beaver-builder-lite-version/fl-builder.php' ),
243
+ );
244
+ }
245
+
246
+ if ( file_exists( WP_PLUGIN_DIR . '/bb-ultimate-addon/bb-ultimate-addon.php' ) && ! is_plugin_active( 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' ) ) {
247
+ $plugins['beaver-builder']['plugins'][] = array(
248
+ 'slug' => 'bb-ultimate-addon',
249
+ 'init' => 'bb-ultimate-addon/bb-ultimate-addon.php',
250
+ 'status' => self::get_plugin_status( 'bb-ultimate-addon/bb-ultimate-addon.php' ),
251
+ );
252
+ } else {
253
+ $plugins['beaver-builder']['plugins'][] = array(
254
+ 'slug' => 'ultimate-addons-for-beaver-builder-lite', // For download from wp.org.
255
+ 'init' => 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php',
256
+ 'status' => self::get_plugin_status( 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' ),
257
+ );
258
+ }
259
+
260
+ return $plugins;
261
+ }
262
+
263
+ /**
264
+ * Get plugin status
265
+ *
266
+ * @since 1.1.4
267
+ *
268
+ * @param string $plugin_init_file Plguin init file.
269
+ * @return mixed
270
+ */
271
+ public static function get_plugin_status( $plugin_init_file ) {
272
+
273
+ if ( null == self::$installed_plugins ) {
274
+ self::$installed_plugins = get_plugins();
275
+ }
276
+
277
+ if ( ! isset( self::$installed_plugins[ $plugin_init_file ] ) ) {
278
+ return 'install';
279
+ } elseif ( ! is_plugin_active( $plugin_init_file ) ) {
280
+ return 'activate';
281
+ } else {
282
+ return;
283
+ }
284
+ }
285
+
286
+ /**
287
+ * Get zapier settings.
288
+ *
289
+ * @return array.
290
+ */
291
+ public static function get_common_settings() {
292
+
293
+ if ( null === self::$common ) {
294
+
295
+ $common_default = apply_filters(
296
+ 'cartflows_common_settings_default',
297
+ array(
298
+ 'disallow_indexing' => 'disable',
299
+ 'global_checkout' => '',
300
+ 'default_page_builder' => 'elementor',
301
+ )
302
+ );
303
+
304
+ $common = self::get_admin_settings_option( '_cartflows_common', false, false );
305
+
306
+ $common = wp_parse_args( $common, $common_default );
307
+
308
+ if ( ! did_action( 'wp' ) ) {
309
+ return $common;
310
+ } else {
311
+ self::$common = $common;
312
+ }
313
+ }
314
+
315
+ return self::$common;
316
+ }
317
+
318
+ /**
319
+ * Get debug settings data.
320
+ *
321
+ * @return array.
322
+ */
323
+ public static function get_debug_settings() {
324
+
325
+ if ( null === self::$debug_data ) {
326
+
327
+ $debug_data_default = apply_filters(
328
+ 'cartflows_debug_settings_default',
329
+ array(
330
+ 'allow_minified_files' => 'disable',
331
+ )
332
+ );
333
+
334
+ $debug_data = self::get_admin_settings_option( '_cartflows_debug_data', false, false );
335
+
336
+ $debug_data = wp_parse_args( $debug_data, $debug_data_default );
337
+
338
+ if ( ! did_action( 'wp' ) ) {
339
+ return $debug_data;
340
+ } else {
341
+ self::$debug_data = $debug_data;
342
+ }
343
+ }
344
+
345
+ return self::$debug_data;
346
+ }
347
+
348
+
349
+ /**
350
+ * Get debug settings data.
351
+ *
352
+ * @return array.
353
+ */
354
+ public static function get_permalink_settings() {
355
+
356
+ if ( null === self::$permalink_setting ) {
357
+
358
+ $permalink_default = apply_filters(
359
+ 'cartflows_permalink_settings_default',
360
+ array(
361
+ 'permalink' => CARTFLOWS_STEP_POST_TYPE,
362
+ 'permalink_flow_base' => CARTFLOWS_FLOW_POST_TYPE,
363
+ 'permalink_structure' => '',
364
+
365
+ )
366
+ );
367
+
368
+ $permalink_data = self::get_admin_settings_option( '_cartflows_permalink', false, false );
369
+
370
+ $permalink_data = wp_parse_args( $permalink_data, $permalink_default );
371
+
372
+ if ( ! did_action( 'wp' ) ) {
373
+ return $permalink_data;
374
+ } else {
375
+ self::$permalink_setting = $permalink_data;
376
+ }
377
+ }
378
+
379
+ return self::$permalink_setting;
380
+ }
381
+
382
+
383
+ /**
384
+ * Get debug settings data.
385
+ *
386
+ * @return array.
387
+ */
388
+ public static function get_google_analytics_settings() {
389
+
390
+ if ( null === self::$google_analytics_settings ) {
391
+
392
+ $google_analytics_settings_default = apply_filters(
393
+ 'cartflows_google_analytics_settings_default',
394
+ array(
395
+ 'enable_google_analytics' => 'disable',
396
+ 'enable_google_analytics_for_site' => 'disable',
397
+ 'google_analytics_id' => '',
398
+ 'enable_begin_checkout' => 'disable',
399
+ 'enable_add_to_cart' => 'disable',
400
+ 'enable_add_payment_info' => 'disable',
401
+ 'enable_purchase_event' => 'disable',
402
+ )
403
+ );
404
+
405
+ $google_analytics_settings_data = self::get_admin_settings_option( '_cartflows_google_analytics', false, true );
406
+
407
+ $google_analytics_settings_data = wp_parse_args( $google_analytics_settings_data, $google_analytics_settings_default );
408
+
409
+ if ( ! did_action( 'wp' ) ) {
410
+ return $google_analytics_settings_data;
411
+ } else {
412
+ self::$google_analytics_settings = $google_analytics_settings_data;
413
+ }
414
+ }
415
+
416
+ return self::$google_analytics_settings = $google_analytics_settings_data; //phpcs:ignore
417
+ }
418
+
419
+ /**
420
+ * Get Checkout field.
421
+ *
422
+ * @param string $key Field key.
423
+ * @param int $post_id Post id.
424
+ * @return array.
425
+ */
426
+ public static function get_checkout_fields( $key, $post_id ) {
427
+
428
+ $saved_fields = get_post_meta( $post_id, 'wcf_fields_' . $key, true );
429
+
430
+ if ( ! $saved_fields ) {
431
+ $saved_fields = array();
432
+ }
433
+
434
+ $fields = array_filter( $saved_fields );
435
+
436
+ if ( empty( $fields ) ) {
437
+ if ( 'billing' === $key || 'shipping' === $key ) {
438
+
439
+ $fields = WC()->countries->get_address_fields( WC()->countries->get_base_country(), $key . '_' );
440
+
441
+ update_post_meta( $post_id, 'wcf_fields_' . $key, $fields );
442
+ }
443
+ }
444
+
445
+ return $fields;
446
+ }
447
+
448
+ /**
449
+ * Add Checkout field.
450
+ *
451
+ * @param string $type Field type.
452
+ * @param string $field_key Field key.
453
+ * @param array $field_data Field data.
454
+ * @param int $post_id Post id.
455
+ * @return boolean.
456
+ */
457
+ public static function add_checkout_field( $type, $field_key, $field_data = array(), $post_id ) {
458
+
459
+ $fields = self::get_checkout_fields( $type, $post_id );
460
+
461
+ $fields[ $field_key ] = $field_data;
462
+
463
+ update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
464
+
465
+ return true;
466
+ }
467
+
468
+ /**
469
+ * Get checkout fields settings.
470
+ *
471
+ * @param string $type Field type.
472
+ * @param string $field_key Field key.
473
+ * @param int $post_id Post id.
474
+ * @return array.
475
+ */
476
+ public static function delete_checkout_field( $type, $field_key, $post_id ) {
477
+
478
+ $fields = self::get_checkout_fields( $type, $post_id );
479
+
480
+ if ( isset( $fields[ $field_key ] ) ) {
481
+ unset( $fields[ $field_key ] );
482
+ }
483
+
484
+ update_post_meta( $post_id, 'wcf_fields_' . $type, $fields );
485
+
486
+ return true;
487
+ }
488
+
489
+ /**
490
+ * Get checkout fields settings.
491
+ *
492
+ * @return array.
493
+ */
494
+ public static function get_checkout_fields_settings() {
495
+
496
+ if ( null === self::$checkout_fields ) {
497
+ $checkout_fields_default = array(
498
+ 'enable_customization' => 'disable',
499
+ 'enable_billing_fields' => 'disable',
500
+ );
501
+
502
+ $billing_fields = self::get_checkout_fields( 'billing' );
503
+
504
+ if ( is_array( $billing_fields ) && ! empty( $billing_fields ) ) {
505
+
506
+ foreach ( $billing_fields as $key => $value ) {
507
+
508
+ $checkout_fields_default[ $key ] = 'enable';
509
+ }
510
+ }
511
+
512
+ $checkout_fields = self::get_admin_settings_option( '_wcf_checkout_fields', false, false );
513
+
514
+ self::$checkout_fields = wp_parse_args( $checkout_fields, $checkout_fields_default );
515
+ }
516
+
517
+ return self::$checkout_fields;
518
+ }
519
+
520
+ /**
521
+ * Get meta options
522
+ *
523
+ * @since 1.0.0
524
+ * @param int $post_id Product ID.
525
+ * @param string $key Meta Key.
526
+ * @param string $default Default value.
527
+ * @return string Meta Value.
528
+ */
529
+ public static function get_meta_option( $post_id, $key, $default = '' ) {
530
+
531
+ $value = get_post_meta( $post_id, $key, true );
532
+
533
+ if ( ! $value ) {
534
+ $value = $default;
535
+ }
536
+
537
+ return $value;
538
+ }
539
+
540
+ /**
541
+ * Save meta option
542
+ *
543
+ * @since 1.0.0
544
+ * @param int $post_id Product ID.
545
+ * @param array $args Arguments array.
546
+ */
547
+ public static function save_meta_option( $post_id, $args = array() ) {
548
+
549
+ if ( is_array( $args ) && ! empty( $args ) ) {
550
+
551
+ foreach ( $args as $key => $value ) {
552
+
553
+ update_post_meta( $post_id, $key, $value );
554
+ }
555
+ }
556
+ }
557
+
558
+ /**
559
+ * Check if Elementor page builder is installed
560
+ *
561
+ * @since 1.0.0
562
+ *
563
+ * @access public
564
+ */
565
+ public static function is_elementor_installed() {
566
+ $path = 'elementor/elementor.php';
567
+ $plugins = get_plugins();
568
+
569
+ return isset( $plugins[ $path ] );
570
+ }
571
+
572
+ /**
573
+ * Check if Step has product assigned.
574
+ *
575
+ * @since 1.0.0
576
+ * @param int $step_id step ID.
577
+ *
578
+ * @access public
579
+ */
580
+ public static function has_product_assigned( $step_id ) {
581
+
582
+ $step_type = get_post_meta( $step_id, 'wcf-step-type', true );
583
+
584
+ $has_product_assigned = false;
585
+
586
+ if ( 'checkout' == $step_type ) {
587
+ $product = get_post_meta( $step_id, 'wcf-checkout-products', true );
588
+
589
+ if ( ! empty( $product ) && isset( $product[0]['product'] ) ) {
590
+ $has_product_assigned = true;
591
+ }
592
+ } else {
593
+ $product = get_post_meta( $step_id, 'wcf-offer-product', true );
594
+ if ( ! empty( $product ) ) {
595
+ $has_product_assigned = true;
596
+ }
597
+ }
598
+
599
+ return $has_product_assigned;
600
+
601
+ }
602
+
603
+ /**
604
+ * Get attributes for cartflows wrap.
605
+ *
606
+ * @since 1.1.4
607
+ *
608
+ * @access public
609
+ */
610
+ public static function get_cartflows_container_atts() {
611
+
612
+ $attributes = apply_filters( 'cartflows_container_atts', array() );
613
+ $atts_string = '';
614
+
615
+ foreach ( $attributes as $key => $value ) {
616
+
617
+ if ( ! $value ) {
618
+ continue;
619
+ }
620
+
621
+ if ( true === $value ) {
622
+ $atts_string .= esc_html( $key ) . ' ';
623
+ } else {
624
+ $atts_string .= sprintf( '%s="%s" ', esc_html( $key ), esc_attr( $value ) );
625
+ }
626
+ }
627
+
628
+ return $atts_string;
629
+ }
630
+
631
+ /**
632
+ * Get facebook pixel settings.
633
+ *
634
+ * @return facebook array.
635
+ */
636
+ public static function get_facebook_settings() {
637
+
638
+ if ( null === self::$facebook ) {
639
+
640
+ $facebook_default = array(
641
+ 'facebook_pixel_id' => '',
642
+ 'facebook_pixel_add_to_cart' => 'enable',
643
+ 'facebook_pixel_initiate_checkout' => 'enable',
644
+ 'facebook_pixel_add_payment_info' => 'enable',
645
+ 'facebook_pixel_purchase_complete' => 'enable',
646
+ 'facebook_pixel_tracking' => 'disable',
647
+ 'facebook_pixel_tracking_for_site' => 'disable',
648
+ );
649
+
650
+ $facebook = self::get_admin_settings_option( '_cartflows_facebook', false, false );
651
+
652
+ $facebook = wp_parse_args( $facebook, $facebook_default );
653
+
654
+ self::$facebook = apply_filters( 'cartflows_facebook_settings_default', $facebook );
655
+
656
+ }
657
+
658
+ return self::$facebook;
659
+ }
660
+
661
+
662
+ /**
663
+ * Prepare response data for facebook.
664
+ *
665
+ * @param int $order_id order_id.
666
+ * @param array $offer_data offer data.
667
+ */
668
+ public static function send_fb_response_if_enabled( $order_id, $offer_data = array() ) {
669
+
670
+ // Stop Execution if WooCommerce is not installed & don't set the cookie.
671
+ if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
672
+ return;
673
+ }
674
+
675
+ $fb_settings = self::get_facebook_settings();
676
+ if ( 'enable' === $fb_settings['facebook_pixel_tracking'] ) {
677
+ setcookie( 'wcf_order_details', wp_json_encode( self::prepare_purchase_data_fb_response( $order_id, $offer_data ) ), strtotime( '+1 year' ), '/' );
678
+ }
679
+
680
+ }
681
+
682
+ /**
683
+ * Prepare purchase response for facebook purcase event.
684
+ *
685
+ * @param integer $order_id order id.
686
+ * @param array $offer_data offer data.
687
+ * @return mixed
688
+ */
689
+ public static function prepare_purchase_data_fb_response( $order_id, $offer_data = array() ) {
690
+
691
+ $thankyou = array();
692
+
693
+ if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
694
+ return $thankyou;
695
+ }
696
+
697
+ $thankyou['order_id'] = $order_id;
698
+ $thankyou['content_type'] = 'product';
699
+ $thankyou['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' );
700
+ $thankyou['userAgent'] = wcf()->options->get_checkout_meta_value( $order_id, '_customer_user_agent' );
701
+ $thankyou['plugin'] = 'CartFlows';
702
+ $order = wc_get_order( $order_id );
703
+ if ( empty( $offer_data ) ) {
704
+ // Iterating through each WC_Order_Item_Product objects.
705
+ foreach ( $order->get_items() as $item_key => $item ) {
706
+ $product = $item->get_product(); // Get the WC_Product object.
707
+ $thankyou['content_ids'][] = (string) $product->get_id();
708
+ }
709
+ $thankyou['value'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_total' );
710
+ } else {
711
+ $thankyou['content_ids'][] = (string) $offer_data['id'];
712
+ $thankyou['value'] = $offer_data['total'];
713
+ }
714
+
715
+ return $thankyou;
716
+ }
717
+
718
+ /**
719
+ * Prepare cart data for fb response.
720
+ *
721
+ * @return array
722
+ */
723
+ public static function prepare_cart_data_fb_response() {
724
+
725
+ $params = array();
726
+
727
+ if ( ! Cartflows_Loader::get_instance()->is_woo_active ) {
728
+ return $params;
729
+ }
730
+
731
+ $cart_total = WC()->cart->get_cart_contents_total();
732
+ $cart_items_count = WC()->cart->get_cart_contents_count();
733
+ $items = WC()->cart->get_cart();
734
+ $product_names = '';
735
+ $category_names = '';
736
+ $cart_contents = array();
737
+ foreach ( $items as $item => $value ) {
738
+
739
+ $_product = wc_get_product( $value['product_id'] );
740
+ $params['content_ids'][] = (string) $_product->get_id();
741
+ $product_names = $product_names . ', ' . $_product->get_title();
742
+ $category_names = $category_names . ', ' . wp_strip_all_tags( wc_get_product_category_list( $_product->get_id() ) );
743
+ array_push(
744
+ $cart_contents,
745
+ array(
746
+ 'id' => $_product->get_id(),
747
+ 'name' => $_product->get_title(),
748
+ 'quantity' => $value['quantity'],
749
+ 'item_price' => $_product->get_price(),
750
+ )
751
+ );
752
+ }
753
+
754
+ $user = wp_get_current_user();
755
+ $roles = implode( ', ', $user->roles );
756
+ $params['content_name'] = substr( $product_names, 2 );
757
+ $params['categoey_name'] = substr( $category_names, 2 );
758
+ $params['user_roles'] = $roles;
759
+ $params['plugin'] = 'CartFlows';
760
+ $params['contents'] = wp_json_encode( $cart_contents );
761
+ $params['content_type'] = 'product';
762
+ $params['value'] = $cart_total;
763
+ $params['num_items'] = $cart_items_count;
764
+ $params['currency'] = get_woocommerce_currency();
765
+ $params['language'] = get_bloginfo( 'language' );
766
+ $params['userAgent'] = wp_unslash( $_SERVER['HTTP_USER_AGENT'] ); //phpcs:ignore
767
+ $params['product_catalog_id'] = '';
768
+ $params['domain'] = get_site_url();
769
+ return $params;
770
+ }
771
+
772
+ /**
773
+ * Get the image url of size.
774
+ *
775
+ * @param int $post_id post id.
776
+ * @param array $key key.
777
+ * @param string $size image size.
778
+ *
779
+ * @return array
780
+ */
781
+ public static function get_image_url( $post_id, $key, $size = false ) {
782
+
783
+ $url = get_post_meta( $post_id, $key, true );
784
+ $img_obj = get_post_meta( $post_id, $key . '-obj', true );
785
+ if ( is_array( $img_obj ) && ! empty( $img_obj ) && false !== $size ) {
786
+
787
+ $url = ! empty( $img_obj['url'][ $size ] ) ? $img_obj['url'][ $size ] : $url;
788
+ }
789
+
790
+ return $url;
791
+ }
792
+
793
+ /**
794
+ * Create Edit page link for the widgets.
795
+ *
796
+ * @since x.x.x
797
+ * @param string $tab The Tab which has to display.
798
+ * @access public
799
+ */
800
+ public static function get_current_page_edit_url( $tab ) {
801
+
802
+ $url = add_query_arg(
803
+ array(
804
+ 'wcf-tab' => $tab,
805
+ ),
806
+ get_edit_post_link()
807
+ );
808
+
809
+ return $url;
810
+ }
811
+
812
+
813
+ }
classes/class-cartflows-loader.php CHANGED
@@ -133,7 +133,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
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.17' );
137
  define( 'CARTFLOWS_SLUG', 'cartflows' );
138
  define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
139
 
@@ -317,6 +317,9 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
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*/
@@ -358,6 +361,11 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
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
 
@@ -369,7 +377,6 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
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
  /**
@@ -417,6 +424,7 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
417
  }
418
  }
419
  }
 
420
  /**
421
  * Load CartFlows Pro Text Domain.
422
  * This will load the translation textdomain depending on the file priorities.
@@ -559,8 +567,6 @@ if ( ! class_exists( 'Cartflows_Loader' ) ) {
559
  public function logger() {
560
  return Cartflows_Logger::get_instance();
561
  }
562
-
563
-
564
  }
565
 
566
  /**
@@ -579,7 +585,6 @@ function wcf() {
579
  return Cartflows_Loader::get_instance();
580
  }
581
 
582
-
583
  if ( ! function_exists( '_is_woo_installed' ) ) {
584
 
585
  /**
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.18' );
137
  define( 'CARTFLOWS_SLUG', 'cartflows' );
138
  define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
139
 
317
  /* Theme support */
318
  if ( $this->is_woo_active ) {
319
  include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
320
+
321
+ /* Woo hooks */
322
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-woo-hooks.php';
323
  }
324
 
325
  /* Admin Meta Fields*/
361
  include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
362
  }
363
 
364
+ if ( class_exists( '\Elementor\Plugin' ) ) {
365
+ // Load the widgets.
366
+ include_once CARTFLOWS_DIR . 'modules/elementor/class-cartflows-el-widgets-loader.php';
367
+ }
368
+
369
  include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
370
  include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
371
 
377
  include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
378
 
379
  include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
 
380
  }
381
 
382
  /**
424
  }
425
  }
426
  }
427
+
428
  /**
429
  * Load CartFlows Pro Text Domain.
430
  * This will load the translation textdomain depending on the file priorities.
567
  public function logger() {
568
  return Cartflows_Logger::get_instance();
569
  }
 
 
570
  }
571
 
572
  /**
585
  return Cartflows_Loader::get_instance();
586
  }
587
 
 
588
  if ( ! function_exists( '_is_woo_installed' ) ) {
589
 
590
  /**
classes/class-cartflows-woo-hooks.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Woo hooks for compatibility. Data processed for performance.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Class for elementor page builder compatibility
10
+ */
11
+ class Cartflows_Woo_Hooks {
12
+
13
+ /**
14
+ * Member Variable
15
+ *
16
+ * @var instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Member Variable
22
+ *
23
+ * @var instance
24
+ */
25
+ public static $ajax_data = array();
26
+
27
+ /**
28
+ * Initiator
29
+ */
30
+ public static function get_instance() {
31
+ if ( ! isset( self::$instance ) ) {
32
+ self::$instance = new self();
33
+ }
34
+ return self::$instance;
35
+ }
36
+
37
+ /**
38
+ * Constructor
39
+ */
40
+ public function __construct() {
41
+
42
+ add_action( 'init', array( $this, 'register_wc_hooks' ), 999 );
43
+ }
44
+
45
+ /**
46
+ * Rgister wc hookes for elementor preview mode
47
+ */
48
+ public function register_wc_hooks() {
49
+
50
+ if ( isset( $_GET['wc-ajax'] ) && 'update_order_review' === $_GET['wc-ajax'] ) { //phpcs:ignore
51
+ $post_data = array();
52
+
53
+ $post_raw_data = isset( $_POST['post_data'] ) ? sanitize_text_field( wp_unslash( $_POST['post_data'] ) ) : ''; //phpcs:ignore
54
+
55
+ parse_str( $post_raw_data, $post_data );
56
+
57
+ self::$ajax_data = $post_data;
58
+
59
+ do_action( 'cartflows_woo_checkout_update_order_review_init', self::$ajax_data );
60
+
61
+ /* Woocommerce update order action */
62
+ add_action( 'woocommerce_checkout_update_order_review', array( $this, 'update_order_review_hook' ) );
63
+ }
64
+
65
+ }
66
+
67
+ /**
68
+ * Update order review hook
69
+ *
70
+ * @param string $post_raw_data post data.
71
+ */
72
+ public function update_order_review_hook( $post_raw_data ) {
73
+
74
+ do_action( 'cartflows_woo_checkout_update_order_review', self::$ajax_data );
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Kicking this off by calling 'get_instance()' method
80
+ */
81
+ Cartflows_Woo_Hooks::get_instance();
includes/meta-fields/generate-product-repeater.php CHANGED
@@ -1,99 +1,99 @@
1
- <?php
2
- /**
3
- * Generate product repeater.
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- $hide_advance = 'wcf-hide-advance';
9
-
10
- if ( empty( $selected_data ) ) {
11
-
12
- $selected_data = array(
13
- 'quantity' => 1,
14
- 'discount_type' => '',
15
- 'discount_value' => '',
16
- 'unique_id' => '',
17
- );
18
- }
19
-
20
- ?>
21
-
22
- <div class="wcf-repeatable-row" data-key="<?php echo $id; ?>">
23
- <div class="wcf_display_advance_fields wcf-repeater-fields-head-wrap">
24
- <div class="wcf-repeatable-row-standard-fields">
25
- <div class="wcf-checkout-products-dashicon dashicons dashicons-menu"></div>
26
-
27
- <!-- Product Name -->
28
- <div class="wcf-repeatable-fields wcf-sel-product">
29
- <span class="wcf-repeatable-row-setting-field">
30
- <select name="wcf-checkout-products[<?php echo $id; ?>][product]" class="wcf-product-search" data-allow_clear="allow_clear" data-include_product_types= "braintree-subscription, braintree-variable-subscription" data-excluded_product_types = "grouped" data-placeholder="<?php echo __( 'Search for a product&hellip;', 'cartflows' ); ?>" data-action="wcf_json_search_products_and_variations"><?php echo $options; ?></select>
31
- </span>
32
-
33
- <span class="wcf-repeatable-row-actions">
34
- <a class="wcf-remove-row wcf-repeatable-remove button" data-type="product">
35
- <span class="dashicons dashicons-trash"></span>
36
- <span class="wcf-repeatable-remove-button"><?php echo __( 'Remove', 'cartflows' ); ?></span>
37
- </a>
38
- </span>
39
- </div>
40
-
41
- <div class="wcf_toggle_advance_fields"><i class="dashicons dashicons-arrow-down"></i></div>
42
- </div>
43
- </div>
44
-
45
- <div class="wcf-repeatable-row-advance-fields <?php echo $hide_advance; ?>">
46
-
47
- <!-- Qty field. -->
48
- <div class="wcf-repeatable-row-qty-field wcf-checkout-products-qty-<?php echo $id; ?>">
49
- <div class="wcf-field-row">
50
- <div class="wcf-field-row-heading">
51
- <label><?php echo __( 'Product Quantity', 'cartflows' ); ?></label>
52
- </div>
53
-
54
- <div class="wcf-field-row-content wcf-field-row-advance-content">
55
- <input type="number" class="input-text qty text" step="1" min="1" max="" name="wcf-checkout-products[<?php echo $id; ?>][quantity]" value="<?php echo $selected_data['quantity']; ?>" title="Qty" inputmode="numeric">
56
- </div>
57
- </div>
58
- </div>
59
- <!-- Qty field end -->
60
-
61
- <!-- Type field. -->
62
- <div class="wcf-repeatable-discount-type-field">
63
- <div class="wcf-field-row">
64
- <div class="wcf-field-row-heading">
65
- <label><?php echo __( 'Discount Type', 'cartflows' ); ?></label>
66
- </div>
67
-
68
- <div class="wcf-field-row-content wcf-field-row-advance-content">
69
- <select name="wcf-checkout-products[<?php echo $id; ?>][discount_type]" data-allow_clear="allow_clear" data-placeholder="<?php echo __( 'Select Discount Type', 'cartflows' ); ?>">
70
- <option value="" <?php selected( $selected_data['discount_type'], '', true ); ?>><?php echo __( 'Original', 'cartflows' ); ?></option>
71
- <option value="discount_percent" <?php selected( $selected_data['discount_type'], 'discount_percent', true ); ?>><?php echo __( 'Percentage', 'cartflows' ); ?></option>
72
- <option value="discount_price" <?php selected( $selected_data['discount_type'], 'discount_price', true ); ?>><?php echo __( 'Price', 'cartflows' ); ?></option>
73
- </select>
74
- </div>
75
- </div>
76
- </div>
77
- <!-- Type field end -->
78
-
79
- <!-- Discount field -->
80
- <div class="wcf-repeatable-row-discount-field <?php echo $hide_advance; ?> wcf-checkout-products-discount-<?php echo $id; ?>">
81
- <div class="wcf-field-row">
82
- <div class="wcf-field-row-heading">
83
- <label><?php echo __( 'Discount Value', 'cartflows' ); ?></label>
84
- <i class="wcf-field-heading-help dashicons dashicons-editor-help"></i>
85
- <span class="wcf-tooltip-text"><?php echo __( 'Discount value will apply for each quantity of product.', 'cartflows' ); ?></span>
86
- </div>
87
- <div class="wcf-field-row-content wcf-field-row-advance-content">
88
- <input type="text" class="input-text text" name="wcf-checkout-products[<?php echo $id; ?>][discount_value]" value="<?php echo $selected_data['discount_value']; ?>" title="" inputmode="numeric">
89
- </div>
90
- </div>
91
- </div>
92
-
93
- <div class="wcf-repeatable-row-unique-id-field">
94
- <input name="wcf-checkout-products[<?php echo $id; ?>][unique_id]" type="hidden" class="wcf-checkout-product-unique" value="<?php echo $selected_data['unique_id']; ?>">
95
- </div>
96
-
97
- <?php do_action( 'cartflows_repeatable_row_advance_fields', $id ); ?>
98
- </div>
99
- </div>
1
+ <?php
2
+ /**
3
+ * Generate product repeater.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $hide_advance = 'wcf-hide-advance';
9
+
10
+ if ( empty( $selected_data ) ) {
11
+
12
+ $selected_data = array(
13
+ 'quantity' => 1,
14
+ 'discount_type' => '',
15
+ 'discount_value' => '',
16
+ 'unique_id' => '',
17
+ );
18
+ }
19
+
20
+ ?>
21
+
22
+ <div class="wcf-repeatable-row" data-key="<?php echo $id; ?>">
23
+ <div class="wcf_display_advance_fields wcf-repeater-fields-head-wrap">
24
+ <div class="wcf-repeatable-row-standard-fields">
25
+ <div class="wcf-checkout-products-dashicon dashicons dashicons-menu"></div>
26
+
27
+ <!-- Product Name -->
28
+ <div class="wcf-repeatable-fields wcf-sel-product">
29
+ <span class="wcf-repeatable-row-setting-field">
30
+ <select name="wcf-checkout-products[<?php echo $id; ?>][product]" class="wcf-product-search" data-allow_clear="allow_clear" data-include_product_types= "braintree-subscription, braintree-variable-subscription" data-excluded_product_types = "grouped" data-placeholder="<?php echo __( 'Search for a product&hellip;', 'cartflows' ); ?>" data-action="wcf_json_search_products_and_variations"><?php echo $options; ?></select>
31
+ </span>
32
+
33
+ <span class="wcf-repeatable-row-actions">
34
+ <a class="wcf-remove-row wcf-repeatable-remove button" data-type="product">
35
+ <span class="dashicons dashicons-trash"></span>
36
+ <span class="wcf-repeatable-remove-button"><?php echo __( 'Remove', 'cartflows' ); ?></span>
37
+ </a>
38
+ </span>
39
+ </div>
40
+
41
+ <div class="wcf_toggle_advance_fields"><i class="dashicons dashicons-arrow-down"></i></div>
42
+ </div>
43
+ </div>
44
+
45
+ <div class="wcf-repeatable-row-advance-fields <?php echo $hide_advance; ?>">
46
+
47
+ <!-- Qty field. -->
48
+ <div class="wcf-repeatable-row-qty-field wcf-checkout-products-qty-<?php echo $id; ?>">
49
+ <div class="wcf-field-row">
50
+ <div class="wcf-field-row-heading">
51
+ <label><?php echo __( 'Product Quantity', 'cartflows' ); ?></label>
52
+ </div>
53
+
54
+ <div class="wcf-field-row-content wcf-field-row-advance-content">
55
+ <input type="number" class="input-text qty text" step="1" min="1" max="" name="wcf-checkout-products[<?php echo $id; ?>][quantity]" value="<?php echo $selected_data['quantity']; ?>" title="Qty" inputmode="numeric">
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <!-- Qty field end -->
60
+
61
+ <!-- Type field. -->
62
+ <div class="wcf-repeatable-discount-type-field">
63
+ <div class="wcf-field-row">
64
+ <div class="wcf-field-row-heading">
65
+ <label><?php echo __( 'Discount Type', 'cartflows' ); ?></label>
66
+ </div>
67
+
68
+ <div class="wcf-field-row-content wcf-field-row-advance-content">
69
+ <select name="wcf-checkout-products[<?php echo $id; ?>][discount_type]" data-allow_clear="allow_clear" data-placeholder="<?php echo __( 'Select Discount Type', 'cartflows' ); ?>">
70
+ <option value="" <?php selected( $selected_data['discount_type'], '', true ); ?>><?php echo __( 'Original', 'cartflows' ); ?></option>
71
+ <option value="discount_percent" <?php selected( $selected_data['discount_type'], 'discount_percent', true ); ?>><?php echo __( 'Percentage', 'cartflows' ); ?></option>
72
+ <option value="discount_price" <?php selected( $selected_data['discount_type'], 'discount_price', true ); ?>><?php echo __( 'Price', 'cartflows' ); ?></option>
73
+ </select>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <!-- Type field end -->
78
+
79
+ <!-- Discount field -->
80
+ <div class="wcf-repeatable-row-discount-field <?php echo $hide_advance; ?> wcf-checkout-products-discount-<?php echo $id; ?>">
81
+ <div class="wcf-field-row">
82
+ <div class="wcf-field-row-heading">
83
+ <label><?php echo __( 'Discount Value', 'cartflows' ); ?></label>
84
+ <i class="wcf-field-heading-help dashicons dashicons-editor-help"></i>
85
+ <span class="wcf-tooltip-text"><?php echo __( 'Discount value will apply for each quantity of product.', 'cartflows' ); ?></span>
86
+ </div>
87
+ <div class="wcf-field-row-content wcf-field-row-advance-content">
88
+ <input type="text" class="input-text text" name="wcf-checkout-products[<?php echo $id; ?>][discount_value]" value="<?php echo $selected_data['discount_value']; ?>" title="" inputmode="numeric">
89
+ </div>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="wcf-repeatable-row-unique-id-field">
94
+ <input name="wcf-checkout-products[<?php echo $id; ?>][unique_id]" type="hidden" class="wcf-checkout-product-unique" value="<?php echo $selected_data['unique_id']; ?>">
95
+ </div>
96
+
97
+ <?php do_action( 'cartflows_repeatable_row_advance_fields', $id ); ?>
98
+ </div>
99
+ </div>
languages/cartflows.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the CartFlows package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: CartFlows 1.5.17\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
7
- "POT-Creation-Date: 2020-09-08 06:13:47+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -77,15 +77,15 @@ msgstr ""
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. "
@@ -97,8 +97,8 @@ msgid "Home"
97
  msgstr ""
98
 
99
  #: classes/class-cartflows-admin.php:191 classes/class-cartflows-admin.php:192
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
 
@@ -168,8 +168,8 @@ msgstr ""
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
 
@@ -183,6 +183,17 @@ msgstr ""
183
  msgid "Click here to disable it"
184
  msgstr ""
185
 
 
 
 
 
 
 
 
 
 
 
 
186
  #: classes/class-cartflows-importer.php:81
187
  msgid "Export this flow"
188
  msgstr ""
@@ -386,18 +397,18 @@ msgid ""
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
 
@@ -466,10 +477,10 @@ 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
 
@@ -783,8 +794,12 @@ 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
 
@@ -1036,126 +1051,117 @@ msgstr ""
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:166
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:167
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:533
1075
  msgid "This product can't be purchased"
1076
  msgstr ""
1077
 
1078
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:978
1079
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1021
1080
  msgid "Coupon Code"
1081
  msgstr ""
1082
 
1083
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:979
1084
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1030
1085
  msgid "Apply"
1086
  msgstr ""
1087
 
1088
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1186
1089
  msgid "Sorry there was a problem removing this coupon."
1090
  msgstr ""
1091
 
1092
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1189
1093
  msgid "Coupon has been removed."
1094
  msgstr ""
1095
 
1096
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1208
1097
  msgid "Sorry there was a problem removing "
1098
  msgstr ""
1099
 
1100
- #: modules/checkout/classes/class-cartflows-checkout-markup.php:1211
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
 
@@ -1192,7 +1198,7 @@ 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 ""
@@ -1218,216 +1224,282 @@ msgstr ""
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 &copy;"
1433
  msgstr ""
@@ -1436,6 +1508,422 @@ msgstr ""
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"
@@ -1706,190 +2194,171 @@ msgstr ""
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:185
1714
  msgid "Please place shortcode on Optin step-type only."
1715
  msgstr ""
1716
 
1717
- #: modules/optin/classes/class-cartflows-optin-markup.php:245
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:262
1724
  msgid "Please update the selected product's price to zero (0)."
1725
  msgstr ""
1726
 
1727
- #: modules/optin/classes/class-cartflows-optin-markup.php:271
1728
- #: modules/optin/classes/class-cartflows-optin-markup.php:275
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:86
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
@@ -1964,10 +2433,6 @@ msgstr ""
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 ""
2
  # This file is distributed under the same license as the CartFlows package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: CartFlows 1.5.18\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
7
+ "POT-Creation-Date: 2020-09-29 10:28:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
77
  msgid "Every %d Minutes"
78
  msgstr ""
79
 
80
+ #: classes/class-cartflows-admin-fields.php:241
81
  msgid "Select"
82
  msgstr ""
83
 
84
+ #: classes/class-cartflows-admin-fields.php:244
85
  msgid "No Checkout Steps"
86
  msgstr ""
87
 
88
+ #: classes/class-cartflows-admin-fields.php:270
89
  #. translators: %s: link
90
  msgid ""
91
  "Be sure not to add any product in above selected Global Checkout step. "
97
  msgstr ""
98
 
99
  #: classes/class-cartflows-admin.php:191 classes/class-cartflows-admin.php:192
100
+ #: modules/optin/classes/class-cartflows-optin-meta.php:151
101
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:140
102
  msgid "Settings"
103
  msgstr ""
104
 
168
  msgid "Clone"
169
  msgstr ""
170
 
171
+ #: classes/class-cartflows-default-meta.php:735
172
+ #: modules/optin/classes/class-cartflows-optin-meta.php:554
173
  msgid "Submit"
174
  msgstr ""
175
 
183
  msgid "Click here to disable it"
184
  msgstr ""
185
 
186
+ #: classes/class-cartflows-functions.php:567
187
+ #. translators: %1$s page builder name "string"
188
+ msgid ""
189
+ "We have introduced %1$1s widgets for CartFlows shortcodes. Now, you can "
190
+ "add/change/update design settings directly from the page builder as well."
191
+ msgstr ""
192
+
193
+ #: classes/class-cartflows-functions.php:568
194
+ msgid "Learn More »"
195
+ msgstr ""
196
+
197
  #: classes/class-cartflows-importer.php:81
198
  msgid "Export this flow"
199
  msgstr ""
397
  "%1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher."
398
  msgstr ""
399
 
400
+ #: classes/class-cartflows-loader.php:509
401
  #. translators: %s: html tags
402
  msgid ""
403
  "This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & "
404
  "activated."
405
  msgstr ""
406
 
407
+ #: classes/class-cartflows-loader.php:519
408
  msgid "Activate WooCommerce"
409
  msgstr ""
410
 
411
+ #: classes/class-cartflows-loader.php:527
412
  msgid "Install WooCommerce"
413
  msgstr ""
414
 
477
  msgstr ""
478
 
479
  #: classes/class-cartflows-meta.php:63
480
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:175
481
  #: modules/landing/classes/class-cartflows-landing-meta.php:136
482
+ #: modules/optin/classes/class-cartflows-optin-meta.php:157
483
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:146
484
  msgid "Custom Script"
485
  msgstr ""
486
 
794
  msgstr ""
795
 
796
  #: includes/admin/cartflows-general.php:116
797
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:119
798
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:179
799
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:184
800
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:146
801
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:151
802
+ #: modules/optin/classes/class-cartflows-optin-meta.php:447
803
  msgid "Default"
804
  msgstr ""
805
 
1051
  msgid "Create Product"
1052
  msgstr ""
1053
 
1054
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:331
1055
+ #: modules/optin/classes/class-cartflows-optin-markup.php:179
1056
  #: modules/thankyou/classes/class-cartflows-thankyou-markup.php:90
1057
  msgid ""
1058
  "WooCommerce functions do not exist. If you are in an IFrame, please reload "
1059
  "it."
1060
  msgstr ""
1061
 
1062
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:332
1063
+ #: modules/optin/classes/class-cartflows-optin-markup.php:180
1064
  #: modules/thankyou/classes/class-cartflows-thankyou-markup.php:91
1065
  msgid "Click Here to Reload"
1066
  msgstr ""
1067
 
1068
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:350
1069
  msgid "Checkout ID not found"
1070
  msgstr ""
1071
 
1072
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:413
1073
+ #: modules/checkout/templates/embed/checkout-template-simple.php:26
1074
  #: modules/checkout/templates/wcf-template.php:36
1075
  #: modules/optin/templates/optin-template-simple.php:25
1076
  msgid "Your cart is currently empty."
1077
  msgstr ""
1078
 
1079
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:492
1080
+ #. translators: %1$1s, %2$2s Link to meta
1081
  msgid ""
1082
+ "No product is selected. Please select products from the %1$1scheckout meta "
1083
+ "settings%2$2s to continue."
1084
  msgstr ""
1085
 
1086
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:587
1087
  msgid "Variations Not set"
1088
  msgstr ""
1089
 
1090
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:598
1091
  msgid "This product can't be purchased"
1092
  msgstr ""
1093
 
1094
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1053
1095
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1096
1096
  msgid "Coupon Code"
1097
  msgstr ""
1098
 
1099
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1054
1100
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1105
1101
  msgid "Apply"
1102
  msgstr ""
1103
 
1104
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1242
1105
  msgid "Sorry there was a problem removing this coupon."
1106
  msgstr ""
1107
 
1108
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1245
1109
  msgid "Coupon has been removed."
1110
  msgstr ""
1111
 
1112
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1264
1113
  msgid "Sorry there was a problem removing "
1114
  msgstr ""
1115
 
1116
+ #: modules/checkout/classes/class-cartflows-checkout-markup.php:1267
1117
  msgid " has been removed."
1118
  msgstr ""
1119
 
1120
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:94
1121
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:169
1122
+ msgid "Checkout Settings"
1123
  msgstr ""
1124
 
1125
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:103
1126
+ msgid "Checkout Layout & Design"
 
 
 
1127
  msgstr ""
1128
 
1129
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:139
1130
+ #: modules/optin/classes/class-cartflows-optin-meta.php:139
1131
  msgid "Select Product"
1132
  msgstr ""
1133
 
1134
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:145
1135
  msgid "Product Options"
1136
  msgstr ""
1137
 
1138
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:151
1139
  msgid "Order Bump"
1140
  msgstr ""
1141
 
1142
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:157
1143
  msgid "Checkout Offer"
1144
  msgstr ""
1145
 
1146
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:163
 
 
 
 
1147
  msgid "Checkout Fields"
1148
  msgstr ""
1149
 
1150
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:186
 
 
 
 
1151
  msgid "Logo (Optional)"
1152
  msgstr ""
1153
 
1154
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:271
1155
  #. translators: %s: link
1156
  msgid "Upgrade to %1$sCartFlows Pro%2$s for Product Options feature."
1157
  msgstr ""
1158
 
1159
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:282
1160
  #. translators: %s: link.
1161
  msgid "Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options"
1162
  msgstr ""
1163
 
1164
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:310
1165
  msgid "Add this shortcode to your checkout page"
1166
  msgstr ""
1167
 
1198
  msgstr ""
1199
 
1200
  #: modules/checkout/classes/class-cartflows-checkout-meta.php:469
1201
+ #: modules/optin/classes/class-cartflows-optin-meta.php:334
1202
  #. translators: %s: link
1203
  msgid "Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature."
1204
  msgstr ""
1224
  msgid "Users will able to remove products from the checkout page."
1225
  msgstr ""
1226
 
1227
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:557
1228
+ msgid "Header Logo"
1229
+ msgstr ""
1230
+
1231
+ #: modules/checkout/classes/class-cartflows-checkout-meta.php:565
1232
+ msgid "Logo Width (In px)"
1233
+ msgstr ""
1234
+
1235
+ #: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:12
1236
+ #: modules/landing/classes/class-cartflows-landing-meta.php:130
1237
+ #: modules/optin/classes/class-cartflows-optin-meta.php:220
1238
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:244
1239
+ msgid "Shortcodes"
1240
+ msgstr ""
1241
+
1242
+ #: modules/checkout/includes/meta-views/design-checkout-metabox-markup.php:18
1243
+ msgid "Checkout Design"
1244
+ msgstr ""
1245
+
1246
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:18
1247
  msgid "One Column (Available in CartFlows Pro) "
1248
  msgstr ""
1249
 
1250
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:19
1251
  msgid "Two Step (Available in CartFlows Pro) "
1252
  msgstr ""
1253
 
1254
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:25
1255
  msgid "Checkout Skin"
1256
  msgstr ""
1257
 
1258
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:29
1259
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:158
1260
  msgid "One Column"
1261
  msgstr ""
1262
 
1263
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:30
1264
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:153
1265
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:159
1266
  msgid "Two Column"
1267
  msgstr ""
1268
 
1269
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:31
1270
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:160
1271
  msgid "Two Step"
1272
  msgstr ""
1273
 
1274
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:40
1275
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:302
1276
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:177
1277
+ #: modules/optin/classes/class-cartflows-optin-meta.php:410
1278
  msgid "Primary Color"
1279
  msgstr ""
1280
 
1281
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:49
1282
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:84
1283
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:130
1284
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:222
1285
+ #: modules/optin/classes/class-cartflows-optin-meta.php:419
1286
+ #: modules/optin/classes/class-cartflows-optin-meta.php:458
1287
+ #: modules/optin/classes/class-cartflows-optin-meta.php:570
1288
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:311
1289
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:342
1290
  msgid "Font Family"
1291
  msgstr ""
1292
 
1293
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:57
1294
  msgid "Advance Options"
1295
  msgstr ""
1296
 
1297
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:69
1298
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:396
1299
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:290
1300
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:509
1301
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:602
1302
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:691
1303
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:327
1304
  msgid "Heading"
1305
  msgstr ""
1306
 
1307
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:75
1308
  msgid "Heading Color"
1309
  msgstr ""
1310
 
1311
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:93
1312
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:139
1313
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:231
1314
+ #: modules/optin/classes/class-cartflows-optin-meta.php:467
1315
+ #: modules/optin/classes/class-cartflows-optin-meta.php:579
1316
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:351
1317
  msgid "Font Weight"
1318
  msgstr ""
1319
 
1320
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:101
1321
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:443
1322
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:208
1323
+ #: modules/optin/classes/class-cartflows-optin-meta.php:430
1324
  msgid "Input Fields"
1325
  msgstr ""
1326
 
1327
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:109
1328
+ #: modules/optin/classes/class-cartflows-optin-meta.php:437
1329
  msgid "Floating Labels (Available in CartFlows Pro)"
1330
  msgstr ""
1331
 
1332
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:115
1333
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:451
1334
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:216
1335
+ #: modules/optin/classes/class-cartflows-optin-meta.php:443
1336
  msgid "Style"
1337
  msgstr ""
1338
 
1339
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:120
1340
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:185
1341
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:152
1342
+ #: modules/optin/classes/class-cartflows-optin-meta.php:448
1343
  msgid "Floating Labels"
1344
  msgstr ""
1345
 
1346
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:147
1347
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:239
1348
+ #: modules/optin/classes/class-cartflows-optin-meta.php:475
1349
+ #: modules/optin/classes/class-cartflows-optin-meta.php:587
1350
  msgid "Size"
1351
  msgstr ""
1352
 
1353
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:151
1354
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:243
1355
+ #: modules/optin/classes/class-cartflows-optin-meta.php:479
1356
+ #: modules/optin/classes/class-cartflows-optin-meta.php:591
1357
  msgid "Extra Small"
1358
  msgstr ""
1359
 
1360
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:152
1361
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:244
1362
+ #: modules/optin/classes/class-cartflows-optin-meta.php:480
1363
+ #: modules/optin/classes/class-cartflows-optin-meta.php:592
1364
  msgid "Small"
1365
  msgstr ""
1366
 
1367
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:153
1368
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:245
1369
+ #: modules/optin/classes/class-cartflows-optin-meta.php:481
1370
+ #: modules/optin/classes/class-cartflows-optin-meta.php:593
1371
  msgid "Medium"
1372
  msgstr ""
1373
 
1374
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:154
1375
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:246
1376
+ #: modules/optin/classes/class-cartflows-optin-meta.php:482
1377
+ #: modules/optin/classes/class-cartflows-optin-meta.php:594
1378
  msgid "Large"
1379
  msgstr ""
1380
 
1381
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:155
1382
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:247
1383
+ #: modules/optin/classes/class-cartflows-optin-meta.php:483
1384
+ #: modules/optin/classes/class-cartflows-optin-meta.php:595
1385
  msgid "Extra Large"
1386
  msgstr ""
1387
 
1388
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:156
1389
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:248
1390
+ #: modules/optin/classes/class-cartflows-optin-meta.php:484
1391
+ #: modules/optin/classes/class-cartflows-optin-meta.php:596
1392
  msgid "Custom"
1393
  msgstr ""
1394
 
1395
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:163
1396
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:255
1397
+ #: modules/optin/classes/class-cartflows-optin-meta.php:491
1398
+ #: modules/optin/classes/class-cartflows-optin-meta.php:603
1399
  msgid "Top Bottom Spacing"
1400
  msgstr ""
1401
 
1402
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:171
1403
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:263
1404
+ #: modules/optin/classes/class-cartflows-optin-meta.php:499
1405
+ #: modules/optin/classes/class-cartflows-optin-meta.php:611
1406
  msgid "Left Right Spacing"
1407
  msgstr ""
1408
 
1409
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:179
1410
+ #: modules/optin/classes/class-cartflows-optin-meta.php:515
1411
  msgid "Text / Placeholder Color"
1412
  msgstr ""
1413
 
1414
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:187
1415
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:287
1416
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:679
1417
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:789
1418
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:995
1419
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:371
1420
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:388
1421
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:458
1422
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:426
1423
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:481
1424
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:571
1425
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:662
1426
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:751
1427
+ #: modules/optin/classes/class-cartflows-optin-meta.php:523
1428
+ #: modules/optin/classes/class-cartflows-optin-meta.php:648
1429
  msgid "Background Color"
1430
  msgstr ""
1431
 
1432
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:195
1433
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:303
1434
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:582
1435
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1008
1436
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:315
1437
+ #: modules/optin/classes/class-cartflows-optin-meta.php:531
1438
+ #: modules/optin/classes/class-cartflows-optin-meta.php:664
1439
  msgid "Border Color"
1440
  msgstr ""
1441
 
1442
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:202
1443
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:495
1444
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:941
1445
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:251
1446
+ #: modules/optin/classes/class-cartflows-optin-meta.php:507
1447
  msgid "Label Color"
1448
  msgstr ""
1449
 
1450
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:215
1451
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:626
1452
  msgid "Buttons"
1453
  msgstr ""
1454
 
1455
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:271
1456
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:364
1457
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:659
1458
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:754
1459
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:825
1460
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:358
1461
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:375
1462
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:435
1463
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:323
1464
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:372
1465
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:402
1466
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:468
1467
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:527
1468
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:558
1469
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:619
1470
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:649
1471
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:708
1472
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:738
1473
+ #: modules/optin/classes/class-cartflows-optin-meta.php:632
1474
  msgid "Text Color"
1475
  msgstr ""
1476
 
1477
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:279
1478
+ #: modules/optin/classes/class-cartflows-optin-meta.php:640
1479
  msgid "Text Hover Color"
1480
  msgstr ""
1481
 
1482
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:295
1483
+ #: modules/optin/classes/class-cartflows-optin-meta.php:656
1484
  msgid "Background Hover Color"
1485
  msgstr ""
1486
 
1487
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:311
1488
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:771
1489
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:446
1490
+ #: modules/optin/classes/class-cartflows-optin-meta.php:672
1491
  msgid "Border Hover Color"
1492
  msgstr ""
1493
 
1494
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:324
1495
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:356
1496
  msgid "Sections"
1497
  msgstr ""
1498
 
1499
+ #: modules/checkout/includes/meta-views/design-checkout-style-tab.php:330
1500
  msgid "Highlight Area Background Color"
1501
  msgstr ""
1502
 
 
 
 
 
 
 
 
 
1503
  #: modules/checkout/templates/wcf-template.php:46
1504
  msgid "Copyright &copy;"
1505
  msgstr ""
1508
  msgid "All Rights Reserved"
1509
  msgstr ""
1510
 
1511
+ #: modules/elementor/class-cartflows-el-widgets-loader.php:120
1512
+ msgid "Cartflows"
1513
+ msgstr ""
1514
+
1515
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:66
1516
+ msgid "Checkout Form"
1517
+ msgstr ""
1518
+
1519
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:152
1520
+ msgid "One Column ( PRO )"
1521
+ msgstr ""
1522
+
1523
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:154
1524
+ msgid "Two Step ( PRO )"
1525
+ msgstr ""
1526
+
1527
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:180
1528
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:147
1529
+ msgid "Floating Labels ( PRO )"
1530
+ msgstr ""
1531
+
1532
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:203
1533
+ msgid "Layout"
1534
+ msgstr ""
1535
+
1536
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:210
1537
+ msgid "Select Layout"
1538
+ msgstr ""
1539
+
1540
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:224
1541
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:465
1542
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:230
1543
+ #. translators: %s admin link
1544
+ msgid ""
1545
+ "This feature is available in the CartFlows Pro. <a href=\"%s\" "
1546
+ "target=\"_blank\" rel=\"noopener\">Upgrade Now!</a>."
1547
+ msgstr ""
1548
+
1549
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:247
1550
+ msgid "Other Settings"
1551
+ msgstr ""
1552
+
1553
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:254
1554
+ msgid "Billing Section Text"
1555
+ msgstr ""
1556
+
1557
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:256
1558
+ msgid "Billing Details"
1559
+ msgstr ""
1560
+
1561
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:264
1562
+ msgid "Shipping Section Text"
1563
+ msgstr ""
1564
+
1565
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:266
1566
+ msgid "Shipping Details"
1567
+ msgstr ""
1568
+
1569
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:274
1570
+ msgid "Order Review Text"
1571
+ msgstr ""
1572
+
1573
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:276
1574
+ #: woocommerce/template/checkout/form-checkout.php:56
1575
+ msgid "Your order"
1576
+ msgstr ""
1577
+
1578
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:294
1579
+ msgid "Global"
1580
+ msgstr ""
1581
+
1582
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:404
1583
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:302
1584
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:333
1585
+ msgid "Color"
1586
+ msgstr ""
1587
+
1588
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:507
1589
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:262
1590
+ msgid "Field Background Color"
1591
+ msgstr ""
1592
+
1593
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:523
1594
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:273
1595
+ msgid "Input Text / Placeholder Color"
1596
+ msgstr ""
1597
+
1598
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:541
1599
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:284
1600
+ msgid "Border Style"
1601
+ msgstr ""
1602
+
1603
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:546
1604
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:289
1605
+ msgid "Inherit"
1606
+ msgstr ""
1607
+
1608
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:547
1609
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:290
1610
+ msgid "Solid"
1611
+ msgstr ""
1612
+
1613
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:548
1614
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:291
1615
+ msgid "Double"
1616
+ msgstr ""
1617
+
1618
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:549
1619
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:292
1620
+ msgid "Dotted"
1621
+ msgstr ""
1622
+
1623
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:550
1624
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:293
1625
+ msgid "Dashed"
1626
+ msgstr ""
1627
+
1628
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:565
1629
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:303
1630
+ msgid "Border Width"
1631
+ msgstr ""
1632
+
1633
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:598
1634
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:711
1635
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:397
1636
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:326
1637
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:406
1638
+ msgid "Rounded Corners"
1639
+ msgstr ""
1640
+
1641
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:652
1642
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:351
1643
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:368
1644
+ msgid "Normal"
1645
+ msgstr ""
1646
+
1647
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:696
1648
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:389
1649
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:398
1650
+ msgid "Border"
1651
+ msgstr ""
1652
+
1653
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:747
1654
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:411
1655
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:428
1656
+ msgid "Hover"
1657
+ msgstr ""
1658
+
1659
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:818
1660
+ msgid "Payment Section"
1661
+ msgstr ""
1662
+
1663
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:839
1664
+ msgid "Description Color"
1665
+ msgstr ""
1666
+
1667
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:851
1668
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:377
1669
+ msgid "Section Background Color"
1670
+ msgstr ""
1671
+
1672
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:863
1673
+ msgid "Information Background Color"
1674
+ msgstr ""
1675
+
1676
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:877
1677
+ msgid "Section Padding"
1678
+ msgstr ""
1679
+
1680
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:890
1681
+ msgid "Section Margin"
1682
+ msgstr ""
1683
+
1684
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:902
1685
+ msgid "Section Rounded Corners"
1686
+ msgstr ""
1687
+
1688
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:924
1689
+ msgid "Field Validation & Error Messages"
1690
+ msgstr ""
1691
+
1692
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:932
1693
+ msgid "Field Validation"
1694
+ msgstr ""
1695
+
1696
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:953
1697
+ msgid "Field Border Color"
1698
+ msgstr ""
1699
+
1700
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:972
1701
+ msgid "Error Messages"
1702
+ msgstr ""
1703
+
1704
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:981
1705
+ msgid "Error Message Color"
1706
+ msgstr ""
1707
+
1708
+ #: modules/elementor/widgets/class-cartflows-el-checkout-form.php:1058
1709
+ msgid ""
1710
+ "No product is selected. Please select products from the checkout meta "
1711
+ "settings to continue."
1712
+ msgstr ""
1713
+
1714
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:70
1715
+ msgid "Next Step Button"
1716
+ msgstr ""
1717
+
1718
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:157
1719
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:291
1720
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:169
1721
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:156
1722
+ msgid "General"
1723
+ msgstr ""
1724
+
1725
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:164
1726
+ msgid "Title"
1727
+ msgstr ""
1728
+
1729
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:166
1730
+ msgid "BUY NOW"
1731
+ msgstr ""
1732
+
1733
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:176
1734
+ msgid "Sub Title"
1735
+ msgstr ""
1736
+
1737
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:187
1738
+ msgid "Icon"
1739
+ msgstr ""
1740
+
1741
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:195
1742
+ msgid "Icon Position"
1743
+ msgstr ""
1744
+
1745
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:199
1746
+ msgid "Before Title"
1747
+ msgstr ""
1748
+
1749
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:200
1750
+ msgid "After Title"
1751
+ msgstr ""
1752
+
1753
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:201
1754
+ msgid "Before Title & Sub Title"
1755
+ msgstr ""
1756
+
1757
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:202
1758
+ msgid "After Title & Sub Title"
1759
+ msgstr ""
1760
+
1761
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:213
1762
+ msgid "Icon Vertical Alignment"
1763
+ msgstr ""
1764
+
1765
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:219
1766
+ msgid "Top"
1767
+ msgstr ""
1768
+
1769
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:223
1770
+ msgid "Middle"
1771
+ msgstr ""
1772
+
1773
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:240
1774
+ msgid "Icon Spacing"
1775
+ msgstr ""
1776
+
1777
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:260
1778
+ msgid "Icon Size"
1779
+ msgstr ""
1780
+
1781
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:299
1782
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:298
1783
+ msgid "Alignment"
1784
+ msgstr ""
1785
+
1786
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:303
1787
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:476
1788
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:302
1789
+ #: modules/optin/classes/class-cartflows-optin-meta.php:623
1790
+ msgid "Left"
1791
+ msgstr ""
1792
+
1793
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:307
1794
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:480
1795
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:306
1796
+ #: modules/optin/classes/class-cartflows-optin-meta.php:624
1797
+ msgid "Center"
1798
+ msgstr ""
1799
+
1800
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:311
1801
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:484
1802
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:310
1803
+ #: modules/optin/classes/class-cartflows-optin-meta.php:625
1804
+ msgid "Right"
1805
+ msgstr ""
1806
+
1807
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:315
1808
+ msgid "Justify"
1809
+ msgstr ""
1810
+
1811
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:327
1812
+ msgid "Button Size"
1813
+ msgstr ""
1814
+
1815
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:337
1816
+ msgid "Padding"
1817
+ msgstr ""
1818
+
1819
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:418
1820
+ msgid "Hover Text Color"
1821
+ msgstr ""
1822
+
1823
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:431
1824
+ msgid "Hover Background Color"
1825
+ msgstr ""
1826
+
1827
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:464
1828
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:540
1829
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:631
1830
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:720
1831
+ msgid "Content"
1832
+ msgstr ""
1833
+
1834
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:472
1835
+ msgid "Text Alignment"
1836
+ msgstr ""
1837
+
1838
+ #: modules/elementor/widgets/class-cartflows-el-next-step-button.php:525
1839
+ msgid "Title and Sub Title Spacing"
1840
+ msgstr ""
1841
+
1842
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:66
1843
+ msgid "Optin Form"
1844
+ msgstr ""
1845
+
1846
+ #: modules/elementor/widgets/class-cartflows-el-optin-form.php:349
1847
+ #: modules/optin/classes/class-cartflows-optin-meta.php:544
1848
+ msgid "Submit Button"
1849
+ msgstr ""
1850
+
1851
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:69
1852
+ msgid "Order Details Form"
1853
+ msgstr ""
1854
+
1855
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:163
1856
+ msgid "Thank You Text"
1857
+ msgstr ""
1858
+
1859
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:165
1860
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:176
1861
+ #: woocommerce/template/checkout/thankyou.php:41
1862
+ #: woocommerce/template/checkout/thankyou.php:86
1863
+ msgid "Thank you. Your order has been received."
1864
+ msgstr ""
1865
+
1866
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:173
1867
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:448
1868
+ msgid "Order Overview"
1869
+ msgstr ""
1870
+
1871
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:175
1872
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:187
1873
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:199
1874
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:211
1875
+ msgid "Show"
1876
+ msgstr ""
1877
+
1878
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:176
1879
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:188
1880
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:200
1881
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:212
1882
+ msgid "Hide"
1883
+ msgstr ""
1884
+
1885
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:185
1886
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:591
1887
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:284
1888
+ msgid "Order Details"
1889
+ msgstr ""
1890
+
1891
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:197
1892
+ msgid "Billing Address"
1893
+ msgstr ""
1894
+
1895
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:209
1896
+ msgid "Shipping Address"
1897
+ msgstr ""
1898
+
1899
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:233
1900
+ msgid "Spacing"
1901
+ msgstr ""
1902
+
1903
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:241
1904
+ msgid "Heading Bottom Spacing"
1905
+ msgstr ""
1906
+
1907
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:257
1908
+ msgid "Spacing Between Sections"
1909
+ msgstr ""
1910
+
1911
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:364
1912
+ msgid "Sections Heading"
1913
+ msgstr ""
1914
+
1915
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:393
1916
+ msgid "Sections Content"
1917
+ msgstr ""
1918
+
1919
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:501
1920
+ msgid "Downloads"
1921
+ msgstr ""
1922
+
1923
+ #: modules/elementor/widgets/class-cartflows-el-order-details-form.php:683
1924
+ msgid "Customer Details"
1925
+ msgstr ""
1926
+
1927
  #: modules/flow/classes/class-cartflows-flow-meta.php:265
1928
  #. translators: %s flow id
1929
  msgid "Step not deleted for flow - %s"
2194
  msgid "Landing Page Settings"
2195
  msgstr ""
2196
 
2197
+ #: modules/landing/classes/class-cartflows-landing-meta.php:171
2198
  msgid "Next Step Link"
2199
  msgstr ""
2200
 
2201
+ #: modules/optin/classes/class-cartflows-optin-markup.php:198
2202
  msgid "Please place shortcode on Optin step-type only."
2203
  msgstr ""
2204
 
2205
+ #: modules/optin/classes/class-cartflows-optin-markup.php:258
2206
  msgid ""
2207
  "No product is selected. Please select a Simple, Virtual and Free product "
2208
  "from the meta settings."
2209
  msgstr ""
2210
 
2211
+ #: modules/optin/classes/class-cartflows-optin-markup.php:275
2212
  msgid "Please update the selected product's price to zero (0)."
2213
  msgstr ""
2214
 
2215
+ #: modules/optin/classes/class-cartflows-optin-markup.php:284
2216
+ #: modules/optin/classes/class-cartflows-optin-markup.php:288
2217
  msgid "Please select a Simple, Virtual and Free product."
2218
  msgstr ""
2219
 
2220
+ #: modules/optin/classes/class-cartflows-optin-meta.php:94
2221
  msgid "Optin Settings"
2222
  msgstr ""
2223
 
2224
+ #: modules/optin/classes/class-cartflows-optin-meta.php:103
2225
+ msgid "Optin Design"
 
2226
  msgstr ""
2227
 
2228
+ #: modules/optin/classes/class-cartflows-optin-meta.php:145
2229
  msgid "Form Fields"
2230
  msgstr ""
2231
 
2232
+ #: modules/optin/classes/class-cartflows-optin-meta.php:226
2233
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:250
2234
+ msgid "Design"
2235
+ msgstr ""
2236
+
2237
+ #: modules/optin/classes/class-cartflows-optin-meta.php:277
2238
  msgid "Add this shortcode to your optin page"
2239
  msgstr ""
2240
 
2241
+ #: modules/optin/classes/class-cartflows-optin-meta.php:302
2242
  msgid "Select Free Product"
2243
  msgstr ""
2244
 
2245
+ #: modules/optin/classes/class-cartflows-optin-meta.php:303
2246
  msgid "Select Free and Virtual product only."
2247
  msgstr ""
2248
 
2249
+ #: modules/optin/classes/class-cartflows-optin-meta.php:357
2250
  msgid "Pass Fields as URL Parameters"
2251
  msgstr ""
2252
 
2253
+ #: modules/optin/classes/class-cartflows-optin-meta.php:360
2254
  msgid "Enable"
2255
  msgstr ""
2256
 
2257
+ #: modules/optin/classes/class-cartflows-optin-meta.php:361
2258
  msgid ""
2259
  "You can pass specific fields from the form to next step as URL query "
2260
  "parameters."
2261
  msgstr ""
2262
 
2263
+ #: modules/optin/classes/class-cartflows-optin-meta.php:372
2264
  msgid "Enter form field"
2265
  msgstr ""
2266
 
2267
+ #: modules/optin/classes/class-cartflows-optin-meta.php:375
2268
+ #: modules/optin/classes/class-cartflows-optin-meta.php:385
2269
  msgid "Enter comma seprated field name. E.g. first_name, last_name"
2270
  msgstr ""
2271
 
2272
+ #: modules/optin/classes/class-cartflows-optin-meta.php:377
2273
  msgid "Fields to pass, separated by commas"
2274
  msgstr ""
2275
 
2276
+ #: modules/optin/classes/class-cartflows-optin-meta.php:387
2277
  #. translators: %s: link
2278
  msgid ""
2279
  "You can pass field value as a URL parameter to the next step. %1$sClick "
2280
  "here%2$s for more information."
2281
  msgstr ""
2282
 
2283
+ #: modules/optin/classes/class-cartflows-optin-meta.php:550
 
 
 
 
2284
  msgid "Button Text"
2285
  msgstr ""
2286
 
2287
+ #: modules/optin/classes/class-cartflows-optin-meta.php:561
2288
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:319
2289
  msgid "Font Size"
2290
  msgstr ""
2291
 
2292
+ #: modules/optin/classes/class-cartflows-optin-meta.php:619
2293
  msgid "Position"
2294
  msgstr ""
2295
 
2296
+ #: modules/thankyou/classes/class-cartflows-thankyou-markup.php:127
2297
+ msgid "No completed or processing order found to show the order details form demo."
2298
  msgstr ""
2299
 
2300
+ #: modules/thankyou/classes/class-cartflows-thankyou-markup.php:131
2301
+ msgid "Order not found. You cannot access this page directly."
 
 
 
 
2302
  msgstr ""
2303
 
2304
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:95
2305
+ msgid "Thank You Settings"
2306
  msgstr ""
2307
 
2308
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:104
2309
+ msgid "Thank You Design"
 
 
 
 
2310
  msgstr ""
2311
 
2312
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:172
2313
+ msgid "Thank You Page Text"
 
 
 
 
 
 
 
 
 
2314
  msgstr ""
2315
 
2316
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:178
2317
+ msgid "It will change the default text on thank you page."
2318
  msgstr ""
2319
 
2320
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:186
2321
+ msgid "Redirect After Purchase"
2322
  msgstr ""
2323
 
2324
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:195
2325
+ msgid "Redirect Link"
2326
  msgstr ""
2327
 
2328
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:199
2329
+ msgid "https://"
2330
  msgstr ""
2331
 
2332
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:256
2333
+ msgid "Edit Fields"
2334
  msgstr ""
2335
 
2336
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:296
2337
+ msgid "Text"
2338
  msgstr ""
2339
 
2340
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:359
2341
+ msgid "Advanced Options"
2342
  msgstr ""
2343
 
2344
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:369
2345
+ msgid "Container Width (In px)"
 
 
2346
  msgstr ""
2347
 
2348
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:391
2349
+ msgid "Enable Order Overview "
2350
  msgstr ""
2351
 
2352
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:399
2353
+ msgid "Enable Order Details "
2354
  msgstr ""
2355
 
2356
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:407
2357
+ msgid "Enable Billing Details "
2358
  msgstr ""
2359
 
2360
+ #: modules/thankyou/classes/class-cartflows-thankyou-meta.php:415
2361
+ msgid "Enable Shipping Details "
2362
  msgstr ""
2363
 
2364
  #: modules/widgets/class-cartflows-next-step.php:24
2433
  msgid "You must be logged in to checkout."
2434
  msgstr ""
2435
 
 
 
 
 
2436
  #: woocommerce/template/checkout/form-coupon.php:26
2437
  msgid "Have a coupon?"
2438
  msgstr ""
modules/checkout/classes/class-cartflows-checkout-markup.php CHANGED
@@ -81,6 +81,30 @@ class Cartflows_Checkout_Markup {
81
  add_filter( 'woocommerce_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
82
 
83
  add_action( 'woocommerce_before_calculate_totals', array( $this, 'custom_price_to_cart_item' ), 9999 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
 
86
  /**
@@ -104,6 +128,24 @@ class Cartflows_Checkout_Markup {
104
  return $args;
105
  }
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  /**
108
  * Change PayPal Express cancel URL.
109
  *
@@ -169,23 +211,28 @@ class Cartflows_Checkout_Markup {
169
  /**
170
  * Change order button text .
171
  *
172
- * @param string $woo_button_text place order.
173
  * @return string
174
  */
175
- public function place_order_button_text( $woo_button_text ) {
176
 
177
  $checkout_id = get_the_ID();
178
- if ( ! $checkout_id ) {
179
- $checkout_id = ( isset( $_POST['option']['checkout_id'] ) ) ? intval( $_POST['option']['checkout_id'] ) : 0; //phpcs:ignore
 
 
180
  }
181
 
182
- $wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
 
 
183
 
184
- if ( ! empty( $wcf_order_button_text ) ) {
185
- $woo_button_text = $wcf_order_button_text;
 
186
  }
187
 
188
- return $woo_button_text;
189
  }
190
 
191
  /**
@@ -344,7 +391,7 @@ class Cartflows_Checkout_Markup {
344
  return;
345
  }
346
 
347
- global $post;
348
 
349
  if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
350
 
@@ -360,7 +407,7 @@ class Cartflows_Checkout_Markup {
360
 
361
  $global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
362
 
363
- if ( ! empty( $global_checkout ) && $checkout_id === $global_checkout ) {
364
 
365
  if ( WC()->cart->is_empty() ) {
366
  wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
@@ -429,7 +476,25 @@ class Cartflows_Checkout_Markup {
429
  WC()->cart->empty_cart();
430
 
431
  if ( is_array( $products ) && empty( $products[0]['product'] ) ) {
432
- wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  return;
434
  }
435
 
@@ -532,9 +597,6 @@ class Cartflows_Checkout_Markup {
532
  } else {
533
  $wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
534
  wc_add_notice( $wrong_product_notice );
535
- /**
536
- WC()->cart->add_to_cart( $product_id, $quantity );.
537
- */
538
  }
539
  }
540
  $products_new[ $index ] = array(
@@ -565,44 +627,51 @@ class Cartflows_Checkout_Markup {
565
 
566
  add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
567
 
568
- /* Show notices if cart has errors */
569
- add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
 
570
 
571
- add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'order_wrap_div_start' ), 99 );
 
 
 
 
572
 
573
- add_action( 'woocommerce_checkout_after_order_review', array( $this, 'order_wrap_div_end' ), 99 );
 
 
574
 
575
- // Outputting the hidden field in checkout page.
576
- add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
577
- add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
 
 
 
578
 
579
- remove_all_actions( 'woocommerce_checkout_billing' );
580
- remove_all_actions( 'woocommerce_checkout_shipping' );
581
 
582
- // Hook in actions once.
583
- add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
584
- add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
585
 
586
- remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
 
587
 
588
- add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
 
 
589
 
590
- add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
591
 
592
- add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
593
 
594
- add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
595
 
596
- global $post;
597
 
598
- if ( _is_wcf_checkout_type() ) {
599
- $checkout_id = $post->ID;
600
- } else {
601
- $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
602
- }
603
 
604
- do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
605
- }
606
  }
607
 
608
  /**
@@ -646,9 +715,15 @@ class Cartflows_Checkout_Markup {
646
 
647
  do_action( 'cartflows_checkout_scripts' );
648
 
649
- $style = $this->generate_style();
 
 
 
 
 
 
650
 
651
- wp_add_inline_style( 'wcf-checkout-template', $style );
652
 
653
  }
654
 
@@ -1155,25 +1230,6 @@ class Cartflows_Checkout_Markup {
1155
  return $fields;
1156
  }
1157
 
1158
- /**
1159
- * Add opening dev
1160
- *
1161
- * @since 1.0.0
1162
- */
1163
- public function order_wrap_div_start() {
1164
-
1165
- echo "<div class='wcf-order-wrap'> ";
1166
- }
1167
-
1168
- /**
1169
- * Add closing dev
1170
- *
1171
- * @since 1.0.0
1172
- */
1173
- public function order_wrap_div_end() {
1174
-
1175
- echo '</div> ';
1176
- }
1177
  /**
1178
  * Remove coupon.
1179
  */
81
  add_filter( 'woocommerce_cart_item_name', array( $this, 'wcf_add_remove_label' ), 10, 3 );
82
 
83
  add_action( 'woocommerce_before_calculate_totals', array( $this, 'custom_price_to_cart_item' ), 9999 );
84
+
85
+ add_action( 'init', array( $this, 'update_woo_actions_ajax' ), 10 );
86
+
87
+ $this->elementor_editor_compatibility();
88
+ }
89
+
90
+ /**
91
+ * Remove login and registration actions.
92
+ */
93
+ public function update_woo_actions_ajax() {
94
+
95
+ add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'after_the_order_review_ajax_call' ) );
96
+ }
97
+
98
+ /**
99
+ * Call the actions after order review ajax call.
100
+ *
101
+ * @param string $post_data post data woo.
102
+ */
103
+ public function after_the_order_review_ajax_call( $post_data ) {
104
+
105
+ if ( isset( $post_data['_wcf_checkout_id'] ) ) { // phpcs:ignore
106
+ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
107
+ }
108
  }
109
 
110
  /**
128
  return $args;
129
  }
130
 
131
+ /**
132
+ * Elementor editor compatibility.
133
+ */
134
+ public function elementor_editor_compatibility() {
135
+
136
+ /* Add data */
137
+
138
+ add_action(
139
+ 'cartflows_elementor_editor_compatibility',
140
+ function( $post_id, $elementor_ajax ) {
141
+
142
+ add_action( 'cartflows_elementor_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
143
+ },
144
+ 10,
145
+ 2
146
+ );
147
+ }
148
+
149
  /**
150
  * Change PayPal Express cancel URL.
151
  *
211
  /**
212
  * Change order button text .
213
  *
214
+ * @param string $button_text place order.
215
  * @return string
216
  */
217
+ public function place_order_button_text( $button_text ) {
218
 
219
  $checkout_id = get_the_ID();
220
+
221
+ if ( ! $checkout_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] ) ) {
222
+
223
+ $checkout_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_checkout_id'] );
224
  }
225
 
226
+ if ( $checkout_id ) {
227
+
228
+ $wcf_order_button_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-place-order-button-text' );
229
 
230
+ if ( ! empty( $wcf_order_button_text ) ) {
231
+ $button_text = $wcf_order_button_text;
232
+ }
233
  }
234
 
235
+ return $button_text;
236
  }
237
 
238
  /**
391
  return;
392
  }
393
 
394
+ global $post, $wcf_step;
395
 
396
  if ( _is_wcf_checkout_type() || _is_wcf_checkout_shortcode() ) {
397
 
407
 
408
  $global_checkout = intval( Cartflows_Helper::get_common_setting( 'global_checkout' ) );
409
 
410
+ if ( ! empty( $global_checkout ) && ( $global_checkout === $wcf_step->get_control_step() ) ) {
411
 
412
  if ( WC()->cart->is_empty() ) {
413
  wc_add_notice( __( 'Your cart is currently empty.', 'cartflows' ), 'error' );
476
  WC()->cart->empty_cart();
477
 
478
  if ( is_array( $products ) && empty( $products[0]['product'] ) ) {
479
+
480
+ $a_start = '';
481
+ $a_close = '';
482
+
483
+ if ( current_user_can( 'manage_options' ) ) {
484
+
485
+ $a_start = '<a href="' . Cartflows_Helper::get_current_page_edit_url( 'select-product' ) . '" target="_blank">';
486
+ $a_close = '</a>';
487
+ }
488
+
489
+ wc_add_notice(
490
+ sprintf(
491
+ /* translators: %1$1s, %2$2s Link to meta */
492
+ __( 'No product is selected. Please select products from the %1$1scheckout meta settings%2$2s to continue.', 'cartflows' ),
493
+ $a_start,
494
+ $a_close
495
+ ),
496
+ 'error'
497
+ );
498
  return;
499
  }
500
 
597
  } else {
598
  $wrong_product_notice = __( 'This product can\'t be purchased', 'cartflows' );
599
  wc_add_notice( $wrong_product_notice );
 
 
 
600
  }
601
  }
602
  $products_new[ $index ] = array(
627
 
628
  add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
629
 
630
+ $this->before_checkout_shortcode_actions();
631
+
632
+ global $post;
633
 
634
+ if ( _is_wcf_checkout_type() ) {
635
+ $checkout_id = $post->ID;
636
+ } else {
637
+ $checkout_id = _get_wcf_checkout_id_from_shortcode( $post->post_content );
638
+ }
639
 
640
+ do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
641
+ }
642
+ }
643
 
644
+ /**
645
+ * Render checkout ID hidden field.
646
+ *
647
+ * @return void
648
+ */
649
+ public function before_checkout_shortcode_actions() {
650
 
651
+ /* Show notices if cart has errors */
652
+ add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
653
 
654
+ // Outputting the hidden field in checkout page.
655
+ add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
656
+ add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
657
 
658
+ remove_all_actions( 'woocommerce_checkout_billing' );
659
+ remove_all_actions( 'woocommerce_checkout_shipping' );
660
 
661
+ // Hook in actions once.
662
+ add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
663
+ add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
664
 
665
+ remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form' );
666
 
667
+ add_action( 'woocommerce_checkout_order_review', array( $this, 'display_custom_coupon_field' ) );
668
 
669
+ add_filter( 'woocommerce_checkout_fields', array( $this, 'add_three_column_layout_fields' ) );
670
 
671
+ add_filter( 'woocommerce_cart_totals_coupon_html', array( $this, 'remove_coupon_text' ) );
672
 
673
+ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
 
 
 
 
674
 
 
 
675
  }
676
 
677
  /**
715
 
716
  do_action( 'cartflows_checkout_scripts' );
717
 
718
+ $checkout_dynamic_css = apply_filters( 'cartflows_checkout_enable_dynamic_css', true );
719
+
720
+ if ( $checkout_dynamic_css ) {
721
+
722
+ $style = $this->generate_style();
723
+
724
+ wp_add_inline_style( 'wcf-checkout-template', $style );
725
 
726
+ }
727
 
728
  }
729
 
1230
  return $fields;
1231
  }
1232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1233
  /**
1234
  * Remove coupon.
1235
  */
modules/checkout/classes/class-cartflows-checkout-meta.php CHANGED
@@ -1,959 +1,619 @@
1
- <?php
2
- /**
3
- * Checkout post meta
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Meta Boxes setup
10
- */
11
- class Cartflows_Checkout_Meta extends Cartflows_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 = null;
27
-
28
- /**
29
- * Initiator
30
- */
31
- public static function get_instance() {
32
- if ( ! isset( self::$instance ) ) {
33
- self::$instance = new self();
34
- }
35
-
36
- return self::$instance;
37
- }
38
-
39
- /**
40
- * Constructor
41
- */
42
- public function __construct() {
43
-
44
- /* Init Metabox */
45
- add_action( 'load-post.php', array( $this, 'init_metabox' ) );
46
- add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
47
- }
48
- /**
49
- * Init Metabox
50
- */
51
- public function init_metabox() {
52
-
53
- add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
54
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
55
- }
56
-
57
- /**
58
- * Setup Metabox
59
- */
60
- public function setup_meta_box() {
61
-
62
- if ( _is_wcf_checkout_type() ) {
63
- add_meta_box(
64
- 'wcf-checkout-settings', // Id.
65
- __( 'Checkout Layout', 'cartflows' ), // Title.
66
- array( $this, 'markup_meta_box' ), // Callback.
67
- wcf()->utils->get_step_post_type(), // Post_type.
68
- 'normal', // Context.
69
- 'high' // Priority.
70
- );
71
- }
72
- }
73
-
74
- /**
75
- * Metabox Markup
76
- *
77
- * @param object $post Post object.
78
- * @return void
79
- */
80
- public function markup_meta_box( $post ) {
81
-
82
- wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
83
-
84
- $stored = get_post_meta( $post->ID );
85
-
86
- $checkout_meta = self::get_meta_option( $post->ID );
87
-
88
- // Set stored and override defaults.
89
- foreach ( $stored as $key => $value ) {
90
- if ( array_key_exists( $key, $checkout_meta ) ) {
91
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
92
- } else {
93
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
94
- }
95
- }
96
-
97
- // Get defaults.
98
- $meta = self::get_meta_option( $post->ID );
99
- $checkout_data = array();
100
-
101
- foreach ( $meta as $key => $value ) {
102
- $checkout_data[ $key ] = $meta[ $key ]['default'];
103
- }
104
-
105
- /**
106
- $billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post->ID );
107
-
108
- // For loop
109
- foreach ( $billing_fields as $key => $value ) {
110
-
111
- $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
112
- }
113
-
114
- $shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post->ID );
115
-
116
- foreach ( $shipping_fields as $key => $value ) {
117
-
118
- $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
119
- }
120
-
121
- $additional_fields = Cartflows_Helper::get_checkout_fields( 'additional', $post->ID );
122
-
123
- foreach ( $additional_fields as $key => $value ) {
124
-
125
- $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
126
- }
127
- */
128
-
129
- do_action( 'wcf_checkout_settings_markup_before' );
130
- $this->tabs_markup( $checkout_data, $post->ID );
131
- do_action( 'wcf_checkout_settings_markup_after' );
132
- }
133
-
134
- /**
135
- * Page Header Tabs
136
- *
137
- * @param array $options options.
138
- * @param int $post_id post ID.
139
- */
140
- public function tabs_markup( $options, $post_id ) {
141
-
142
- $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
143
-
144
- if ( empty( $active_tab ) ) {
145
- $active_tab = 'wcf-checkout-shortcodes';
146
- }
147
-
148
- $tab_array = array(
149
- array(
150
- 'title' => __( 'Shortcodes', 'cartflows' ),
151
- 'id' => 'wcf-checkout-shortcodes',
152
- 'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
153
- 'icon' => 'dashicons-editor-code',
154
- ),
155
- array(
156
- 'title' => __( 'Select Product', 'cartflows' ),
157
- 'id' => 'wcf-checkout-general',
158
- 'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
159
- 'icon' => 'dashicons-info',
160
- ),
161
- array(
162
- 'title' => __( 'Product Options', 'cartflows' ),
163
- 'id' => 'wcf-product-options',
164
- 'class' => 'wcf-product-options' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
165
- 'icon' => 'dashicons dashicons-screenoptions',
166
- ),
167
- array(
168
- 'title' => __( 'Order Bump', 'cartflows' ),
169
- 'id' => 'wcf-product-order-bump',
170
- 'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
171
- 'icon' => 'dashicons-cart',
172
- ),
173
- array(
174
- 'title' => __( 'Checkout Offer', 'cartflows' ),
175
- 'id' => 'wcf-pre-checkout-offer',
176
- 'class' => 'wcf-pre-checkout-offer' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
177
- 'icon' => 'dashicons-arrow-up-alt',
178
- ),
179
- array(
180
- 'title' => __( 'Checkout Design', 'cartflows' ),
181
- 'id' => 'wcf-checkout-style',
182
- 'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
183
- 'icon' => 'dashicons-admin-customizer',
184
- ),
185
- array(
186
- 'title' => __( 'Checkout Fields', 'cartflows' ),
187
- 'id' => 'wcf-checkout-custom-fields',
188
- 'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
189
- 'icon' => 'dashicons-welcome-widgets-menus',
190
- ),
191
- array(
192
- 'title' => __( 'Checkout Settings', 'cartflows' ),
193
- 'id' => 'wcf-checkout-custom-settings',
194
- 'class' => 'wcf-checkout-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
195
- 'icon' => 'dashicons-admin-generic',
196
- ),
197
- array(
198
- 'title' => __( 'Custom Script', 'cartflows' ),
199
- 'id' => 'wcf-checkout-custom-script-header',
200
- 'class' => 'wcf-checkout-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
201
- 'icon' => 'dashicons-format-aside',
202
- ),
203
- );
204
-
205
- $show_logo = filter_input( INPUT_GET, 'logo-tab', FILTER_VALIDATE_BOOLEAN );
206
-
207
- if ( $show_logo ) {
208
- $logo_tab = array(
209
- 'title' => __( 'Logo (Optional)', 'cartflows' ),
210
- 'id' => 'wcf-checkout-header',
211
- 'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
212
- 'icon' => 'dashicons-format-image',
213
- );
214
- array_push( $tab_array, $logo_tab );
215
- }
216
-
217
- $tabs = apply_filters( 'cartflows_checkout_tabs', $tab_array, $active_tab );
218
-
219
- ?>
220
- <div class="wcf-checkout-table wcf-metabox-wrap widefat">
221
- <div class="wcf-table-container">
222
- <div class="wcf-column-left">
223
- <div class="wcf-tab-wrapper">
224
-
225
- <?php foreach ( $tabs as $key => $tab ) { ?>
226
- <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
227
- <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
228
- <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
229
- </div>
230
- <?php } ?>
231
-
232
- <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
233
- </div>
234
- </div>
235
- <div class="wcf-column-right">
236
- <?php $this->tab_shortcodes( $options, $post_id ); ?>
237
- <?php $this->tab_general( $options, $post_id ); ?>
238
- <?php $this->tab_product_options( $options, $post_id ); ?>
239
- <?php $this->tab_style( $options, $post_id ); ?>
240
- <?php $this->tab_pre_checkout_offer( $options, $post_id ); ?>
241
- <?php $this->tab_product_bump( $options, $post_id ); ?>
242
- <?php $this->tab_custom_fields( $options, $post_id ); ?>
243
- <?php $this->tab_custom_settings( $options, $post_id ); ?>
244
- <?php $this->tab_header_content( $options, $post_id ); ?>
245
- <?php $this->tab_custom_script( $options, $post_id ); ?>
246
- <?php do_action( 'cartflows_checkout_tabs_content', $options, $post_id ); ?>
247
- <?php $this->right_column_footer( $options, $post_id ); ?>
248
- </div>
249
- </div>
250
- </div>
251
-
252
- <?php
253
- }
254
-
255
- /**
256
- * Product options tab.
257
- *
258
- * @param array $options options.
259
- * @param int $post_id post ID.
260
- */
261
- public function tab_product_options( $options, $post_id ) {
262
- ?>
263
- <div class="wcf-product-options wcf-tab-content widefat">
264
- <?php
265
- if ( ! _is_cartflows_pro() ) {
266
- echo wcf()->meta->get_description_field(
267
- array(
268
- 'name' => 'wcf-upgrade-to-pro',
269
- /* translators: %s: link */
270
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Product Options feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
271
- )
272
- );
273
- } elseif ( _is_cartflows_pro() && _is_cartflows_pro_ver_less_than( '1.5.4' ) ) {
274
- $version = '1.5.4';
275
- $file_path = 'cartflows-pro/cartflows-pro.php';
276
- $upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
277
- echo wcf()->meta->get_description_field(
278
- array(
279
- 'name' => 'wcf-upgrade-to-pro',
280
- // translators: %s: link.
281
- 'content' => '<i>' . sprintf( esc_html__( 'Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options', 'cartflows' ), '<a href="' . $upgrade_link . '" target="_blank">', '</a>', $version ) . '</i>',
282
- )
283
- );
284
- }
285
-
286
- do_action( 'cartflows_product_options_tab_content', $options, $post_id );
287
- ?>
288
- </div>
289
- <?php
290
- }
291
-
292
- /**
293
- * Shortcodes tab
294
- *
295
- * @param array $options options.
296
- * @param int $post_id post ID.
297
- */
298
- public function tab_shortcodes( $options, $post_id ) {
299
- ?>
300
- <div class="wcf-checkout-shortcodes wcf-tab-content widefat">
301
-
302
- <?php
303
-
304
- echo wcf()->meta->get_shortcode_field(
305
- array(
306
- 'label' => 'Checkout Page',
307
- 'name' => 'wcf-checkout-shortcode',
308
- 'content' => '[cartflows_checkout]',
309
- 'help' => esc_html__( 'Add this shortcode to your checkout page', 'cartflows' ),
310
- )
311
- );
312
- ?>
313
- </div>
314
- <?php
315
- }
316
-
317
-
318
- /**
319
- * General tab
320
- *
321
- * @param array $options options.
322
- * @param int $post_id post ID.
323
- */
324
- public function tab_general( $options, $post_id ) {
325
- ?>
326
- <div class="wcf-checkout-general wcf-tab-content widefat">
327
-
328
- <?php
329
-
330
- echo wcf()->meta->get_product_selection_repeater(
331
- array(
332
- 'name' => 'wcf-checkout-products',
333
- 'value' => $options['wcf-checkout-products'],
334
- 'allow_clear' => true,
335
- )
336
- );
337
-
338
- if ( ! _is_cartflows_pro() ) {
339
-
340
- echo wcf()->meta->get_hr_line_field( array() );
341
- echo wcf()->meta->get_description_field(
342
- array(
343
- 'name' => 'wcf-upgrade-to-pro',
344
- /* translators: %s: link */
345
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
346
- )
347
- );
348
- }
349
-
350
- do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
351
-
352
- ?>
353
- </div>
354
- <?php
355
- }
356
-
357
- /**
358
- * Pre Checkout tab
359
- *
360
- * @param array $options options.
361
- * @param int $post_id post ID.
362
- */
363
- public function tab_pre_checkout_offer( $options, $post_id ) {
364
- ?>
365
- <div class="wcf-pre-checkout-offer wcf-tab-content widefat">
366
- <?php
367
- if ( ! _is_cartflows_pro() ) {
368
- echo wcf()->meta->get_description_field(
369
- array(
370
- 'name' => 'wcf-upgrade-to-pro',
371
- /* translators: %s: link */
372
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
373
- )
374
- );
375
- } elseif ( _is_cartflows_pro_ver_less_than( '1.2.0' ) ) {
376
-
377
- $version = '1.2.0';
378
- echo wcf()->meta->get_description_field(
379
- array(
380
- 'name' => 'wcf-upgrade-to-pro',
381
- /* translators: %s: link */
382
- 'content' => '<i>' . sprintf( esc_html__( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
383
- )
384
- );
385
- }
386
- ?>
387
-
388
- <?php do_action( 'cartflows_pre_checkout_offer_tab_content', $options, $post_id ); ?>
389
- </div>
390
- <?php
391
- }
392
-
393
-
394
- /**
395
- * Pre Checkout tab
396
- *
397
- * @param array $options options.
398
- * @param int $post_id post ID.
399
- */
400
- public function animate_title_settings( $options, $post_id ) {
401
-
402
- echo wcf()->meta->get_hr_line_field( array() );
403
-
404
- if ( ! _is_cartflows_pro() ) {
405
- echo wcf()->meta->get_description_field(
406
- array(
407
- 'name' => 'wcf-upgrade-to-pro',
408
- /* translators: %s: link */
409
- 'content' => '<i>' . sprintf( __( 'Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
410
- )
411
- );
412
- } elseif ( _is_cartflows_pro_ver_less_than( '1.4.0' ) ) {
413
-
414
- $version = '1.4.0';
415
- echo wcf()->meta->get_description_field(
416
- array(
417
- 'name' => 'wcf-upgrade-to-pro',
418
- /* translators: %s: link */
419
- 'content' => '<i>' . sprintf( __( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
420
- )
421
- );
422
- }
423
-
424
- do_action( 'cartflows_animate_browser_tab_settings', $options, $post_id );
425
- }
426
-
427
- /**
428
- * Product bump tab
429
- *
430
- * @param array $options options.
431
- * @param int $post_id post ID.
432
- */
433
- public function tab_product_bump( $options, $post_id ) {
434
- ?>
435
- <div class="wcf-product-order-bump wcf-tab-content widefat">
436
- <?php
437
- if ( ! _is_cartflows_pro() ) {
438
- echo wcf()->meta->get_description_field(
439
- array(
440
- 'name' => 'wcf-upgrade-to-pro',
441
- /* translators: %s: link */
442
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
443
- )
444
- );
445
- }
446
- ?>
447
-
448
- <?php do_action( 'cartflows_order_bump_tab_content', $options, $post_id ); ?>
449
- </div>
450
- <?php
451
- }
452
- /**
453
- * Tab custom fields
454
- *
455
- * @param array $options options.
456
- * @param int $post_id post ID.
457
- */
458
- public function tab_custom_fields( $options, $post_id ) {
459
- ?>
460
- <div class="wcf-checkout-custom-fields wcf-tab-content widefat">
461
- <?php
462
- /* Custom Checkout Fields Section */
463
-
464
- if ( ! _is_cartflows_pro() ) {
465
- echo wcf()->meta->get_description_field(
466
- array(
467
- 'name' => 'wcf-upgrade-to-pro',
468
- /* translators: %s: link */
469
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
470
- )
471
- );
472
- }
473
- ?>
474
- <?php do_action( 'cartflows_custom_fields_tab_content', $options, $post_id ); ?>
475
- </div>
476
- <?php
477
- }
478
- /**
479
- * Tab custom settings
480
- *
481
- * @param array $options options.
482
- * @param int $post_id post ID.
483
- */
484
- public function tab_custom_settings( $options, $post_id ) {
485
- ?>
486
- <div class="wcf-checkout-custom-settings wcf-tab-content widefat">
487
- <div class="wcf-custom-settings-fields">
488
- <?php
489
-
490
- echo wcf()->meta->get_text_field(
491
- array(
492
- 'label' => __( 'Place Order Button Text', 'cartflows' ),
493
- 'name' => 'wcf-checkout-place-order-button-text',
494
- 'value' => $options['wcf-checkout-place-order-button-text'],
495
- 'attr' => array(
496
- 'placeholder' => __( 'Place order', 'cartflows' ),
497
- ),
498
- 'help' => __( 'It will change the Place Order Button text on checkout page.', 'cartflows' ),
499
- )
500
- );
501
-
502
- echo wcf()->meta->get_hr_line_field( array() );
503
-
504
- echo wcf()->meta->get_checkbox_field(
505
- array(
506
- 'name' => 'wcf-remove-product-field',
507
- 'value' => $options['wcf-remove-product-field'],
508
- 'after' => esc_html__( 'Enable cart editing on checkout', 'cartflows' ),
509
- )
510
- );
511
-
512
- echo wcf()->meta->get_description_field(
513
- array(
514
- 'name' => '',
515
- /* translators: %s: link */
516
- 'content' => '<i>' . sprintf( esc_html__( 'Users will able to remove products from the checkout page.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
517
- )
518
- );
519
-
520
- $this->animate_title_settings( $options, $post_id );
521
- ?>
522
- </div>
523
- <?php do_action( 'cartflows_custom_settings_tab_content', $options, $post_id ); ?>
524
- </div>
525
- <?php
526
- }
527
-
528
- /**
529
- * Tab style
530
- *
531
- * @param array $options options.
532
- * @param int $post_id post ID.
533
- */
534
- public function tab_style( $options, $post_id ) {
535
- ?>
536
-
537
- <div class="wcf-checkout-style wcf-tab-content widefat">
538
- <div class="wcf-cs-fields">
539
- <div class="wcf-cs-checkbox-field">
540
- <?php
541
-
542
- $layout_pro_option = array();
543
-
544
- if ( ! _is_cartflows_pro() ) {
545
- $layout_pro_option = array(
546
- 'one-column' => __( 'One Column (Available in CartFlows Pro) ', 'cartflows' ),
547
- 'two-step' => __( 'Two Step (Available in CartFlows Pro) ', 'cartflows' ),
548
- );
549
- }
550
-
551
- echo wcf()->meta->get_select_field(
552
- array(
553
- 'label' => __( 'Checkout Skin', 'cartflows' ),
554
- 'name' => 'wcf-checkout-layout',
555
- 'value' => $options['wcf-checkout-layout'],
556
- 'options' => array(
557
- 'one-column' => esc_html__( 'One Column', 'cartflows' ),
558
- 'two-column' => esc_html__( 'Two Column', 'cartflows' ),
559
- 'two-step' => esc_html__( 'Two Step', 'cartflows' ),
560
- ),
561
- 'pro-options' => $layout_pro_option,
562
-
563
- )
564
- );
565
-
566
- echo wcf()->meta->get_color_picker_field(
567
- array(
568
- 'label' => __( 'Primary Color', 'cartflows' ),
569
- 'name' => 'wcf-primary-color',
570
- 'value' => $options['wcf-primary-color'],
571
- )
572
- );
573
-
574
- echo wcf()->meta->get_font_family_field(
575
- array(
576
- 'for' => 'wcf-base',
577
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
578
- 'name' => 'wcf-base-font-family',
579
- 'value' => $options['wcf-base-font-family'],
580
- )
581
- );
582
-
583
- echo wcf()->meta->get_checkbox_field(
584
- array(
585
- 'label' => __( 'Advance Options', 'cartflows' ),
586
- 'name' => 'wcf-advance-options-fields',
587
- 'value' => $options['wcf-advance-options-fields'],
588
- 'after' => 'Enable',
589
- )
590
- );
591
- ?>
592
- </div>
593
- <div class="wcf-cs-fields-options">
594
- <?php
595
- echo wcf()->meta->get_section(
596
- array(
597
- 'label' => __( 'Heading', 'cartflows' ),
598
- )
599
- );
600
-
601
- echo wcf()->meta->get_color_picker_field(
602
- array(
603
- 'label' => __( 'Heading Color', 'cartflows' ),
604
- 'name' => 'wcf-heading-color',
605
- 'value' => $options['wcf-heading-color'],
606
- )
607
- );
608
-
609
- echo wcf()->meta->get_font_family_field(
610
- array(
611
- 'for' => 'wcf-heading',
612
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
613
- 'name' => 'wcf-heading-font-family',
614
- 'value' => $options['wcf-heading-font-family'],
615
- )
616
- );
617
-
618
- echo wcf()->meta->get_font_weight_field(
619
- array(
620
- 'for' => 'wcf-heading',
621
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
622
- 'name' => 'wcf-heading-font-weight',
623
- 'value' => $options['wcf-heading-font-weight'],
624
- )
625
- );
626
-
627
- echo wcf()->meta->get_section(
628
- array(
629
- 'label' => __( 'Input Fields', 'cartflows' ),
630
- )
631
- );
632
-
633
- $fields_skin_pro_option = array();
634
-
635
- if ( ! _is_cartflows_pro() ) {
636
- $fields_skin_pro_option = array(
637
- 'style-one' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
638
- );
639
- }
640
-
641
- echo wcf()->meta->get_select_field(
642
- array(
643
- 'label' => __( 'Style', 'cartflows' ),
644
- 'name' => 'wcf-fields-skins',
645
- 'value' => $options['wcf-fields-skins'],
646
- 'options' => array(
647
- 'default' => esc_html__( 'Default', 'cartflows' ),
648
- 'style-one' => esc_html__( 'Floating Labels', 'cartflows' ),
649
- ),
650
- 'pro-options' => $fields_skin_pro_option,
651
-
652
- )
653
- );
654
-
655
- echo wcf()->meta->get_font_family_field(
656
- array(
657
- 'for' => 'wcf-input',
658
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
659
- 'name' => 'wcf-input-font-family',
660
- 'value' => $options['wcf-input-font-family'],
661
- )
662
- );
663
-
664
- echo wcf()->meta->get_font_weight_field(
665
- array(
666
- 'for' => 'wcf-input',
667
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
668
- 'name' => 'wcf-input-font-weight',
669
- 'value' => $options['wcf-input-font-weight'],
670
- )
671
- );
672
-
673
- echo wcf()->meta->get_select_field(
674
- array(
675
- 'label' => __( 'Size', 'cartflows' ),
676
- 'name' => 'wcf-input-field-size',
677
- 'value' => $options['wcf-input-field-size'],
678
- 'options' => array(
679
- '33px' => esc_html__( 'Extra Small', 'cartflows' ),
680
- '38px' => esc_html__( 'Small', 'cartflows' ),
681
- '44px' => esc_html__( 'Medium', 'cartflows' ),
682
- '58px' => esc_html__( 'Large', 'cartflows' ),
683
- '68px' => esc_html__( 'Extra Large', 'cartflows' ),
684
- 'custom' => esc_html__( 'Custom', 'cartflows' ),
685
- ),
686
- )
687
- );
688
-
689
- echo wcf()->meta->get_number_field(
690
- array(
691
- 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
692
- 'name' => 'wcf-field-tb-padding',
693
- 'value' => $options['wcf-field-tb-padding'],
694
- )
695
- );
696
-
697
- echo wcf()->meta->get_number_field(
698
- array(
699
- 'label' => __( 'Left Right Spacing', 'cartflows' ),
700
- 'name' => 'wcf-field-lr-padding',
701
- 'value' => $options['wcf-field-lr-padding'],
702
- )
703
- );
704
-
705
- echo wcf()->meta->get_color_picker_field(
706
- array(
707
- 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
708
- 'name' => 'wcf-field-color',
709
- 'value' => $options['wcf-field-color'],
710
- )
711
- );
712
-
713
- echo wcf()->meta->get_color_picker_field(
714
- array(
715
- 'label' => __( 'Background Color', 'cartflows' ),
716
- 'name' => 'wcf-field-bg-color',
717
- 'value' => $options['wcf-field-bg-color'],
718
- )
719
- );
720
-
721
- echo wcf()->meta->get_color_picker_field(
722
- array(
723
- 'label' => __( 'Border Color', 'cartflows' ),
724
- 'name' => 'wcf-field-border-color',
725
- 'value' => $options['wcf-field-border-color'],
726
- )
727
- );
728
- echo wcf()->meta->get_color_picker_field(
729
- array(
730
- 'label' => __( 'Label Color', 'cartflows' ),
731
- 'name' => 'wcf-field-label-color',
732
- 'value' => $options['wcf-field-label-color'],
733
- )
734
- );
735
-
736
- ?>
737
- </div>
738
- <div class="wcf-cs-button-options">
739
- <?php
740
-
741
- echo wcf()->meta->get_section(
742
- array(
743
- 'label' => __( 'Buttons', 'cartflows' ),
744
- )
745
- );
746
-
747
- echo wcf()->meta->get_font_family_field(
748
- array(
749
- 'for' => 'wcf-button',
750
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
751
- 'name' => 'wcf-button-font-family',
752
- 'value' => $options['wcf-button-font-family'],
753
- )
754
- );
755
-
756
- echo wcf()->meta->get_font_weight_field(
757
- array(
758
- 'for' => 'wcf-button',
759
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
760
- 'name' => 'wcf-button-font-weight',
761
- 'value' => $options['wcf-button-font-weight'],
762
- )
763
- );
764
-
765
- echo wcf()->meta->get_select_field(
766
- array(
767
- 'label' => __( 'Size', 'cartflows' ),
768
- 'name' => 'wcf-input-button-size',
769
- 'value' => $options['wcf-input-button-size'],
770
- 'options' => array(
771
- '33px' => esc_html__( 'Extra Small', 'cartflows' ),
772
- '38px' => esc_html__( 'Small', 'cartflows' ),
773
- '44px' => esc_html__( 'Medium', 'cartflows' ),
774
- '58px' => esc_html__( 'Large', 'cartflows' ),
775
- '68px' => esc_html__( 'Extra Large', 'cartflows' ),
776
- 'custom' => esc_html__( 'Custom', 'cartflows' ),
777
- ),
778
- )
779
- );
780
-
781
- echo wcf()->meta->get_number_field(
782
- array(
783
- 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
784
- 'name' => 'wcf-submit-tb-padding',
785
- 'value' => $options['wcf-submit-tb-padding'],
786
- )
787
- );
788
-
789
- echo wcf()->meta->get_number_field(
790
- array(
791
- 'label' => __( 'Left Right Spacing', 'cartflows' ),
792
- 'name' => 'wcf-submit-lr-padding',
793
- 'value' => $options['wcf-submit-lr-padding'],
794
- )
795
- );
796
-
797
- echo wcf()->meta->get_color_picker_field(
798
- array(
799
- 'label' => __( 'Text Color', 'cartflows' ),
800
- 'name' => 'wcf-submit-color',
801
- 'value' => $options['wcf-submit-color'],
802
- )
803
- );
804
-
805
- echo wcf()->meta->get_color_picker_field(
806
- array(
807
- 'label' => __( 'Text Hover Color', 'cartflows' ),
808
- 'name' => 'wcf-submit-hover-color',
809
- 'value' => $options['wcf-submit-hover-color'],
810
- )
811
- );
812
-
813
- echo wcf()->meta->get_color_picker_field(
814
- array(
815
- 'label' => __( 'Background Color', 'cartflows' ),
816
- 'name' => 'wcf-submit-bg-color',
817
- 'value' => $options['wcf-submit-bg-color'],
818
- )
819
- );
820
-
821
- echo wcf()->meta->get_color_picker_field(
822
- array(
823
- 'label' => __( 'Background Hover Color', 'cartflows' ),
824
- 'name' => 'wcf-submit-bg-hover-color',
825
- 'value' => $options['wcf-submit-bg-hover-color'],
826
- )
827
- );
828
-
829
- echo wcf()->meta->get_color_picker_field(
830
- array(
831
- 'label' => __( 'Border Color', 'cartflows' ),
832
- 'name' => 'wcf-submit-border-color',
833
- 'value' => $options['wcf-submit-border-color'],
834
- )
835
- );
836
-
837
- echo wcf()->meta->get_color_picker_field(
838
- array(
839
- 'label' => __( 'Border Hover Color', 'cartflows' ),
840
- 'name' => 'wcf-submit-border-hover-color',
841
- 'value' => $options['wcf-submit-border-hover-color'],
842
- )
843
- );
844
-
845
- ?>
846
- </div>
847
- <div class="wcf-cs-section-options">
848
- <?php
849
-
850
- echo wcf()->meta->get_section(
851
- array(
852
- 'label' => __( 'Sections', 'cartflows' ),
853
- )
854
- );
855
-
856
- echo wcf()->meta->get_color_picker_field(
857
- array(
858
- 'label' => __( 'Highlight Area Background Color', 'cartflows' ),
859
- 'name' => 'wcf-hl-bg-color',
860
- 'value' => $options['wcf-hl-bg-color'],
861
- )
862
- );
863
-
864
- echo wcf()->meta->get_hidden_field(
865
- array(
866
- 'name' => 'wcf-field-google-font-url',
867
- 'value' => $options['wcf-field-google-font-url'],
868
- )
869
- );
870
- ?>
871
- </div>
872
- <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
873
- </div>
874
- </div>
875
- <?php
876
- }
877
-
878
-
879
- /**
880
- * Tab Header (Used for add logo into header)
881
- *
882
- * @param array $options options.
883
- * @param int $post_id post ID.
884
- */
885
- public function tab_header_content( $options, $post_id ) {
886
- ?>
887
-
888
- <div class="wcf-checkout-header wcf-tab-content widefat">
889
- <?php
890
-
891
- $layout_pro_option = array();
892
-
893
- echo wcf()->meta->get_image_field(
894
- array(
895
- 'name' => 'wcf-header-logo-image',
896
- 'value' => $options['wcf-header-logo-image'],
897
- 'label' => esc_html__( 'Header Logo', 'cartflows' ),
898
- )
899
- );
900
-
901
- echo wcf()->meta->get_number_field(
902
- array(
903
- 'name' => 'wcf-header-logo-width',
904
- 'value' => $options['wcf-header-logo-width'],
905
- 'label' => esc_html__( 'Logo Width (In px)', 'cartflows' ),
906
- )
907
- );
908
- ?>
909
- <?php do_action( 'cartflows_checkout_header_tab_content', $options, $post_id ); ?>
910
- </div>
911
- <?php
912
- }
913
- /**
914
- * Get metabox options
915
- *
916
- * @param int $post_id post ID.
917
- */
918
- public static function get_meta_option( $post_id ) {
919
-
920
- if ( null === self::$meta_option ) {
921
-
922
- /**
923
- * Set metabox options
924
- *
925
- * @see http://php.net/manual/en/filter.filters.sanitize.php
926
- */
927
- self::$meta_option = wcf()->options->get_checkout_fields( $post_id );
928
- }
929
-
930
- return self::$meta_option;
931
- }
932
-
933
- /**
934
- * Metabox Save
935
- *
936
- * @param number $post_id Post ID.
937
- * @return void
938
- */
939
- public function save_meta_box( $post_id ) {
940
-
941
- // Checks save status.
942
- $is_autosave = wp_is_post_autosave( $post_id );
943
- $is_revision = wp_is_post_revision( $post_id );
944
-
945
- $is_valid_nonce = ( isset( $_POST['nonce-checkout-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-checkout-step-meta'] ) ), 'save-nonce-checkout-step-meta' ) ) ? true : false;
946
-
947
- // Exits script depending on save status.
948
- if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
949
- return;
950
- }
951
-
952
- wcf()->options->save_checkout_fields( $post_id );
953
- }
954
- }
955
-
956
- /**
957
- * Kicking this off by calling 'get_instance()' method
958
- */
959
- Cartflows_Checkout_Meta::get_instance();
1
+ <?php
2
+ /**
3
+ * Checkout post meta
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Checkout_Meta extends Cartflows_Meta {
12
+
13
+ /**
14
+ * Instance
15
+ *
16
+ * @var $instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Meta Option
22
+ *
23
+ * @var $meta_option
24
+ */
25
+ private static $meta_option = null;
26
+
27
+ /**
28
+ * Meta Options map key->value map,
29
+ *
30
+ * @var $meta_option_data
31
+ */
32
+ private static $meta_option_data = array();
33
+
34
+ /**
35
+ * Initiator
36
+ */
37
+ public static function get_instance() {
38
+ if ( ! isset( self::$instance ) ) {
39
+ self::$instance = new self();
40
+ }
41
+
42
+ return self::$instance;
43
+ }
44
+
45
+ /**
46
+ * Constructor
47
+ */
48
+ public function __construct() {
49
+
50
+ /* Init Metabox */
51
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
52
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
53
+ }
54
+ /**
55
+ * Init Metabox
56
+ */
57
+ public function init_metabox() {
58
+
59
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ), 10, 2 );
60
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
61
+ }
62
+
63
+ /**
64
+ * Setup Metabox
65
+ *
66
+ * @param string $post_type post type.
67
+ * @param object $post post object.
68
+ */
69
+ public function setup_meta_box( $post_type, $post ) {
70
+
71
+ if ( _is_wcf_checkout_type() ) {
72
+
73
+ $stored_meta = get_post_meta( $post->ID );
74
+ $checkout_meta = self::get_meta_option( $post->ID );
75
+
76
+ // Set stored and override defaults.
77
+ foreach ( $stored_meta as $key => $value ) {
78
+ if ( array_key_exists( $key, $checkout_meta ) ) {
79
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? maybe_unserialize( $stored_meta[ $key ][0] ) : '';
80
+ } else {
81
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? $stored_meta[ $key ][0] : '';
82
+ }
83
+ }
84
+
85
+ // Get defaults.
86
+ $new_meta = self::get_meta_option( $post->ID );
87
+
88
+ foreach ( $new_meta as $key => $value ) {
89
+ self::$meta_option_data[ $key ] = $new_meta[ $key ]['default'];
90
+ }
91
+
92
+ add_meta_box(
93
+ 'wcf-checkout-settings', // Id.
94
+ __( 'Checkout Settings', 'cartflows' ), // Title.
95
+ array( $this, 'settings_markup_metabox' ), // Callback.
96
+ $post_type, // Post_type.
97
+ 'normal', // Context.
98
+ 'high' // Priority.
99
+ );
100
+
101
+ add_meta_box(
102
+ 'wcf-checkout-design-settings', // Id.
103
+ __( 'Checkout Layout & Design', 'cartflows' ), // Title.
104
+ array( $this, 'design_markup_metabox' ), // Callback.
105
+ $post_type, // Post_type.
106
+ 'normal', // Context.
107
+ 'high' // Priority.
108
+ );
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Metabox Markup
114
+ *
115
+ * @param object $post Post object.
116
+ * @return void
117
+ */
118
+ public function settings_markup_metabox( $post ) {
119
+
120
+ wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
121
+
122
+ do_action( 'wcf_checkout_settings_markup_before' );
123
+ $this->settings_tabs_markup( self::$meta_option_data, $post->ID );
124
+ do_action( 'wcf_checkout_settings_markup_after' );
125
+ }
126
+
127
+ /**
128
+ * Page Header Tabs
129
+ *
130
+ * @param array $options options.
131
+ * @param int $post_id post ID.
132
+ */
133
+ public function settings_tabs_markup( $options, $post_id ) {
134
+
135
+ $active_tab = 'wcf-checkout-general';
136
+
137
+ $tab_array = array(
138
+ array(
139
+ 'title' => __( 'Select Product', 'cartflows' ),
140
+ 'id' => 'wcf-checkout-general',
141
+ 'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
142
+ 'icon' => 'dashicons-info',
143
+ ),
144
+ array(
145
+ 'title' => __( 'Product Options', 'cartflows' ),
146
+ 'id' => 'wcf-product-options',
147
+ 'class' => 'wcf-product-options' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
148
+ 'icon' => 'dashicons dashicons-screenoptions',
149
+ ),
150
+ array(
151
+ 'title' => __( 'Order Bump', 'cartflows' ),
152
+ 'id' => 'wcf-product-order-bump',
153
+ 'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
154
+ 'icon' => 'dashicons-cart',
155
+ ),
156
+ array(
157
+ 'title' => __( 'Checkout Offer', 'cartflows' ),
158
+ 'id' => 'wcf-pre-checkout-offer',
159
+ 'class' => 'wcf-pre-checkout-offer' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
160
+ 'icon' => 'dashicons-arrow-up-alt',
161
+ ),
162
+ array(
163
+ 'title' => __( 'Checkout Fields', 'cartflows' ),
164
+ 'id' => 'wcf-checkout-custom-fields',
165
+ 'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
166
+ 'icon' => 'dashicons-welcome-widgets-menus',
167
+ ),
168
+ array(
169
+ 'title' => __( 'Checkout Settings', 'cartflows' ),
170
+ 'id' => 'wcf-checkout-custom-settings',
171
+ 'class' => 'wcf-checkout-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
172
+ 'icon' => 'dashicons-admin-generic',
173
+ ),
174
+ array(
175
+ 'title' => __( 'Custom Script', 'cartflows' ),
176
+ 'id' => 'wcf-checkout-custom-script-header',
177
+ 'class' => 'wcf-checkout-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
178
+ 'icon' => 'dashicons-format-aside',
179
+ ),
180
+ );
181
+
182
+ $show_logo = filter_input( INPUT_GET, 'logo-tab', FILTER_VALIDATE_BOOLEAN );
183
+
184
+ if ( $show_logo ) {
185
+ $logo_tab = array(
186
+ 'title' => __( 'Logo (Optional)', 'cartflows' ),
187
+ 'id' => 'wcf-checkout-header',
188
+ 'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
189
+ 'icon' => 'dashicons-format-image',
190
+ );
191
+ array_push( $tab_array, $logo_tab );
192
+ }
193
+
194
+ $tabs = apply_filters( 'cartflows_checkout_tabs', $tab_array, $active_tab );
195
+
196
+ ?>
197
+ <div class="wcf-checkout-table wcf-metabox-wrap widefat">
198
+ <div class="wcf-table-container">
199
+ <div class="wcf-column-left">
200
+ <div class="wcf-tab-wrapper">
201
+
202
+ <?php foreach ( $tabs as $key => $tab ) { ?>
203
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
204
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
205
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
206
+ </div>
207
+ <?php } ?>
208
+ </div>
209
+ </div>
210
+ <div class="wcf-column-right">
211
+ <?php $this->tab_general( $options, $post_id ); ?>
212
+ <?php $this->tab_product_options( $options, $post_id ); ?>
213
+ <?php $this->tab_product_bump( $options, $post_id ); ?>
214
+ <?php $this->tab_pre_checkout_offer( $options, $post_id ); ?>
215
+ <?php $this->tab_custom_fields( $options, $post_id ); ?>
216
+ <?php $this->tab_custom_settings( $options, $post_id ); ?>
217
+ <?php $this->tab_header_content( $options, $post_id ); ?>
218
+ <?php $this->tab_custom_script( $options, $post_id ); ?>
219
+ <?php do_action( 'cartflows_checkout_tabs_content', $options, $post_id ); ?>
220
+ <?php $this->right_column_footer( $options, $post_id ); ?>
221
+ </div>
222
+ </div>
223
+ </div>
224
+
225
+ <?php
226
+ }
227
+
228
+ /* Design metabox settings */
229
+
230
+ /**
231
+ * Metabox Markup
232
+ *
233
+ * @param object $post Post object.
234
+ * @return void
235
+ */
236
+ public function design_markup_metabox( $post ) {
237
+
238
+ wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
239
+
240
+ do_action( 'wcf_checkout_design_settings_markup_before' );
241
+ $this->design_tabs_markup( self::$meta_option_data, $post->ID );
242
+ do_action( 'wcf_checkout_design_settings_markup_after' );
243
+ }
244
+
245
+ /**
246
+ * Design settings Tabs
247
+ *
248
+ * @param array $options options.
249
+ * @param int $post_id post ID.
250
+ */
251
+ public function design_tabs_markup( $options, $post_id ) {
252
+
253
+ include CARTFLOWS_CHECKOUT_DIR . 'includes/meta-views/design-checkout-metabox-markup.php';
254
+ }
255
+
256
+ /**
257
+ * Product options tab.
258
+ *
259
+ * @param array $options options.
260
+ * @param int $post_id post ID.
261
+ */
262
+ public function tab_product_options( $options, $post_id ) {
263
+ ?>
264
+ <div class="wcf-product-options wcf-tab-content widefat">
265
+ <?php
266
+ if ( ! _is_cartflows_pro() ) {
267
+ echo wcf()->meta->get_description_field(
268
+ array(
269
+ 'name' => 'wcf-upgrade-to-pro',
270
+ /* translators: %s: link */
271
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Product Options feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
272
+ )
273
+ );
274
+ } elseif ( _is_cartflows_pro() && _is_cartflows_pro_ver_less_than( '1.5.4' ) ) {
275
+ $version = '1.5.4';
276
+ $file_path = 'cartflows-pro/cartflows-pro.php';
277
+ $upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
278
+ echo wcf()->meta->get_description_field(
279
+ array(
280
+ 'name' => 'wcf-upgrade-to-pro',
281
+ // translators: %s: link.
282
+ 'content' => '<i>' . sprintf( esc_html__( 'Update %1$sCartFlows Pro%2$s to %3$s or above for Product Options', 'cartflows' ), '<a href="' . $upgrade_link . '" target="_blank">', '</a>', $version ) . '</i>',
283
+ )
284
+ );
285
+ }
286
+
287
+ do_action( 'cartflows_product_options_tab_content', $options, $post_id );
288
+ ?>
289
+ </div>
290
+ <?php
291
+ }
292
+
293
+ /**
294
+ * Shortcodes tab
295
+ *
296
+ * @param array $options options.
297
+ * @param int $post_id post ID.
298
+ */
299
+ public function design_tab_shortcodes( $options, $post_id ) {
300
+ ?>
301
+ <div class="wcf-checkout-shortcodes wcf-tab-content widefat">
302
+
303
+ <?php
304
+
305
+ echo wcf()->meta->get_shortcode_field(
306
+ array(
307
+ 'label' => 'Checkout Page',
308
+ 'name' => 'wcf-checkout-shortcode',
309
+ 'content' => '[cartflows_checkout]',
310
+ 'help' => esc_html__( 'Add this shortcode to your checkout page', 'cartflows' ),
311
+ )
312
+ );
313
+ ?>
314
+ </div>
315
+ <?php
316
+ }
317
+
318
+ /**
319
+ * General tab
320
+ *
321
+ * @param array $options options.
322
+ * @param int $post_id post ID.
323
+ */
324
+ public function tab_general( $options, $post_id ) {
325
+ ?>
326
+ <div class="wcf-checkout-general wcf-tab-content widefat">
327
+
328
+ <?php
329
+
330
+ echo wcf()->meta->get_product_selection_repeater(
331
+ array(
332
+ 'name' => 'wcf-checkout-products',
333
+ 'value' => $options['wcf-checkout-products'],
334
+ 'allow_clear' => true,
335
+ )
336
+ );
337
+
338
+ if ( ! _is_cartflows_pro() ) {
339
+
340
+ echo wcf()->meta->get_hr_line_field( array() );
341
+ echo wcf()->meta->get_description_field(
342
+ array(
343
+ 'name' => 'wcf-upgrade-to-pro',
344
+ /* translators: %s: link */
345
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Pre-applied Coupon.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
346
+ )
347
+ );
348
+ }
349
+
350
+ do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
351
+
352
+ ?>
353
+ </div>
354
+ <?php
355
+ }
356
+
357
+ /**
358
+ * Pre Checkout tab
359
+ *
360
+ * @param array $options options.
361
+ * @param int $post_id post ID.
362
+ */
363
+ public function tab_pre_checkout_offer( $options, $post_id ) {
364
+ ?>
365
+ <div class="wcf-pre-checkout-offer wcf-tab-content widefat">
366
+ <?php
367
+ if ( ! _is_cartflows_pro() ) {
368
+ echo wcf()->meta->get_description_field(
369
+ array(
370
+ 'name' => 'wcf-upgrade-to-pro',
371
+ /* translators: %s: link */
372
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
373
+ )
374
+ );
375
+ } elseif ( _is_cartflows_pro_ver_less_than( '1.2.0' ) ) {
376
+
377
+ $version = '1.2.0';
378
+ echo wcf()->meta->get_description_field(
379
+ array(
380
+ 'name' => 'wcf-upgrade-to-pro',
381
+ /* translators: %s: link */
382
+ 'content' => '<i>' . sprintf( esc_html__( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for Checkout Offer feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
383
+ )
384
+ );
385
+ }
386
+ ?>
387
+
388
+ <?php do_action( 'cartflows_pre_checkout_offer_tab_content', $options, $post_id ); ?>
389
+ </div>
390
+ <?php
391
+ }
392
+
393
+
394
+ /**
395
+ * Pre Checkout tab
396
+ *
397
+ * @param array $options options.
398
+ * @param int $post_id post ID.
399
+ */
400
+ public function animate_title_settings( $options, $post_id ) {
401
+
402
+ echo wcf()->meta->get_hr_line_field( array() );
403
+
404
+ if ( ! _is_cartflows_pro() ) {
405
+ echo wcf()->meta->get_description_field(
406
+ array(
407
+ 'name' => 'wcf-upgrade-to-pro',
408
+ /* translators: %s: link */
409
+ 'content' => '<i>' . sprintf( __( 'Upgrade to %1$sCartFlows Pro%2$s for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
410
+ )
411
+ );
412
+ } elseif ( _is_cartflows_pro_ver_less_than( '1.4.0' ) ) {
413
+
414
+ $version = '1.4.0';
415
+ echo wcf()->meta->get_description_field(
416
+ array(
417
+ 'name' => 'wcf-upgrade-to-pro',
418
+ /* translators: %s: link */
419
+ 'content' => '<i>' . sprintf( __( 'Update to %1$sCartFlows Pro%2$s to %3$s or above for animate browser tab feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>', $version ) . '</i>',
420
+ )
421
+ );
422
+ }
423
+
424
+ do_action( 'cartflows_animate_browser_tab_settings', $options, $post_id );
425
+ }
426
+
427
+ /**
428
+ * Product bump tab
429
+ *
430
+ * @param array $options options.
431
+ * @param int $post_id post ID.
432
+ */
433
+ public function tab_product_bump( $options, $post_id ) {
434
+ ?>
435
+ <div class="wcf-product-order-bump wcf-tab-content widefat">
436
+ <?php
437
+ if ( ! _is_cartflows_pro() ) {
438
+ echo wcf()->meta->get_description_field(
439
+ array(
440
+ 'name' => 'wcf-upgrade-to-pro',
441
+ /* translators: %s: link */
442
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
443
+ )
444
+ );
445
+ }
446
+ ?>
447
+
448
+ <?php do_action( 'cartflows_order_bump_tab_content', $options, $post_id ); ?>
449
+ </div>
450
+ <?php
451
+ }
452
+ /**
453
+ * Tab custom fields
454
+ *
455
+ * @param array $options options.
456
+ * @param int $post_id post ID.
457
+ */
458
+ public function tab_custom_fields( $options, $post_id ) {
459
+ ?>
460
+ <div class="wcf-checkout-custom-fields wcf-tab-content widefat">
461
+ <?php
462
+ /* Custom Checkout Fields Section */
463
+
464
+ if ( ! _is_cartflows_pro() ) {
465
+ echo wcf()->meta->get_description_field(
466
+ array(
467
+ 'name' => 'wcf-upgrade-to-pro',
468
+ /* translators: %s: link */
469
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
470
+ )
471
+ );
472
+ }
473
+ ?>
474
+ <?php do_action( 'cartflows_custom_fields_tab_content', $options, $post_id ); ?>
475
+ </div>
476
+ <?php
477
+ }
478
+ /**
479
+ * Tab custom settings
480
+ *
481
+ * @param array $options options.
482
+ * @param int $post_id post ID.
483
+ */
484
+ public function tab_custom_settings( $options, $post_id ) {
485
+ ?>
486
+ <div class="wcf-checkout-custom-settings wcf-tab-content widefat">
487
+ <div class="wcf-custom-settings-fields">
488
+ <?php
489
+
490
+ echo wcf()->meta->get_text_field(
491
+ array(
492
+ 'label' => __( 'Place Order Button Text', 'cartflows' ),
493
+ 'name' => 'wcf-checkout-place-order-button-text',
494
+ 'value' => $options['wcf-checkout-place-order-button-text'],
495
+ 'attr' => array(
496
+ 'placeholder' => __( 'Place order', 'cartflows' ),
497
+ ),
498
+ 'help' => __( 'It will change the Place Order Button text on checkout page.', 'cartflows' ),
499
+ )
500
+ );
501
+
502
+ echo wcf()->meta->get_hr_line_field( array() );
503
+
504
+ echo wcf()->meta->get_checkbox_field(
505
+ array(
506
+ 'name' => 'wcf-remove-product-field',
507
+ 'value' => $options['wcf-remove-product-field'],
508
+ 'after' => esc_html__( 'Enable cart editing on checkout', 'cartflows' ),
509
+ )
510
+ );
511
+
512
+ echo wcf()->meta->get_description_field(
513
+ array(
514
+ 'name' => '',
515
+ /* translators: %s: link */
516
+ 'content' => '<i>' . sprintf( esc_html__( 'Users will able to remove products from the checkout page.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
517
+ )
518
+ );
519
+
520
+ $this->animate_title_settings( $options, $post_id );
521
+ ?>
522
+ </div>
523
+ <?php do_action( 'cartflows_custom_settings_tab_content', $options, $post_id ); ?>
524
+ </div>
525
+ <?php
526
+ }
527
+
528
+ /**
529
+ * Tab style
530
+ *
531
+ * @param array $options options.
532
+ * @param int $post_id post ID.
533
+ */
534
+ public function design_tab_style( $options, $post_id ) {
535
+ include CARTFLOWS_CHECKOUT_DIR . 'includes/meta-views/design-checkout-style-tab.php';
536
+ }
537
+
538
+
539
+ /**
540
+ * Tab Header (Used for add logo into header)
541
+ *
542
+ * @param array $options options.
543
+ * @param int $post_id post ID.
544
+ */
545
+ public function tab_header_content( $options, $post_id ) {
546
+ ?>
547
+
548
+ <div class="wcf-checkout-header wcf-tab-content widefat">
549
+ <?php
550
+
551
+ $layout_pro_option = array();
552
+
553
+ echo wcf()->meta->get_image_field(
554
+ array(
555
+ 'name' => 'wcf-header-logo-image',
556
+ 'value' => $options['wcf-header-logo-image'],
557
+ 'label' => esc_html__( 'Header Logo', 'cartflows' ),
558
+ )
559
+ );
560
+
561
+ echo wcf()->meta->get_number_field(
562
+ array(
563
+ 'name' => 'wcf-header-logo-width',
564
+ 'value' => $options['wcf-header-logo-width'],
565
+ 'label' => esc_html__( 'Logo Width (In px)', 'cartflows' ),
566
+ )
567
+ );
568
+ ?>
569
+ <?php do_action( 'cartflows_checkout_header_tab_content', $options, $post_id ); ?>
570
+ </div>
571
+ <?php
572
+ }
573
+ /**
574
+ * Get metabox options
575
+ *
576
+ * @param int $post_id post ID.
577
+ */
578
+ public static function get_meta_option( $post_id ) {
579
+
580
+ if ( null === self::$meta_option ) {
581
+
582
+ /**
583
+ * Set metabox options
584
+ *
585
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
586
+ */
587
+ self::$meta_option = wcf()->options->get_checkout_fields( $post_id );
588
+ }
589
+
590
+ return self::$meta_option;
591
+ }
592
+
593
+ /**
594
+ * Metabox Save
595
+ *
596
+ * @param number $post_id Post ID.
597
+ * @return void
598
+ */
599
+ public function save_meta_box( $post_id ) {
600
+
601
+ // Checks save status.
602
+ $is_autosave = wp_is_post_autosave( $post_id );
603
+ $is_revision = wp_is_post_revision( $post_id );
604
+
605
+ $is_valid_nonce = ( isset( $_POST['nonce-checkout-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-checkout-step-meta'] ) ), 'save-nonce-checkout-step-meta' ) ) ? true : false;
606
+
607
+ // Exits script depending on save status.
608
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
609
+ return;
610
+ }
611
+
612
+ wcf()->options->save_checkout_fields( $post_id );
613
+ }
614
+ }
615
+
616
+ /**
617
+ * Kicking this off by calling 'get_instance()' method
618
+ */
619
+ Cartflows_Checkout_Meta::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
modules/checkout/includes/meta-views/design-checkout-metabox-markup.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout design metabox markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $active_tab = 'wcf-checkout-style';
9
+
10
+ $tab_array = array(
11
+ array(
12
+ 'title' => __( 'Shortcodes', 'cartflows' ),
13
+ 'id' => 'wcf-checkout-shortcodes',
14
+ 'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
15
+ 'icon' => 'dashicons-editor-code',
16
+ ),
17
+ array(
18
+ 'title' => __( 'Checkout Design', 'cartflows' ),
19
+ 'id' => 'wcf-checkout-style',
20
+ 'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
21
+ 'icon' => 'dashicons-admin-customizer',
22
+ ),
23
+ );
24
+
25
+ $option_tabs = apply_filters( 'cartflows_checkout_design_settings_tabs', $tab_array, $active_tab );
26
+
27
+ ?>
28
+ <div class="wcf-checkout-design-table wcf-metabox-wrap widefat">
29
+ <div class="wcf-table-container">
30
+ <?php echo wcf_get_page_builder_notice(); ?>
31
+ <div class="wcf-column-left">
32
+ <div class="wcf-tab-wrapper">
33
+ <?php foreach ( $option_tabs as $key => $option_tab ) { ?>
34
+ <div class="<?php echo esc_attr( $option_tab['class'] ); ?>" data-tab="<?php echo esc_attr( $option_tab['id'] ); ?>">
35
+ <span class="dashicons <?php echo esc_attr( $option_tab['icon'] ); ?>"></span>
36
+ <span class="wcf-tab-title"><?php echo esc_html( $option_tab['title'] ); ?></span>
37
+ </div>
38
+ <?php } ?>
39
+ </div>
40
+ </div>
41
+ <div class="wcf-column-right">
42
+ <?php
43
+ $this->design_tab_shortcodes( $options, $post_id );
44
+ $this->design_tab_style( $options, $post_id );
45
+ do_action( 'cartflows_checkout_design_tabs_content', $options, $post_id );
46
+ $this->right_column_footer( $options, $post_id );
47
+ ?>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+ <?php
modules/checkout/includes/meta-views/design-checkout-style-tab.php ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout style tab content.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ ?>
9
+ <div class="wcf-checkout-style wcf-tab-content widefat">
10
+ <div class="wcf-cs-fields">
11
+ <div class="wcf-cs-checkbox-field">
12
+ <?php
13
+
14
+ $layout_pro_option = array();
15
+
16
+ if ( ! _is_cartflows_pro() ) {
17
+ $layout_pro_option = array(
18
+ 'one-column' => __( 'One Column (Available in CartFlows Pro) ', 'cartflows' ),
19
+ 'two-step' => __( 'Two Step (Available in CartFlows Pro) ', 'cartflows' ),
20
+ );
21
+ }
22
+
23
+ echo wcf()->meta->get_select_field(
24
+ array(
25
+ 'label' => __( 'Checkout Skin', 'cartflows' ),
26
+ 'name' => 'wcf-checkout-layout',
27
+ 'value' => $options['wcf-checkout-layout'],
28
+ 'options' => array(
29
+ 'one-column' => esc_html__( 'One Column', 'cartflows' ),
30
+ 'two-column' => esc_html__( 'Two Column', 'cartflows' ),
31
+ 'two-step' => esc_html__( 'Two Step', 'cartflows' ),
32
+ ),
33
+ 'pro-options' => $layout_pro_option,
34
+
35
+ )
36
+ );
37
+
38
+ echo wcf()->meta->get_color_picker_field(
39
+ array(
40
+ 'label' => __( 'Primary Color', 'cartflows' ),
41
+ 'name' => 'wcf-primary-color',
42
+ 'value' => $options['wcf-primary-color'],
43
+ )
44
+ );
45
+
46
+ echo wcf()->meta->get_font_family_field(
47
+ array(
48
+ 'for' => 'wcf-base',
49
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
50
+ 'name' => 'wcf-base-font-family',
51
+ 'value' => $options['wcf-base-font-family'],
52
+ )
53
+ );
54
+
55
+ echo wcf()->meta->get_checkbox_field(
56
+ array(
57
+ 'label' => __( 'Advance Options', 'cartflows' ),
58
+ 'name' => 'wcf-advance-options-fields',
59
+ 'value' => $options['wcf-advance-options-fields'],
60
+ 'after' => 'Enable',
61
+ )
62
+ );
63
+ ?>
64
+ </div>
65
+ <div class="wcf-cs-fields-options">
66
+ <?php
67
+ echo wcf()->meta->get_section(
68
+ array(
69
+ 'label' => __( 'Heading', 'cartflows' ),
70
+ )
71
+ );
72
+
73
+ echo wcf()->meta->get_color_picker_field(
74
+ array(
75
+ 'label' => __( 'Heading Color', 'cartflows' ),
76
+ 'name' => 'wcf-heading-color',
77
+ 'value' => $options['wcf-heading-color'],
78
+ )
79
+ );
80
+
81
+ echo wcf()->meta->get_font_family_field(
82
+ array(
83
+ 'for' => 'wcf-heading',
84
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
85
+ 'name' => 'wcf-heading-font-family',
86
+ 'value' => $options['wcf-heading-font-family'],
87
+ )
88
+ );
89
+
90
+ echo wcf()->meta->get_font_weight_field(
91
+ array(
92
+ 'for' => 'wcf-heading',
93
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
94
+ 'name' => 'wcf-heading-font-weight',
95
+ 'value' => $options['wcf-heading-font-weight'],
96
+ )
97
+ );
98
+
99
+ echo wcf()->meta->get_section(
100
+ array(
101
+ 'label' => __( 'Input Fields', 'cartflows' ),
102
+ )
103
+ );
104
+
105
+ $fields_skin_pro_option = array();
106
+
107
+ if ( ! _is_cartflows_pro() ) {
108
+ $fields_skin_pro_option = array(
109
+ 'style-one' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
110
+ );
111
+ }
112
+
113
+ echo wcf()->meta->get_select_field(
114
+ array(
115
+ 'label' => __( 'Style', 'cartflows' ),
116
+ 'name' => 'wcf-fields-skins',
117
+ 'value' => $options['wcf-fields-skins'],
118
+ 'options' => array(
119
+ 'default' => esc_html__( 'Default', 'cartflows' ),
120
+ 'style-one' => esc_html__( 'Floating Labels', 'cartflows' ),
121
+ ),
122
+ 'pro-options' => $fields_skin_pro_option,
123
+
124
+ )
125
+ );
126
+
127
+ echo wcf()->meta->get_font_family_field(
128
+ array(
129
+ 'for' => 'wcf-input',
130
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
131
+ 'name' => 'wcf-input-font-family',
132
+ 'value' => $options['wcf-input-font-family'],
133
+ )
134
+ );
135
+
136
+ echo wcf()->meta->get_font_weight_field(
137
+ array(
138
+ 'for' => 'wcf-input',
139
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
140
+ 'name' => 'wcf-input-font-weight',
141
+ 'value' => $options['wcf-input-font-weight'],
142
+ )
143
+ );
144
+
145
+ echo wcf()->meta->get_select_field(
146
+ array(
147
+ 'label' => __( 'Size', 'cartflows' ),
148
+ 'name' => 'wcf-input-field-size',
149
+ 'value' => $options['wcf-input-field-size'],
150
+ 'options' => array(
151
+ '33px' => esc_html__( 'Extra Small', 'cartflows' ),
152
+ '38px' => esc_html__( 'Small', 'cartflows' ),
153
+ '44px' => esc_html__( 'Medium', 'cartflows' ),
154
+ '58px' => esc_html__( 'Large', 'cartflows' ),
155
+ '68px' => esc_html__( 'Extra Large', 'cartflows' ),
156
+ 'custom' => esc_html__( 'Custom', 'cartflows' ),
157
+ ),
158
+ )
159
+ );
160
+
161
+ echo wcf()->meta->get_number_field(
162
+ array(
163
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
164
+ 'name' => 'wcf-field-tb-padding',
165
+ 'value' => $options['wcf-field-tb-padding'],
166
+ )
167
+ );
168
+
169
+ echo wcf()->meta->get_number_field(
170
+ array(
171
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
172
+ 'name' => 'wcf-field-lr-padding',
173
+ 'value' => $options['wcf-field-lr-padding'],
174
+ )
175
+ );
176
+
177
+ echo wcf()->meta->get_color_picker_field(
178
+ array(
179
+ 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
180
+ 'name' => 'wcf-field-color',
181
+ 'value' => $options['wcf-field-color'],
182
+ )
183
+ );
184
+
185
+ echo wcf()->meta->get_color_picker_field(
186
+ array(
187
+ 'label' => __( 'Background Color', 'cartflows' ),
188
+ 'name' => 'wcf-field-bg-color',
189
+ 'value' => $options['wcf-field-bg-color'],
190
+ )
191
+ );
192
+
193
+ echo wcf()->meta->get_color_picker_field(
194
+ array(
195
+ 'label' => __( 'Border Color', 'cartflows' ),
196
+ 'name' => 'wcf-field-border-color',
197
+ 'value' => $options['wcf-field-border-color'],
198
+ )
199
+ );
200
+ echo wcf()->meta->get_color_picker_field(
201
+ array(
202
+ 'label' => __( 'Label Color', 'cartflows' ),
203
+ 'name' => 'wcf-field-label-color',
204
+ 'value' => $options['wcf-field-label-color'],
205
+ )
206
+ );
207
+
208
+ ?>
209
+ </div>
210
+ <div class="wcf-cs-button-options">
211
+ <?php
212
+
213
+ echo wcf()->meta->get_section(
214
+ array(
215
+ 'label' => __( 'Buttons', 'cartflows' ),
216
+ )
217
+ );
218
+
219
+ echo wcf()->meta->get_font_family_field(
220
+ array(
221
+ 'for' => 'wcf-button',
222
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
223
+ 'name' => 'wcf-button-font-family',
224
+ 'value' => $options['wcf-button-font-family'],
225
+ )
226
+ );
227
+
228
+ echo wcf()->meta->get_font_weight_field(
229
+ array(
230
+ 'for' => 'wcf-button',
231
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
232
+ 'name' => 'wcf-button-font-weight',
233
+ 'value' => $options['wcf-button-font-weight'],
234
+ )
235
+ );
236
+
237
+ echo wcf()->meta->get_select_field(
238
+ array(
239
+ 'label' => __( 'Size', 'cartflows' ),
240
+ 'name' => 'wcf-input-button-size',
241
+ 'value' => $options['wcf-input-button-size'],
242
+ 'options' => array(
243
+ '33px' => esc_html__( 'Extra Small', 'cartflows' ),
244
+ '38px' => esc_html__( 'Small', 'cartflows' ),
245
+ '44px' => esc_html__( 'Medium', 'cartflows' ),
246
+ '58px' => esc_html__( 'Large', 'cartflows' ),
247
+ '68px' => esc_html__( 'Extra Large', 'cartflows' ),
248
+ 'custom' => esc_html__( 'Custom', 'cartflows' ),
249
+ ),
250
+ )
251
+ );
252
+
253
+ echo wcf()->meta->get_number_field(
254
+ array(
255
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
256
+ 'name' => 'wcf-submit-tb-padding',
257
+ 'value' => $options['wcf-submit-tb-padding'],
258
+ )
259
+ );
260
+
261
+ echo wcf()->meta->get_number_field(
262
+ array(
263
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
264
+ 'name' => 'wcf-submit-lr-padding',
265
+ 'value' => $options['wcf-submit-lr-padding'],
266
+ )
267
+ );
268
+
269
+ echo wcf()->meta->get_color_picker_field(
270
+ array(
271
+ 'label' => __( 'Text Color', 'cartflows' ),
272
+ 'name' => 'wcf-submit-color',
273
+ 'value' => $options['wcf-submit-color'],
274
+ )
275
+ );
276
+
277
+ echo wcf()->meta->get_color_picker_field(
278
+ array(
279
+ 'label' => __( 'Text Hover Color', 'cartflows' ),
280
+ 'name' => 'wcf-submit-hover-color',
281
+ 'value' => $options['wcf-submit-hover-color'],
282
+ )
283
+ );
284
+
285
+ echo wcf()->meta->get_color_picker_field(
286
+ array(
287
+ 'label' => __( 'Background Color', 'cartflows' ),
288
+ 'name' => 'wcf-submit-bg-color',
289
+ 'value' => $options['wcf-submit-bg-color'],
290
+ )
291
+ );
292
+
293
+ echo wcf()->meta->get_color_picker_field(
294
+ array(
295
+ 'label' => __( 'Background Hover Color', 'cartflows' ),
296
+ 'name' => 'wcf-submit-bg-hover-color',
297
+ 'value' => $options['wcf-submit-bg-hover-color'],
298
+ )
299
+ );
300
+
301
+ echo wcf()->meta->get_color_picker_field(
302
+ array(
303
+ 'label' => __( 'Border Color', 'cartflows' ),
304
+ 'name' => 'wcf-submit-border-color',
305
+ 'value' => $options['wcf-submit-border-color'],
306
+ )
307
+ );
308
+
309
+ echo wcf()->meta->get_color_picker_field(
310
+ array(
311
+ 'label' => __( 'Border Hover Color', 'cartflows' ),
312
+ 'name' => 'wcf-submit-border-hover-color',
313
+ 'value' => $options['wcf-submit-border-hover-color'],
314
+ )
315
+ );
316
+
317
+ ?>
318
+ </div>
319
+ <div class="wcf-cs-section-options">
320
+ <?php
321
+
322
+ echo wcf()->meta->get_section(
323
+ array(
324
+ 'label' => __( 'Sections', 'cartflows' ),
325
+ )
326
+ );
327
+
328
+ echo wcf()->meta->get_color_picker_field(
329
+ array(
330
+ 'label' => __( 'Highlight Area Background Color', 'cartflows' ),
331
+ 'name' => 'wcf-hl-bg-color',
332
+ 'value' => $options['wcf-hl-bg-color'],
333
+ )
334
+ );
335
+
336
+ echo wcf()->meta->get_hidden_field(
337
+ array(
338
+ 'name' => 'wcf-field-google-font-url',
339
+ 'value' => $options['wcf-field-google-font-url'],
340
+ )
341
+ );
342
+ ?>
343
+ </div>
344
+ <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
345
+ </div>
346
+ </div>
347
+ <?php
modules/checkout/templates/embed/checkout-template-simple.php CHANGED
@@ -1,33 +1,34 @@
1
- <?php
2
- /**
3
- * Checkout template
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
9
- $fields_skins = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-fields-skins' );
10
- ?>
11
- <div id="wcf-embed-checkout-form" class="wcf-embed-checkout-form wcf-embed-checkout-form-<?php echo $checkout_layout; ?> wcf-field-<?php echo $fields_skins; ?>">
12
- <!-- CHECKOUT SHORTCODE -->
13
- <?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
14
-
15
- <?php
16
- $checkout_html = do_shortcode( '[woocommerce_checkout]' );
17
-
18
- if (
19
- empty( $checkout_html ) ||
20
- trim( $checkout_html ) == '<div class="woocommerce"></div>'
21
- ) {
22
-
23
- do_action( 'cartflows_checkout_cart_empty', $checkout_id );
24
-
25
- echo esc_html__( 'Your cart is currently empty.', 'cartflows' );
26
- } else {
27
- echo $checkout_html;
28
- }
29
- ?>
30
-
31
- <?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
32
- <!-- END CHECKOUT SHORTCODE -->
33
- </div>
 
1
+ <?php
2
+ /**
3
+ * Checkout template
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
9
+ $fields_skins = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-fields-skins' );
10
+
11
+ ?>
12
+ <div id="wcf-embed-checkout-form" class="wcf-embed-checkout-form wcf-embed-checkout-form-<?php echo $checkout_layout; ?> wcf-field-<?php echo $fields_skins; ?>">
13
+ <!-- CHECKOUT SHORTCODE -->
14
+ <?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
15
+
16
+ <?php
17
+ $checkout_html = do_shortcode( '[woocommerce_checkout]' );
18
+
19
+ if (
20
+ empty( $checkout_html ) ||
21
+ trim( $checkout_html ) == '<div class="woocommerce"></div>'
22
+ ) {
23
+
24
+ do_action( 'cartflows_checkout_cart_empty', $checkout_id );
25
+
26
+ echo esc_html__( 'Your cart is currently empty.', 'cartflows' );
27
+ } else {
28
+ echo $checkout_html;
29
+ }
30
+ ?>
31
+
32
+ <?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
33
+ <!-- END CHECKOUT SHORTCODE -->
34
+ </div>
modules/elementor/class-cartflows-el-widgets-loader.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ /**
3
+ * Widgets loader for Cartflows.
4
+ *
5
+ * @package Cartflows
6
+ * */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * Set up Widgets Loader class
12
+ */
13
+ class Cartflows_Widgets_Loader {
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
+ * Setup actions and filters.
34
+ *
35
+ * @since x.x.x
36
+ */
37
+ private function __construct() {
38
+
39
+ // Register category.
40
+ add_action( 'elementor/elements/categories_registered', array( $this, 'register_widget_category' ) );
41
+
42
+ // Register widgets.
43
+ add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) );
44
+
45
+ add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'admin_enqueue_styles' ) );
46
+ }
47
+
48
+ /**
49
+ * Enqueue admin scripts
50
+ *
51
+ * @since x.x.x
52
+ * @param string $hook Current page hook.
53
+ * @access public
54
+ */
55
+ public function admin_enqueue_styles( $hook ) {
56
+
57
+ // Register the icons styles.
58
+ wp_register_style(
59
+ 'cartflows-elementor-icons-style',
60
+ CARTFLOWS_URL . 'assets/elementor-assets/css/style.css',
61
+ array(),
62
+ CARTFLOWS_VER
63
+ );
64
+
65
+ wp_enqueue_style( 'cartflows-elementor-icons-style' );
66
+ }
67
+
68
+ /**
69
+ * Returns Script array.
70
+ *
71
+ * @return array()
72
+ * @since x.x.x
73
+ */
74
+ public static function get_widget_list() {
75
+
76
+ $widget_list = array(
77
+ 'checkout-form',
78
+ 'order-details-form',
79
+ 'next-step-button',
80
+ 'optin-form',
81
+ );
82
+
83
+ return $widget_list;
84
+ }
85
+
86
+
87
+ /**
88
+ * Include Widgets files
89
+ *
90
+ * Load widgets files
91
+ *
92
+ * @since x.x.x
93
+ * @access public
94
+ */
95
+ public function include_widgets_files() {
96
+
97
+ /* Required files */
98
+ require_once CARTFLOWS_DIR . 'modules/elementor/classes/class-cartflows-elementor-editor.php';
99
+
100
+ $widget_list = $this->get_widget_list();
101
+
102
+ if ( ! empty( $widget_list ) ) {
103
+ foreach ( $widget_list as $handle => $data ) {
104
+ require_once CARTFLOWS_DIR . 'modules/elementor/widgets/class-cartflows-el-' . $data . '.php';
105
+ }
106
+ }
107
+
108
+ // Emqueue the widgets style.
109
+ wp_enqueue_style( 'cartflows-elementor-style', CARTFLOWS_URL . 'modules/elementor/widgets-css/frontend.css', array(), CARTFLOWS_VER );
110
+
111
+ }
112
+
113
+ /**
114
+ * Register Category
115
+ *
116
+ * @since x.x.x
117
+ * @param object $this_cat class.
118
+ */
119
+ public function register_widget_category( $this_cat ) {
120
+ $category = __( 'Cartflows', 'cartflows' );
121
+
122
+ $this_cat->add_category(
123
+ 'cartflows-widgets',
124
+ array(
125
+ 'title' => $category,
126
+ 'icon' => 'eicon-font',
127
+ )
128
+ );
129
+
130
+ return $this_cat;
131
+ }
132
+
133
+ /**
134
+ * Register Widgets
135
+ *
136
+ * Register new Elementor widgets.
137
+ *
138
+ * @since x.x.x
139
+ * @access public
140
+ */
141
+ public function register_widgets() {
142
+
143
+ global $post;
144
+
145
+ if ( ! isset( $post ) ) {
146
+ return;
147
+ }
148
+
149
+ $post_type = $post->post_type;
150
+
151
+ $step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
152
+
153
+ if ( 'cartflows_step' === $post_type && class_exists( '\Elementor\Plugin' ) ) {
154
+
155
+ $widget_manager = \Elementor\Plugin::$instance->widgets_manager;
156
+
157
+ $widget_list = $this->get_widget_list();
158
+
159
+ // Its is now safe to include Widgets files.
160
+ $this->include_widgets_files();
161
+
162
+ foreach ( $widget_list as $widget ) {
163
+
164
+ $widget_name = str_replace( '-', ' ', $widget );
165
+
166
+ $class_name = 'Cartflows_' . str_replace( ' ', '_', ucwords( $widget_name ) );
167
+
168
+ if ( $class_name::is_enable( $step_type ) ) {
169
+ $widget_manager->register_widget_type( new $class_name() );
170
+ }
171
+ }
172
+ }
173
+ }
174
+
175
+ }
176
+
177
+ /**
178
+ * Initiate the class.
179
+ */
180
+ Cartflows_Widgets_Loader::get_instance();
modules/elementor/classes/class-cartflows-elementor-editor.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Editor Compatibility.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Elementor_Editor {
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
+
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self();
29
+ }
30
+
31
+ return self::$instance;
32
+ }
33
+
34
+ /**
35
+ * Constructor
36
+ */
37
+ public function __construct() {
38
+
39
+ $this->elementor_editor_compatibility();
40
+ }
41
+
42
+ /**
43
+ * Elementor editor compatibility.
44
+ */
45
+ public function elementor_editor_compatibility() {
46
+
47
+ if ( ! empty( $_REQUEST['action'] ) && is_admin() ) { //phpcs:ignore
48
+
49
+ $current_post_id = false;
50
+ $elementor_ajax = false;
51
+
52
+ if ( 'elementor' === $_REQUEST['action'] && isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) { //phpcs:ignore
53
+ $current_post_id = intval( $_GET['post'] ); //phpcs:ignore
54
+ }
55
+
56
+ if ( wp_doing_ajax() && 'elementor_ajax' === $_REQUEST['action'] && isset( $_REQUEST['editor_post_id'] ) && ! empty( $_REQUEST['editor_post_id'] ) ) { //phpcs:ignore
57
+ $current_post_id = intval( $_REQUEST['editor_post_id'] ); //phpcs:ignore
58
+ $elementor_ajax = true;
59
+ }
60
+
61
+ if ( $current_post_id ) { //phpcs:ignore
62
+
63
+ $current_post_type = get_post_type( $current_post_id );
64
+
65
+ if ( wcf()->utils->is_step_post_type( $current_post_type ) ) {
66
+
67
+ $cf_frontend = Cartflows_Frontend::get_instance();
68
+
69
+ /* Load woo templates from plugin */
70
+ add_filter( 'woocommerce_locate_template', array( $cf_frontend, 'override_woo_template' ), 20, 3 );
71
+
72
+ do_action( 'cartflows_elementor_editor_compatibility', $current_post_id, $elementor_ajax );
73
+ }
74
+ }
75
+
76
+ /* Compatibility without condition, just to add actions */
77
+ if ( 'elementor' === $_REQUEST['action'] || 'elementor_ajax' === $_REQUEST['action'] ) { //phpcs:ignore
78
+
79
+ add_action( 'cartflows_elementor_before_checkout_shortcode', array( $this, 'before_checkout_shortcode_actions' ) );
80
+ add_action( 'cartflows_elementor_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
81
+
82
+ /* Thank you filters */
83
+ add_filter( 'cartflows_show_demo_order_details', '__return_true' );
84
+ }
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Before checkout shortcode actions.
90
+ *
91
+ * @param int $checkout_id checkout id.
92
+ */
93
+ public function before_checkout_shortcode_actions( $checkout_id ) {
94
+
95
+ do_action( 'cartflows_checkout_before_shortcode', $checkout_id );
96
+ }
97
+
98
+ /**
99
+ * Before optin shortcode actions.
100
+ *
101
+ * @param int $checkout_id checkout id.
102
+ */
103
+ public function before_optin_shortcode_actions( $checkout_id ) {
104
+
105
+ do_action( 'cartflows_optin_before_shortcode', $checkout_id );
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Kicking this off by calling 'get_instance()' method
111
+ */
112
+ Cartflows_Elementor_Editor::get_instance();
modules/elementor/widgets-css/frontend.css ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS for Next Step Button module */
2
+ .cartflows-elementor__before_title, .cartflows-elementor__after_title, .cartflows-elementor__next-step-button-title {
3
+ vertical-align: middle;
4
+ }
5
+
6
+ .cartflows-elementor__before_title_sub_title {
7
+ margin-right: 10px;
8
+ }
9
+
10
+ .cartflows-elementor__after_title_sub_title {
11
+ margin-left: 10px;
12
+ }
13
+
14
+ .cartflows-elementor__next-step-inner-wrap {
15
+ display: inline-flex;
16
+ }
17
+
18
+ .elementor-widget-next-step-button .cartflows-elementor__next-step-button-sub-title {
19
+ font-size: 0.9em;
20
+ }
21
+ .cartflows-elementor__next-step-button-icon-wrap svg {
22
+ height: 1em;
23
+ width: 1em;
24
+ }
25
+
26
+ /* CSS for Order Details Form module */
27
+ .cartflows-elementor__display-order-overview-no .wcf-thankyou-wrap .woocommerce-order ul.order_details,
28
+ .cartflows-elementor__display-order-overview-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-details {
29
+ display: none;
30
+ }
31
+
32
+ .cartflows-elementor__display-order-overview-yes .wcf-thankyou-wrap .woocommerce-order ul.order_details,
33
+ .cartflows-elementor__display-order-overview-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-details {
34
+ display: block;
35
+ }
36
+
37
+ .cartflows-elementor__display-order-details-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details {
38
+ display: none;
39
+ }
40
+
41
+ .cartflows-elementor__display-order-details-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details {
42
+ display: block;
43
+ }
44
+
45
+ .cartflows-elementor__display-shipping-address-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--shipping-address{
46
+ display: none;
47
+ }
48
+
49
+ .cartflows-elementor__display-billing-address-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--billing-address{
50
+ display: none;
51
+ }
52
+
53
+ .cartflows-elementor__display-billing-address-no.cartflows-elementor__display-shipping-address-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details {
54
+ display: none;
55
+ }
56
+
57
+ .cartflows-elementor__display-billing-address-no.cartflows-elementor__display-shipping-address-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
58
+ .cartflows-elementor__display-billing-address-yes.cartflows-elementor__display-shipping-address-no .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
59
+ .cartflows-elementor__display-billing-address-yes.cartflows-elementor__display-shipping-address-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
60
+ .cartflows-elementor__display-billing-address-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--billing-address,
61
+ .cartflows-elementor__display-shipping-address-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column--shipping-address,
62
+ .cartflows-elementor__display-order-details-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details{
63
+ display: block;
64
+ }
65
+ .cartflows-elementor__display-billing-address-no.cartflows-elementor__display-shipping-address-yes .wcf-thankyou-wrap .woocommerce-order .woocommerce-column--shipping-address {
66
+ float: left;
67
+ }
68
+
69
+ /* Checkout Form CSS */
70
+ .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button {
71
+ color: #fff;
72
+ }
73
+ .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce #order_review button,
74
+ .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
75
+ .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small {
76
+ border-width: 0px;
77
+ }
modules/elementor/widgets/class-cartflows-el-checkout-form.php ADDED
@@ -0,0 +1,1087 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ /**
3
+ * Elementor Classes.
4
+ *
5
+ * @package cartflows
6
+ */
7
+
8
+ use Elementor\Controls_Manager;
9
+ use Elementor\Widget_Base;
10
+ use Elementor\Group_Control_Typography;
11
+ use Elementor\Group_Control_Background;
12
+ use Elementor\Group_Control_Border;
13
+ use Elementor\Group_Control_Box_Shadow;
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ exit; // Exit if accessed directly.
17
+ }
18
+
19
+ /**
20
+ * Checkout Form Widget
21
+ *
22
+ * @since x.x.x
23
+ */
24
+ class Cartflows_Checkout_Form extends Widget_Base {
25
+
26
+ /**
27
+ * Module should load or not.
28
+ *
29
+ * @since x.x.x
30
+ * @access public
31
+ * @param string $step_type Current step type.
32
+ *
33
+ * @return bool true|false.
34
+ */
35
+ public static function is_enable( $step_type ) {
36
+
37
+ if ( 'checkout' === $step_type && wcf()->is_woo_active ) {
38
+ return true;
39
+ }
40
+ return false;
41
+ }
42
+
43
+ /**
44
+ * Retrieve the widget name.
45
+ *
46
+ * @since x.x.x
47
+ *
48
+ * @access public
49
+ *
50
+ * @return string Widget name.
51
+ */
52
+ public function get_name() {
53
+ return 'checkout-form';
54
+ }
55
+
56
+ /**
57
+ * Retrieve the widget title.
58
+ *
59
+ * @since x.x.x
60
+ *
61
+ * @access public
62
+ *
63
+ * @return string Widget title.
64
+ */
65
+ public function get_title() {
66
+ return __( 'Checkout Form', 'cartflows' );
67
+ }
68
+
69
+ /**
70
+ * Retrieve the widget icon.
71
+ *
72
+ * @since x.x.x
73
+ *
74
+ * @access public
75
+ *
76
+ * @return string Widget icon.
77
+ */
78
+ public function get_icon() {
79
+ return 'wcf-el-icon-checkout-form';
80
+ }
81
+
82
+ /**
83
+ * Retrieve the list of categories the widget belongs to.
84
+ *
85
+ * Used to determine where to display the widget in the editor.
86
+ *
87
+ * Note that currently Elementor supports only one category.
88
+ * When multiple categories passed, Elementor uses the first one.
89
+ *
90
+ * @since x.x.x
91
+ *
92
+ * @access public
93
+ *
94
+ * @return array Widget categories.
95
+ */
96
+ public function get_categories() {
97
+ return array( 'cartflows-widgets' );
98
+ }
99
+
100
+ /**
101
+ * Settings
102
+ *
103
+ * @since x.x.x
104
+ * @var object $settings
105
+ */
106
+ public static $settings;
107
+
108
+ /**
109
+ * Retrieve Widget Keywords.
110
+ *
111
+ * @since x.x.x
112
+ * @access public
113
+ *
114
+ * @return string Widget keywords.
115
+ */
116
+ public function get_keywords() {
117
+ return array( 'cartflows', 'checkout', 'form' );
118
+ }
119
+
120
+ /**
121
+ * Register cart controls controls.
122
+ *
123
+ * @since x.x.x
124
+ * @access protected
125
+ */
126
+ protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
127
+
128
+ // Content Tab.
129
+ $this->register_general_content_controls();
130
+
131
+ // Style Tab.
132
+ $this->register_global_style_controls();
133
+ $this->register_heading_style_controls();
134
+ $this->register_input_style_controls();
135
+ $this->register_button_style_controls();
136
+ $this->register_payment_section_style_controls();
137
+ $this->register_error_style_controls();
138
+ }
139
+
140
+ /**
141
+ * Function to get layout types.
142
+ *
143
+ * @since x.x.x
144
+ * @access protected
145
+ */
146
+ protected function get_layout_types() {
147
+
148
+ $layout_options = array();
149
+
150
+ if ( ! _is_cartflows_pro() ) {
151
+ $layout_options = array(
152
+ 'one-column' => __( 'One Column ( PRO )', 'cartflows' ),
153
+ 'two-column' => __( 'Two Column', 'cartflows' ),
154
+ 'two-step' => __( 'Two Step ( PRO )', 'cartflows' ),
155
+ );
156
+ } else {
157
+ $layout_options = array(
158
+ 'one-column' => __( 'One Column', 'cartflows' ),
159
+ 'two-column' => __( 'Two Column', 'cartflows' ),
160
+ 'two-step' => __( 'Two Step', 'cartflows' ),
161
+ );
162
+ }
163
+
164
+ return $layout_options;
165
+ }
166
+
167
+ /**
168
+ * Function to get skin types.
169
+ *
170
+ * @since x.x.x
171
+ * @access protected
172
+ */
173
+ protected function get_skin_types() {
174
+
175
+ $skin_options = array();
176
+
177
+ if ( ! _is_cartflows_pro() ) {
178
+ $skin_options = array(
179
+ 'default' => __( 'Default', 'cartflows' ),
180
+ 'style-one' => __( 'Floating Labels ( PRO )', 'cartflows' ),
181
+ );
182
+ } else {
183
+ $skin_options = array(
184
+ 'default' => __( 'Default', 'cartflows' ),
185
+ 'style-one' => __( 'Floating Labels', 'cartflows' ),
186
+ );
187
+ }
188
+
189
+ return $skin_options;
190
+ }
191
+
192
+ /**
193
+ * Register General Controls.
194
+ *
195
+ * @since x.x.x
196
+ * @access protected
197
+ */
198
+ protected function register_general_content_controls() {
199
+
200
+ $this->start_controls_section(
201
+ 'section_general_fields',
202
+ array(
203
+ 'label' => __( 'Layout', 'cartflows' ),
204
+ )
205
+ );
206
+
207
+ $this->add_control(
208
+ 'layout',
209
+ array(
210
+ 'label' => __( 'Select Layout', 'cartflows' ),
211
+ 'type' => Controls_Manager::SELECT,
212
+ 'default' => 'two-column',
213
+ 'options' => $this->get_layout_types(),
214
+ )
215
+ );
216
+
217
+ if ( ! _is_cartflows_pro() ) {
218
+
219
+ $this->add_control(
220
+ 'layout_upgrade_pro',
221
+ array(
222
+ 'type' => Controls_Manager::RAW_HTML,
223
+ /* translators: %s admin link */
224
+ 'raw' => sprintf( __( 'This feature is available in the CartFlows Pro. <a href="%s" target="_blank" rel="noopener">Upgrade Now!</a>.', 'cartflows' ), CARTFLOWS_DOMAIN_URL ),
225
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
226
+ 'condition' => array(
227
+ 'layout!' => 'two-column',
228
+ ),
229
+ )
230
+ );
231
+ }
232
+
233
+ $this->end_controls_section();
234
+ }
235
+
236
+ /**
237
+ * Register Place Order Button Controls.
238
+ *
239
+ * @since x.x.x
240
+ * @access protected
241
+ */
242
+ protected function register_other_settings_controls() {
243
+
244
+ $this->start_controls_section(
245
+ 'section_other_settings_fields',
246
+ array(
247
+ 'label' => __( 'Other Settings', 'cartflows' ),
248
+ )
249
+ );
250
+
251
+ $this->add_control(
252
+ 'billing_section_text',
253
+ array(
254
+ 'label' => __( 'Billing Section Text', 'cartflows' ),
255
+ 'type' => Controls_Manager::TEXT,
256
+ 'placeholder' => __( 'Billing Details', 'cartflows' ),
257
+ 'label_block' => true,
258
+ )
259
+ );
260
+
261
+ $this->add_control(
262
+ 'shipping_section_text',
263
+ array(
264
+ 'label' => __( 'Shipping Section Text', 'cartflows' ),
265
+ 'type' => Controls_Manager::TEXT,
266
+ 'placeholder' => __( 'Shipping Details', 'cartflows' ),
267
+ 'label_block' => true,
268
+ )
269
+ );
270
+
271
+ $this->add_control(
272
+ 'your_order_text',
273
+ array(
274
+ 'label' => __( 'Order Review Text', 'cartflows' ),
275
+ 'type' => Controls_Manager::TEXT,
276
+ 'placeholder' => __( 'Your order', 'cartflows' ),
277
+ 'label_block' => true,
278
+ )
279
+ );
280
+
281
+ $this->end_controls_section();
282
+ }
283
+
284
+ /**
285
+ * Register General Style Controls.
286
+ *
287
+ * @since x.x.x
288
+ * @access protected
289
+ */
290
+ protected function register_global_style_controls() {
291
+ $this->start_controls_section(
292
+ 'section_general_style_fields',
293
+ array(
294
+ 'label' => __( 'Global', 'cartflows' ),
295
+ 'tab' => Controls_Manager::TAB_STYLE,
296
+ )
297
+ );
298
+
299
+ $this->add_control(
300
+ 'global_primary_color',
301
+ array(
302
+ 'label' => __( 'Primary Color', 'cartflows' ),
303
+ 'type' => Controls_Manager::COLOR,
304
+ 'default' => '',
305
+ 'selectors' => array(
306
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
307
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:checked:before,
308
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:checked:before,
309
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-info::before,
310
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-message::before,
311
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce a,
312
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name,
313
+ body .wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf-content-modal-title .wcf_first_name' => 'color: {{VALUE}};',
314
+
315
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover,
316
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment input[type=checkbox]:focus,
317
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus,
318
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:focus,
319
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus,
320
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
321
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
322
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
323
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
324
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
325
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
326
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
327
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
328
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
329
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
330
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
331
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'border-color: {{VALUE}};',
332
+
333
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment input[type=radio]:checked:before,
334
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
335
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
336
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
337
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
338
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
339
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
340
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
341
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
342
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
343
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current:before,
344
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current:before,
345
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current:before,
346
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note,
347
+ body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step,
348
+ body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:before,
349
+ body .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line:after' => 'background-color: {{VALUE}};',
350
+
351
+ '{{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before' => 'border-top-color: {{VALUE}};',
352
+
353
+ '{{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
354
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button,
355
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
356
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'background-color: {{VALUE}}; color: #fff;',
357
+ ),
358
+ )
359
+ );
360
+
361
+ $this->add_control(
362
+ 'global_text_color',
363
+ array(
364
+ 'label' => __( 'Text Color', 'cartflows' ),
365
+ 'type' => Controls_Manager::COLOR,
366
+ 'default' => '',
367
+ 'selectors' => array(
368
+ '{{WRAPPER}} .wcf-embed-checkout-form,
369
+ {{WRAPPER}} .wcf-embed-checkout-form #payment .woocommerce-privacy-policy-text p' => 'color: {{VALUE}};',
370
+ ),
371
+ )
372
+ );
373
+
374
+ $this->add_group_control(
375
+ Group_Control_Typography::get_type(),
376
+ array(
377
+ 'name' => 'global_typography',
378
+ 'label' => 'Typography',
379
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form',
380
+ )
381
+ );
382
+
383
+ $this->end_controls_section();
384
+ }
385
+
386
+ /**
387
+ * Register Heading Style Controls.
388
+ *
389
+ * @since x.x.x
390
+ * @access protected
391
+ */
392
+ protected function register_heading_style_controls() {
393
+ $this->start_controls_section(
394
+ 'section_heading_style_fields',
395
+ array(
396
+ 'label' => __( 'Heading', 'cartflows' ),
397
+ 'tab' => Controls_Manager::TAB_STYLE,
398
+ )
399
+ );
400
+
401
+ $this->add_control(
402
+ 'heading_text_color',
403
+ array(
404
+ 'label' => __( 'Color', 'cartflows' ),
405
+ 'type' => Controls_Manager::COLOR,
406
+ 'default' => '',
407
+ 'selectors' => array(
408
+ '{{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce h3,
409
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
410
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
411
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name' => 'color: {{VALUE}};',
412
+ ),
413
+ )
414
+ );
415
+
416
+ $this->add_group_control(
417
+ Group_Control_Typography::get_type(),
418
+ array(
419
+ 'name' => 'heading_typography',
420
+ 'label' => 'Typography',
421
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce h3,
422
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce h3 span,
423
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce-checkout #order_review_heading,
424
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-name,
425
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .col2-set .col-1 h3,
426
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .col2-set .col-2 h3',
427
+ )
428
+ );
429
+
430
+ $this->end_controls_section();
431
+ }
432
+
433
+ /**
434
+ * Register Input Fields Style Controls.
435
+ *
436
+ * @since x.x.x
437
+ * @access protected
438
+ */
439
+ protected function register_input_style_controls() {
440
+ $this->start_controls_section(
441
+ 'input_section',
442
+ array(
443
+ 'label' => __( 'Input Fields', 'cartflows' ),
444
+ 'tab' => Controls_Manager::TAB_STYLE,
445
+ )
446
+ );
447
+
448
+ $this->add_control(
449
+ 'input_skins',
450
+ array(
451
+ 'label' => __( 'Style', 'cartflows' ),
452
+ 'type' => Controls_Manager::SELECT,
453
+ 'default' => 'default',
454
+ 'options' => $this->get_skin_types(),
455
+ )
456
+ );
457
+
458
+ if ( ! _is_cartflows_pro() ) {
459
+
460
+ $this->add_control(
461
+ 'input_skins_upgrade_pro',
462
+ array(
463
+ 'type' => Controls_Manager::RAW_HTML,
464
+ /* translators: %s admin link */
465
+ 'raw' => sprintf( __( 'This feature is available in the CartFlows Pro. <a href="%s" target="_blank" rel="noopener">Upgrade Now!</a>.', 'cartflows' ), CARTFLOWS_DOMAIN_URL ),
466
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
467
+ 'condition' => array(
468
+ 'input_skins' => 'style-one',
469
+ ),
470
+ )
471
+ );
472
+ }
473
+
474
+ $this->add_group_control(
475
+ Group_Control_Typography::get_type(),
476
+ array(
477
+ 'name' => 'input_text_typography',
478
+ 'label' => 'Typography',
479
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
480
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
481
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
482
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
483
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .col2-set .col-1,
484
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .col2-set .col-2,
485
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form p.form-row label,
486
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:checked + label,
487
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment [type="radio"]:not(:checked) + label,
488
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select',
489
+ )
490
+ );
491
+
492
+ $this->add_control(
493
+ 'label_color',
494
+ array(
495
+ 'label' => __( 'Label Color', 'cartflows' ),
496
+ 'type' => Controls_Manager::COLOR,
497
+ 'selectors' => array(
498
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout label,
499
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form p.form-row label' => 'color: {{VALUE}};',
500
+ ),
501
+ )
502
+ );
503
+
504
+ $this->add_control(
505
+ 'input_bgcolor',
506
+ array(
507
+ 'label' => __( 'Field Background Color', 'cartflows' ),
508
+ 'type' => Controls_Manager::COLOR,
509
+ 'selectors' => array(
510
+ '{{WRAPPER}} .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
511
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
512
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
513
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
514
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
515
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select' => 'background-color: {{VALUE}};',
516
+ ),
517
+ )
518
+ );
519
+
520
+ $this->add_control(
521
+ 'input_color',
522
+ array(
523
+ 'label' => __( 'Input Text / Placeholder Color', 'cartflows' ),
524
+ 'type' => Controls_Manager::COLOR,
525
+ 'selectors' => array(
526
+ '{{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
527
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
528
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row textarea,
529
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
530
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form .woocommerce form .form-row select,
531
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select,
532
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form ::placeholder,
533
+ {{WRAPPER}} .cartflows-elementor__checkout-form .wcf-embed-checkout-form ::-webkit-input-placeholder' => 'color: {{VALUE}} !important;',
534
+ ),
535
+ )
536
+ );
537
+
538
+ $this->add_control(
539
+ 'input_border_style',
540
+ array(
541
+ 'label' => __( 'Border Style', 'cartflows' ),
542
+ 'type' => Controls_Manager::SELECT,
543
+ 'label_block' => false,
544
+ 'default' => '',
545
+ 'options' => array(
546
+ '' => __( 'Inherit', 'cartflows' ),
547
+ 'solid' => __( 'Solid', 'cartflows' ),
548
+ 'double' => __( 'Double', 'cartflows' ),
549
+ 'dotted' => __( 'Dotted', 'cartflows' ),
550
+ 'dashed' => __( 'Dashed', 'cartflows' ),
551
+ ),
552
+ 'selectors' => array(
553
+ '{{WRAPPER}} .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
554
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
555
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
556
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
557
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
558
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select' => 'border-style: {{VALUE}};',
559
+ ),
560
+ )
561
+ );
562
+ $this->add_control(
563
+ 'input_border_size',
564
+ array(
565
+ 'label' => __( 'Border Width', 'cartflows' ),
566
+ 'type' => Controls_Manager::DIMENSIONS,
567
+ 'size_units' => array( 'px' ),
568
+ 'selectors' => array(
569
+ '{{WRAPPER}} .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
570
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
571
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
572
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
573
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
574
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
575
+ ),
576
+ )
577
+ );
578
+
579
+ $this->add_control(
580
+ 'input_border_color',
581
+ array(
582
+ 'label' => __( 'Border Color', 'cartflows' ),
583
+ 'type' => Controls_Manager::COLOR,
584
+ 'selectors' => array(
585
+ '{{WRAPPER}} .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
586
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
587
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
588
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
589
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
590
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select' => 'border-color: {{VALUE}};',
591
+ ),
592
+ )
593
+ );
594
+
595
+ $this->add_responsive_control(
596
+ 'input_radius',
597
+ array(
598
+ 'label' => __( 'Rounded Corners', 'cartflows' ),
599
+ 'type' => Controls_Manager::DIMENSIONS,
600
+ 'size_units' => array( 'px', 'em', '%' ),
601
+ 'selectors' => array(
602
+ '{{WRAPPER}} .wcf-embed-checkout-form #order_review .wcf-custom-coupon-field input[type="text"],
603
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
604
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea,
605
+ {{WRAPPER}} .wcf-embed-checkout-form .select2-container--default .select2-selection--single,
606
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select.select,
607
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
608
+ ),
609
+ )
610
+ );
611
+
612
+ $this->end_controls_section();
613
+ }
614
+
615
+ /**
616
+ * Register Button Style Controls.
617
+ *
618
+ * @since x.x.x
619
+ * @access protected
620
+ */
621
+ protected function register_button_style_controls() {
622
+
623
+ $this->start_controls_section(
624
+ 'button_section',
625
+ array(
626
+ 'label' => __( 'Buttons', 'cartflows' ),
627
+ 'tab' => Controls_Manager::TAB_STYLE,
628
+ )
629
+ );
630
+
631
+ $this->add_group_control(
632
+ Group_Control_Typography::get_type(),
633
+ array(
634
+ 'name' => 'buttons_typography',
635
+ 'label' => 'Typography',
636
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
637
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
638
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
639
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
640
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
641
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
642
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
643
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn',
644
+ )
645
+ );
646
+
647
+ $this->start_controls_tabs( 'tabs_button_style' );
648
+
649
+ $this->start_controls_tab(
650
+ 'tab_button_normal',
651
+ array(
652
+ 'label' => __( 'Normal', 'cartflows' ),
653
+ )
654
+ );
655
+
656
+ $this->add_control(
657
+ 'button_text_color',
658
+ array(
659
+ 'label' => __( 'Text Color', 'cartflows' ),
660
+ 'type' => Controls_Manager::COLOR,
661
+ 'default' => '',
662
+ 'selectors' => array(
663
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
664
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
665
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
666
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
667
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
668
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
669
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
670
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'color: {{VALUE}};',
671
+ ),
672
+ )
673
+ );
674
+
675
+ $this->add_group_control(
676
+ Group_Control_Background::get_type(),
677
+ array(
678
+ 'name' => 'btn_background_color',
679
+ 'label' => __( 'Background Color', 'cartflows' ),
680
+ 'types' => array( 'classic', 'gradient' ),
681
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
682
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
683
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
684
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
685
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
686
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
687
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
688
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn',
689
+ )
690
+ );
691
+
692
+ $this->add_group_control(
693
+ Group_Control_Border::get_type(),
694
+ array(
695
+ 'name' => 'btn_border',
696
+ 'label' => __( 'Border', 'cartflows' ),
697
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
698
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
699
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
700
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
701
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
702
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
703
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
704
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn',
705
+ )
706
+ );
707
+
708
+ $this->add_responsive_control(
709
+ 'btn_border_radius',
710
+ array(
711
+ 'label' => __( 'Rounded Corners', 'cartflows' ),
712
+ 'type' => Controls_Manager::DIMENSIONS,
713
+ 'size_units' => array( 'px', '%' ),
714
+ 'selectors' => array(
715
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
716
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
717
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
718
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
719
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
720
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
721
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
722
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
723
+ ),
724
+ )
725
+ );
726
+
727
+ $this->add_group_control(
728
+ Group_Control_Box_Shadow::get_type(),
729
+ array(
730
+ 'name' => 'button_box_shadow',
731
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button,
732
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form.woocommerce-form-login .form-row button,
733
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small,
734
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.woocommerce-form-login .button,
735
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button,
736
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button,
737
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button,
738
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn',
739
+ )
740
+ );
741
+
742
+ $this->end_controls_tab();
743
+
744
+ $this->start_controls_tab(
745
+ 'tab_button_hover',
746
+ array(
747
+ 'label' => __( 'Hover', 'cartflows' ),
748
+ )
749
+ );
750
+
751
+ $this->add_control(
752
+ 'btn_hover_color',
753
+ array(
754
+ 'label' => __( 'Text Color', 'cartflows' ),
755
+ 'type' => Controls_Manager::COLOR,
756
+ 'selectors' => array(
757
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
758
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
759
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
760
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
761
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button:hover,
762
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
763
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'color: {{VALUE}};',
764
+ ),
765
+ )
766
+ );
767
+
768
+ $this->add_control(
769
+ 'button_hover_border_color',
770
+ array(
771
+ 'label' => __( 'Border Hover Color', 'cartflows' ),
772
+ 'type' => Controls_Manager::COLOR,
773
+ 'selectors' => array(
774
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
775
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
776
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
777
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
778
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button:hover,
779
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
780
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn' => 'border-color: {{VALUE}};',
781
+ ),
782
+ )
783
+ );
784
+
785
+ $this->add_group_control(
786
+ Group_Control_Background::get_type(),
787
+ array(
788
+ 'name' => 'button_background_hover_color',
789
+ 'label' => __( 'Background Color', 'cartflows' ),
790
+ 'types' => array( 'classic', 'gradient' ),
791
+ 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.login .button:hover,
792
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover,
793
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #payment #place_order:hover,
794
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review button.wcf-btn-small:hover,
795
+ {{WRAPPER}} .wcf-embed-checkout-form form.checkout_coupon .button:hover,
796
+ {{WRAPPER}} .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button:hover,
797
+ body .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn',
798
+ )
799
+ );
800
+
801
+ $this->end_controls_tab();
802
+
803
+ $this->end_controls_tabs();
804
+
805
+ $this->end_controls_section();
806
+ }
807
+
808
+ /**
809
+ * Register Sections Style Controls.
810
+ *
811
+ * @since x.x.x
812
+ * @access protected
813
+ */
814
+ protected function register_payment_section_style_controls() {
815
+ $this->start_controls_section(
816
+ 'section_payment_style_fields',
817
+ array(
818
+ 'label' => __( 'Payment Section', 'cartflows' ),
819
+ 'tab' => Controls_Manager::TAB_STYLE,
820
+ )
821
+ );
822
+ $this->add_control(
823
+ 'payment_section_text_color',
824
+ array(
825
+ 'label' => __( 'Text Color', 'cartflows' ),
826
+ 'type' => Controls_Manager::COLOR,
827
+ 'default' => '',
828
+ 'selectors' => array(
829
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment,
830
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment label,
831
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment label a' => 'color: {{VALUE}};',
832
+ ),
833
+ )
834
+ );
835
+
836
+ $this->add_control(
837
+ 'payment_section_desc_color',
838
+ array(
839
+ 'label' => __( 'Description Color', 'cartflows' ),
840
+ 'type' => Controls_Manager::COLOR,
841
+ 'default' => '',
842
+ 'selectors' => array(
843
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box' => 'color: {{VALUE}};',
844
+ ),
845
+ )
846
+ );
847
+
848
+ $this->add_control(
849
+ 'payment_section_bg_color',
850
+ array(
851
+ 'label' => __( 'Section Background Color', 'cartflows' ),
852
+ 'type' => Controls_Manager::COLOR,
853
+ 'selectors' => array(
854
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => 'background-color: {{VALUE}};',
855
+ ),
856
+ 'separator' => 'before',
857
+ )
858
+ );
859
+
860
+ $this->add_control(
861
+ 'payment_info_bg_color',
862
+ array(
863
+ 'label' => __( 'Information Background Color', 'cartflows' ),
864
+ 'type' => Controls_Manager::COLOR,
865
+ 'selectors' => array(
866
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box' => 'background-color: {{VALUE}};',
867
+ '{{WRAPPER}} .wcf-embed-checkout-form #add_payment_method #payment div.payment_box::before,
868
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-cart #payment div.payment_box::before,
869
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment div.payment_box::before' => 'border-bottom-color: {{VALUE}};',
870
+ ),
871
+ )
872
+ );
873
+
874
+ $this->add_control(
875
+ 'payment_section_padding',
876
+ array(
877
+ 'label' => __( 'Section Padding', 'cartflows' ),
878
+ 'type' => Controls_Manager::DIMENSIONS,
879
+ 'size_units' => array( 'px', 'em', '%' ),
880
+ 'selectors' => array(
881
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
882
+ ),
883
+ 'separator' => 'before',
884
+ )
885
+ );
886
+
887
+ $this->add_control(
888
+ 'payment_section_margin',
889
+ array(
890
+ 'label' => __( 'Section Margin', 'cartflows' ),
891
+ 'type' => Controls_Manager::DIMENSIONS,
892
+ 'size_units' => array( 'px', '%', 'em' ),
893
+ 'selectors' => array(
894
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
895
+ ),
896
+ )
897
+ );
898
+
899
+ $this->add_control(
900
+ 'payment_section_radius',
901
+ array(
902
+ 'label' => __( 'Section Rounded Corners', 'cartflows' ),
903
+ 'type' => Controls_Manager::DIMENSIONS,
904
+ 'size_units' => array( 'px', 'em', '%' ),
905
+ 'selectors' => array(
906
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce-checkout #payment ul.payment_methods' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
907
+ ),
908
+ )
909
+ );
910
+
911
+ $this->end_controls_section();
912
+ }
913
+
914
+ /**
915
+ * Register Sections error Controls.
916
+ *
917
+ * @since x.x.x
918
+ * @access protected
919
+ */
920
+ protected function register_error_style_controls() {
921
+ $this->start_controls_section(
922
+ 'section_error_style_fields',
923
+ array(
924
+ 'label' => __( 'Field Validation & Error Messages', 'cartflows' ),
925
+ 'tab' => Controls_Manager::TAB_STYLE,
926
+ )
927
+ );
928
+
929
+ $this->add_control(
930
+ 'error_fields_text',
931
+ array(
932
+ 'label' => __( 'Field Validation', 'cartflows' ),
933
+ 'type' => Controls_Manager::HEADING,
934
+ 'label_block' => true,
935
+ )
936
+ );
937
+
938
+ $this->add_control(
939
+ 'error_label_color',
940
+ array(
941
+ 'label' => __( 'Label Color', 'cartflows' ),
942
+ 'type' => Controls_Manager::COLOR,
943
+ 'default' => '',
944
+ 'selectors' => array(
945
+ '{{WRAPPER}} .woocommerce form .form-row.woocommerce-invalid label' => 'color: {{VALUE}};',
946
+ ),
947
+ )
948
+ );
949
+
950
+ $this->add_control(
951
+ 'error_field_border_color',
952
+ array(
953
+ 'label' => __( 'Field Border Color', 'cartflows' ),
954
+ 'type' => Controls_Manager::COLOR,
955
+ 'selectors' => array(
956
+ '{{WRAPPER}} .wcf-embed-checkout-form .select2-container--default.field-required .select2-selection--single,
957
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row input.input-text.field-required,
958
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row textarea.input-text.field-required,
959
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce #order_review .input-text.field-required
960
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid .select2-container,
961
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid input.input-text,
962
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce form .form-row.woocommerce-invalid select' => 'border-color: {{VALUE}};',
963
+
964
+ ),
965
+ 'separator' => 'after',
966
+ )
967
+ );
968
+
969
+ $this->add_control(
970
+ 'error_fields_section',
971
+ array(
972
+ 'label' => __( 'Error Messages', 'cartflows' ),
973
+ 'type' => Controls_Manager::HEADING,
974
+ 'label_block' => true,
975
+ )
976
+ );
977
+
978
+ $this->add_control(
979
+ 'error_text_color',
980
+ array(
981
+ 'label' => __( 'Error Message Color', 'cartflows' ),
982
+ 'type' => Controls_Manager::COLOR,
983
+ 'default' => '',
984
+ 'selectors' => array(
985
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-error,
986
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
987
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error' => 'color: {{VALUE}};',
988
+ ),
989
+ )
990
+ );
991
+
992
+ $this->add_control(
993
+ 'error_bg_color',
994
+ array(
995
+ 'label' => __( 'Background Color', 'cartflows' ),
996
+ 'type' => Controls_Manager::COLOR,
997
+ 'selectors' => array(
998
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-error,
999
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
1000
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error' => 'background-color: {{VALUE}};',
1001
+ ),
1002
+ )
1003
+ );
1004
+
1005
+ $this->add_control(
1006
+ 'error_border_color',
1007
+ array(
1008
+ 'label' => __( 'Border Color', 'cartflows' ),
1009
+ 'type' => Controls_Manager::COLOR,
1010
+ 'selectors' => array(
1011
+ '{{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-error,
1012
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-NoticeGroup .woocommerce-error,
1013
+ {{WRAPPER}} .wcf-embed-checkout-form .woocommerce .woocommerce-notices-wrapper .woocommerce-error' => 'border-color: {{VALUE}};',
1014
+
1015
+ ),
1016
+ )
1017
+ );
1018
+
1019
+ $this->end_controls_section();
1020
+ }
1021
+
1022
+ /**
1023
+ * Cartflows Checkout Form Styler.
1024
+ *
1025
+ * @since x.x.x
1026
+ * @access public
1027
+ */
1028
+ public function is_reload_preview_required() {
1029
+ return true;
1030
+ }
1031
+
1032
+ /**
1033
+ * Render Checkout Form output on the frontend.
1034
+ *
1035
+ * Written in PHP and used to generate the final HTML.
1036
+ *
1037
+ * @since x.x.x
1038
+ * @access protected
1039
+ */
1040
+ protected function render() {
1041
+
1042
+ $data_settings = array();
1043
+
1044
+ self::$settings = $this->get_settings_for_display();
1045
+
1046
+ $is_editor = \Elementor\Plugin::instance()->editor->is_edit_mode();
1047
+
1048
+ $checkout_id = get_the_id();
1049
+
1050
+ $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id );
1051
+
1052
+ if ( ! wcf()->flow->is_flow_testmode( $flow_id ) && $is_editor ) {
1053
+
1054
+ $products = wcf()->utils->get_selected_checkout_products( $checkout_id );
1055
+
1056
+ if ( ! is_array( $products ) || empty( $products[0]['product'] ) ) {
1057
+ wc_clear_notices();
1058
+ wc_add_notice( __( 'No product is selected. Please select products from the checkout meta settings to continue.', 'cartflows' ), 'error' );
1059
+ }
1060
+ }
1061
+
1062
+ /* Add elementor setting options to filters */
1063
+ $this->dynamic_option_filters();
1064
+
1065
+ do_action( 'cartflows_elementor_before_checkout_shortcode', $checkout_id );
1066
+
1067
+ $data_settings = apply_filters( 'cartflows_elementor_checkout_settings', $data_settings );
1068
+
1069
+ ?>
1070
+ <div class = "wcf-el-checkout-form cartflows-elementor__checkout-form" data-settings-data="<?php echo htmlentities( wp_json_encode( $data_settings ) ); ?>">
1071
+ <?php echo do_shortcode( '[cartflows_checkout]' ); ?>
1072
+ </div>
1073
+ <?php
1074
+
1075
+ }
1076
+
1077
+ /**
1078
+ * Dynamic options of elementor and add filters.
1079
+ *
1080
+ * @since x.x.x
1081
+ */
1082
+ public function dynamic_option_filters() {
1083
+
1084
+ do_action( 'cartflows_elementor_checkout_options_filters', self::$settings );
1085
+ }
1086
+
1087
+ }
modules/elementor/widgets/class-cartflows-el-next-step-button.php ADDED
@@ -0,0 +1,678 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ /**
3
+ * Elementor Classes.
4
+ *
5
+ * @package cartflows
6
+ */
7
+
8
+ use Elementor\Controls_Manager;
9
+ use Elementor\Group_Control_Border;
10
+ use Elementor\Widget_Base;
11
+ use Elementor\Widget_Button;
12
+ use Elementor\Group_Control_Typography;
13
+ use Elementor\Scheme_Typography;
14
+ use Elementor\Group_Control_Background;
15
+ use Elementor\Scheme_Color;
16
+ use Elementor\Icons_Manager;
17
+
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit; // Exit if accessed directly.
20
+ }
21
+
22
+ /**
23
+ * Next Step Button Widget
24
+ *
25
+ * @since x.x.x
26
+ */
27
+ class CartFlows_Next_Step_Button extends Widget_Base {
28
+
29
+ /**
30
+ * Module should load or not.
31
+ *
32
+ * @since x.x.x
33
+ * @access public
34
+ * @param string $step_type Current step type.
35
+ *
36
+ * @return bool true|false.
37
+ */
38
+ public static function is_enable( $step_type ) {
39
+
40
+ if ( 'landing' === $step_type ) {
41
+ return true;
42
+ }
43
+
44
+ return false;
45
+ }
46
+
47
+ /**
48
+ * Retrieve the widget name.
49
+ *
50
+ * @since x.x.x
51
+ *
52
+ * @access public
53
+ *
54
+ * @return string Widget name.
55
+ */
56
+ public function get_name() {
57
+ return 'next-step-button';
58
+ }
59
+
60
+ /**
61
+ * Retrieve the widget title.
62
+ *
63
+ * @since x.x.x
64
+ *
65
+ * @access public
66
+ *
67
+ * @return string Widget title.
68
+ */
69
+ public function get_title() {
70
+ return __( 'Next Step Button', 'cartflows' );
71
+ }
72
+
73
+
74
+ /**
75
+ * Retrieve the widget icon.
76
+ *
77
+ * @since x.x.x
78
+ *
79
+ * @access public
80
+ *
81
+ * @return string Widget icon.
82
+ */
83
+ public function get_icon() {
84
+ return 'wcf-el-icon-next-step';
85
+ }
86
+
87
+
88
+ /**
89
+ * Retrieve the list of categories the widget belongs to.
90
+ *
91
+ * Used to determine where to display the widget in the editor.
92
+ *
93
+ * Note that currently Elementor supports only one category.
94
+ * When multiple categories passed, Elementor uses the first one.
95
+ *
96
+ * @since x.x.x
97
+ *
98
+ * @access public
99
+ *
100
+ * @return array Widget categories.
101
+ */
102
+ public function get_categories() {
103
+ return array( 'cartflows-widgets' );
104
+ }
105
+
106
+ /**
107
+ * Retrieve Widget Keywords.
108
+ *
109
+ * @since x.x.x
110
+ * @access public
111
+ *
112
+ * @return string Widget keywords.
113
+ */
114
+ public function get_keywords() {
115
+ return array( 'cartflows', 'next step', 'button' );
116
+ }
117
+
118
+ /**
119
+ * Retrieve Next Step Button sizes.
120
+ *
121
+ * @since x.x.x
122
+ * @access public
123
+ *
124
+ * @return array Next Step Button Sizes.
125
+ */
126
+ public static function get_button_sizes() {
127
+ return Widget_Button::get_button_sizes();
128
+ }
129
+
130
+ /**
131
+ * Register Next Step Button controls.
132
+ *
133
+ * @since x.x.x
134
+ * @access protected
135
+ */
136
+ protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
137
+
138
+ // Content Tab.
139
+ $this->register_button_content_controls();
140
+
141
+ // Style Tab.
142
+ $this->register_button_style_controls();
143
+ $this->register_button_content_style_controls();
144
+ }
145
+
146
+ /**
147
+ * Register Next Step Button General Controls.
148
+ *
149
+ * @since x.x.x
150
+ * @access protected
151
+ */
152
+ protected function register_button_content_controls() {
153
+
154
+ $this->start_controls_section(
155
+ 'section_general_fields',
156
+ array(
157
+ 'label' => __( 'General', 'cartflows' ),
158
+ )
159
+ );
160
+
161
+ $this->add_control(
162
+ 'title',
163
+ array(
164
+ 'label' => __( 'Title', 'cartflows' ),
165
+ 'type' => Controls_Manager::TEXT,
166
+ 'default' => __( 'BUY NOW', 'cartflows' ),
167
+ 'dynamic' => array(
168
+ 'active' => true,
169
+ ),
170
+ )
171
+ );
172
+
173
+ $this->add_control(
174
+ 'sub_title',
175
+ array(
176
+ 'label' => __( 'Sub Title', 'cartflows' ),
177
+ 'type' => Controls_Manager::TEXT,
178
+ 'dynamic' => array(
179
+ 'active' => true,
180
+ ),
181
+ )
182
+ );
183
+
184
+ $this->add_control(
185
+ 'icon',
186
+ array(
187
+ 'label' => __( 'Icon', 'cartflows' ),
188
+ 'type' => Controls_Manager::ICONS,
189
+ )
190
+ );
191
+
192
+ $this->add_control(
193
+ 'icon_position',
194
+ array(
195
+ 'label' => __( 'Icon Position', 'cartflows' ),
196
+ 'type' => Controls_Manager::SELECT,
197
+ 'default' => 'before_title',
198
+ 'options' => array(
199
+ 'before_title' => __( 'Before Title', 'cartflows' ),
200
+ 'after_title' => __( 'After Title', 'cartflows' ),
201
+ 'before_title_sub_title' => __( 'Before Title & Sub Title', 'cartflows' ),
202
+ 'after_title_sub_title' => __( 'After Title & Sub Title', 'cartflows' ),
203
+ ),
204
+ 'condition' => array(
205
+ 'icon[value]!' => '',
206
+ ),
207
+ )
208
+ );
209
+
210
+ $this->add_control(
211
+ 'icon_vertical_align',
212
+ array(
213
+ 'label' => __( 'Icon Vertical Alignment', 'cartflows' ),
214
+ 'type' => Controls_Manager::CHOOSE,
215
+ 'label_block' => false,
216
+ 'default' => 'center',
217
+ 'options' => array(
218
+ 'flex-start' => array(
219
+ 'title' => __( 'Top', 'cartflows' ),
220
+ 'icon' => 'eicon-v-align-top',
221
+ ),
222
+ 'center' => array(
223
+ 'title' => __( 'Middle', 'cartflows' ),
224
+ 'icon' => 'eicon-v-align-middle',
225
+ ),
226
+ ),
227
+ 'condition' => array(
228
+ 'icon_position' => array( 'before_title_sub_title', 'after_title_sub_title' ),
229
+ 'icon[value]!' => '',
230
+ ),
231
+ 'selectors' => array(
232
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-icon-wrap' => 'align-self: {{VALUE}};',
233
+ ),
234
+ )
235
+ );
236
+
237
+ $this->add_control(
238
+ 'icon_spacing',
239
+ array(
240
+ 'label' => __( 'Icon Spacing', 'cartflows' ),
241
+ 'type' => Controls_Manager::SLIDER,
242
+ 'range' => array(
243
+ 'px' => array(
244
+ 'max' => 50,
245
+ ),
246
+ ),
247
+ 'selectors' => array(
248
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-title-wrap .cartflows-elementor__before_title, {{WRAPPER}} .cartflows-elementor__before_title_sub_title' => 'margin-right: {{SIZE}}{{UNIT}};',
249
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-title-wrap .cartflows-elementor__after_title, {{WRAPPER}} .cartflows-elementor__after_title_sub_title' => 'margin-left: {{SIZE}}{{UNIT}};',
250
+ ),
251
+ 'condition' => array(
252
+ 'icon[value]!' => '',
253
+ ),
254
+ )
255
+ );
256
+
257
+ $this->add_responsive_control(
258
+ 'icon_size',
259
+ array(
260
+ 'label' => __( 'Icon Size', 'cartflows' ),
261
+ 'type' => Controls_Manager::SLIDER,
262
+ 'range' => array(
263
+ 'px' => array(
264
+ 'max' => 50,
265
+ ),
266
+ ),
267
+ 'selectors' => array(
268
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-wrap .cartflows-elementor__next-step-button-icon-wrap i ' => 'font-size: {{SIZE}}{{UNIT}};',
269
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-wrap .cartflows-elementor__next-step-button-icon-wrap svg ' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
270
+ ),
271
+ 'condition' => array(
272
+ 'icon[value]!' => '',
273
+ ),
274
+ )
275
+ );
276
+
277
+ $this->end_controls_section();
278
+ }
279
+
280
+ /**
281
+ * Register Next Step Button Styling Controls.
282
+ *
283
+ * @since x.x.x
284
+ * @access protected
285
+ */
286
+ protected function register_button_style_controls() {
287
+
288
+ $this->start_controls_section(
289
+ 'next_step_button_styling',
290
+ array(
291
+ 'label' => __( 'General', 'cartflows' ),
292
+ 'tab' => Controls_Manager::TAB_STYLE,
293
+ )
294
+ );
295
+
296
+ $this->add_responsive_control(
297
+ 'align',
298
+ array(
299
+ 'label' => __( 'Alignment', 'cartflows' ),
300
+ 'type' => Controls_Manager::CHOOSE,
301
+ 'options' => array(
302
+ 'left' => array(
303
+ 'title' => __( 'Left', 'cartflows' ),
304
+ 'icon' => 'fa fa-align-left',
305
+ ),
306
+ 'center' => array(
307
+ 'title' => __( 'Center', 'cartflows' ),
308
+ 'icon' => 'fa fa-align-center',
309
+ ),
310
+ 'right' => array(
311
+ 'title' => __( 'Right', 'cartflows' ),
312
+ 'icon' => 'fa fa-align-right',
313
+ ),
314
+ 'justify' => array(
315
+ 'title' => __( 'Justify', 'cartflows' ),
316
+ 'icon' => 'fa fa-align-justify',
317
+ ),
318
+ ),
319
+ 'default' => 'left',
320
+ 'prefix_class' => 'elementor%s-align-',
321
+ )
322
+ );
323
+
324
+ $this->add_control(
325
+ 'button_size',
326
+ array(
327
+ 'label' => __( 'Button Size', 'cartflows' ),
328
+ 'type' => Controls_Manager::SELECT,
329
+ 'default' => 'md',
330
+ 'options' => self::get_button_sizes(),
331
+ )
332
+ );
333
+
334
+ $this->add_responsive_control(
335
+ 'padding',
336
+ array(
337
+ 'label' => __( 'Padding', 'cartflows' ),
338
+ 'type' => Controls_Manager::DIMENSIONS,
339
+ 'size_units' => array( 'px', 'em', '%' ),
340
+ 'selectors' => array(
341
+ '{{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
342
+ ),
343
+ )
344
+ );
345
+
346
+ $this->start_controls_tabs( '_next_step_button_style' );
347
+
348
+ $this->start_controls_tab(
349
+ '_next_step_button_normal',
350
+ array(
351
+ 'label' => __( 'Normal', 'cartflows' ),
352
+ )
353
+ );
354
+
355
+ $this->add_control(
356
+ 'text_color',
357
+ array(
358
+ 'label' => __( 'Text Color', 'cartflows' ),
359
+ 'type' => Controls_Manager::COLOR,
360
+ 'default' => '',
361
+ 'selectors' => array(
362
+ '{{WRAPPER}} a.cartflows-elementor__next-step-button-link' => 'color: {{VALUE}};',
363
+ ),
364
+ )
365
+ );
366
+
367
+ $this->add_group_control(
368
+ Group_Control_Background::get_type(),
369
+ array(
370
+ 'name' => 'all_background_color',
371
+ 'label' => __( 'Background Color', 'cartflows' ),
372
+ 'types' => array( 'classic', 'gradient' ),
373
+ 'selector' => '{{WRAPPER}} a.elementor-button',
374
+ 'fields_options' => array(
375
+ 'color' => array(
376
+ 'scheme' => array(
377
+ 'type' => Scheme_Color::get_type(),
378
+ 'value' => Scheme_Color::COLOR_4,
379
+ ),
380
+ ),
381
+ ),
382
+ )
383
+ );
384
+
385
+ $this->add_group_control(
386
+ Group_Control_Border::get_type(),
387
+ array(
388
+ 'name' => 'all_border',
389
+ 'label' => __( 'Border', 'cartflows' ),
390
+ 'selector' => '{{WRAPPER}} .elementor-button',
391
+ )
392
+ );
393
+
394
+ $this->add_control(
395
+ 'all_border_radius',
396
+ array(
397
+ 'label' => __( 'Rounded Corners', 'cartflows' ),
398
+ 'type' => Controls_Manager::DIMENSIONS,
399
+ 'size_units' => array( 'px', '%' ),
400
+ 'selectors' => array(
401
+ '{{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
402
+ ),
403
+ )
404
+ );
405
+
406
+ $this->end_controls_tab();
407
+
408
+ $this->start_controls_tab(
409
+ '_next_step_button_hover',
410
+ array(
411
+ 'label' => __( 'Hover', 'cartflows' ),
412
+ )
413
+ );
414
+
415
+ $this->add_control(
416
+ 'hover_text_color',
417
+ array(
418
+ 'label' => __( 'Hover Text Color', 'cartflows' ),
419
+ 'type' => Controls_Manager::COLOR,
420
+ 'default' => '',
421
+ 'selectors' => array(
422
+ '{{WRAPPER}} a.cartflows-elementor__next-step-button-link:hover' => 'color: {{VALUE}};',
423
+ ),
424
+ )
425
+ );
426
+
427
+ $this->add_group_control(
428
+ Group_Control_Background::get_type(),
429
+ array(
430
+ 'name' => 'hover_background_color',
431
+ 'label' => __( 'Hover Background Color', 'cartflows' ),
432
+ 'types' => array( 'classic', 'gradient' ),
433
+ 'selector' => '{{WRAPPER}} a.elementor-button:hover',
434
+ 'fields_options' => array(
435
+ 'color' => array(
436
+ 'scheme' => array(
437
+ 'type' => Scheme_Color::get_type(),
438
+ 'value' => Scheme_Color::COLOR_4,
439
+ ),
440
+ ),
441
+ ),
442
+ )
443
+ );
444
+
445
+ $this->end_controls_tab();
446
+
447
+ $this->end_controls_tabs();
448
+
449
+ $this->end_controls_section();
450
+
451
+ }
452
+
453
+ /**
454
+ * Register Button Content Styling Controls.
455
+ *
456
+ * @since x.x.x
457
+ * @access protected
458
+ */
459
+ protected function register_button_content_style_controls() {
460
+
461
+ $this->start_controls_section(
462
+ 'button_content_styling',
463
+ array(
464
+ 'label' => __( 'Content', 'cartflows' ),
465
+ 'tab' => Controls_Manager::TAB_STYLE,
466
+ )
467
+ );
468
+
469
+ $this->add_control(
470
+ 'text_align',
471
+ array(
472
+ 'label' => __( 'Text Alignment', 'cartflows' ),
473
+ 'type' => Controls_Manager::CHOOSE,
474
+ 'options' => array(
475
+ 'left' => array(
476
+ 'title' => __( 'Left', 'cartflows' ),
477
+ 'icon' => 'fa fa-align-left',
478
+ ),
479
+ 'center' => array(
480
+ 'title' => __( 'Center', 'cartflows' ),
481
+ 'icon' => 'fa fa-align-center',
482
+ ),
483
+ 'right' => array(
484
+ 'title' => __( 'Right', 'cartflows' ),
485
+ 'icon' => 'fa fa-align-right',
486
+ ),
487
+ ),
488
+ 'default' => 'center',
489
+ 'toggle' => false,
490
+ 'selectors' => array(
491
+ '{{WRAPPER}} a.elementor-button' => 'text-align: {{VALUE}};',
492
+ ),
493
+ 'condition' => array(
494
+ 'align' => 'justify',
495
+ ),
496
+ )
497
+ );
498
+
499
+ $this->add_group_control(
500
+ Group_Control_Typography::get_type(),
501
+ array(
502
+ 'name' => 'title_typography',
503
+ 'label' => 'Title Typography',
504
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
505
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__next-step-button-title',
506
+ )
507
+ );
508
+
509
+ $this->add_group_control(
510
+ Group_Control_Typography::get_type(),
511
+ array(
512
+ 'name' => 'sub_title_typography',
513
+ 'label' => 'Sub Title Typography',
514
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
515
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__next-step-button-sub-title',
516
+ 'condition' => array(
517
+ 'sub_title!' => '',
518
+ ),
519
+ )
520
+ );
521
+
522
+ $this->add_control(
523
+ 'title_sub_title_spacing',
524
+ array(
525
+ 'label' => __( 'Title and Sub Title Spacing', 'cartflows' ),
526
+ 'type' => Controls_Manager::SLIDER,
527
+ 'range' => array(
528
+ 'px' => array(
529
+ 'max' => 50,
530
+ ),
531
+ ),
532
+ 'default' => array(
533
+ 'unit' => 'px',
534
+ 'size' => 10,
535
+ ),
536
+ 'selectors' => array(
537
+ '{{WRAPPER}} .cartflows-elementor__next-step-button-sub-title' => 'margin-top: {{SIZE}}{{UNIT}};',
538
+ ),
539
+ 'condition' => array(
540
+ 'sub_title!' => '',
541
+ ),
542
+ )
543
+ );
544
+
545
+ }
546
+
547
+
548
+ /**
549
+ * Render Next Step Button icon.
550
+ *
551
+ * @since x.x.x
552
+ * @param string $position Icon positin.
553
+ * @param array $settings settings.
554
+ * @access protected
555
+ */
556
+ protected function render_button_icon( $position, $settings ) {
557
+
558
+ $icon = esc_attr( $settings['icon']['value'] );
559
+ $icon_position_class = esc_attr( 'cartflows-elementor__' . $settings['icon_position'] );
560
+
561
+ if ( '' !== $icon && $position === $settings['icon_position'] ) {
562
+ ?>
563
+ <span class="cartflows-elementor__next-step-button-icon-wrap <?php echo $icon_position_class; ?>">
564
+ <?php Icons_Manager::render_icon( $settings['icon'], array( 'aria-hidden' => 'true' ) ); ?>
565
+ </span>
566
+ <?php
567
+ }
568
+
569
+ }
570
+
571
+ /**
572
+ * Render Next Step Button output on the frontend.
573
+ *
574
+ * Written in PHP and used to generate the final HTML.
575
+ *
576
+ * @since x.x.x
577
+ * @access protected
578
+ */
579
+ protected function render() {
580
+
581
+ $settings = $this->get_settings_for_display();
582
+ $button_size = esc_attr( $settings['button_size'] );
583
+ $title = esc_html( $settings['title'] );
584
+ $sub_title = esc_html( $settings['sub_title'] );
585
+ ?>
586
+
587
+ <div class="cartflows-elementor__next-step-button">
588
+ <div class="cartflows-elementor__next-step-button-wrap">
589
+ <a href="?class=wcf-next-step" class="cartflows-elementor__next-step-button-link elementor-button elementor-button-link elementor-size-<?php echo $button_size; ?>">
590
+
591
+ <div class="cartflows-elementor__next-step-inner-wrap">
592
+
593
+ <?php $this->render_button_icon( 'before_title_sub_title', $settings ); ?>
594
+ <span class="cartflows-elementor__next-step-button-content-wrap">
595
+ <div class="cartflows-elementor__next-step-button-title-wrap">
596
+ <?php $this->render_button_icon( 'before_title', $settings ); ?>
597
+ <span class="cartflows-elementor__next-step-button-title"><?php echo $title; ?></span>
598
+ <?php $this->render_button_icon( 'after_title', $settings ); ?>
599
+ </div>
600
+ <?php if ( '' !== $settings['sub_title'] ) { ?>
601
+ <div class="cartflows-elementor__next-step-button-sub-title"><?php echo $sub_title; ?></div>
602
+ <?php } ?>
603
+ </span>
604
+ <?php $this->render_button_icon( 'after_title_sub_title', $settings ); ?>
605
+
606
+ </div>
607
+
608
+ </a>
609
+ </div>
610
+ </div>
611
+
612
+ <?php
613
+ }
614
+
615
+ /**
616
+ * Render Next Step Button output in the editor.
617
+ *
618
+ * Written as a Backbone JavaScript template and used to generate the live preview.
619
+ *
620
+ * @since x.x.x
621
+ * @access protected
622
+ */
623
+ protected function content_template() {
624
+ ?>
625
+ <#
626
+ function render_icon(position) {
627
+
628
+ var iconHTML = elementor.helpers.renderIcon( view, settings.icon, {}, 'i' , 'object' );
629
+
630
+ var icon_position_class = 'cartflows-elementor__'+settings.icon_position;
631
+
632
+ if( '' !== settings.icon.value && position === settings.icon_position ){ #>
633
+ <span class="cartflows-elementor__next-step-button-icon-wrap {{icon_position_class}}">
634
+ {{{ iconHTML.value }}}
635
+ </span>
636
+ <#}
637
+ }
638
+ #>
639
+ <div class="cartflows-elementor__next-step-button">
640
+ <div class="cartflows-elementor__next-step-button-wrap">
641
+ <a href="?class=wcf-next-step" class="cartflows-elementor__next-step-button-link elementor-button elementor-button-link elementor-size-{{ settings.button_size }}">
642
+ <div class="cartflows-elementor__next-step-inner-wrap">
643
+ <# render_icon('before_title_sub_title') #>
644
+ <span class="cartflows-elementor__next-step-button-content-wrap">
645
+ <div class="cartflows-elementor__next-step-button-title-wrap">
646
+ <# render_icon('before_title') #>
647
+ <span class="cartflows-elementor__next-step-button-title">
648
+ {{settings.title}}
649
+ </span>
650
+ <# render_icon('after_title') #>
651
+ </div>
652
+ <# if( '' !== settings.sub_title ){ #>
653
+ <div class="cartflows-elementor__next-step-button-sub-title">{{settings.sub_title}}</div>
654
+ <# } #>
655
+ </span>
656
+ <# render_icon('after_title_sub_title') #>
657
+ </div>
658
+ </a>
659
+ </div>
660
+ </div>
661
+ <?php
662
+ }
663
+
664
+ /**
665
+ * Render Next Step Button output in the editor.
666
+ *
667
+ * Written as a Backbone JavaScript template and used to generate the live preview.
668
+ *
669
+ * Remove this after Elementor v3.3.0
670
+ *
671
+ * @since x.x.x
672
+ * @access protected
673
+ */
674
+ protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
675
+ $this->content_template();
676
+ }
677
+
678
+ }
modules/elementor/widgets/class-cartflows-el-optin-form.php ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ /**
3
+ * Elementor Classes.
4
+ *
5
+ * @package cartflows
6
+ */
7
+
8
+ use Elementor\Controls_Manager;
9
+ use Elementor\Widget_Base;
10
+ use Elementor\Group_Control_Typography;
11
+ use Elementor\Group_Control_Background;
12
+ use Elementor\Group_Control_Border;
13
+ use Elementor\Group_Control_Box_Shadow;
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ exit; // Exit if accessed directly.
17
+ }
18
+
19
+ /**
20
+ * Optin Form Widget
21
+ *
22
+ * @since x.x.x
23
+ */
24
+ class CartFlows_Optin_Form extends Widget_Base {
25
+
26
+ /**
27
+ * Module should load or not.
28
+ *
29
+ * @since x.x.x
30
+ * @access public
31
+ * @param string $step_type Current step type.
32
+ *
33
+ * @return bool true|false.
34
+ */
35
+ public static function is_enable( $step_type ) {
36
+
37
+ if ( 'optin' === $step_type && wcf()->is_woo_active ) {
38
+ return true;
39
+ }
40
+ return false;
41
+ }
42
+
43
+ /**
44
+ * Retrieve the widget name.
45
+ *
46
+ * @since x.x.x
47
+ *
48
+ * @access public
49
+ *
50
+ * @return string Widget name.
51
+ */
52
+ public function get_name() {
53
+ return 'optin-form';
54
+ }
55
+
56
+ /**
57
+ * Retrieve the widget title.
58
+ *
59
+ * @since x.x.x
60
+ *
61
+ * @access public
62
+ *
63
+ * @return string Widget title.
64
+ */
65
+ public function get_title() {
66
+ return __( 'Optin Form', 'cartflows' );
67
+ }
68
+
69
+ /**
70
+ * Retrieve the widget icon.
71
+ *
72
+ * @since x.x.x
73
+ *
74
+ * @access public
75
+ *
76
+ * @return string Widget icon.
77
+ */
78
+ public function get_icon() {
79
+ return 'wcf-el-icon-optin-form';
80
+ }
81
+
82
+ /**
83
+ * Retrieve the list of categories the widget belongs to.
84
+ *
85
+ * Used to determine where to display the widget in the editor.
86
+ *
87
+ * Note that currently Elementor supports only one category.
88
+ * When multiple categories passed, Elementor uses the first one.
89
+ *
90
+ * @since x.x.x
91
+ *
92
+ * @access public
93
+ *
94
+ * @return array Widget categories.
95
+ */
96
+ public function get_categories() {
97
+ return array( 'cartflows-widgets' );
98
+ }
99
+
100
+ /**
101
+ * Settings
102
+ *
103
+ * @since x.x.x
104
+ * @var object $settings
105
+ */
106
+ public static $settings;
107
+
108
+ /**
109
+ * Retrieve Widget Keywords.
110
+ *
111
+ * @since x.x.x
112
+ * @access public
113
+ *
114
+ * @return string Widget keywords.
115
+ */
116
+ public function get_keywords() {
117
+ return array( 'cartflows', 'optin', 'form' );
118
+ }
119
+
120
+ /**
121
+ * Register cart controls controls.
122
+ *
123
+ * @since x.x.x
124
+ * @access protected
125
+ */
126
+ protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
127
+
128
+ // Style Tab.
129
+ $this->register_general_style_controls();
130
+ $this->register_input_style_controls();
131
+ $this->register_button_style_controls();
132
+ }
133
+
134
+ /**
135
+ * Function to get skin types.
136
+ *
137
+ * @since x.x.x
138
+ * @access protected
139
+ */
140
+ protected function get_skin_types() {
141
+
142
+ $skin_options = array();
143
+
144
+ if ( ! _is_cartflows_pro() ) {
145
+ $skin_options = array(
146
+ 'default' => __( 'Default', 'cartflows' ),
147
+ 'floating-labels' => __( 'Floating Labels ( PRO )', 'cartflows' ),
148
+ );
149
+ } else {
150
+ $skin_options = array(
151
+ 'default' => __( 'Default', 'cartflows' ),
152
+ 'floating-labels' => __( 'Floating Labels', 'cartflows' ),
153
+ );
154
+ }
155
+
156
+ return $skin_options;
157
+ }
158
+
159
+ /**
160
+ * Register General Style Controls.
161
+ *
162
+ * @since x.x.x
163
+ * @access protected
164
+ */
165
+ protected function register_general_style_controls() {
166
+ $this->start_controls_section(
167
+ 'section_general_style_fields',
168
+ array(
169
+ 'label' => __( 'General', 'cartflows' ),
170
+ 'tab' => Controls_Manager::TAB_STYLE,
171
+ )
172
+ );
173
+
174
+ $this->add_control(
175
+ 'general_primary_color',
176
+ array(
177
+ 'label' => __( 'Primary Color', 'cartflows' ),
178
+ 'type' => Controls_Manager::COLOR,
179
+ 'default' => '',
180
+ 'selectors' => array(
181
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order' => 'background-color: {{VALUE}}; border-color: {{VALUE}};',
182
+ ),
183
+ )
184
+ );
185
+
186
+ $this->add_group_control(
187
+ Group_Control_Typography::get_type(),
188
+ array(
189
+ 'name' => 'general_typography',
190
+ 'label' => 'Typography',
191
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout label, {{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input, {{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order',
192
+ )
193
+ );
194
+
195
+ $this->end_controls_section();
196
+ }
197
+
198
+ /**
199
+ * Register Input Fields Style Controls.
200
+ *
201
+ * @since x.x.x
202
+ * @access protected
203
+ */
204
+ protected function register_input_style_controls() {
205
+ $this->start_controls_section(
206
+ 'input_section',
207
+ array(
208
+ 'label' => __( 'Input Fields', 'cartflows' ),
209
+ 'tab' => Controls_Manager::TAB_STYLE,
210
+ )
211
+ );
212
+
213
+ $this->add_control(
214
+ 'input_skins',
215
+ array(
216
+ 'label' => __( 'Style', 'cartflows' ),
217
+ 'type' => Controls_Manager::SELECT,
218
+ 'default' => 'default',
219
+ 'options' => $this->get_skin_types(),
220
+ )
221
+ );
222
+
223
+ if ( ! _is_cartflows_pro() ) {
224
+
225
+ $this->add_control(
226
+ 'floating_labels_upgrade_pro',
227
+ array(
228
+ 'type' => Controls_Manager::RAW_HTML,
229
+ /* translators: %s admin link */
230
+ 'raw' => sprintf( __( 'This feature is available in the CartFlows Pro. <a href="%s" target="_blank" rel="noopener">Upgrade Now!</a>.', 'cartflows' ), CARTFLOWS_DOMAIN_URL ),
231
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
232
+ 'condition' => array(
233
+ 'input_skins' => 'floating-labels',
234
+ ),
235
+ )
236
+ );
237
+ }
238
+
239
+ $this->add_group_control(
240
+ Group_Control_Typography::get_type(),
241
+ array(
242
+ 'name' => 'input_text_typography',
243
+ 'label' => 'Typography',
244
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout label, {{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input',
245
+ )
246
+ );
247
+
248
+ $this->add_control(
249
+ 'label_color',
250
+ array(
251
+ 'label' => __( 'Label Color', 'cartflows' ),
252
+ 'type' => Controls_Manager::COLOR,
253
+ 'selectors' => array(
254
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout label' => 'color: {{VALUE}};',
255
+ ),
256
+ )
257
+ );
258
+
259
+ $this->add_control(
260
+ 'input_bgcolor',
261
+ array(
262
+ 'label' => __( 'Field Background Color', 'cartflows' ),
263
+ 'type' => Controls_Manager::COLOR,
264
+ 'selectors' => array(
265
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'background-color: {{VALUE}};',
266
+ ),
267
+ )
268
+ );
269
+
270
+ $this->add_control(
271
+ 'input_color',
272
+ array(
273
+ 'label' => __( 'Input Text / Placeholder Color', 'cartflows' ),
274
+ 'type' => Controls_Manager::COLOR,
275
+ 'selectors' => array(
276
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'color: {{VALUE}} !important;',
277
+ ),
278
+ )
279
+ );
280
+
281
+ $this->add_control(
282
+ 'input_border_style',
283
+ array(
284
+ 'label' => __( 'Border Style', 'cartflows' ),
285
+ 'type' => Controls_Manager::SELECT,
286
+ 'label_block' => false,
287
+ 'default' => '',
288
+ 'options' => array(
289
+ '' => __( 'Inherit', 'cartflows' ),
290
+ 'solid' => __( 'Solid', 'cartflows' ),
291
+ 'double' => __( 'Double', 'cartflows' ),
292
+ 'dotted' => __( 'Dotted', 'cartflows' ),
293
+ 'dashed' => __( 'Dashed', 'cartflows' ),
294
+ ),
295
+ 'selectors' => array(
296
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'border-style: {{VALUE}};',
297
+ ),
298
+ )
299
+ );
300
+ $this->add_control(
301
+ 'input_border_size',
302
+ array(
303
+ 'label' => __( 'Border Width', 'cartflows' ),
304
+ 'type' => Controls_Manager::DIMENSIONS,
305
+ 'size_units' => array( 'px' ),
306
+ 'selectors' => array(
307
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
308
+ ),
309
+ )
310
+ );
311
+
312
+ $this->add_control(
313
+ 'input_border_color',
314
+ array(
315
+ 'label' => __( 'Border Color', 'cartflows' ),
316
+ 'type' => Controls_Manager::COLOR,
317
+ 'selectors' => array(
318
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'border-color: {{VALUE}};',
319
+ ),
320
+ )
321
+ );
322
+
323
+ $this->add_responsive_control(
324
+ 'input_radius',
325
+ array(
326
+ 'label' => __( 'Rounded Corners', 'cartflows' ),
327
+ 'type' => Controls_Manager::DIMENSIONS,
328
+ 'size_units' => array( 'px', 'em', '%' ),
329
+ 'selectors' => array(
330
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
331
+ ),
332
+ )
333
+ );
334
+
335
+ $this->end_controls_section();
336
+ }
337
+
338
+ /**
339
+ * Register Button Style Controls.
340
+ *
341
+ * @since x.x.x
342
+ * @access protected
343
+ */
344
+ protected function register_button_style_controls() {
345
+
346
+ $this->start_controls_section(
347
+ 'button_section',
348
+ array(
349
+ 'label' => __( 'Submit Button', 'cartflows' ),
350
+ 'tab' => Controls_Manager::TAB_STYLE,
351
+ )
352
+ );
353
+
354
+ $this->add_group_control(
355
+ Group_Control_Typography::get_type(),
356
+ array(
357
+ 'name' => 'buttons_typography',
358
+ 'label' => 'Typography',
359
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review #payment button#place_order',
360
+ )
361
+ );
362
+
363
+ $this->start_controls_tabs( 'tabs_button_style' );
364
+
365
+ $this->start_controls_tab(
366
+ 'tab_button_normal',
367
+ array(
368
+ 'label' => __( 'Normal', 'cartflows' ),
369
+ )
370
+ );
371
+
372
+ $this->add_control(
373
+ 'button_text_color',
374
+ array(
375
+ 'label' => __( 'Text Color', 'cartflows' ),
376
+ 'type' => Controls_Manager::COLOR,
377
+ 'default' => '',
378
+ 'selectors' => array(
379
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order' => 'color: {{VALUE}};',
380
+ ),
381
+ )
382
+ );
383
+
384
+ $this->add_group_control(
385
+ Group_Control_Background::get_type(),
386
+ array(
387
+ 'name' => 'btn_background_color',
388
+ 'label' => __( 'Background Color', 'cartflows' ),
389
+ 'types' => array( 'classic', 'gradient' ),
390
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order',
391
+ )
392
+ );
393
+
394
+ $this->add_group_control(
395
+ Group_Control_Border::get_type(),
396
+ array(
397
+ 'name' => 'btn_border',
398
+ 'label' => __( 'Border', 'cartflows' ),
399
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order',
400
+ )
401
+ );
402
+
403
+ $this->add_responsive_control(
404
+ 'btn_border_radius',
405
+ array(
406
+ 'label' => __( 'Rounded Corners', 'cartflows' ),
407
+ 'type' => Controls_Manager::DIMENSIONS,
408
+ 'size_units' => array( 'px', '%' ),
409
+ 'selectors' => array(
410
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
411
+ ),
412
+ )
413
+ );
414
+
415
+ $this->add_group_control(
416
+ Group_Control_Box_Shadow::get_type(),
417
+ array(
418
+ 'name' => 'button_box_shadow',
419
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order',
420
+ )
421
+ );
422
+
423
+ $this->end_controls_tab();
424
+
425
+ $this->start_controls_tab(
426
+ 'tab_button_hover',
427
+ array(
428
+ 'label' => __( 'Hover', 'cartflows' ),
429
+ )
430
+ );
431
+
432
+ $this->add_control(
433
+ 'btn_hover_color',
434
+ array(
435
+ 'label' => __( 'Text Color', 'cartflows' ),
436
+ 'type' => Controls_Manager::COLOR,
437
+ 'selectors' => array(
438
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order:hover' => 'color: {{VALUE}};',
439
+ ),
440
+ )
441
+ );
442
+
443
+ $this->add_control(
444
+ 'button_hover_border_color',
445
+ array(
446
+ 'label' => __( 'Border Hover Color', 'cartflows' ),
447
+ 'type' => Controls_Manager::COLOR,
448
+ 'selectors' => array(
449
+ '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order:hover' => 'border-color: {{VALUE}};',
450
+ ),
451
+ )
452
+ );
453
+
454
+ $this->add_group_control(
455
+ Group_Control_Background::get_type(),
456
+ array(
457
+ 'name' => 'button_background_hover_color',
458
+ 'label' => __( 'Background Color', 'cartflows' ),
459
+ 'types' => array( 'classic', 'gradient' ),
460
+ 'selector' => '{{WRAPPER}} .wcf-el-optin-form.cartflows-elementor__optin-form .wcf-optin-form .checkout.woocommerce-checkout .wcf-order-wrap #order_review .woocommerce-checkout-payment button#place_order:hover',
461
+ )
462
+ );
463
+
464
+ $this->end_controls_tab();
465
+
466
+ $this->end_controls_tabs();
467
+
468
+ $this->end_controls_section();
469
+ }
470
+
471
+
472
+ /**
473
+ * Cartflows Optin Form Styler.
474
+ *
475
+ * @since x.x.x
476
+ * @access public
477
+ */
478
+ public function is_reload_preview_required() {
479
+ return true;
480
+ }
481
+
482
+ /**
483
+ * Render Optin Form output on the frontend.
484
+ *
485
+ * Written in PHP and used to generate the final HTML.
486
+ *
487
+ * @since x.x.x
488
+ * @access protected
489
+ */
490
+ protected function render() {
491
+
492
+ self::$settings = $this->get_settings_for_display();
493
+
494
+ /* Add elementor setting options to filters */
495
+ $this->dynamic_option_filters();
496
+
497
+ $checkout_id = get_the_id();
498
+
499
+ do_action( 'cartflows_elementor_before_optin_shortcode', $checkout_id );
500
+
501
+ ?>
502
+ <div class = "wcf-el-optin-form cartflows-elementor__optin-form">
503
+ <?php echo do_shortcode( '[cartflows_optin]' ); ?>
504
+ </div>
505
+ <?php
506
+
507
+ }
508
+
509
+ /**
510
+ * Dynamic options of elementor and add filters.
511
+ *
512
+ * @since x.x.x
513
+ */
514
+ public function dynamic_option_filters() {
515
+
516
+ do_action( 'cartflows_elementor_optin_options_filters', self::$settings );
517
+ }
518
+ }
modules/elementor/widgets/class-cartflows-el-order-details-form.php ADDED
@@ -0,0 +1,826 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+ /**
3
+ * Elementor Classes.
4
+ *
5
+ * @package cartflows
6
+ */
7
+
8
+ use Elementor\Controls_Manager;
9
+ use Elementor\Group_Control_Border;
10
+ use Elementor\Widget_Base;
11
+ use Elementor\Widget_Button;
12
+ use Elementor\Group_Control_Typography;
13
+ use Elementor\Scheme_Typography;
14
+ use Elementor\Group_Control_Background;
15
+ use Elementor\Scheme_Color;
16
+
17
+
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit; // Exit if accessed directly.
20
+ }
21
+
22
+ /**
23
+ * Order Details Form Widget
24
+ *
25
+ * @since x.x.x
26
+ */
27
+ class Cartflows_Order_Details_Form extends Widget_Base {
28
+
29
+ /**
30
+ * Module should load or not.
31
+ *
32
+ * @since x.x.x
33
+ * @access public
34
+ * @param string $step_type Current step type.
35
+ *
36
+ * @return bool true|false.
37
+ */
38
+ public static function is_enable( $step_type ) {
39
+
40
+ if ( 'thankyou' === $step_type && wcf()->is_woo_active ) {
41
+ return true;
42
+ }
43
+ return false;
44
+ }
45
+
46
+ /**
47
+ * Retrieve the widget name.
48
+ *
49
+ * @since x.x.x
50
+ *
51
+ * @access public
52
+ *
53
+ * @return string Widget name.
54
+ */
55
+ public function get_name() {
56
+ return 'order-details-form';
57
+ }
58
+
59
+ /**
60
+ * Retrieve the widget title.
61
+ *
62
+ * @since x.x.x
63
+ *
64
+ * @access public
65
+ *
66
+ * @return string Widget title.
67
+ */
68
+ public function get_title() {
69
+ return __( 'Order Details Form', 'cartflows' );
70
+ }
71
+
72
+ /**
73
+ * Retrieve the widget icon.
74
+ *
75
+ * @since x.x.x
76
+ *
77
+ * @access public
78
+ *
79
+ * @return string Widget icon.
80
+ */
81
+ public function get_icon() {
82
+ return 'wcf-el-icon-order-detail';
83
+ }
84
+
85
+ /**
86
+ * Retrieve the list of categories the widget belongs to.
87
+ *
88
+ * Used to determine where to display the widget in the editor.
89
+ *
90
+ * Note that currently Elementor supports only one category.
91
+ * When multiple categories passed, Elementor uses the first one.
92
+ *
93
+ * @since x.x.x
94
+ *
95
+ * @access public
96
+ *
97
+ * @return array Widget categories.
98
+ */
99
+ public function get_categories() {
100
+ return array( 'cartflows-widgets' );
101
+ }
102
+
103
+ /**
104
+ * Settings
105
+ *
106
+ * @since x.x.x
107
+ * @var object $settings
108
+ */
109
+ public static $settings;
110
+
111
+ /**
112
+ * Retrieve Widget Keywords.
113
+ *
114
+ * @since x.x.x
115
+ * @access public
116
+ *
117
+ * @return string Widget keywords.
118
+ */
119
+ public function get_keywords() {
120
+ return array( 'cartflows', 'order details', 'form' );
121
+ }
122
+
123
+ /**
124
+ * Register Order Details Form controls.
125
+ *
126
+ * @since x.x.x
127
+ * @access protected
128
+ */
129
+ protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
130
+
131
+ // Content Tab.
132
+ $this->register_thankyou_controls();
133
+
134
+ // Style Tab.
135
+ $this->register_spacing_controls();
136
+ $this->register_heading_style_controls();
137
+ $this->register_general_style_controls();
138
+ $this->register_section_order_review_style_controls();
139
+ $this->register_section_downloads_style_controls();
140
+ $this->register_section_order_details_style_controls();
141
+ $this->register_section_customer_details_style_controls();
142
+
143
+ }
144
+
145
+ /**
146
+ * Register Thank you page Controls.
147
+ *
148
+ * @since x.x.x
149
+ * @access protected
150
+ */
151
+ protected function register_thankyou_controls() {
152
+
153
+ $this->start_controls_section(
154
+ 'section_thankyou_fields',
155
+ array(
156
+ 'label' => __( 'General', 'cartflows' ),
157
+ )
158
+ );
159
+
160
+ $this->add_control(
161
+ 'thankyou_text',
162
+ array(
163
+ 'label' => __( 'Thank You Text', 'cartflows' ),
164
+ 'type' => Controls_Manager::TEXT,
165
+ 'placeholder' => __( 'Thank you. Your order has been received.', 'cartflows' ),
166
+ 'label_block' => true,
167
+ )
168
+ );
169
+
170
+ $this->add_control(
171
+ 'show_order_overview',
172
+ array(
173
+ 'label' => __( 'Order Overview', 'cartflows' ),
174
+ 'type' => Controls_Manager::SWITCHER,
175
+ 'label_on' => __( 'Show', 'cartflows' ),
176
+ 'label_off' => __( 'Hide', 'cartflows' ),
177
+ 'return_value' => 'yes',
178
+ 'default' => 'yes',
179
+ )
180
+ );
181
+
182
+ $this->add_control(
183
+ 'show_order_details',
184
+ array(
185
+ 'label' => __( 'Order Details', 'cartflows' ),
186
+ 'type' => Controls_Manager::SWITCHER,
187
+ 'label_on' => __( 'Show', 'cartflows' ),
188
+ 'label_off' => __( 'Hide', 'cartflows' ),
189
+ 'return_value' => 'yes',
190
+ 'default' => 'yes',
191
+ )
192
+ );
193
+
194
+ $this->add_control(
195
+ 'show_billing_address',
196
+ array(
197
+ 'label' => __( 'Billing Address', 'cartflows' ),
198
+ 'type' => Controls_Manager::SWITCHER,
199
+ 'label_on' => __( 'Show', 'cartflows' ),
200
+ 'label_off' => __( 'Hide', 'cartflows' ),
201
+ 'return_value' => 'yes',
202
+ 'default' => 'yes',
203
+ )
204
+ );
205
+
206
+ $this->add_control(
207
+ 'show_shipping_address',
208
+ array(
209
+ 'label' => __( 'Shipping Address', 'cartflows' ),
210
+ 'type' => Controls_Manager::SWITCHER,
211
+ 'label_on' => __( 'Show', 'cartflows' ),
212
+ 'label_off' => __( 'Hide', 'cartflows' ),
213
+ 'return_value' => 'yes',
214
+ 'default' => 'yes',
215
+ )
216
+ );
217
+
218
+ $this->end_controls_section();
219
+
220
+ }
221
+
222
+ /**
223
+ * Register spacing Styling Controls.
224
+ *
225
+ * @since x.x.x
226
+ * @access protected
227
+ */
228
+ protected function register_spacing_controls() {
229
+
230
+ $this->start_controls_section(
231
+ 'order_details_form_spacing_styling',
232
+ array(
233
+ 'label' => __( 'Spacing', 'cartflows' ),
234
+ 'tab' => Controls_Manager::TAB_STYLE,
235
+ )
236
+ );
237
+
238
+ $this->add_control(
239
+ 'heading_spacing',
240
+ array(
241
+ 'label' => __( 'Heading Bottom Spacing', 'cartflows' ),
242
+ 'type' => Controls_Manager::SLIDER,
243
+ 'range' => array(
244
+ 'px' => array(
245
+ 'max' => 50,
246
+ ),
247
+ ),
248
+ 'selectors' => array(
249
+ '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received' => 'margin-bottom: {{SIZE}}{{UNIT}};',
250
+ ),
251
+ )
252
+ );
253
+
254
+ $this->add_control(
255
+ 'sections_spacing',
256
+ array(
257
+ 'label' => __( 'Spacing Between Sections', 'cartflows' ),
258
+ 'type' => Controls_Manager::SLIDER,
259
+ 'range' => array(
260
+ 'px' => array(
261
+ 'max' => 50,
262
+ ),
263
+ ),
264
+ 'selectors' => array(
265
+ '{{WRAPPER}} .woocommerce-order ul.order_details,
266
+ {{WRAPPER}} .woocommerce-order .woocommerce-customer-details,
267
+ {{WRAPPER}} .woocommerce-order .woocommerce-order-details,
268
+ {{WRAPPER}} .woocommerce-order .woocommerce-order-downloads,
269
+ {{WRAPPER}} .woocommerce-order .woocommerce-bacs-bank-details,
270
+ {{WRAPPER}} .woocommerce-order-details.mollie-instructions' => 'margin-bottom: {{SIZE}}{{UNIT}};',
271
+ ),
272
+ )
273
+ );
274
+
275
+ $this->end_controls_section();
276
+
277
+ }
278
+
279
+ /**
280
+ * Register heading Styling Controls.
281
+ *
282
+ * @since x.x.x
283
+ * @access protected
284
+ */
285
+ protected function register_heading_style_controls() {
286
+
287
+ $this->start_controls_section(
288
+ 'order_details_form_heading_styling',
289
+ array(
290
+ 'label' => __( 'Heading', 'cartflows' ),
291
+ 'tab' => Controls_Manager::TAB_STYLE,
292
+ )
293
+ );
294
+
295
+ $this->add_control(
296
+ 'heading_align',
297
+ array(
298
+ 'label' => __( 'Alignment', 'cartflows' ),
299
+ 'type' => Controls_Manager::CHOOSE,
300
+ 'options' => array(
301
+ 'left' => array(
302
+ 'title' => __( 'Left', 'cartflows' ),
303
+ 'icon' => 'fa fa-align-left',
304
+ ),
305
+ 'center' => array(
306
+ 'title' => __( 'Center', 'cartflows' ),
307
+ 'icon' => 'fa fa-align-center',
308
+ ),
309
+ 'right' => array(
310
+ 'title' => __( 'Right', 'cartflows' ),
311
+ 'icon' => 'fa fa-align-right',
312
+ ),
313
+ ),
314
+ 'selectors' => array(
315
+ '{{WRAPPER}} .cartflows-elementor__order-details-form .woocommerce-order .woocommerce-thankyou-order-received' => 'text-align: {{VALUE}};',
316
+ ),
317
+ )
318
+ );
319
+
320
+ $this->add_control(
321
+ 'heading_color',
322
+ array(
323
+ 'label' => __( 'Text Color', 'cartflows' ),
324
+ 'type' => Controls_Manager::COLOR,
325
+ 'default' => '',
326
+ 'selectors' => array(
327
+ '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received' => 'color: {{VALUE}};',
328
+ ),
329
+ )
330
+ );
331
+
332
+ $this->add_group_control(
333
+ Group_Control_Typography::get_type(),
334
+ array(
335
+ 'name' => 'heading_typography',
336
+ 'label' => 'Typography',
337
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order .woocommerce-thankyou-order-received',
338
+ )
339
+ );
340
+
341
+ $this->end_controls_section();
342
+
343
+ }
344
+
345
+ /**
346
+ * Register General Styling Controls.
347
+ *
348
+ * @since x.x.x
349
+ * @access protected
350
+ */
351
+ protected function register_general_style_controls() {
352
+
353
+ $this->start_controls_section(
354
+ 'order_details_form_general_styling',
355
+ array(
356
+ 'label' => __( 'Sections', 'cartflows' ),
357
+ 'tab' => Controls_Manager::TAB_STYLE,
358
+ )
359
+ );
360
+
361
+ $this->add_control(
362
+ 'label_section_heading',
363
+ array(
364
+ 'label' => __( 'Sections Heading', 'cartflows' ),
365
+ 'type' => Controls_Manager::HEADING,
366
+ )
367
+ );
368
+
369
+ $this->add_control(
370
+ 'section_heading_color',
371
+ array(
372
+ 'label' => __( 'Text Color', 'cartflows' ),
373
+ 'type' => Controls_Manager::COLOR,
374
+ 'default' => '',
375
+ 'selectors' => array(
376
+ '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order h2' => 'color: {{VALUE}};',
377
+ ),
378
+ )
379
+ );
380
+
381
+ $this->add_group_control(
382
+ Group_Control_Typography::get_type(),
383
+ array(
384
+ 'name' => 'section_heading_typography',
385
+ 'label' => 'Typography',
386
+ 'selector' => '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order h2',
387
+ )
388
+ );
389
+
390
+ $this->add_control(
391
+ 'section_content_heading',
392
+ array(
393
+ 'label' => __( 'Sections Content', 'cartflows' ),
394
+ 'type' => Controls_Manager::HEADING,
395
+ 'separator' => 'before',
396
+ )
397
+ );
398
+
399
+ $this->add_control(
400
+ 'section_text_color',
401
+ array(
402
+ 'label' => __( 'Text Color', 'cartflows' ),
403
+ 'type' => Controls_Manager::COLOR,
404
+ 'default' => '',
405
+ 'selectors' => array(
406
+ '{{WRAPPER}} .cartflows-elementor__order-details-form .wcf-thankyou-wrap .woocommerce-order,
407
+ {{WRAPPER}} .woocommerce-order-downloads table.shop_table' => 'color: {{VALUE}};',
408
+ ),
409
+ )
410
+ );
411
+
412
+ $this->add_group_control(
413
+ Group_Control_Typography::get_type(),
414
+ array(
415
+ 'name' => 'section_text_typography',
416
+ 'label' => 'Typography',
417
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li, {{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table, {{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address,
418
+ {{WRAPPER}} .woocommerce-order-downloads table.shop_table',
419
+ )
420
+ );
421
+
422
+ $this->add_group_control(
423
+ Group_Control_Background::get_type(),
424
+ array(
425
+ 'name' => 'section_all_background_color',
426
+ 'label' => __( 'Background Color', 'cartflows' ),
427
+ 'types' => array( 'classic', 'gradient' ),
428
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details, {{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details, {{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details,
429
+ {{WRAPPER}} .woocommerce-order-downloads',
430
+ 'separator' => 'before',
431
+ )
432
+ );
433
+
434
+ $this->end_controls_section();
435
+ }
436
+
437
+ /**
438
+ * Register Section Order Review Styling Controls.
439
+ *
440
+ * @since x.x.x
441
+ * @access protected
442
+ */
443
+ protected function register_section_order_review_style_controls() {
444
+
445
+ $this->start_controls_section(
446
+ 'section_order_review_styling',
447
+ array(
448
+ 'label' => __( 'Order Overview', 'cartflows' ),
449
+ 'tab' => Controls_Manager::TAB_STYLE,
450
+ 'condition' => array(
451
+ 'show_order_overview' => 'yes',
452
+ ),
453
+ )
454
+ );
455
+
456
+ $this->add_group_control(
457
+ Group_Control_Typography::get_type(),
458
+ array(
459
+ 'name' => 'section_order_review_typography',
460
+ 'label' => 'Typography',
461
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details li',
462
+ )
463
+ );
464
+
465
+ $this->add_control(
466
+ 'section_order_review_text_color',
467
+ array(
468
+ 'label' => __( 'Text Color', 'cartflows' ),
469
+ 'type' => Controls_Manager::COLOR,
470
+ 'default' => '',
471
+ 'selectors' => array(
472
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details' => 'color: {{VALUE}};',
473
+ ),
474
+ )
475
+ );
476
+
477
+ $this->add_group_control(
478
+ Group_Control_Background::get_type(),
479
+ array(
480
+ 'name' => 'section_order_review_background_color',
481
+ 'label' => __( 'Background Color', 'cartflows' ),
482
+ 'types' => array( 'classic', 'gradient' ),
483
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details',
484
+ )
485
+ );
486
+
487
+ $this->end_controls_section();
488
+ }
489
+
490
+ /**
491
+ * Register Section Order downloads Styling Controls.
492
+ *
493
+ * @since x.x.x
494
+ * @access protected
495
+ */
496
+ protected function register_section_downloads_style_controls() {
497
+
498
+ $this->start_controls_section(
499
+ 'section_downloads_styling',
500
+ array(
501
+ 'label' => __( 'Downloads', 'cartflows' ),
502
+ 'tab' => Controls_Manager::TAB_STYLE,
503
+ )
504
+ );
505
+
506
+ $this->add_control(
507
+ 'section_downloads_label_heading',
508
+ array(
509
+ 'label' => __( 'Heading', 'cartflows' ),
510
+ 'type' => Controls_Manager::HEADING,
511
+ )
512
+ );
513
+
514
+ $this->add_group_control(
515
+ Group_Control_Typography::get_type(),
516
+ array(
517
+ 'name' => 'section_downloads_heading_typography',
518
+ 'label' => 'Typography',
519
+ 'selector' => '{{WRAPPER}} .woocommerce-order h2.woocommerce-order-downloads__title,
520
+ {{WRAPPER}} .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title',
521
+ )
522
+ );
523
+
524
+ $this->add_control(
525
+ 'section_downloads_heading_color',
526
+ array(
527
+ 'label' => __( 'Text Color', 'cartflows' ),
528
+ 'type' => Controls_Manager::COLOR,
529
+ 'default' => '',
530
+ 'selectors' => array(
531
+ '{{WRAPPER}} .woocommerce-order h2.woocommerce-order-downloads__title,
532
+ {{WRAPPER}} .woocommerce-order .woocommerce-order-downloads h2.woocommerce-order-downloads__title' => 'color: {{VALUE}};',
533
+ ),
534
+ )
535
+ );
536
+
537
+ $this->add_control(
538
+ 'section_downloads_content_heading',
539
+ array(
540
+ 'label' => __( 'Content', 'cartflows' ),
541
+ 'type' => Controls_Manager::HEADING,
542
+ 'separator' => 'before',
543
+ )
544
+ );
545
+
546
+ $this->add_group_control(
547
+ Group_Control_Typography::get_type(),
548
+ array(
549
+ 'name' => 'section_downloads_text_typography',
550
+ 'label' => 'Typography',
551
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table',
552
+ )
553
+ );
554
+
555
+ $this->add_control(
556
+ 'section_downloads_text_color',
557
+ array(
558
+ 'label' => __( 'Text Color', 'cartflows' ),
559
+ 'type' => Controls_Manager::COLOR,
560
+ 'default' => '',
561
+ 'selectors' => array(
562
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads table.shop_table' => 'color: {{VALUE}};',
563
+ ),
564
+ )
565
+ );
566
+
567
+ $this->add_group_control(
568
+ Group_Control_Background::get_type(),
569
+ array(
570
+ 'name' => 'section_downloads_background_color',
571
+ 'label' => __( 'Background Color', 'cartflows' ),
572
+ 'types' => array( 'classic', 'gradient' ),
573
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-downloads',
574
+ )
575
+ );
576
+
577
+ $this->end_controls_section();
578
+ }
579
+
580
+ /**
581
+ * Register Section Order Details Styling Controls.
582
+ *
583
+ * @since x.x.x
584
+ * @access protected
585
+ */
586
+ protected function register_section_order_details_style_controls() {
587
+
588
+ $this->start_controls_section(
589
+ 'section_order_details_styling',
590
+ array(
591
+ 'label' => __( 'Order Details', 'cartflows' ),
592
+ 'tab' => Controls_Manager::TAB_STYLE,
593
+ 'condition' => array(
594
+ 'show_order_details' => 'yes',
595
+ ),
596
+ )
597
+ );
598
+
599
+ $this->add_control(
600
+ 'section_order_details_label_heading',
601
+ array(
602
+ 'label' => __( 'Heading', 'cartflows' ),
603
+ 'type' => Controls_Manager::HEADING,
604
+ )
605
+ );
606
+
607
+ $this->add_group_control(
608
+ Group_Control_Typography::get_type(),
609
+ array(
610
+ 'name' => 'section_order_details_heading_typography',
611
+ 'label' => 'Typography',
612
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title',
613
+ )
614
+ );
615
+
616
+ $this->add_control(
617
+ 'section_order_details_heading_color',
618
+ array(
619
+ 'label' => __( 'Text Color', 'cartflows' ),
620
+ 'type' => Controls_Manager::COLOR,
621
+ 'default' => '',
622
+ 'selectors' => array(
623
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-order-details__title' => 'color: {{VALUE}};',
624
+ ),
625
+ )
626
+ );
627
+
628
+ $this->add_control(
629
+ 'section_order_details_content_heading',
630
+ array(
631
+ 'label' => __( 'Content', 'cartflows' ),
632
+ 'type' => Controls_Manager::HEADING,
633
+ 'separator' => 'before',
634
+ )
635
+ );
636
+
637
+ $this->add_group_control(
638
+ Group_Control_Typography::get_type(),
639
+ array(
640
+ 'name' => 'section_order_details_text_typography',
641
+ 'label' => 'Typography',
642
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table',
643
+ )
644
+ );
645
+
646
+ $this->add_control(
647
+ 'section_order_details_text_color',
648
+ array(
649
+ 'label' => __( 'Text Color', 'cartflows' ),
650
+ 'type' => Controls_Manager::COLOR,
651
+ 'default' => '',
652
+ 'selectors' => array(
653
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details .woocommerce-table' => 'color: {{VALUE}};',
654
+ ),
655
+ )
656
+ );
657
+
658
+ $this->add_group_control(
659
+ Group_Control_Background::get_type(),
660
+ array(
661
+ 'name' => 'section_order_details_background_color',
662
+ 'label' => __( 'Background Color', 'cartflows' ),
663
+ 'types' => array( 'classic', 'gradient' ),
664
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-order-details',
665
+ )
666
+ );
667
+
668
+ $this->end_controls_section();
669
+ }
670
+
671
+
672
+ /**
673
+ * Register Section Customer Details Styling Controls.
674
+ *
675
+ * @since x.x.x
676
+ * @access protected
677
+ */
678
+ protected function register_section_customer_details_style_controls() {
679
+
680
+ $this->start_controls_section(
681
+ 'section_customer_details_styling',
682
+ array(
683
+ 'label' => __( 'Customer Details', 'cartflows' ),
684
+ 'tab' => Controls_Manager::TAB_STYLE,
685
+ )
686
+ );
687
+
688
+ $this->add_control(
689
+ 'section_customer_details_label_heading',
690
+ array(
691
+ 'label' => __( 'Heading', 'cartflows' ),
692
+ 'type' => Controls_Manager::HEADING,
693
+ )
694
+ );
695
+
696
+ $this->add_group_control(
697
+ Group_Control_Typography::get_type(),
698
+ array(
699
+ 'name' => 'section_customer_details_heading_typography',
700
+ 'label' => 'Typography',
701
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title',
702
+ )
703
+ );
704
+
705
+ $this->add_control(
706
+ 'section_customer_details_heading_color',
707
+ array(
708
+ 'label' => __( 'Text Color', 'cartflows' ),
709
+ 'type' => Controls_Manager::COLOR,
710
+ 'default' => '',
711
+ 'selectors' => array(
712
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details .woocommerce-column__title' => 'color: {{VALUE}};',
713
+ ),
714
+ )
715
+ );
716
+
717
+ $this->add_control(
718
+ 'section_customer_details_content_heading',
719
+ array(
720
+ 'label' => __( 'Content', 'cartflows' ),
721
+ 'type' => Controls_Manager::HEADING,
722
+ 'separator' => 'before',
723
+ )
724
+ );
725
+
726
+ $this->add_group_control(
727
+ Group_Control_Typography::get_type(),
728
+ array(
729
+ 'name' => 'section_customer_details_text_typography',
730
+ 'label' => 'Typography',
731
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address',
732
+ )
733
+ );
734
+
735
+ $this->add_control(
736
+ 'section_customer_details_text_color',
737
+ array(
738
+ 'label' => __( 'Text Color', 'cartflows' ),
739
+ 'type' => Controls_Manager::COLOR,
740
+ 'default' => '',
741
+ 'selectors' => array(
742
+ '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details address' => 'color: {{VALUE}};',
743
+ ),
744
+ )
745
+ );
746
+
747
+ $this->add_group_control(
748
+ Group_Control_Background::get_type(),
749
+ array(
750
+ 'name' => 'section_customer_details_background_color',
751
+ 'label' => __( 'Background Color', 'cartflows' ),
752
+ 'types' => array( 'classic', 'gradient' ),
753
+ 'selector' => '{{WRAPPER}} .wcf-thankyou-wrap .woocommerce-order .woocommerce-customer-details',
754
+ )
755
+ );
756
+
757
+ $this->end_controls_section();
758
+ }
759
+
760
+ /**
761
+ * Render Order Details Form output on the frontend.
762
+ *
763
+ * Written in PHP and used to generate the final HTML.
764
+ *
765
+ * @since x.x.x
766
+ * @access protected
767
+ */
768
+ protected function render() {
769
+
770
+ self::$settings = $this->get_settings_for_display();
771
+
772
+ /* Add elementor setting options to filters */
773
+ $this->dynamic_option_filters();
774
+
775
+ $order_overview = self::$settings['show_order_overview'] ? self::$settings['show_order_overview'] : 'no';
776
+
777
+ $order_details = self::$settings['show_order_details'] ? self::$settings['show_order_details'] : 'no';
778
+
779
+ $shipping_address = self::$settings['show_shipping_address'] ? self::$settings['show_shipping_address'] : 'no';
780
+
781
+ $billing_address = self::$settings['show_billing_address'] ? self::$settings['show_billing_address'] : 'no';
782
+
783
+ ?>
784
+ <div class = "cartflows-elementor__order-details-form cartflows-elementor__display-order-overview-<?php echo esc_attr( $order_overview ); ?> cartflows-elementor__display-order-details-<?php echo esc_attr( $order_details ); ?> cartflows-elementor__display-billing-address-<?php echo esc_attr( $billing_address ); ?> cartflows-elementor__display-shipping-address-<?php echo esc_attr( $shipping_address ); ?>">
785
+ <?php echo do_shortcode( '[cartflows_order_details]' ); ?>
786
+ </div>
787
+ <?php
788
+ }
789
+
790
+ /**
791
+ * Dynamic options of elementor and add filters.
792
+ *
793
+ * @since x.x.x
794
+ */
795
+ public function dynamic_option_filters() {
796
+
797
+ if ( ! empty( self::$settings['thankyou_text'] ) ) {
798
+
799
+ add_filter(
800
+ 'cartflows_thankyou_meta_wcf-tq-text',
801
+ function( $text ) {
802
+
803
+ $text = self::$settings['thankyou_text'];
804
+
805
+ return $text;
806
+ },
807
+ 10,
808
+ 1
809
+ );
810
+ }
811
+
812
+ }
813
+
814
+ /**
815
+ * Render Order Details Form output in the editor.
816
+ *
817
+ * Written as a Backbone JavaScript template and used to generate the live preview.
818
+ *
819
+ * Remove this after Elementor v3.3.0
820
+ *
821
+ * @since x.x.x
822
+ * @access protected
823
+ */
824
+ protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
825
+ }
826
+ }
modules/elementor/widgets/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ /**
3
+ * Silence is golden.
modules/flow/view/view-flow-inner-step.php CHANGED
@@ -1,129 +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>
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 ) && ( $control_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 ) && ( $control_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 ) && $control_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/landing/classes/class-cartflows-landing-markup.php CHANGED
@@ -1,147 +1,147 @@
1
- <?php
2
- /**
3
- * Markup
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Checkout Markup
10
- *
11
- * @since 1.0.0
12
- */
13
- class Cartflows_Landing_Markup {
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
- add_action( 'pre_get_posts', array( $this, 'wcf_pre_get_posts' ) );
39
- add_action( 'template_redirect', array( $this, 'template_redirect' ) );
40
-
41
- if ( is_admin() ) {
42
- add_filter( 'wp_dropdown_pages', array( $this, 'wp_dropdown_pages' ) );
43
- }
44
- }
45
-
46
- /**
47
- * Add landing pages in WordPress reading section.
48
- *
49
- * @param array $output output.
50
- */
51
- public function wp_dropdown_pages( $output ) {
52
-
53
- global $pagenow;
54
-
55
- if ( ( 'options-reading.php' === $pagenow || 'customize.php' === $pagenow ) && preg_match( '#page_on_front#', $output ) ) {
56
-
57
- $args = array(
58
- 'post_type' => CARTFLOWS_STEP_POST_TYPE,
59
- 'numberposts' => 100,
60
- 'meta_query' => array( //phpcs:ignore
61
- 'relation' => 'OR',
62
- array(
63
- 'key' => 'wcf-step-type',
64
- 'value' => 'landing',
65
- ),
66
- array(
67
- 'key' => 'wcf-step-type',
68
- 'value' => 'checkout',
69
- ),
70
- array(
71
- 'key' => 'wcf-step-type',
72
- 'value' => 'optin',
73
- ),
74
- ),
75
- );
76
-
77
- $landing_pages = get_posts( $args );
78
-
79
- if ( is_array( $landing_pages ) && ! empty( $landing_pages ) ) {
80
-
81
- $cartflows_custom_option = '';
82
-
83
- $front_page_id = get_option( 'page_on_front' );
84
-
85
- foreach ( $landing_pages as $key => $landing_page ) {
86
-
87
- $selected = selected( $front_page_id, $landing_page->ID, false );
88
-
89
- $cartflows_custom_option .= "<option value=\"{$landing_page->ID}\"{$selected}>{$landing_page->post_title} ( #{$landing_page->ID} - CartFlows )</option>";
90
- }
91
-
92
- $cartflows_custom_option .= '</select>';
93
-
94
- $output = str_replace( '</select>', $cartflows_custom_option, $output );
95
- }
96
- }
97
-
98
- return $output;
99
- }
100
-
101
- /**
102
- * Set post query.
103
- *
104
- * @param string $query post query.
105
- */
106
- public function wcf_pre_get_posts( $query ) {
107
-
108
- if ( $query->is_main_query() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
109
-
110
- $post_type = $query->get( 'post_type' );
111
-
112
- $page_id = $query->get( 'page_id' );
113
-
114
- if ( empty( $post_type ) && ! empty( $page_id ) ) {
115
- $query->set( 'post_type', get_post_type( $page_id ) );
116
- }
117
- }
118
- }
119
-
120
- /**
121
- * Redirect to homepage if landing page set as home page.
122
- */
123
- public function template_redirect() {
124
-
125
- if ( ! wcf()->utils->is_step_post_type() ) {
126
- return;
127
- }
128
-
129
- $compatibiliy = Cartflows_Compatibility::get_instance();
130
-
131
- // Do not redirect for page builder preview.
132
- if ( $compatibiliy->is_page_builder_preview() ) {
133
- return;
134
- }
135
-
136
- global $post;
137
-
138
- if ( is_singular() && ! is_front_page() && get_option( 'page_on_front' ) == $post->ID ) {
139
- wp_safe_redirect( site_url(), 301 );
140
- }
141
- }
142
- }
143
-
144
- /**
145
- * Kicking this off by calling 'get_instance()' method
146
- */
147
- Cartflows_Landing_Markup::get_instance();
1
+ <?php
2
+ /**
3
+ * Markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Landing_Markup {
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
+ add_action( 'pre_get_posts', array( $this, 'wcf_pre_get_posts' ) );
39
+ add_action( 'template_redirect', array( $this, 'template_redirect' ) );
40
+
41
+ if ( is_admin() ) {
42
+ add_filter( 'wp_dropdown_pages', array( $this, 'wp_dropdown_pages' ) );
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Add landing pages in WordPress reading section.
48
+ *
49
+ * @param array $output output.
50
+ */
51
+ public function wp_dropdown_pages( $output ) {
52
+
53
+ global $pagenow;
54
+
55
+ if ( ( 'options-reading.php' === $pagenow || 'customize.php' === $pagenow ) && preg_match( '#page_on_front#', $output ) ) {
56
+
57
+ $args = array(
58
+ 'post_type' => CARTFLOWS_STEP_POST_TYPE,
59
+ 'numberposts' => 100,
60
+ 'meta_query' => array( //phpcs:ignore
61
+ 'relation' => 'OR',
62
+ array(
63
+ 'key' => 'wcf-step-type',
64
+ 'value' => 'landing',
65
+ ),
66
+ array(
67
+ 'key' => 'wcf-step-type',
68
+ 'value' => 'checkout',
69
+ ),
70
+ array(
71
+ 'key' => 'wcf-step-type',
72
+ 'value' => 'optin',
73
+ ),
74
+ ),
75
+ );
76
+
77
+ $landing_pages = get_posts( $args );
78
+
79
+ if ( is_array( $landing_pages ) && ! empty( $landing_pages ) ) {
80
+
81
+ $cartflows_custom_option = '';
82
+
83
+ $front_page_id = get_option( 'page_on_front' );
84
+
85
+ foreach ( $landing_pages as $key => $landing_page ) {
86
+
87
+ $selected = selected( $front_page_id, $landing_page->ID, false );
88
+
89
+ $cartflows_custom_option .= "<option value=\"{$landing_page->ID}\"{$selected}>{$landing_page->post_title} ( #{$landing_page->ID} - CartFlows )</option>";
90
+ }
91
+
92
+ $cartflows_custom_option .= '</select>';
93
+
94
+ $output = str_replace( '</select>', $cartflows_custom_option, $output );
95
+ }
96
+ }
97
+
98
+ return $output;
99
+ }
100
+
101
+ /**
102
+ * Set post query.
103
+ *
104
+ * @param string $query post query.
105
+ */
106
+ public function wcf_pre_get_posts( $query ) {
107
+
108
+ if ( $query->is_main_query() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
109
+
110
+ $post_type = $query->get( 'post_type' );
111
+
112
+ $page_id = $query->get( 'page_id' );
113
+
114
+ if ( empty( $post_type ) && ! empty( $page_id ) ) {
115
+ $query->set( 'post_type', get_post_type( $page_id ) );
116
+ }
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Redirect to homepage if landing page set as home page.
122
+ */
123
+ public function template_redirect() {
124
+
125
+ if ( ! wcf()->utils->is_step_post_type() ) {
126
+ return;
127
+ }
128
+
129
+ $compatibiliy = Cartflows_Compatibility::get_instance();
130
+
131
+ // Do not redirect for page builder preview.
132
+ if ( $compatibiliy->is_page_builder_preview() ) {
133
+ return;
134
+ }
135
+
136
+ global $post;
137
+
138
+ if ( is_singular() && ! is_front_page() && get_option( 'page_on_front' ) == $post->ID ) {
139
+ wp_safe_redirect( site_url(), 301 );
140
+ }
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Kicking this off by calling 'get_instance()' method
146
+ */
147
+ Cartflows_Landing_Markup::get_instance();
modules/landing/classes/class-cartflows-landing-meta.php CHANGED
@@ -1,235 +1,237 @@
1
- <?php
2
- /**
3
- * Landing post meta box
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Meta Boxes setup
10
- */
11
- class Cartflows_Landing_Meta extends Cartflows_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 = null;
27
-
28
- /**
29
- * Initiator
30
- */
31
- public static function get_instance() {
32
- if ( ! isset( self::$instance ) ) {
33
- self::$instance = new self();
34
- }
35
-
36
- return self::$instance;
37
- }
38
-
39
- /**
40
- * Constructor
41
- */
42
- public function __construct() {
43
-
44
- /* Init Metabox */
45
- add_action( 'load-post.php', array( $this, 'init_metabox' ) );
46
- add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
47
- }
48
-
49
- /**
50
- * Init Metabox
51
- */
52
- public function init_metabox() {
53
-
54
- add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
55
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
56
- }
57
-
58
- /**
59
- * Setup Metabox
60
- */
61
- public function setup_meta_box() {
62
-
63
- if ( _is_wcf_landing_type() ) {
64
- add_meta_box(
65
- 'wcf-ladning-settings', // Id.
66
- __( 'Landing Page Settings', 'cartflows' ), // Title.
67
- array( $this, 'landing_meta_box' ), // Callback.
68
- wcf()->utils->get_step_post_type(), // Post_type.
69
- 'normal', // Context.
70
- 'high' // Priority.
71
- );
72
- }
73
- }
74
-
75
- /**
76
- * Landing Metabox Markup
77
- *
78
- * @param object $post Post object.
79
- * @return void
80
- */
81
- public function landing_meta_box( $post ) {
82
-
83
- wp_nonce_field( 'save-nonce-landing-step-meta', 'nonce-landing-step-meta' );
84
- $stored = get_post_meta( $post->ID );
85
-
86
- $checkout_meta = self::get_meta_option( $post->ID );
87
-
88
- // Set stored and override defaults.
89
- foreach ( $stored as $key => $value ) {
90
- if ( array_key_exists( $key, $checkout_meta ) ) {
91
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
92
- } else {
93
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
94
- }
95
- }
96
-
97
- // Get defaults.
98
- $meta = self::get_meta_option( $post->ID );
99
-
100
- /**
101
- * Get options
102
- */
103
- $landing_data = array();
104
- foreach ( $meta as $key => $value ) {
105
-
106
- $landing_data[ $key ] = $meta[ $key ]['default'];
107
- }
108
-
109
- do_action( 'wcf_landing_settings_markup_before', $meta );
110
- $this->page_header_tab( $landing_data, $post->ID );
111
- do_action( 'wcf_landing_settings_markup_after', $meta );
112
- }
113
-
114
- /**
115
- * Page Header Tabs
116
- *
117
- * @param array $options Post meta.
118
- * @param int $post_id Post ID.
119
- */
120
- public function page_header_tab( $options, $post_id ) {
121
-
122
- $active_tab = get_post_meta( $post_id, 'wcf_active_tab', true );
123
-
124
- if ( empty( $active_tab ) ) {
125
- $active_tab = 'wcf-landing-shortcodes';
126
- }
127
-
128
- $tabs = array(
129
- array(
130
- 'title' => __( 'Shortcodes', 'cartflows' ),
131
- 'id' => 'wcf-landing-shortcodes',
132
- 'class' => 'wcf-landing-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
133
- 'icon' => 'dashicons-info',
134
- ),
135
- array(
136
- 'title' => __( 'Custom Script', 'cartflows' ),
137
- 'id' => 'wcf-landing-custom-script-header',
138
- 'class' => 'wcf-landing-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
139
- 'icon' => 'dashicons-format-aside',
140
- ),
141
- );
142
-
143
- ?>
144
- <div class="wcf-landing-table wcf-metabox-wrap widefat">
145
- <div class="wcf-table-container">
146
- <div class="wcf-column-left">
147
- <div class="wcf-tab-wrapper">
148
-
149
- <?php foreach ( $tabs as $key => $tab ) { ?>
150
- <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
151
- <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
152
- <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
153
- </div>
154
- <?php } ?>
155
- <input type="hidden" id="wcf_active_tab" name="wcf_active_tab" value="<?php echo esc_attr( $active_tab ); ?>" />
156
-
157
- </div>
158
- </div>
159
- <div class="wcf-column-right">
160
- <div class="wcf-landing-shortcodes wcf-tab-content active widefat">
161
- <?php
162
-
163
- $next_step_link = wcf()->utils->get_linking_url(
164
- array( 'class' => 'wcf-next-step' )
165
- );
166
-
167
- echo wcf()->meta->get_shortcode_field(
168
- array(
169
- 'label' => __( 'Next Step Link', 'cartflows' ),
170
- 'name' => 'wcf-next-step-link',
171
- 'content' => $next_step_link,
172
- )
173
- );
174
-
175
- ?>
176
- </div>
177
-
178
- <?php $this->tab_custom_script( $options, $post_id ); ?>
179
-
180
- <?php $this->right_column_footer( $options, $post_id ); ?>
181
- </div>
182
- </div>
183
- </div>
184
-
185
- <?php
186
-
187
- }
188
-
189
- /**
190
- * Get metabox options
191
- *
192
- * @param int $post_id post ID.
193
- * @return array
194
- */
195
- public static function get_meta_option( $post_id ) {
196
-
197
- if ( null === self::$meta_option ) {
198
- /**
199
- * Set metabox options
200
- *
201
- * @see http://php.net/manual/en/filter.filters.sanitize.php
202
- */
203
- self::$meta_option = wcf()->options->get_landing_fields( $post_id );
204
- }
205
-
206
- return self::$meta_option;
207
- }
208
-
209
- /**
210
- * Metabox Save
211
- *
212
- * @param number $post_id Post ID.
213
- * @return void
214
- */
215
- public function save_meta_box( $post_id ) {
216
-
217
- // Checks save status.
218
- $is_autosave = wp_is_post_autosave( $post_id );
219
- $is_revision = wp_is_post_revision( $post_id );
220
-
221
- $is_valid_nonce = ( isset( $_POST['nonce-landing-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-landing-step-meta'] ) ), 'save-nonce-landing-step-meta' ) ) ? true : false;
222
-
223
- // Exits script depending on save status.
224
- if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
225
- return;
226
- }
227
-
228
- wcf()->options->save_landing_fields( $post_id );
229
- }
230
- }
231
-
232
- /**
233
- * Kicking this off by calling 'get_instance()' method
234
- */
235
- Cartflows_Landing_Meta::get_instance();
 
 
1
+ <?php
2
+ /**
3
+ * Landing post meta box
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Landing_Meta extends Cartflows_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 = null;
27
+
28
+ /**
29
+ * Initiator
30
+ */
31
+ public static function get_instance() {
32
+ if ( ! isset( self::$instance ) ) {
33
+ self::$instance = new self();
34
+ }
35
+
36
+ return self::$instance;
37
+ }
38
+
39
+ /**
40
+ * Constructor
41
+ */
42
+ public function __construct() {
43
+
44
+ /* Init Metabox */
45
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
46
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
47
+ }
48
+
49
+ /**
50
+ * Init Metabox
51
+ */
52
+ public function init_metabox() {
53
+
54
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
55
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
56
+ }
57
+
58
+ /**
59
+ * Setup Metabox
60
+ */
61
+ public function setup_meta_box() {
62
+
63
+ if ( _is_wcf_landing_type() ) {
64
+ add_meta_box(
65
+ 'wcf-landing-settings', // Id.
66
+ __( 'Landing Page Settings', 'cartflows' ), // Title.
67
+ array( $this, 'landing_meta_box' ), // Callback.
68
+ wcf()->utils->get_step_post_type(), // Post_type.
69
+ 'normal', // Context.
70
+ 'high' // Priority.
71
+ );
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Landing Metabox Markup
77
+ *
78
+ * @param object $post Post object.
79
+ * @return void
80
+ */
81
+ public function landing_meta_box( $post ) {
82
+
83
+ wp_nonce_field( 'save-nonce-landing-step-meta', 'nonce-landing-step-meta' );
84
+ $stored = get_post_meta( $post->ID );
85
+
86
+ $checkout_meta = self::get_meta_option( $post->ID );
87
+
88
+ // Set stored and override defaults.
89
+ foreach ( $stored as $key => $value ) {
90
+ if ( array_key_exists( $key, $checkout_meta ) ) {
91
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
92
+ } else {
93
+ self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
94
+ }
95
+ }
96
+
97
+ // Get defaults.
98
+ $meta = self::get_meta_option( $post->ID );
99
+
100
+ /**
101
+ * Get options
102
+ */
103
+ $landing_data = array();
104
+ foreach ( $meta as $key => $value ) {
105
+
106
+ $landing_data[ $key ] = $meta[ $key ]['default'];
107
+ }
108
+
109
+ do_action( 'wcf_landing_settings_markup_before', $meta );
110
+ $this->page_header_tab( $landing_data, $post->ID );
111
+ do_action( 'wcf_landing_settings_markup_after', $meta );
112
+ }
113
+
114
+ /**
115
+ * Page Header Tabs
116
+ *
117
+ * @param array $options Post meta.
118
+ * @param int $post_id Post ID.
119
+ */
120
+ public function page_header_tab( $options, $post_id ) {
121
+
122
+ $active_tab = get_post_meta( $post_id, 'wcf_active_tab', true );
123
+
124
+ if ( empty( $active_tab ) ) {
125
+ $active_tab = 'wcf-landing-shortcodes';
126
+ }
127
+
128
+ $tabs = array(
129
+ array(
130
+ 'title' => __( 'Shortcodes', 'cartflows' ),
131
+ 'id' => 'wcf-landing-shortcodes',
132
+ 'class' => 'wcf-landing-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
133
+ 'icon' => 'dashicons-info',
134
+ ),
135
+ array(
136
+ 'title' => __( 'Custom Script', 'cartflows' ),
137
+ 'id' => 'wcf-landing-custom-script-header',
138
+ 'class' => 'wcf-landing-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
139
+ 'icon' => 'dashicons-format-aside',
140
+ ),
141
+ );
142
+
143
+ ?>
144
+ <div class="wcf-landing-table wcf-metabox-wrap widefat">
145
+ <div class="wcf-table-container">
146
+ <div class="wcf-column-left">
147
+ <div class="wcf-tab-wrapper">
148
+
149
+ <?php foreach ( $tabs as $key => $tab ) { ?>
150
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
151
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
152
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
153
+ </div>
154
+ <?php } ?>
155
+ <input type="hidden" id="wcf_active_tab" name="wcf_active_tab" value="<?php echo esc_attr( $active_tab ); ?>" />
156
+
157
+ </div>
158
+ </div>
159
+ <div class="wcf-column-right">
160
+ <div class="wcf-landing-shortcodes wcf-tab-content active widefat">
161
+ <?php
162
+
163
+ echo wcf_get_page_builder_notice();
164
+
165
+ $next_step_link = wcf()->utils->get_linking_url(
166
+ array( 'class' => 'wcf-next-step' )
167
+ );
168
+
169
+ echo wcf()->meta->get_shortcode_field(
170
+ array(
171
+ 'label' => __( 'Next Step Link', 'cartflows' ),
172
+ 'name' => 'wcf-next-step-link',
173
+ 'content' => $next_step_link,
174
+ )
175
+ );
176
+
177
+ ?>
178
+ </div>
179
+
180
+ <?php $this->tab_custom_script( $options, $post_id ); ?>
181
+
182
+ <?php $this->right_column_footer( $options, $post_id ); ?>
183
+ </div>
184
+ </div>
185
+ </div>
186
+
187
+ <?php
188
+
189
+ }
190
+
191
+ /**
192
+ * Get metabox options
193
+ *
194
+ * @param int $post_id post ID.
195
+ * @return array
196
+ */
197
+ public static function get_meta_option( $post_id ) {
198
+
199
+ if ( null === self::$meta_option ) {
200
+ /**
201
+ * Set metabox options
202
+ *
203
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
204
+ */
205
+ self::$meta_option = wcf()->options->get_landing_fields( $post_id );
206
+ }
207
+
208
+ return self::$meta_option;
209
+ }
210
+
211
+ /**
212
+ * Metabox Save
213
+ *
214
+ * @param number $post_id Post ID.
215
+ * @return void
216
+ */
217
+ public function save_meta_box( $post_id ) {
218
+
219
+ // Checks save status.
220
+ $is_autosave = wp_is_post_autosave( $post_id );
221
+ $is_revision = wp_is_post_revision( $post_id );
222
+
223
+ $is_valid_nonce = ( isset( $_POST['nonce-landing-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-landing-step-meta'] ) ), 'save-nonce-landing-step-meta' ) ) ? true : false;
224
+
225
+ // Exits script depending on save status.
226
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
227
+ return;
228
+ }
229
+
230
+ wcf()->options->save_landing_fields( $post_id );
231
+ }
232
+ }
233
+
234
+ /**
235
+ * Kicking this off by calling 'get_instance()' method
236
+ */
237
+ Cartflows_Landing_Meta::get_instance();
modules/optin/classes/class-cartflows-optin-markup.php CHANGED
@@ -1,736 +1,762 @@
1
- <?php
2
- /**
3
- * Checkout markup.
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Checkout Markup
10
- *
11
- * @since 1.0.0
12
- */
13
- class Cartflows_Optin_Markup {
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
- /* Set is checkout flag */
38
- add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
39
-
40
- add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_optin_fields' ), 10, 2 );
41
-
42
- /* Optin Shortcode */
43
- add_shortcode( 'cartflows_optin', array( $this, 'optin_shortcode_markup' ) );
44
-
45
- /* Preconfigured cart data */
46
- add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
47
-
48
- /* Optin shortcode data */
49
- add_action( 'wp', array( $this, 'shortcode_load_data' ), 1000 );
50
-
51
- /* Ajax Endpoint */
52
- add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
53
- add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
54
-
55
- /* Optin Fields */
56
- add_filter( 'woocommerce_default_address_fields', array( $this, 'set_optin_default_fields' ), 1000 );
57
- /**
58
- * It may required later
59
- * add_filter( 'woocommerce_checkout_fields', array( $this, 'set_optin_fields' ) );
60
- */
61
- add_filter( 'woocommerce_billing_fields', array( $this, 'billing_optin_fields' ), 1000, 2 );
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
-
70
- /**
71
- * Elementor editor compatibility.
72
- */
73
- public function elementor_editor_compatibility() {
74
-
75
- if ( ! empty( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] && is_admin() ) { //phpcs:ignore
76
-
77
- if ( isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) { //phpcs:ignore
78
-
79
- if ( _wcf_check_is_optin_by_id( intval( $_GET['post'] ) ) ) { //phpcs:ignore
80
-
81
- /* Submit Button */
82
- add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
83
- }
84
- }
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
-
95
- if ( isset( $_POST['billing_email'] ) && ! empty( $_POST['billing_email'] ) ) { //phpcs:ignore
96
-
97
- if ( email_exists( sanitize_email( wp_unslash( $_POST['billing_email'] ) ) ) ) { // phpcs:ignore
98
- add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
99
- }
100
- }
101
-
102
- add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
103
- }
104
- }
105
-
106
- /**
107
- * Change order button text .
108
- *
109
- * @param string $woo_button_text place order.
110
- * @return string
111
- */
112
- public function place_order_button_text( $woo_button_text ) {
113
-
114
- $optin_id = get_the_ID();
115
-
116
- $wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
117
-
118
- if ( ! empty( $wcf_order_button_text ) ) {
119
- $woo_button_text = $wcf_order_button_text;
120
- }
121
-
122
- return $woo_button_text;
123
- }
124
-
125
- /**
126
- * Display all WooCommerce notices.
127
- *
128
- * @since 1.1.5
129
- */
130
- public function display_woo_notices() {
131
-
132
- if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
133
- woocommerce_output_all_notices();
134
- }
135
- }
136
-
137
- /**
138
- * Check for checkout flag
139
- *
140
- * @param bool $is_checkout is checkout.
141
- *
142
- * @return bool
143
- */
144
- public function woo_checkout_flag( $is_checkout ) {
145
-
146
- if ( ! is_admin() ) {
147
-
148
- if ( _is_wcf_optin_type() ) {
149
-
150
- $is_checkout = true;
151
- }
152
- }
153
-
154
- return $is_checkout;
155
- }
156
-
157
- /**
158
- * Render checkout shortcode markup.
159
- *
160
- * @param array $atts attributes.
161
- * @return string
162
- */
163
- public function optin_shortcode_markup( $atts ) {
164
-
165
- if ( ! function_exists( 'wc_print_notices' ) ) {
166
- $notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
167
- $notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
168
-
169
- return $notice_out;
170
- }
171
-
172
- $atts = shortcode_atts(
173
- array(
174
- 'id' => 0,
175
- ),
176
- $atts
177
- );
178
-
179
- $optin_id = intval( $atts['id'] );
180
-
181
- if ( empty( $optin_id ) ) {
182
-
183
- if ( ! _is_wcf_optin_type() ) {
184
-
185
- return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>';
186
- }
187
-
188
- global $post;
189
-
190
- $optin_id = intval( $post->ID );
191
- }
192
-
193
- $output = '';
194
-
195
- ob_start();
196
-
197
- do_action( 'cartflows_optin_form_before', $optin_id );
198
-
199
- $optin_layout = 'default';
200
-
201
- $template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php';
202
-
203
- include $template_default;
204
-
205
- $output .= ob_get_clean();
206
-
207
- return $output;
208
- }
209
-
210
- /**
211
- * Configure Cart Data.
212
- *
213
- * @since 1.0.0
214
- *
215
- * @return void
216
- */
217
- public function preconfigured_cart_data() {
218
-
219
- if ( is_admin() ) {
220
- return;
221
- }
222
-
223
- global $post;
224
-
225
- if ( _is_wcf_optin_type() ) {
226
-
227
- if ( wp_doing_ajax() ) {
228
- return;
229
- } else {
230
-
231
- $optin_id = $post->ID;
232
-
233
- do_action( 'cartflows_optin_before_configure_cart', $optin_id );
234
-
235
- $products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
236
-
237
- if ( ! is_array( $products ) ) {
238
- return;
239
- }
240
-
241
- /* Empty the current cart */
242
- WC()->cart->empty_cart();
243
-
244
- if ( is_array( $products ) && count( $products ) < 1 ) {
245
- wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
246
- return;
247
- }
248
-
249
- /* Set customer session if not set */
250
- if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
251
- WC()->session->set_customer_session_cookie( true );
252
- }
253
-
254
- $product_id = reset( $products );
255
- $_product = wc_get_product( $product_id );
256
-
257
- if ( ! empty( $_product ) ) {
258
-
259
- if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) {
260
-
261
- if ( $_product->get_price() > 0 ) {
262
- wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' );
263
- } else {
264
-
265
- $quantity = 1;
266
-
267
- WC()->cart->add_to_cart( $product_id, $quantity );
268
- }
269
- } else {
270
-
271
- wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
272
- }
273
- } else {
274
-
275
- wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
276
- }
277
-
278
- do_action( 'cartflows_optin_after_configure_cart', $optin_id );
279
- }
280
- }
281
- }
282
-
283
- /**
284
- * Load shortcode data.
285
- *
286
- * @return void
287
- */
288
- public function shortcode_load_data() {
289
-
290
- if ( _is_wcf_optin_type() ) {
291
-
292
- add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
293
-
294
- add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
295
-
296
- /* Show notices if cart has errors */
297
- add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
298
-
299
- // Outputting the hidden field in checkout page.
300
- add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
301
- add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
302
-
303
- /* Remove unnecessary option */
304
- add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
305
- add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
306
-
307
- remove_all_actions( 'woocommerce_before_checkout_form' );
308
- remove_all_actions( 'woocommerce_checkout_billing' );
309
- remove_all_actions( 'woocommerce_checkout_shipping' );
310
- remove_all_actions( 'woocommerce_checkout_before_order_review' );
311
- remove_all_actions( 'woocommerce_checkout_order_review' );
312
- remove_all_actions( 'woocommerce_checkout_after_order_review' );
313
- add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
314
- add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) );
315
-
316
- /* Paypal Expresss remove */
317
-
318
- if ( function_exists( 'wc_gateway_ppec' ) ) {
319
- remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) );
320
- }
321
-
322
- // Hook in actions once.
323
- add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 );
324
- add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
325
- add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
326
- add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
327
-
328
- /* Submit Button */
329
- add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
330
-
331
- add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
332
-
333
- /* Remove login actions */
334
- add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
335
- add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
336
-
337
- global $post;
338
-
339
- $optin_id = $post->ID;
340
-
341
- do_action( 'cartflows_optin_before_shortcode', $optin_id );
342
- }
343
- }
344
-
345
- /**
346
- * Disable payment gateways.
347
- *
348
- * @param array $available_gateways gateways.
349
- * @return array
350
- */
351
- public function disable_payment_gateways( $available_gateways ) {
352
-
353
- if ( ! is_admin() ) {
354
-
355
- $available_gateways = array();
356
- }
357
-
358
- return $available_gateways;
359
- }
360
-
361
- /**
362
- * Render checkout ID hidden field.
363
- *
364
- * @param array $checkout checkout session data.
365
- * @return void
366
- */
367
- public function checkout_shortcode_post_id( $checkout ) {
368
-
369
- if ( ! _is_wcf_optin_type() ) {
370
- return;
371
- }
372
-
373
- global $post;
374
-
375
- $optin_id = $post->ID;
376
-
377
- $flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true );
378
-
379
- echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
380
- echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">';
381
- }
382
-
383
- /**
384
- * Load shortcode scripts.
385
- *
386
- * @return void
387
- */
388
- public function shortcode_scripts() {
389
-
390
- wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
391
-
392
- wp_enqueue_script(
393
- 'wcf-optin-template',
394
- wcf()->utils->get_js_url( 'optin-template' ),
395
- array( 'jquery' ),
396
- CARTFLOWS_VER,
397
- true
398
- );
399
-
400
- do_action( 'cartflows_optin_scripts' );
401
-
402
- $style = $this->generate_style();
403
-
404
- wp_add_inline_style( 'wcf-optin-template', $style );
405
- }
406
-
407
- /**
408
- * Load compatibility scripts.
409
- *
410
- * @return void
411
- */
412
- public function compatibility_scripts() {
413
-
414
- global $post;
415
-
416
- $optin_id = $post->ID;
417
-
418
- // Add DIVI Compatibility css if DIVI theme is enabled.
419
- if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
420
- Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id )
421
- ) {
422
- wp_enqueue_style( 'wcf-optin-template-divi', wcf()->utils->get_css_url( 'optin-template-divi' ), '', CARTFLOWS_VER );
423
- }
424
- }
425
-
426
- /**
427
- * Generate styles.
428
- *
429
- * @return string
430
- */
431
- public function generate_style() {
432
-
433
- global $post;
434
-
435
- $optin_id = $post->ID;
436
-
437
- /* Load all fonts */
438
- CartFlows_Font_Families::render_fonts( $optin_id );
439
-
440
- $r = '';
441
- $g = '';
442
- $b = '';
443
- $output = '';
444
-
445
- /* Global */
446
- $primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' );
447
- $base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' );
448
-
449
- /* Input Fields */
450
- $input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' );
451
- $input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' );
452
- $field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' );
453
- $field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' );
454
- $field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' );
455
- $field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' );
456
- $field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' );
457
- $field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' );
458
- $field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' );
459
-
460
- if ( 'custom' == $field_input_size ) {
461
- $field_input_size = '38px';
462
- }
463
-
464
- /* Submit Button */
465
- $submit_button_width = '100%';
466
- $optin_button_position = '';
467
- $button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' );
468
- $button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' );
469
- $button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' );
470
- $submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' );
471
- $submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' );
472
- $submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' );
473
- $submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' );
474
- $submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' );
475
- $submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' );
476
- $submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color );
477
- $submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color );
478
- $submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color );
479
- $submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color );
480
-
481
- if ( 'custom' == $submit_button_height ) {
482
- $submit_button_height = '38px';
483
- $submit_button_width = 'auto';
484
-
485
- switch ( $submit_button_position ) {
486
- case 'left':
487
- $optin_button_position = '0 auto 0 0';
488
- break;
489
- case 'center':
490
- $optin_button_position = '0 auto';
491
- break;
492
- case 'right':
493
- $optin_button_position = '0 0 0 auto';
494
- break;
495
-
496
- default:
497
- $optin_button_position = '0 auto';
498
- break;
499
- }
500
- }
501
-
502
- if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
503
- Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) {
504
-
505
- include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-divi-css.php';
506
-
507
- } else {
508
- include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-css.php';
509
- }
510
-
511
- return $output;
512
- }
513
-
514
- /**
515
- * Get ajax end points.
516
- *
517
- * @param string $endpoint_url end point URL.
518
- * @param string $request end point request.
519
- * @return string
520
- */
521
- public function get_ajax_endpoint( $endpoint_url, $request ) {
522
-
523
- global $post;
524
-
525
- if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
526
-
527
- if ( _is_wcf_optin_type() ) {
528
-
529
- if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
530
-
531
- if ( '' === $request ) {
532
- $query_args = array(
533
- 'wc-ajax' => '%%endpoint%%',
534
- );
535
- } else {
536
- $query_args = array(
537
- 'wc-ajax' => $request,
538
- );
539
- }
540
-
541
- $uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
542
- $uri = $uri[0];
543
-
544
- $endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
545
- }
546
- }
547
- }
548
-
549
- return $endpoint_url;
550
- }
551
-
552
-
553
- /**
554
- * Save checkout fields.
555
- *
556
- * @param int $order_id order id.
557
- * @param array $posted posted data.
558
- * @return void
559
- */
560
- public function save_optin_fields( $order_id, $posted ) {
561
-
562
- if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
563
-
564
- $optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore
565
-
566
- update_post_meta( $order_id, '_wcf_optin_id', $optin_id );
567
-
568
- if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
569
-
570
- $flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
571
-
572
- update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
573
- }
574
- }
575
-
576
- }
577
-
578
- /**
579
- * Redirect users to our checkout if hidden param
580
- *
581
- * @param string $redirect redirect url.
582
- * @param object $user user.
583
- * @return string
584
- */
585
- public function after_login_redirect( $redirect, $user ) {
586
-
587
- if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
588
-
589
- $optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore
590
-
591
- $redirect = get_permalink( $optin_id );
592
- }
593
-
594
- return $redirect;
595
- }
596
-
597
-
598
- /**
599
- * Add custom class to the fields to change the UI to three column.
600
- *
601
- * @param array $fields fields.
602
- */
603
- public function set_optin_default_fields( $fields ) {
604
-
605
- if ( _is_wcf_optin_type() ) {
606
-
607
- global $post;
608
-
609
- $optin_id = $post->ID;
610
- } else {
611
-
612
- if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
613
-
614
- $optin_id = wcf()->utils->get_optin_id_from_post_data();
615
- } else {
616
- return $fields;
617
- }
618
- }
619
-
620
- $first_name = $fields['first_name'];
621
- $last_name = $fields['last_name'];
622
-
623
- /* Make fields required */
624
- $first_name['required'] = true;
625
- $last_name['required'] = true;
626
-
627
- $fields = array(
628
- 'first_name' => $first_name,
629
- 'last_name' => $last_name,
630
- );
631
-
632
- return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id );
633
- }
634
-
635
- /**
636
- * Add custom class to the fields to change the UI to three column.
637
- *
638
- * @param array $fields fields.
639
- */
640
- public function set_optin_fields( $fields ) {
641
-
642
- if ( _is_wcf_optin_type() ) {
643
-
644
- global $post;
645
-
646
- $optin_id = $post->ID;
647
- } else {
648
-
649
- if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
650
-
651
- $optin_id = wcf()->utils->get_optin_id_from_post_data();
652
- } else {
653
- return $fields;
654
- }
655
- }
656
-
657
- $billing_first_name = $fields['billing']['billing_first_name'];
658
- $billing_last_name = $fields['billing']['billing_last_name'];
659
- $billing_email = $fields['billing']['billing_email'];
660
-
661
- $fields['billing'] = array(
662
- 'billing_first_name' => $billing_first_name,
663
- 'billing_last_name' => $billing_last_name,
664
- 'billing_email' => $billing_email,
665
- );
666
-
667
- return apply_filters( 'cartflows_optin_fields', $fields, $optin_id );
668
- }
669
-
670
- /**
671
- * Billing field customization.
672
- *
673
- * @param array $fields fields data.
674
- * @param string $country country name.
675
- * @return array
676
- */
677
- public function billing_optin_fields( $fields, $country ) {
678
-
679
- if ( _is_wcf_optin_type() ) {
680
-
681
- global $post;
682
-
683
- $optin_id = $post->ID;
684
- } else {
685
-
686
- if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
687
- $optin_id = wcf()->utils->get_optin_id_from_post_data();
688
- } else {
689
- return $fields;
690
- }
691
- }
692
-
693
- if ( is_wc_endpoint_url( 'edit-address' ) ) {
694
- return $fields;
695
- }
696
-
697
- $billing_first_name = $fields['billing_first_name'];
698
- $billing_last_name = $fields['billing_last_name'];
699
- $billing_email = $fields['billing_email'];
700
-
701
- /* Make fields required */
702
- $billing_first_name['required'] = true;
703
- $billing_last_name['required'] = true;
704
-
705
- $fields = array(
706
- 'billing_first_name' => $billing_first_name,
707
- 'billing_last_name' => $billing_last_name,
708
- 'billing_email' => $billing_email,
709
- );
710
-
711
- return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id );
712
- }
713
-
714
-
715
- /**
716
- * Replace billing label.
717
- *
718
- * @param string $notice Notice.
719
- * @param string $field_label Field name.
720
- * @return string
721
- */
722
- public function change_field_label_in_required_notice( $notice, $field_label ) {
723
-
724
- if ( _is_wcf_doing_optin_ajax() ) {
725
-
726
- $notice = str_replace( 'Billing ', '', $notice );
727
- }
728
-
729
- return $notice;
730
- }
731
- }
732
-
733
- /**
734
- * Kicking this off by calling 'get_instance()' method
735
- */
736
- Cartflows_Optin_Markup::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout markup.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Optin_Markup {
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
+ /* Set is checkout flag */
38
+ add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
39
+
40
+ add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_optin_fields' ), 10, 2 );
41
+
42
+ /* Optin Shortcode */
43
+ add_shortcode( 'cartflows_optin', array( $this, 'optin_shortcode_markup' ) );
44
+
45
+ /* Preconfigured cart data */
46
+ add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 );
47
+
48
+ /* Optin shortcode data */
49
+ add_action( 'wp', array( $this, 'shortcode_load_data' ), 1000 );
50
+
51
+ /* Ajax Endpoint */
52
+ add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 );
53
+ add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 );
54
+
55
+ /* Optin Fields */
56
+ add_filter( 'woocommerce_default_address_fields', array( $this, 'set_optin_default_fields' ), 1000 );
57
+
58
+ /** It may required later
59
+ * add_filter( 'woocommerce_checkout_fields', array( $this, 'set_optin_fields' ) );
60
+ */
61
+ add_filter( 'woocommerce_billing_fields', array( $this, 'billing_optin_fields' ), 1000, 2 );
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_woo_actions' ) );
66
+
67
+ $this->elementor_editor_compatibility();
68
+ }
69
+
70
+ /**
71
+ * Elementor editor compatibility.
72
+ */
73
+ public function elementor_editor_compatibility() {
74
+
75
+ add_action( 'cartflows_elementor_before_optin_shortcode', array( $this, 'before_optin_shortcode_actions' ) );
76
+ }
77
+
78
+ /**
79
+ * Remove login and registration actions.
80
+ */
81
+ public function remove_woo_actions() {
82
+
83
+ if ( _is_wcf_doing_optin_ajax() ) {
84
+
85
+ if ( isset( $_POST['billing_email'] ) && ! empty( $_POST['billing_email'] ) ) { //phpcs:ignore
86
+
87
+ if ( email_exists( sanitize_email( wp_unslash( $_POST['billing_email'] ) ) ) ) { // phpcs:ignore
88
+ add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
89
+ }
90
+ }
91
+
92
+ add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
93
+ }
94
+
95
+ add_action( 'cartflows_woo_checkout_update_order_review', array( $this, 'filter_remove_woo_data' ) );
96
+ }
97
+
98
+ /**
99
+ * Filter or remove woo data on update order review ajax call.
100
+ *
101
+ * @param string $post_data post data woo.
102
+ * @return void
103
+ */
104
+ public function filter_remove_woo_data( $post_data ) {
105
+
106
+ if ( isset( $post_data['_wcf_optin_id'] ) ) {
107
+ add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
108
+ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 1 );
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Change order button text .
114
+ *
115
+ * @param string $button_text place order.
116
+ * @return string
117
+ */
118
+ public function place_order_button_text( $button_text ) {
119
+
120
+ $optin_id = get_the_ID();
121
+
122
+ if ( ! $optin_id && isset( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] ) ) {
123
+ $optin_id = intval( Cartflows_Woo_Hooks::$ajax_data['_wcf_optin_id'] );
124
+ }
125
+
126
+ if ( $optin_id ) {
127
+
128
+ $wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' );
129
+
130
+ if ( ! empty( $wcf_order_button_text ) ) {
131
+ $button_text = $wcf_order_button_text;
132
+ }
133
+ }
134
+
135
+ return $button_text;
136
+ }
137
+
138
+ /**
139
+ * Display all WooCommerce notices.
140
+ *
141
+ * @since 1.1.5
142
+ */
143
+ public function display_woo_notices() {
144
+
145
+ if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) {
146
+ woocommerce_output_all_notices();
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Check for checkout flag
152
+ *
153
+ * @param bool $is_checkout is checkout.
154
+ *
155
+ * @return bool
156
+ */
157
+ public function woo_checkout_flag( $is_checkout ) {
158
+
159
+ if ( ! is_admin() ) {
160
+
161
+ if ( _is_wcf_optin_type() ) {
162
+
163
+ $is_checkout = true;
164
+ }
165
+ }
166
+
167
+ return $is_checkout;
168
+ }
169
+
170
+ /**
171
+ * Render checkout shortcode markup.
172
+ *
173
+ * @param array $atts attributes.
174
+ * @return string
175
+ */
176
+ public function optin_shortcode_markup( $atts ) {
177
+
178
+ if ( ! function_exists( 'wc_print_notices' ) ) {
179
+ $notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
180
+ $notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
181
+
182
+ return $notice_out;
183
+ }
184
+
185
+ $atts = shortcode_atts(
186
+ array(
187
+ 'id' => 0,
188
+ ),
189
+ $atts
190
+ );
191
+
192
+ $optin_id = intval( $atts['id'] );
193
+
194
+ if ( empty( $optin_id ) ) {
195
+
196
+ if ( ! _is_wcf_optin_type() ) {
197
+
198
+ return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>';
199
+ }
200
+
201
+ global $post;
202
+
203
+ $optin_id = intval( $post->ID );
204
+ }
205
+
206
+ $output = '';
207
+
208
+ ob_start();
209
+
210
+ do_action( 'cartflows_optin_form_before', $optin_id );
211
+
212
+ $optin_layout = 'default';
213
+
214
+ $template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php';
215
+
216
+ include $template_default;
217
+
218
+ $output .= ob_get_clean();
219
+
220
+ return $output;
221
+ }
222
+
223
+ /**
224
+ * Configure Cart Data.
225
+ *
226
+ * @since 1.0.0
227
+ *
228
+ * @return void
229
+ */
230
+ public function preconfigured_cart_data() {
231
+
232
+ if ( is_admin() ) {
233
+ return;
234
+ }
235
+
236
+ global $post;
237
+
238
+ if ( _is_wcf_optin_type() ) {
239
+
240
+ if ( wp_doing_ajax() ) {
241
+ return;
242
+ } else {
243
+
244
+ $optin_id = $post->ID;
245
+
246
+ do_action( 'cartflows_optin_before_configure_cart', $optin_id );
247
+
248
+ $products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' );
249
+
250
+ if ( ! is_array( $products ) ) {
251
+ return;
252
+ }
253
+
254
+ /* Empty the current cart */
255
+ WC()->cart->empty_cart();
256
+
257
+ if ( is_array( $products ) && count( $products ) < 1 ) {
258
+ wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' );
259
+ return;
260
+ }
261
+
262
+ /* Set customer session if not set */
263
+ if ( ! is_user_logged_in() && WC()->cart->is_empty() ) {
264
+ WC()->session->set_customer_session_cookie( true );
265
+ }
266
+
267
+ $product_id = reset( $products );
268
+ $_product = wc_get_product( $product_id );
269
+
270
+ if ( ! empty( $_product ) ) {
271
+
272
+ if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) {
273
+
274
+ if ( $_product->get_price() > 0 ) {
275
+ wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' );
276
+ } else {
277
+
278
+ $quantity = 1;
279
+
280
+ WC()->cart->add_to_cart( $product_id, $quantity );
281
+ }
282
+ } else {
283
+
284
+ wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
285
+ }
286
+ } else {
287
+
288
+ wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' );
289
+ }
290
+
291
+ do_action( 'cartflows_optin_after_configure_cart', $optin_id );
292
+ }
293
+ }
294
+ }
295
+
296
+ /**
297
+ * Load shortcode data.
298
+ *
299
+ * @return void
300
+ */
301
+ public function shortcode_load_data() {
302
+
303
+ if ( _is_wcf_optin_type() ) {
304
+
305
+ add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 );
306
+
307
+ add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 );
308
+
309
+ $this->before_optin_shortcode_actions();
310
+
311
+ global $post;
312
+
313
+ $optin_id = $post->ID;
314
+
315
+ do_action( 'cartflows_optin_before_shortcode', $optin_id );
316
+
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Before option shortcode actions.
322
+ */
323
+ public function before_optin_shortcode_actions() {
324
+
325
+ /* Show notices if cart has errors */
326
+ add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' );
327
+
328
+ // Outputting the hidden field in checkout page.
329
+ add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 );
330
+ add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 );
331
+
332
+ /* Remove unnecessary option */
333
+ add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
334
+ add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' );
335
+
336
+ remove_all_actions( 'woocommerce_before_checkout_form' );
337
+ remove_all_actions( 'woocommerce_checkout_billing' );
338
+ remove_all_actions( 'woocommerce_checkout_shipping' );
339
+ remove_all_actions( 'woocommerce_checkout_before_order_review' );
340
+ remove_all_actions( 'woocommerce_checkout_order_review' );
341
+ remove_all_actions( 'woocommerce_checkout_after_order_review' );
342
+ add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
343
+ add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) );
344
+
345
+ /* Paypal Expresss remove */
346
+ if ( function_exists( 'wc_gateway_ppec' ) ) {
347
+ remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) );
348
+ }
349
+
350
+ // Hook in actions once.
351
+ add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 );
352
+ add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) );
353
+ add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) );
354
+ add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
355
+
356
+ /* Submit Button */
357
+ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 );
358
+
359
+ add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' );
360
+
361
+ /* Remove login actions */
362
+ add_filter( 'woocommerce_checkout_registration_enabled', '__return_false' );
363
+ add_filter( 'woocommerce_checkout_registration_required', '__return_false' );
364
+ }
365
+
366
+ /**
367
+ * Disable payment gateways.
368
+ *
369
+ * @param array $available_gateways gateways.
370
+ * @return array
371
+ */
372
+ public function disable_payment_gateways( $available_gateways ) {
373
+
374
+ if ( ! is_admin() ) {
375
+
376
+ $available_gateways = array();
377
+ }
378
+
379
+ return $available_gateways;
380
+ }
381
+
382
+ /**
383
+ * Render checkout ID hidden field.
384
+ *
385
+ * @param array $checkout checkout session data.
386
+ * @return void
387
+ */
388
+ public function checkout_shortcode_post_id( $checkout ) {
389
+
390
+ if ( ! _is_wcf_optin_type() ) {
391
+ return;
392
+ }
393
+
394
+ global $post;
395
+
396
+ $optin_id = $post->ID;
397
+
398
+ $flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true );
399
+
400
+ echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">';
401
+ echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">';
402
+ }
403
+
404
+ /**
405
+ * Load shortcode scripts.
406
+ *
407
+ * @return void
408
+ */
409
+ public function shortcode_scripts() {
410
+
411
+ wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER );
412
+
413
+ wp_enqueue_script(
414
+ 'wcf-optin-template',
415
+ wcf()->utils->get_js_url( 'optin-template' ),
416
+ array( 'jquery' ),
417
+ CARTFLOWS_VER,
418
+ true
419
+ );
420
+
421
+ do_action( 'cartflows_optin_scripts' );
422
+
423
+ $optin_dynamic_css = apply_filters( 'cartflows_optin_enable_dynamic_css', true );
424
+
425
+ if ( $optin_dynamic_css ) {
426
+
427
+ $style = $this->generate_style();
428
+
429
+ wp_add_inline_style( 'wcf-optin-template', $style );
430
+ }
431
+ }
432
+
433
+ /**
434
+ * Load compatibility scripts.
435
+ *
436
+ * @return void
437
+ */
438
+ public function compatibility_scripts() {
439
+
440
+ global $post;
441
+
442
+ $optin_id = $post->ID;
443
+
444
+ // Add DIVI Compatibility css if DIVI theme is enabled.
445
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
446
+ Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id )
447
+ ) {
448
+ wp_enqueue_style( 'wcf-optin-template-divi', wcf()->utils->get_css_url( 'optin-template-divi' ), '', CARTFLOWS_VER );
449
+ }
450
+ }
451
+
452
+ /**
453
+ * Generate styles.
454
+ *
455
+ * @return string
456
+ */
457
+ public function generate_style() {
458
+
459
+ global $post;
460
+
461
+ $optin_id = $post->ID;
462
+
463
+ /* Load all fonts */
464
+ CartFlows_Font_Families::render_fonts( $optin_id );
465
+
466
+ $r = '';
467
+ $g = '';
468
+ $b = '';
469
+ $output = '';
470
+
471
+ /* Global */
472
+ $primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' );
473
+ $base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' );
474
+
475
+ /* Input Fields */
476
+ $input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' );
477
+ $input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' );
478
+ $field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' );
479
+ $field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' );
480
+ $field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' );
481
+ $field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' );
482
+ $field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' );
483
+ $field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' );
484
+ $field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' );
485
+
486
+ if ( 'custom' == $field_input_size ) {
487
+ $field_input_size = '38px';
488
+ }
489
+
490
+ /* Submit Button */
491
+ $submit_button_width = '100%';
492
+ $optin_button_position = '';
493
+ $button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' );
494
+ $button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' );
495
+ $button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' );
496
+ $submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' );
497
+ $submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' );
498
+ $submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' );
499
+ $submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' );
500
+ $submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' );
501
+ $submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' );
502
+ $submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color );
503
+ $submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color );
504
+ $submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color );
505
+ $submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color );
506
+
507
+ if ( 'custom' == $submit_button_height ) {
508
+ $submit_button_height = '38px';
509
+ $submit_button_width = 'auto';
510
+
511
+ switch ( $submit_button_position ) {
512
+ case 'left':
513
+ $optin_button_position = '0 auto 0 0';
514
+ break;
515
+ case 'center':
516
+ $optin_button_position = '0 auto';
517
+ break;
518
+ case 'right':
519
+ $optin_button_position = '0 0 0 auto';
520
+ break;
521
+
522
+ default:
523
+ $optin_button_position = '0 auto';
524
+ break;
525
+ }
526
+ }
527
+
528
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
529
+ Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) {
530
+
531
+ include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-divi-css.php';
532
+
533
+ } else {
534
+ include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-css.php';
535
+ }
536
+
537
+ return $output;
538
+ }
539
+
540
+ /**
541
+ * Get ajax end points.
542
+ *
543
+ * @param string $endpoint_url end point URL.
544
+ * @param string $request end point request.
545
+ * @return string
546
+ */
547
+ public function get_ajax_endpoint( $endpoint_url, $request ) {
548
+
549
+ global $post;
550
+
551
+ if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
552
+
553
+ if ( _is_wcf_optin_type() ) {
554
+
555
+ if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) {
556
+
557
+ if ( '' === $request ) {
558
+ $query_args = array(
559
+ 'wc-ajax' => '%%endpoint%%',
560
+ );
561
+ } else {
562
+ $query_args = array(
563
+ 'wc-ajax' => $request,
564
+ );
565
+ }
566
+
567
+ $uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore
568
+ $uri = $uri[0];
569
+
570
+ $endpoint_url = esc_url( add_query_arg( $query_args, $uri ) );
571
+ }
572
+ }
573
+ }
574
+
575
+ return $endpoint_url;
576
+ }
577
+
578
+
579
+ /**
580
+ * Save checkout fields.
581
+ *
582
+ * @param int $order_id order id.
583
+ * @param array $posted posted data.
584
+ * @return void
585
+ */
586
+ public function save_optin_fields( $order_id, $posted ) {
587
+
588
+ if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
589
+
590
+ $optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore
591
+
592
+ update_post_meta( $order_id, '_wcf_optin_id', $optin_id );
593
+
594
+ if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore
595
+
596
+ $flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore
597
+
598
+ update_post_meta( $order_id, '_wcf_flow_id', $flow_id );
599
+ }
600
+ }
601
+
602
+ }
603
+
604
+ /**
605
+ * Redirect users to our checkout if hidden param
606
+ *
607
+ * @param string $redirect redirect url.
608
+ * @param object $user user.
609
+ * @return string
610
+ */
611
+ public function after_login_redirect( $redirect, $user ) {
612
+
613
+ if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore
614
+
615
+ $optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore
616
+
617
+ $redirect = get_permalink( $optin_id );
618
+ }
619
+
620
+ return $redirect;
621
+ }
622
+
623
+
624
+ /**
625
+ * Add custom class to the fields to change the UI to three column.
626
+ *
627
+ * @param array $fields fields.
628
+ */
629
+ public function set_optin_default_fields( $fields ) {
630
+
631
+ if ( _is_wcf_optin_type() ) {
632
+
633
+ global $post;
634
+
635
+ $optin_id = $post->ID;
636
+ } else {
637
+
638
+ if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
639
+
640
+ $optin_id = wcf()->utils->get_optin_id_from_post_data();
641
+ } else {
642
+ return $fields;
643
+ }
644
+ }
645
+
646
+ $first_name = $fields['first_name'];
647
+ $last_name = $fields['last_name'];
648
+
649
+ /* Make fields required */
650
+ $first_name['required'] = true;
651
+ $last_name['required'] = true;
652
+
653
+ $fields = array(
654
+ 'first_name' => $first_name,
655
+ 'last_name' => $last_name,
656
+ );
657
+
658
+ return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id );
659
+ }
660
+
661
+ /**
662
+ * Add custom class to the fields to change the UI to three column.
663
+ *
664
+ * @param array $fields fields.
665
+ */
666
+ public function set_optin_fields( $fields ) {
667
+
668
+ if ( _is_wcf_optin_type() ) {
669
+
670
+ global $post;
671
+
672
+ $optin_id = $post->ID;
673
+ } else {
674
+
675
+ if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
676
+
677
+ $optin_id = wcf()->utils->get_optin_id_from_post_data();
678
+ } else {
679
+ return $fields;
680
+ }
681
+ }
682
+
683
+ $billing_first_name = $fields['billing']['billing_first_name'];
684
+ $billing_last_name = $fields['billing']['billing_last_name'];
685
+ $billing_email = $fields['billing']['billing_email'];
686
+
687
+ $fields['billing'] = array(
688
+ 'billing_first_name' => $billing_first_name,
689
+ 'billing_last_name' => $billing_last_name,
690
+ 'billing_email' => $billing_email,
691
+ );
692
+
693
+ return apply_filters( 'cartflows_optin_fields', $fields, $optin_id );
694
+ }
695
+
696
+ /**
697
+ * Billing field customization.
698
+ *
699
+ * @param array $fields fields data.
700
+ * @param string $country country name.
701
+ * @return array
702
+ */
703
+ public function billing_optin_fields( $fields, $country ) {
704
+
705
+ if ( _is_wcf_optin_type() ) {
706
+
707
+ global $post;
708
+
709
+ $optin_id = $post->ID;
710
+ } else {
711
+
712
+ if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) {
713
+ $optin_id = wcf()->utils->get_optin_id_from_post_data();
714
+ } else {
715
+ return $fields;
716
+ }
717
+ }
718
+
719
+ if ( is_wc_endpoint_url( 'edit-address' ) ) {
720
+ return $fields;
721
+ }
722
+
723
+ $billing_first_name = $fields['billing_first_name'];
724
+ $billing_last_name = $fields['billing_last_name'];
725
+ $billing_email = $fields['billing_email'];
726
+
727
+ /* Make fields required */
728
+ $billing_first_name['required'] = true;
729
+ $billing_last_name['required'] = true;
730
+
731
+ $fields = array(
732
+ 'billing_first_name' => $billing_first_name,
733
+ 'billing_last_name' => $billing_last_name,
734
+ 'billing_email' => $billing_email,
735
+ );
736
+
737
+ return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id );
738
+ }
739
+
740
+
741
+ /**
742
+ * Replace billing label.
743
+ *
744
+ * @param string $notice Notice.
745
+ * @param string $field_label Field name.
746
+ * @return string
747
+ */
748
+ public function change_field_label_in_required_notice( $notice, $field_label ) {
749
+
750
+ if ( _is_wcf_doing_optin_ajax() ) {
751
+
752
+ $notice = str_replace( 'Billing ', '', $notice );
753
+ }
754
+
755
+ return $notice;
756
+ }
757
+ }
758
+
759
+ /**
760
+ * Kicking this off by calling 'get_instance()' method
761
+ */
762
+ Cartflows_Optin_Markup::get_instance();
modules/optin/classes/class-cartflows-optin-meta.php CHANGED
@@ -1,675 +1,739 @@
1
- <?php
2
- /**
3
- * Checkout post meta
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Meta Boxes setup
10
- */
11
- class Cartflows_Optin_Meta extends Cartflows_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 = null;
27
-
28
- /**
29
- * Initiator
30
- */
31
- public static function get_instance() {
32
- if ( ! isset( self::$instance ) ) {
33
- self::$instance = new self();
34
- }
35
-
36
- return self::$instance;
37
- }
38
-
39
- /**
40
- * Constructor
41
- */
42
- public function __construct() {
43
-
44
- /* Init Metabox */
45
- add_action( 'load-post.php', array( $this, 'init_metabox' ) );
46
- add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
47
- }
48
- /**
49
- * Init Metabox
50
- */
51
- public function init_metabox() {
52
-
53
- add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
54
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
55
- }
56
-
57
- /**
58
- * Setup Metabox
59
- */
60
- public function setup_meta_box() {
61
-
62
- if ( _is_wcf_optin_type() ) {
63
- add_meta_box(
64
- 'wcf-optin-settings', // Id.
65
- __( 'Optin Settings', 'cartflows' ), // Title.
66
- array( $this, 'markup_meta_box' ), // Callback.
67
- wcf()->utils->get_step_post_type(), // Post_type.
68
- 'normal', // Context.
69
- 'high' // Priority.
70
- );
71
- }
72
- }
73
-
74
- /**
75
- * Metabox Markup
76
- *
77
- * @param object $post Post object.
78
- * @return void
79
- */
80
- public function markup_meta_box( $post ) {
81
-
82
- wp_nonce_field( 'save-nonce-optin-step-meta', 'nonce-optin-step-meta' );
83
-
84
- $stored = get_post_meta( $post->ID );
85
-
86
- $optin_meta = self::get_meta_option( $post->ID );
87
-
88
- // Set stored and override defaults.
89
- foreach ( $stored as $key => $value ) {
90
- if ( array_key_exists( $key, $optin_meta ) ) {
91
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
92
- } else {
93
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
94
- }
95
- }
96
-
97
- // Get defaults.
98
- $meta = self::get_meta_option( $post->ID );
99
- $optin_meta = array();
100
-
101
- foreach ( $meta as $key => $value ) {
102
- $optin_meta[ $key ] = $meta[ $key ]['default'];
103
- }
104
-
105
- do_action( 'wcf_optin_settings_markup_before' );
106
- $this->tabs_markup( $optin_meta, $post->ID );
107
- do_action( 'wcf_optin_settings_markup_after' );
108
- }
109
-
110
- /**
111
- * Page Header Tabs
112
- *
113
- * @param array $options options.
114
- * @param int $post_id post ID.
115
- */
116
- public function tabs_markup( $options, $post_id ) {
117
-
118
- $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
119
-
120
- if ( empty( $active_tab ) ) {
121
- $active_tab = 'wcf-optin-shortcodes';
122
- }
123
-
124
- $tab_array = array(
125
- array(
126
- 'title' => __( 'Shortcodes', 'cartflows' ),
127
- 'id' => 'wcf-optin-shortcodes',
128
- 'class' => 'wcf-optin-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
129
- 'icon' => 'dashicons-editor-code',
130
- ),
131
- array(
132
- 'title' => __( 'Select Product', 'cartflows' ),
133
- 'id' => 'wcf-optin-general',
134
- 'class' => 'wcf-optin-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
135
- 'icon' => 'dashicons-info',
136
- ),
137
- array(
138
- 'title' => __( 'Design', 'cartflows' ),
139
- 'id' => 'wcf-optin-style',
140
- 'class' => 'wcf-optin-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
141
- 'icon' => 'dashicons-admin-customizer',
142
- ),
143
- array(
144
- 'title' => __( 'Form Fields', 'cartflows' ),
145
- 'id' => 'wcf-optin-custom-fields',
146
- 'class' => 'wcf-optin-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
147
- 'icon' => 'dashicons-welcome-widgets-menus',
148
- ),
149
- array(
150
- 'title' => __( 'Settings', 'cartflows' ),
151
- 'id' => 'wcf-optin-custom-settings',
152
- 'class' => 'wcf-optin-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
153
- 'icon' => 'dashicons-admin-generic',
154
- ),
155
- array(
156
- 'title' => __( 'Custom Script', 'cartflows' ),
157
- 'id' => 'wcf-optin-custom-script-header',
158
- 'class' => 'wcf-optin-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
159
- 'icon' => 'dashicons-format-aside',
160
- ),
161
- );
162
-
163
- $tabs = $tab_array;
164
-
165
- ?>
166
- <div class="wcf-optin-table wcf-metabox-wrap widefat">
167
- <div class="wcf-table-container">
168
- <div class="wcf-column-left">
169
- <div class="wcf-tab-wrapper">
170
-
171
- <?php foreach ( $tabs as $key => $tab ) { ?>
172
- <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
173
- <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
174
- <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
175
- </div>
176
- <?php } ?>
177
-
178
- <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
179
- </div>
180
- </div>
181
- <div class="wcf-column-right">
182
- <?php $this->tab_shortcodes( $options, $post_id ); ?>
183
- <?php $this->tab_general( $options, $post_id ); ?>
184
- <?php $this->tab_style( $options, $post_id ); ?>
185
- <?php $this->tab_custom_fields( $options, $post_id ); ?>
186
- <?php $this->tab_custom_settings( $options, $post_id ); ?>
187
- <?php $this->tab_custom_script( $options, $post_id ); ?>
188
- <?php $this->right_column_footer( $options, $post_id ); ?>
189
- </div>
190
- </div>
191
- </div>
192
-
193
- <?php
194
- }
195
-
196
- /**
197
- * Shortcodes tab
198
- *
199
- * @param array $options options.
200
- * @param int $post_id post ID.
201
- */
202
- public function tab_shortcodes( $options, $post_id ) {
203
- ?>
204
- <div class="wcf-optin-shortcodes wcf-tab-content widefat">
205
-
206
- <?php
207
-
208
- echo wcf()->meta->get_shortcode_field(
209
- array(
210
- 'label' => 'Optin Page',
211
- 'name' => 'wcf-optin-shortcode',
212
- 'content' => '[cartflows_optin]',
213
- 'help' => esc_html__( 'Add this shortcode to your optin page', 'cartflows' ),
214
- )
215
- );
216
- ?>
217
- </div>
218
- <?php
219
- }
220
-
221
-
222
- /**
223
- * General tab
224
- *
225
- * @param array $options options.
226
- * @param int $post_id post ID.
227
- */
228
- public function tab_general( $options, $post_id ) {
229
- ?>
230
- <div class="wcf-optin-general wcf-tab-content widefat">
231
-
232
- <?php
233
-
234
- echo wcf()->meta->get_product_selection_field(
235
- array(
236
- 'name' => 'wcf-optin-product',
237
- 'value' => $options['wcf-optin-product'],
238
- 'label' => __( 'Select Free Product', 'cartflows' ),
239
- 'help' => __( 'Select Free and Virtual product only.', 'cartflows' ),
240
- 'multiple' => false,
241
- 'allow_clear' => true,
242
- 'allowed_product_types' => array( 'simple' ),
243
- 'excluded_product_types' => array(),
244
- 'include_product_types' => array(),
245
- )
246
- );
247
-
248
- ?>
249
- </div>
250
- <?php
251
- }
252
-
253
- /**
254
- * Tab custom fields
255
- *
256
- * @param array $options options.
257
- * @param int $post_id post ID.
258
- */
259
- public function tab_custom_fields( $options, $post_id ) {
260
- ?>
261
- <div class="wcf-optin-custom-fields wcf-tab-content widefat">
262
- <?php
263
- /* Custom Checkout Fields Section */
264
-
265
- if ( ! _is_cartflows_pro() ) {
266
- echo wcf()->meta->get_description_field(
267
- array(
268
- 'name' => 'wcf-upgrade-to-pro',
269
- /* translators: %s: link */
270
- 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
271
- )
272
- );
273
- }
274
- ?>
275
- <?php do_action( 'cartflows_optin_custom_fields_tab_content', $options, $post_id ); ?>
276
- </div>
277
- <?php
278
- }
279
-
280
- /**
281
- * Tab custom settings
282
- *
283
- * @param array $options options.
284
- * @param int $post_id post ID.
285
- */
286
- public function tab_custom_settings( $options, $post_id ) {
287
- ?>
288
- <div class="wcf-optin-custom-settings wcf-tab-content widefat">
289
- <div class="wcf-custom-settings-fields">
290
- <?php
291
- echo wcf()->meta->get_checkbox_field(
292
- array(
293
- 'label' => __( 'Pass Fields as URL Parameters', 'cartflows' ),
294
- 'name' => 'wcf-optin-pass-fields',
295
- 'value' => $options['wcf-optin-pass-fields'],
296
- 'after' => __( 'Enable', 'cartflows' ),
297
- 'help' => __( 'You can pass specific fields from the form to next step as URL query parameters.', 'cartflows' ),
298
- 'toggle' => array(
299
- 'fields' => array(
300
- 'yes' => array( 'wcf-optin-pass-specific-fields' ),
301
- ),
302
- ),
303
- )
304
- );
305
-
306
- echo wcf()->meta->get_text_field(
307
- array(
308
- 'label' => __( 'Enter form field', 'cartflows' ),
309
- 'name' => 'wcf-optin-pass-specific-fields',
310
- 'value' => $options['wcf-optin-pass-specific-fields'],
311
- 'help' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
312
- 'attr' => array(
313
- 'placeholder' => __( 'Fields to pass, separated by commas', 'cartflows' ),
314
- ),
315
- )
316
- );
317
-
318
- echo wcf()->meta->get_description_field(
319
- array(
320
- 'name' => 'wcf-optin-pass-fields-doc',
321
- 'content' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
322
- /* translators: %s: link */
323
- 'content' => sprintf( esc_html__( 'You can pass field value as a URL parameter to the next step. %1$sClick here%2$s for more information.', 'cartflows' ), '<a href="https://cartflows.com/docs/pass-variable-as-query-parameters-to-url/" target="_blank">', '</a>' ),
324
- )
325
- );
326
-
327
- ?>
328
- </div>
329
- </div>
330
- <?php
331
- }
332
-
333
- /**
334
- * Tab style
335
- *
336
- * @param array $options options.
337
- * @param int $post_id post ID.
338
- */
339
- public function tab_style( $options, $post_id ) {
340
- ?>
341
-
342
- <div class="wcf-optin-style wcf-tab-content widefat">
343
- <?php
344
- echo wcf()->meta->get_color_picker_field(
345
- array(
346
- 'label' => __( 'Primary Color', 'cartflows' ),
347
- 'name' => 'wcf-primary-color',
348
- 'value' => $options['wcf-primary-color'],
349
- )
350
- );
351
-
352
- echo wcf()->meta->get_font_family_field(
353
- array(
354
- 'for' => 'wcf-base',
355
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
356
- 'name' => 'wcf-base-font-family',
357
- 'value' => $options['wcf-base-font-family'],
358
- )
359
- );
360
- ?>
361
- <div class="wcf-cs-fields">
362
- <div class="wcf-cs-fields-options">
363
- <?php
364
- echo wcf()->meta->get_section(
365
- array(
366
- 'label' => __( 'Input Fields', 'cartflows' ),
367
- )
368
- );
369
-
370
- $fields_skin_pro_option = array();
371
- if ( ! _is_cartflows_pro() ) {
372
- $fields_skin_pro_option = array(
373
- 'floating-labels' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
374
- );
375
- }
376
-
377
- echo wcf()->meta->get_select_field(
378
- array(
379
- 'label' => __( 'Style', 'cartflows' ),
380
- 'name' => 'wcf-input-fields-skins',
381
- 'value' => $options['wcf-input-fields-skins'],
382
- 'options' => array(
383
- 'default' => esc_html__( 'Default', 'cartflows' ),
384
- 'floating-labels' => esc_html__( 'Floating Labels', 'cartflows' ),
385
- ),
386
- 'pro-options' => $fields_skin_pro_option,
387
-
388
- )
389
- );
390
-
391
- echo wcf()->meta->get_font_family_field(
392
- array(
393
- 'for' => 'wcf-input',
394
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
395
- 'name' => 'wcf-input-font-family',
396
- 'value' => $options['wcf-input-font-family'],
397
- )
398
- );
399
-
400
- echo wcf()->meta->get_font_weight_field(
401
- array(
402
- 'for' => 'wcf-input',
403
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
404
- 'name' => 'wcf-input-font-weight',
405
- 'value' => $options['wcf-input-font-weight'],
406
- )
407
- );
408
-
409
- echo wcf()->meta->get_select_field(
410
- array(
411
- 'label' => __( 'Size', 'cartflows' ),
412
- 'name' => 'wcf-input-field-size',
413
- 'value' => $options['wcf-input-field-size'],
414
- 'options' => array(
415
- '33px' => esc_html__( 'Extra Small', 'cartflows' ),
416
- '38px' => esc_html__( 'Small', 'cartflows' ),
417
- '44px' => esc_html__( 'Medium', 'cartflows' ),
418
- '58px' => esc_html__( 'Large', 'cartflows' ),
419
- '68px' => esc_html__( 'Extra Large', 'cartflows' ),
420
- 'custom' => esc_html__( 'Custom', 'cartflows' ),
421
- ),
422
- )
423
- );
424
-
425
- echo wcf()->meta->get_number_field(
426
- array(
427
- 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
428
- 'name' => 'wcf-field-tb-padding',
429
- 'value' => $options['wcf-field-tb-padding'],
430
- )
431
- );
432
-
433
- echo wcf()->meta->get_number_field(
434
- array(
435
- 'label' => __( 'Left Right Spacing', 'cartflows' ),
436
- 'name' => 'wcf-field-lr-padding',
437
- 'value' => $options['wcf-field-lr-padding'],
438
- )
439
- );
440
-
441
- echo wcf()->meta->get_color_picker_field(
442
- array(
443
- 'label' => __( 'Label Color', 'cartflows' ),
444
- 'name' => 'wcf-field-label-color',
445
- 'value' => $options['wcf-field-label-color'],
446
- )
447
- );
448
-
449
- echo wcf()->meta->get_color_picker_field(
450
- array(
451
- 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
452
- 'name' => 'wcf-field-color',
453
- 'value' => $options['wcf-field-color'],
454
- )
455
- );
456
-
457
- echo wcf()->meta->get_color_picker_field(
458
- array(
459
- 'label' => __( 'Background Color', 'cartflows' ),
460
- 'name' => 'wcf-field-bg-color',
461
- 'value' => $options['wcf-field-bg-color'],
462
- )
463
- );
464
-
465
- echo wcf()->meta->get_color_picker_field(
466
- array(
467
- 'label' => __( 'Border Color', 'cartflows' ),
468
- 'name' => 'wcf-field-border-color',
469
- 'value' => $options['wcf-field-border-color'],
470
- )
471
- );
472
-
473
- ?>
474
- </div>
475
- <div class="wcf-cs-button-options">
476
- <?php
477
-
478
- echo wcf()->meta->get_section(
479
- array(
480
- 'label' => __( 'Submit Button', 'cartflows' ),
481
- )
482
- );
483
-
484
- echo wcf()->meta->get_text_field(
485
- array(
486
- 'label' => __( 'Button Text', 'cartflows' ),
487
- 'name' => 'wcf-submit-button-text',
488
- 'value' => $options['wcf-submit-button-text'],
489
- 'attr' => array(
490
- 'placeholder' => __( 'Submit', 'cartflows' ),
491
- ),
492
- )
493
- );
494
-
495
- echo wcf()->meta->get_number_field(
496
- array(
497
- 'label' => __( 'Font Size', 'cartflows' ),
498
- 'name' => 'wcf-submit-font-size',
499
- 'value' => $options['wcf-submit-font-size'],
500
- )
501
- );
502
-
503
- echo wcf()->meta->get_font_family_field(
504
- array(
505
- 'for' => 'wcf-button',
506
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
507
- 'name' => 'wcf-button-font-family',
508
- 'value' => $options['wcf-button-font-family'],
509
- )
510
- );
511
-
512
- echo wcf()->meta->get_font_weight_field(
513
- array(
514
- 'for' => 'wcf-button',
515
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
516
- 'name' => 'wcf-button-font-weight',
517
- 'value' => $options['wcf-button-font-weight'],
518
- )
519
- );
520
-
521
- echo wcf()->meta->get_select_field(
522
- array(
523
- 'label' => __( 'Size', 'cartflows' ),
524
- 'name' => 'wcf-submit-button-size',
525
- 'value' => $options['wcf-submit-button-size'],
526
- 'options' => array(
527
- '33px' => esc_html__( 'Extra Small', 'cartflows' ),
528
- '38px' => esc_html__( 'Small', 'cartflows' ),
529
- '44px' => esc_html__( 'Medium', 'cartflows' ),
530
- '58px' => esc_html__( 'Large', 'cartflows' ),
531
- '68px' => esc_html__( 'Extra Large', 'cartflows' ),
532
- 'custom' => esc_html__( 'Custom', 'cartflows' ),
533
- ),
534
- )
535
- );
536
-
537
- echo wcf()->meta->get_number_field(
538
- array(
539
- 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
540
- 'name' => 'wcf-submit-tb-padding',
541
- 'value' => $options['wcf-submit-tb-padding'],
542
- )
543
- );
544
-
545
- echo wcf()->meta->get_number_field(
546
- array(
547
- 'label' => __( 'Left Right Spacing', 'cartflows' ),
548
- 'name' => 'wcf-submit-lr-padding',
549
- 'value' => $options['wcf-submit-lr-padding'],
550
- )
551
- );
552
-
553
- echo wcf()->meta->get_select_field(
554
- array(
555
- 'label' => __( 'Position', 'cartflows' ),
556
- 'name' => 'wcf-submit-button-position',
557
- 'value' => $options['wcf-submit-button-position'],
558
- 'options' => array(
559
- 'left' => esc_html__( 'Left', 'cartflows' ),
560
- 'center' => esc_html__( 'Center', 'cartflows' ),
561
- 'right' => esc_html__( 'Right', 'cartflows' ),
562
- ),
563
- )
564
- );
565
-
566
- echo wcf()->meta->get_color_picker_field(
567
- array(
568
- 'label' => __( 'Text Color', 'cartflows' ),
569
- 'name' => 'wcf-submit-color',
570
- 'value' => $options['wcf-submit-color'],
571
- )
572
- );
573
-
574
- echo wcf()->meta->get_color_picker_field(
575
- array(
576
- 'label' => __( 'Text Hover Color', 'cartflows' ),
577
- 'name' => 'wcf-submit-hover-color',
578
- 'value' => $options['wcf-submit-hover-color'],
579
- )
580
- );
581
-
582
- echo wcf()->meta->get_color_picker_field(
583
- array(
584
- 'label' => __( 'Background Color', 'cartflows' ),
585
- 'name' => 'wcf-submit-bg-color',
586
- 'value' => $options['wcf-submit-bg-color'],
587
- )
588
- );
589
-
590
- echo wcf()->meta->get_color_picker_field(
591
- array(
592
- 'label' => __( 'Background Hover Color', 'cartflows' ),
593
- 'name' => 'wcf-submit-bg-hover-color',
594
- 'value' => $options['wcf-submit-bg-hover-color'],
595
- )
596
- );
597
-
598
- echo wcf()->meta->get_color_picker_field(
599
- array(
600
- 'label' => __( 'Border Color', 'cartflows' ),
601
- 'name' => 'wcf-submit-border-color',
602
- 'value' => $options['wcf-submit-border-color'],
603
- )
604
- );
605
-
606
- echo wcf()->meta->get_color_picker_field(
607
- array(
608
- 'label' => __( 'Border Hover Color', 'cartflows' ),
609
- 'name' => 'wcf-submit-border-hover-color',
610
- 'value' => $options['wcf-submit-border-hover-color'],
611
- )
612
- );
613
-
614
- ?>
615
- </div>
616
- </div>
617
- <?php
618
- echo wcf()->meta->get_hidden_field(
619
- array(
620
- 'name' => 'wcf-field-google-font-url',
621
- 'value' => $options['wcf-field-google-font-url'],
622
- )
623
- );
624
- ?>
625
- </div>
626
- <?php
627
- }
628
-
629
- /**
630
- * Get metabox options
631
- *
632
- * @param int $post_id post ID.
633
- */
634
- public static function get_meta_option( $post_id ) {
635
-
636
- if ( null === self::$meta_option ) {
637
-
638
- /**
639
- * Set metabox options
640
- *
641
- * @see http://php.net/manual/en/filter.filters.sanitize.php
642
- */
643
- self::$meta_option = wcf()->options->get_optin_fields( $post_id );
644
- }
645
-
646
- return self::$meta_option;
647
- }
648
-
649
- /**
650
- * Metabox Save
651
- *
652
- * @param number $post_id Post ID.
653
- * @return void
654
- */
655
- public function save_meta_box( $post_id ) {
656
-
657
- // Checks save status.
658
- $is_autosave = wp_is_post_autosave( $post_id );
659
- $is_revision = wp_is_post_revision( $post_id );
660
-
661
- $is_valid_nonce = ( isset( $_POST['nonce-optin-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-optin-step-meta'] ) ), 'save-nonce-optin-step-meta' ) ) ? true : false;
662
-
663
- // Exits script depending on save status.
664
- if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
665
- return;
666
- }
667
-
668
- wcf()->options->save_optin_fields( $post_id );
669
- }
670
- }
671
-
672
- /**
673
- * Kicking this off by calling 'get_instance()' method
674
- */
675
- Cartflows_Optin_Meta::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout post meta
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Optin_Meta extends Cartflows_Meta {
12
+
13
+ /**
14
+ * Instance
15
+ *
16
+ * @var $instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Meta Option
22
+ *
23
+ * @var $meta_option
24
+ */
25
+ private static $meta_option = null;
26
+
27
+ /**
28
+ * Meta Options map key->value map,
29
+ *
30
+ * @var $meta_option_data
31
+ */
32
+ private static $meta_option_data = array();
33
+
34
+ /**
35
+ * Initiator
36
+ */
37
+ public static function get_instance() {
38
+ if ( ! isset( self::$instance ) ) {
39
+ self::$instance = new self();
40
+ }
41
+
42
+ return self::$instance;
43
+ }
44
+
45
+ /**
46
+ * Constructor
47
+ */
48
+ public function __construct() {
49
+
50
+ /* Init Metabox */
51
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
52
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
53
+ }
54
+ /**
55
+ * Init Metabox
56
+ */
57
+ public function init_metabox() {
58
+
59
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ), 10, 2 );
60
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
61
+ }
62
+
63
+ /**
64
+ * Setup Metabox
65
+ *
66
+ * @param string $post_type post type.
67
+ * @param object $post post object.
68
+ */
69
+ public function setup_meta_box( $post_type, $post ) {
70
+
71
+ if ( _is_wcf_optin_type() ) {
72
+
73
+ $stored_meta = get_post_meta( $post->ID );
74
+ $optin_meta = self::get_meta_option( $post->ID );
75
+
76
+ // Set stored and override defaults.
77
+ foreach ( $stored_meta as $key => $value ) {
78
+ if ( array_key_exists( $key, $optin_meta ) ) {
79
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? maybe_unserialize( $stored_meta[ $key ][0] ) : '';
80
+ } else {
81
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? $stored_meta[ $key ][0] : '';
82
+ }
83
+ }
84
+
85
+ // Get defaults.
86
+ $new_meta = self::get_meta_option( $post->ID );
87
+
88
+ foreach ( $new_meta as $key => $value ) {
89
+ self::$meta_option_data[ $key ] = $new_meta[ $key ]['default'];
90
+ }
91
+
92
+ add_meta_box(
93
+ 'wcf-optin-settings', // Id.
94
+ __( 'Optin Settings', 'cartflows' ), // Title.
95
+ array( $this, 'settings_markup_meta_box' ), // Callback.
96
+ $post_type, // Post_type.
97
+ 'normal', // Context.
98
+ 'high' // Priority.
99
+ );
100
+
101
+ add_meta_box(
102
+ 'wcf-optin-design-settings', // Id.
103
+ __( 'Optin Design', 'cartflows' ), // Title.
104
+ array( $this, 'design_markup_meta_box' ), // Callback.
105
+ $post_type, // Post_type.
106
+ 'normal', // Context.
107
+ 'high' // Priority.
108
+ );
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Metabox Markup
114
+ *
115
+ * @param object $post Post object.
116
+ * @return void
117
+ */
118
+ public function settings_markup_meta_box( $post ) {
119
+
120
+ wp_nonce_field( 'save-nonce-optin-step-meta', 'nonce-optin-step-meta' );
121
+
122
+ do_action( 'wcf_optin_settings_markup_before' );
123
+ $this->tabs_markup( self::$meta_option_data, $post->ID );
124
+ do_action( 'wcf_optin_settings_markup_after' );
125
+ }
126
+
127
+ /**
128
+ * Page Header Tabs
129
+ *
130
+ * @param array $options options.
131
+ * @param int $post_id post ID.
132
+ */
133
+ public function tabs_markup( $options, $post_id ) {
134
+
135
+ $active_tab = 'wcf-optin-general';
136
+
137
+ $tab_array = array(
138
+ array(
139
+ 'title' => __( 'Select Product', 'cartflows' ),
140
+ 'id' => 'wcf-optin-general',
141
+ 'class' => 'wcf-optin-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
142
+ 'icon' => 'dashicons-info',
143
+ ),
144
+ array(
145
+ 'title' => __( 'Form Fields', 'cartflows' ),
146
+ 'id' => 'wcf-optin-custom-fields',
147
+ 'class' => 'wcf-optin-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
148
+ 'icon' => 'dashicons-welcome-widgets-menus',
149
+ ),
150
+ array(
151
+ 'title' => __( 'Settings', 'cartflows' ),
152
+ 'id' => 'wcf-optin-custom-settings',
153
+ 'class' => 'wcf-optin-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
154
+ 'icon' => 'dashicons-admin-generic',
155
+ ),
156
+ array(
157
+ 'title' => __( 'Custom Script', 'cartflows' ),
158
+ 'id' => 'wcf-optin-custom-script-header',
159
+ 'class' => 'wcf-optin-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
160
+ 'icon' => 'dashicons-format-aside',
161
+ ),
162
+ );
163
+
164
+ $tabs = $tab_array;
165
+
166
+ ?>
167
+ <div class="wcf-optin-table wcf-metabox-wrap widefat">
168
+ <div class="wcf-table-container">
169
+ <div class="wcf-column-left">
170
+ <div class="wcf-tab-wrapper">
171
+
172
+ <?php foreach ( $tabs as $key => $tab ) { ?>
173
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
174
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
175
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
176
+ </div>
177
+ <?php } ?>
178
+ </div>
179
+ </div>
180
+ <div class="wcf-column-right">
181
+ <?php $this->tab_general( $options, $post_id ); ?>
182
+ <?php $this->tab_custom_fields( $options, $post_id ); ?>
183
+ <?php $this->tab_custom_settings( $options, $post_id ); ?>
184
+ <?php $this->tab_custom_script( $options, $post_id ); ?>
185
+ <?php $this->right_column_footer( $options, $post_id ); ?>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <?php
191
+ }
192
+
193
+ /**
194
+ * Design settings metabox Markup
195
+ *
196
+ * @param object $post Post object.
197
+ * @return void
198
+ */
199
+ public function design_markup_meta_box( $post ) {
200
+
201
+ wp_nonce_field( 'save-nonce-optin-step-meta', 'nonce-optin-step-meta' );
202
+
203
+ do_action( 'wcf_optin_design_settings_markup_before' );
204
+ $this->design_tabs_markup( self::$meta_option_data, $post->ID );
205
+ do_action( 'wcf_optin_design_settings_markup_after' );
206
+ }
207
+
208
+ /**
209
+ * Design Tabs
210
+ *
211
+ * @param array $options options.
212
+ * @param int $post_id post ID.
213
+ */
214
+ public function design_tabs_markup( $options, $post_id ) {
215
+
216
+ $active_tab = 'wcf-optin-style';
217
+
218
+ $tab_array = array(
219
+ array(
220
+ 'title' => __( 'Shortcodes', 'cartflows' ),
221
+ 'id' => 'wcf-optin-shortcodes',
222
+ 'class' => 'wcf-optin-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
223
+ 'icon' => 'dashicons-editor-code',
224
+ ),
225
+ array(
226
+ 'title' => __( 'Design', 'cartflows' ),
227
+ 'id' => 'wcf-optin-style',
228
+ 'class' => 'wcf-optin-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
229
+ 'icon' => 'dashicons-admin-customizer',
230
+ ),
231
+ );
232
+
233
+ $tabs = $tab_array;
234
+ ?>
235
+ <div class="wcf-optin-design_table wcf-metabox-wrap widefat">
236
+ <div class="wcf-table-container">
237
+ <?php echo wcf_get_page_builder_notice(); ?>
238
+ <div class="wcf-column-left">
239
+ <div class="wcf-tab-wrapper">
240
+
241
+ <?php foreach ( $tabs as $key => $tab ) { ?>
242
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
243
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
244
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
245
+ </div>
246
+ <?php } ?>
247
+ </div>
248
+ </div>
249
+ <div class="wcf-column-right">
250
+ <?php $this->tab_shortcodes( $options, $post_id ); ?>
251
+ <?php $this->tab_style( $options, $post_id ); ?>
252
+ <?php $this->right_column_footer( $options, $post_id ); ?>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <?php
258
+ }
259
+
260
+ /**
261
+ * Shortcodes tab
262
+ *
263
+ * @param array $options options.
264
+ * @param int $post_id post ID.
265
+ */
266
+ public function tab_shortcodes( $options, $post_id ) {
267
+ ?>
268
+ <div class="wcf-optin-shortcodes wcf-tab-content widefat">
269
+
270
+ <?php
271
+
272
+ echo wcf()->meta->get_shortcode_field(
273
+ array(
274
+ 'label' => 'Optin Page',
275
+ 'name' => 'wcf-optin-shortcode',
276
+ 'content' => '[cartflows_optin]',
277
+ 'help' => esc_html__( 'Add this shortcode to your optin page', 'cartflows' ),
278
+ )
279
+ );
280
+ ?>
281
+ </div>
282
+ <?php
283
+ }
284
+
285
+
286
+ /**
287
+ * General tab
288
+ *
289
+ * @param array $options options.
290
+ * @param int $post_id post ID.
291
+ */
292
+ public function tab_general( $options, $post_id ) {
293
+ ?>
294
+ <div class="wcf-optin-general wcf-tab-content widefat">
295
+
296
+ <?php
297
+
298
+ echo wcf()->meta->get_product_selection_field(
299
+ array(
300
+ 'name' => 'wcf-optin-product',
301
+ 'value' => $options['wcf-optin-product'],
302
+ 'label' => __( 'Select Free Product', 'cartflows' ),
303
+ 'help' => __( 'Select Free and Virtual product only.', 'cartflows' ),
304
+ 'multiple' => false,
305
+ 'allow_clear' => true,
306
+ 'allowed_product_types' => array( 'simple' ),
307
+ 'excluded_product_types' => array(),
308
+ 'include_product_types' => array(),
309
+ )
310
+ );
311
+
312
+ ?>
313
+ </div>
314
+ <?php
315
+ }
316
+
317
+ /**
318
+ * Tab custom fields
319
+ *
320
+ * @param array $options options.
321
+ * @param int $post_id post ID.
322
+ */
323
+ public function tab_custom_fields( $options, $post_id ) {
324
+ ?>
325
+ <div class="wcf-optin-custom-fields wcf-tab-content widefat">
326
+ <?php
327
+ /* Custom Checkout Fields Section */
328
+
329
+ if ( ! _is_cartflows_pro() ) {
330
+ echo wcf()->meta->get_description_field(
331
+ array(
332
+ 'name' => 'wcf-upgrade-to-pro',
333
+ /* translators: %s: link */
334
+ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
335
+ )
336
+ );
337
+ }
338
+ ?>
339
+ <?php do_action( 'cartflows_optin_custom_fields_tab_content', $options, $post_id ); ?>
340
+ </div>
341
+ <?php
342
+ }
343
+
344
+ /**
345
+ * Tab custom settings
346
+ *
347
+ * @param array $options options.
348
+ * @param int $post_id post ID.
349
+ */
350
+ public function tab_custom_settings( $options, $post_id ) {
351
+ ?>
352
+ <div class="wcf-optin-custom-settings wcf-tab-content widefat">
353
+ <div class="wcf-custom-settings-fields">
354
+ <?php
355
+ echo wcf()->meta->get_checkbox_field(
356
+ array(
357
+ 'label' => __( 'Pass Fields as URL Parameters', 'cartflows' ),
358
+ 'name' => 'wcf-optin-pass-fields',
359
+ 'value' => $options['wcf-optin-pass-fields'],
360
+ 'after' => __( 'Enable', 'cartflows' ),
361
+ 'help' => __( 'You can pass specific fields from the form to next step as URL query parameters.', 'cartflows' ),
362
+ 'toggle' => array(
363
+ 'fields' => array(
364
+ 'yes' => array( 'wcf-optin-pass-specific-fields' ),
365
+ ),
366
+ ),
367
+ )
368
+ );
369
+
370
+ echo wcf()->meta->get_text_field(
371
+ array(
372
+ 'label' => __( 'Enter form field', 'cartflows' ),
373
+ 'name' => 'wcf-optin-pass-specific-fields',
374
+ 'value' => $options['wcf-optin-pass-specific-fields'],
375
+ 'help' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
376
+ 'attr' => array(
377
+ 'placeholder' => __( 'Fields to pass, separated by commas', 'cartflows' ),
378
+ ),
379
+ )
380
+ );
381
+
382
+ echo wcf()->meta->get_description_field(
383
+ array(
384
+ 'name' => 'wcf-optin-pass-fields-doc',
385
+ 'content' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ),
386
+ /* translators: %s: link */
387
+ 'content' => sprintf( esc_html__( 'You can pass field value as a URL parameter to the next step. %1$sClick here%2$s for more information.', 'cartflows' ), '<a href="https://cartflows.com/docs/pass-variable-as-query-parameters-to-url/" target="_blank">', '</a>' ),
388
+ )
389
+ );
390
+
391
+ ?>
392
+ </div>
393
+ </div>
394
+ <?php
395
+ }
396
+
397
+ /**
398
+ * Tab style
399
+ *
400
+ * @param array $options options.
401
+ * @param int $post_id post ID.
402
+ */
403
+ public function tab_style( $options, $post_id ) {
404
+ ?>
405
+
406
+ <div class="wcf-optin-style wcf-tab-content widefat">
407
+ <?php
408
+ echo wcf()->meta->get_color_picker_field(
409
+ array(
410
+ 'label' => __( 'Primary Color', 'cartflows' ),
411
+ 'name' => 'wcf-primary-color',
412
+ 'value' => $options['wcf-primary-color'],
413
+ )
414
+ );
415
+
416
+ echo wcf()->meta->get_font_family_field(
417
+ array(
418
+ 'for' => 'wcf-base',
419
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
420
+ 'name' => 'wcf-base-font-family',
421
+ 'value' => $options['wcf-base-font-family'],
422
+ )
423
+ );
424
+ ?>
425
+ <div class="wcf-cs-fields">
426
+ <div class="wcf-cs-fields-options">
427
+ <?php
428
+ echo wcf()->meta->get_section(
429
+ array(
430
+ 'label' => __( 'Input Fields', 'cartflows' ),
431
+ )
432
+ );
433
+
434
+ $fields_skin_pro_option = array();
435
+ if ( ! _is_cartflows_pro() ) {
436
+ $fields_skin_pro_option = array(
437
+ 'floating-labels' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
438
+ );
439
+ }
440
+
441
+ echo wcf()->meta->get_select_field(
442
+ array(
443
+ 'label' => __( 'Style', 'cartflows' ),
444
+ 'name' => 'wcf-input-fields-skins',
445
+ 'value' => $options['wcf-input-fields-skins'],
446
+ 'options' => array(
447
+ 'default' => esc_html__( 'Default', 'cartflows' ),
448
+ 'floating-labels' => esc_html__( 'Floating Labels', 'cartflows' ),
449
+ ),
450
+ 'pro-options' => $fields_skin_pro_option,
451
+
452
+ )
453
+ );
454
+
455
+ echo wcf()->meta->get_font_family_field(
456
+ array(
457
+ 'for' => 'wcf-input',
458
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
459
+ 'name' => 'wcf-input-font-family',
460
+ 'value' => $options['wcf-input-font-family'],
461
+ )
462
+ );
463
+
464
+ echo wcf()->meta->get_font_weight_field(
465
+ array(
466
+ 'for' => 'wcf-input',
467
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
468
+ 'name' => 'wcf-input-font-weight',
469
+ 'value' => $options['wcf-input-font-weight'],
470
+ )
471
+ );
472
+
473
+ echo wcf()->meta->get_select_field(
474
+ array(
475
+ 'label' => __( 'Size', 'cartflows' ),
476
+ 'name' => 'wcf-input-field-size',
477
+ 'value' => $options['wcf-input-field-size'],
478
+ 'options' => array(
479
+ '33px' => esc_html__( 'Extra Small', 'cartflows' ),
480
+ '38px' => esc_html__( 'Small', 'cartflows' ),
481
+ '44px' => esc_html__( 'Medium', 'cartflows' ),
482
+ '58px' => esc_html__( 'Large', 'cartflows' ),
483
+ '68px' => esc_html__( 'Extra Large', 'cartflows' ),
484
+ 'custom' => esc_html__( 'Custom', 'cartflows' ),
485
+ ),
486
+ )
487
+ );
488
+
489
+ echo wcf()->meta->get_number_field(
490
+ array(
491
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
492
+ 'name' => 'wcf-field-tb-padding',
493
+ 'value' => $options['wcf-field-tb-padding'],
494
+ )
495
+ );
496
+
497
+ echo wcf()->meta->get_number_field(
498
+ array(
499
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
500
+ 'name' => 'wcf-field-lr-padding',
501
+ 'value' => $options['wcf-field-lr-padding'],
502
+ )
503
+ );
504
+
505
+ echo wcf()->meta->get_color_picker_field(
506
+ array(
507
+ 'label' => __( 'Label Color', 'cartflows' ),
508
+ 'name' => 'wcf-field-label-color',
509
+ 'value' => $options['wcf-field-label-color'],
510
+ )
511
+ );
512
+
513
+ echo wcf()->meta->get_color_picker_field(
514
+ array(
515
+ 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
516
+ 'name' => 'wcf-field-color',
517
+ 'value' => $options['wcf-field-color'],
518
+ )
519
+ );
520
+
521
+ echo wcf()->meta->get_color_picker_field(
522
+ array(
523
+ 'label' => __( 'Background Color', 'cartflows' ),
524
+ 'name' => 'wcf-field-bg-color',
525
+ 'value' => $options['wcf-field-bg-color'],
526
+ )
527
+ );
528
+
529
+ echo wcf()->meta->get_color_picker_field(
530
+ array(
531
+ 'label' => __( 'Border Color', 'cartflows' ),
532
+ 'name' => 'wcf-field-border-color',
533
+ 'value' => $options['wcf-field-border-color'],
534
+ )
535
+ );
536
+
537
+ ?>
538
+ </div>
539
+ <div class="wcf-cs-button-options">
540
+ <?php
541
+
542
+ echo wcf()->meta->get_section(
543
+ array(
544
+ 'label' => __( 'Submit Button', 'cartflows' ),
545
+ )
546
+ );
547
+
548
+ echo wcf()->meta->get_text_field(
549
+ array(
550
+ 'label' => __( 'Button Text', 'cartflows' ),
551
+ 'name' => 'wcf-submit-button-text',
552
+ 'value' => $options['wcf-submit-button-text'],
553
+ 'attr' => array(
554
+ 'placeholder' => __( 'Submit', 'cartflows' ),
555
+ ),
556
+ )
557
+ );
558
+
559
+ echo wcf()->meta->get_number_field(
560
+ array(
561
+ 'label' => __( 'Font Size', 'cartflows' ),
562
+ 'name' => 'wcf-submit-font-size',
563
+ 'value' => $options['wcf-submit-font-size'],
564
+ )
565
+ );
566
+
567
+ echo wcf()->meta->get_font_family_field(
568
+ array(
569
+ 'for' => 'wcf-button',
570
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
571
+ 'name' => 'wcf-button-font-family',
572
+ 'value' => $options['wcf-button-font-family'],
573
+ )
574
+ );
575
+
576
+ echo wcf()->meta->get_font_weight_field(
577
+ array(
578
+ 'for' => 'wcf-button',
579
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
580
+ 'name' => 'wcf-button-font-weight',
581
+ 'value' => $options['wcf-button-font-weight'],
582
+ )
583
+ );
584
+
585
+ echo wcf()->meta->get_select_field(
586
+ array(
587
+ 'label' => __( 'Size', 'cartflows' ),
588
+ 'name' => 'wcf-submit-button-size',
589
+ 'value' => $options['wcf-submit-button-size'],
590
+ 'options' => array(
591
+ '33px' => esc_html__( 'Extra Small', 'cartflows' ),
592
+ '38px' => esc_html__( 'Small', 'cartflows' ),
593
+ '44px' => esc_html__( 'Medium', 'cartflows' ),
594
+ '58px' => esc_html__( 'Large', 'cartflows' ),
595
+ '68px' => esc_html__( 'Extra Large', 'cartflows' ),
596
+ 'custom' => esc_html__( 'Custom', 'cartflows' ),
597
+ ),
598
+ )
599
+ );
600
+
601
+ echo wcf()->meta->get_number_field(
602
+ array(
603
+ 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
604
+ 'name' => 'wcf-submit-tb-padding',
605
+ 'value' => $options['wcf-submit-tb-padding'],
606
+ )
607
+ );
608
+
609
+ echo wcf()->meta->get_number_field(
610
+ array(
611
+ 'label' => __( 'Left Right Spacing', 'cartflows' ),
612
+ 'name' => 'wcf-submit-lr-padding',
613
+ 'value' => $options['wcf-submit-lr-padding'],
614
+ )
615
+ );
616
+
617
+ echo wcf()->meta->get_select_field(
618
+ array(
619
+ 'label' => __( 'Position', 'cartflows' ),
620
+ 'name' => 'wcf-submit-button-position',
621
+ 'value' => $options['wcf-submit-button-position'],
622
+ 'options' => array(
623
+ 'left' => esc_html__( 'Left', 'cartflows' ),
624
+ 'center' => esc_html__( 'Center', 'cartflows' ),
625
+ 'right' => esc_html__( 'Right', 'cartflows' ),
626
+ ),
627
+ )
628
+ );
629
+
630
+ echo wcf()->meta->get_color_picker_field(
631
+ array(
632
+ 'label' => __( 'Text Color', 'cartflows' ),
633
+ 'name' => 'wcf-submit-color',
634
+ 'value' => $options['wcf-submit-color'],
635
+ )
636
+ );
637
+
638
+ echo wcf()->meta->get_color_picker_field(
639
+ array(
640
+ 'label' => __( 'Text Hover Color', 'cartflows' ),
641
+ 'name' => 'wcf-submit-hover-color',
642
+ 'value' => $options['wcf-submit-hover-color'],
643
+ )
644
+ );
645
+
646
+ echo wcf()->meta->get_color_picker_field(
647
+ array(
648
+ 'label' => __( 'Background Color', 'cartflows' ),
649
+ 'name' => 'wcf-submit-bg-color',
650
+ 'value' => $options['wcf-submit-bg-color'],
651
+ )
652
+ );
653
+
654
+ echo wcf()->meta->get_color_picker_field(
655
+ array(
656
+ 'label' => __( 'Background Hover Color', 'cartflows' ),
657
+ 'name' => 'wcf-submit-bg-hover-color',
658
+ 'value' => $options['wcf-submit-bg-hover-color'],
659
+ )
660
+ );
661
+
662
+ echo wcf()->meta->get_color_picker_field(
663
+ array(
664
+ 'label' => __( 'Border Color', 'cartflows' ),
665
+ 'name' => 'wcf-submit-border-color',
666
+ 'value' => $options['wcf-submit-border-color'],
667
+ )
668
+ );
669
+
670
+ echo wcf()->meta->get_color_picker_field(
671
+ array(
672
+ 'label' => __( 'Border Hover Color', 'cartflows' ),
673
+ 'name' => 'wcf-submit-border-hover-color',
674
+ 'value' => $options['wcf-submit-border-hover-color'],
675
+ )
676
+ );
677
+
678
+ ?>
679
+ </div>
680
+ </div>
681
+ <?php
682
+ echo wcf()->meta->get_hidden_field(
683
+ array(
684
+ 'name' => 'wcf-field-google-font-url',
685
+ 'value' => $options['wcf-field-google-font-url'],
686
+ )
687
+ );
688
+ ?>
689
+ </div>
690
+ <?php
691
+ }
692
+
693
+ /**
694
+ * Get metabox options
695
+ *
696
+ * @param int $post_id post ID.
697
+ */
698
+ public static function get_meta_option( $post_id ) {
699
+
700
+ if ( null === self::$meta_option ) {
701
+
702
+ /**
703
+ * Set metabox options
704
+ *
705
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
706
+ */
707
+ self::$meta_option = wcf()->options->get_optin_fields( $post_id );
708
+ }
709
+
710
+ return self::$meta_option;
711
+ }
712
+
713
+ /**
714
+ * Metabox Save
715
+ *
716
+ * @param number $post_id Post ID.
717
+ * @return void
718
+ */
719
+ public function save_meta_box( $post_id ) {
720
+
721
+ // Checks save status.
722
+ $is_autosave = wp_is_post_autosave( $post_id );
723
+ $is_revision = wp_is_post_revision( $post_id );
724
+
725
+ $is_valid_nonce = ( isset( $_POST['nonce-optin-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-optin-step-meta'] ) ), 'save-nonce-optin-step-meta' ) ) ? true : false;
726
+
727
+ // Exits script depending on save status.
728
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
729
+ return;
730
+ }
731
+
732
+ wcf()->options->save_optin_fields( $post_id );
733
+ }
734
+ }
735
+
736
+ /**
737
+ * Kicking this off by calling 'get_instance()' method
738
+ */
739
+ Cartflows_Optin_Meta::get_instance();
modules/thankyou/classes/class-cartflows-thankyou-markup.php CHANGED
@@ -1,314 +1,324 @@
1
- <?php
2
- /**
3
- * Front end and markup
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Checkout Markup
10
- *
11
- * @since 1.0.0
12
- */
13
- class Cartflows_Thankyou_Markup {
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
- /* Downsell Shortcode */
39
- add_shortcode( 'cartflows_order_details', array( $this, 'cartflows_order_details_shortcode_markup' ) );
40
-
41
- add_action( 'wp_enqueue_scripts', array( $this, 'thank_you_scripts' ), 21 );
42
-
43
- add_action( 'woocommerce_is_order_received_page', array( $this, 'set_order_received_page' ) );
44
-
45
- /* Set is checkout flag */
46
- add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
47
-
48
- /* Custom redirection of thank you page */
49
- add_action( 'template_redirect', array( $this, 'redirect_tq_page_to_custom_url' ) );
50
-
51
- add_action( 'cartflows_thank_you_scripts', array( $this, 'add_divi_compatibility_css' ) );
52
- }
53
-
54
- /**
55
- * Redirect to custom url instead of thank you page.
56
- */
57
- public function redirect_tq_page_to_custom_url() {
58
- global $post;
59
-
60
- if ( _is_wcf_thankyou_type() ) {
61
-
62
- $thank_you_id = $post->ID;
63
- $enable_redirection = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-tq-redirect-section' );
64
- $redirect_link = wp_http_validate_url( wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-redirect-link' ) );
65
-
66
- if ( 'yes' === $enable_redirection && ! empty( $redirect_link ) ) {
67
- exit( wp_redirect( $redirect_link ) ); //phpcs:ignore
68
- }
69
- }
70
- }
71
- /**
72
- * Order shortcode markup
73
- *
74
- * @param array $atts attributes.
75
- * @since 1.0.0
76
- */
77
- public function cartflows_order_details_shortcode_markup( $atts ) {
78
-
79
- $output = '';
80
-
81
- if ( _is_wcf_thankyou_type() ) {
82
- /* Remove order item link */
83
- add_filter( 'woocommerce_order_item_permalink', '__return_false' );
84
-
85
- /* Change order text */
86
- add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'custom_tq_text' ), 10, 2 );
87
-
88
- if ( ! function_exists( 'wc_print_notices' ) ) {
89
-
90
- $notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
91
- $notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
92
-
93
- return $notice_out;
94
- }
95
-
96
- $order = false;
97
-
98
- $id_param = 'wcf-order';
99
- $key_param = 'wcf-key';
100
-
101
- if ( isset( $_GET['wcf-opt-order'] ) ) { //phpcs:ignore
102
- $id_param = 'wcf-opt-order';
103
- $key_param = 'wcf-opt-key';
104
- }
105
-
106
- if ( ! isset( $_GET[ $id_param ] ) && wcf()->flow->is_flow_testmode() ) { //phpcs:ignore
107
- $args = array(
108
- 'limit' => 1,
109
- 'order' => 'DESC',
110
- 'post_type' => 'shop_order',
111
- 'status' => array( 'completed', 'processing' ),
112
- );
113
-
114
- $latest_order = wc_get_orders( $args );
115
-
116
- $order_id = ( ! empty( $latest_order ) ) ? current( $latest_order )->get_id() : 0;
117
-
118
- if ( $order_id > 0 ) {
119
- $order = wc_get_order( $order_id );
120
-
121
- if ( ! $order ) {
122
- $order = false;
123
- }
124
- }
125
- } else {
126
- if ( ! isset( $_GET[ $id_param ] ) ) { //phpcs:ignore
127
- return '<p class="woocommerce-notice">Order not found. You cannot access this page directly.</p>';
128
- }
129
-
130
- // Get the order.
131
- $order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET[ $id_param ] ) ? 0 : intval( $_GET[ $id_param ] ) ); //phpcs:ignore
132
- $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET[ $key_param ] ) ? '' : wc_clean( wp_unslash( $_GET[ $key_param ] ) ) ); //phpcs:ignore
133
-
134
- if ( $order_id > 0 ) {
135
- $order = wc_get_order( $order_id );
136
-
137
- if ( ! $order || $order->get_order_key() !== $order_key ) {
138
- $order = false;
139
- }
140
- }
141
- }
142
-
143
- // Empty awaiting payment session.
144
- unset( WC()->session->order_awaiting_payment );
145
-
146
- if ( null !== WC()->session ) {
147
- if ( ! isset( WC()->cart ) || '' === WC()->cart ) {
148
- WC()->cart = new WC_Cart();
149
- }
150
-
151
- if ( ! WC()->cart->is_empty() ) {
152
- // wc_empty_cart();
153
- // Empty current cart.
154
- WC()->cart->empty_cart( true );
155
-
156
- wc_clear_notices();
157
- }
158
-
159
- wc_print_notices();
160
- }
161
-
162
- do_action( 'cartflows_thankyou_details_before', $order );
163
-
164
- ob_start();
165
- echo "<div class='wcf-thankyou-wrap' id='wcf-thankyou-wrap'>";
166
- wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) );
167
- echo '</div>';
168
- $output = ob_get_clean();
169
- }
170
-
171
- return $output;
172
- }
173
-
174
- /**
175
- * Load Thank You scripts.
176
- *
177
- * @return void
178
- */
179
- public function thank_you_scripts() {
180
-
181
- if ( _is_wcf_thankyou_type() ) {
182
-
183
- do_action( 'cartflows_thank_you_scripts' );
184
-
185
- $style = $this->generate_thank_you_style();
186
-
187
- wp_add_inline_style( 'wcf-frontend-global', $style );
188
- }
189
- }
190
-
191
- /**
192
- * Load DIVI compatibility Thank You style.
193
- *
194
- * @return void
195
- */
196
- public function add_divi_compatibility_css() {
197
-
198
- global $post;
199
-
200
- $thank_you_id = $post->ID;
201
-
202
- if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
203
- Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id )
204
- ) {
205
- wp_enqueue_style( 'wcf-frontend-global-divi', wcf()->utils->get_css_url( 'frontend-divi' ), array(), CARTFLOWS_VER );
206
- }
207
- }
208
-
209
- /**
210
- * Set thank you as a order received page.
211
- *
212
- * @param boolean $is_order_page order page.
213
- * @return boolean
214
- */
215
- public function set_order_received_page( $is_order_page ) {
216
-
217
- if ( _is_wcf_thankyou_type() ) {
218
- $is_order_page = true;
219
- }
220
-
221
- return $is_order_page;
222
- }
223
-
224
- /**
225
- * Generate Thank You Styles.
226
- *
227
- * @return string
228
- */
229
- public function generate_thank_you_style() {
230
-
231
- global $post;
232
-
233
- if ( _is_wcf_thankyou_type() ) {
234
- $thank_you_id = $post->ID;
235
- } else {
236
- $thank_you_id = _get_wcf_thankyou_id( $post->post_content );
237
- }
238
-
239
- CartFlows_Font_Families::render_fonts( $thank_you_id );
240
-
241
- $text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
242
- $text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
243
- $text_font_size = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-size' );
244
- $heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
245
- $heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
246
- $heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
247
- $container_width = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-container-width' );
248
- $section_bg_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-section-bg-color' );
249
-
250
- $show_order_review = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-overview-section' );
251
-
252
- $show_order_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-details-section' );
253
-
254
- $show_billing_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-billing-section' );
255
-
256
- $show_shipping_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-shipping-section' );
257
-
258
- if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
259
- Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id ) ) {
260
-
261
- include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-divi-css.php';
262
-
263
- } else {
264
- include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-css.php';
265
- }
266
-
267
- return $output;
268
- }
269
-
270
- /**
271
- * Set as a checkout page if it is thank you page.
272
- * Thank you page need to be set as a checkout page.
273
- * Becauye ayment gateways will not load if it is not checkout.
274
- *
275
- * @param bool $is_checkout is checkout.
276
- *
277
- * @return bool
278
- */
279
- public function woo_checkout_flag( $is_checkout ) {
280
-
281
- if ( ! is_admin() ) {
282
- if ( _is_wcf_thankyou_type() ) {
283
- $is_checkout = true;
284
- }
285
- }
286
-
287
- return $is_checkout;
288
- }
289
-
290
- /**
291
- * Add custom text on thank you page.
292
- *
293
- * @param string $woo_text Default text.
294
- * @param int $order order.
295
- */
296
- public function custom_tq_text( $woo_text, $order ) {
297
-
298
- global $post;
299
-
300
- $thank_you_id = $post->ID;
301
- $new_text = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text' );
302
-
303
- if ( ! empty( $new_text ) ) {
304
- $woo_text = do_shortcode( $new_text );
305
- }
306
-
307
- return $woo_text;
308
- }
309
- }
310
-
311
- /**
312
- * Kicking this off by calling 'get_instance()' method
313
- */
314
- Cartflows_Thankyou_Markup::get_instance();
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Front end and markup
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Checkout Markup
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ class Cartflows_Thankyou_Markup {
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
+ /* Downsell Shortcode */
39
+ add_shortcode( 'cartflows_order_details', array( $this, 'cartflows_order_details_shortcode_markup' ) );
40
+
41
+ add_action( 'wp_enqueue_scripts', array( $this, 'thank_you_scripts' ), 21 );
42
+
43
+ add_action( 'woocommerce_is_order_received_page', array( $this, 'set_order_received_page' ) );
44
+
45
+ /* Set is checkout flag */
46
+ add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 );
47
+
48
+ /* Custom redirection of thank you page */
49
+ add_action( 'template_redirect', array( $this, 'redirect_tq_page_to_custom_url' ) );
50
+
51
+ add_action( 'cartflows_thank_you_scripts', array( $this, 'add_divi_compatibility_css' ) );
52
+ }
53
+
54
+ /**
55
+ * Redirect to custom url instead of thank you page.
56
+ */
57
+ public function redirect_tq_page_to_custom_url() {
58
+ global $post;
59
+
60
+ if ( _is_wcf_thankyou_type() ) {
61
+
62
+ $thank_you_id = $post->ID;
63
+ $enable_redirection = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-tq-redirect-section' );
64
+ $redirect_link = wp_http_validate_url( wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-redirect-link' ) );
65
+
66
+ if ( 'yes' === $enable_redirection && ! empty( $redirect_link ) ) {
67
+ exit( wp_redirect( $redirect_link ) ); //phpcs:ignore
68
+ }
69
+ }
70
+ }
71
+ /**
72
+ * Order shortcode markup
73
+ *
74
+ * @param array $atts attributes.
75
+ * @since 1.0.0
76
+ */
77
+ public function cartflows_order_details_shortcode_markup( $atts ) {
78
+
79
+ $output = '';
80
+
81
+ if ( _is_wcf_thankyou_type() ) {
82
+ /* Remove order item link */
83
+ add_filter( 'woocommerce_order_item_permalink', '__return_false' );
84
+
85
+ /* Change order text */
86
+ add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'custom_tq_text' ), 10, 2 );
87
+
88
+ if ( ! function_exists( 'wc_print_notices' ) ) {
89
+
90
+ $notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>';
91
+ $notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>';
92
+
93
+ return $notice_out;
94
+ }
95
+
96
+ $order = false;
97
+
98
+ $id_param = 'wcf-order';
99
+ $key_param = 'wcf-key';
100
+
101
+ if ( isset( $_GET['wcf-opt-order'] ) ) { //phpcs:ignore
102
+ $id_param = 'wcf-opt-order';
103
+ $key_param = 'wcf-opt-key';
104
+ }
105
+
106
+ $show_demo_order = apply_filters( 'cartflows_show_demo_order_details', false );
107
+
108
+ if ( ! isset( $_GET[ $id_param ] ) && ( wcf()->flow->is_flow_testmode() || $show_demo_order ) ) { //phpcs:ignore
109
+ $args = array(
110
+ 'limit' => 1,
111
+ 'order' => 'DESC',
112
+ 'post_type' => 'shop_order',
113
+ 'status' => array( 'completed', 'processing' ),
114
+ );
115
+
116
+ $latest_order = wc_get_orders( $args );
117
+
118
+ $order_id = ( ! empty( $latest_order ) ) ? current( $latest_order )->get_id() : 0;
119
+
120
+ if ( $order_id > 0 ) {
121
+ $order = wc_get_order( $order_id );
122
+
123
+ if ( ! $order ) {
124
+ $order = false;
125
+ }
126
+ } else {
127
+ return '<p class="woocommerce-notice">' . __( 'No completed or processing order found to show the order details form demo.', 'cartflows' ) . '</p>';
128
+ }
129
+ } else {
130
+ if ( ! isset( $_GET[ $id_param ] ) ) { //phpcs:ignore
131
+ return '<p class="woocommerce-notice">' . __( 'Order not found. You cannot access this page directly.', 'cartflows' ) . '</p>';
132
+ }
133
+
134
+ // Get the order.
135
+ $order_id = apply_filters( 'woocommerce_thankyou_order_id', empty( $_GET[ $id_param ] ) ? 0 : intval( $_GET[ $id_param ] ) ); //phpcs:ignore
136
+ $order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET[ $key_param ] ) ? '' : wc_clean( wp_unslash( $_GET[ $key_param ] ) ) ); //phpcs:ignore
137
+
138
+ if ( $order_id > 0 ) {
139
+ $order = wc_get_order( $order_id );
140
+
141
+ if ( ! $order || $order->get_order_key() !== $order_key ) {
142
+ $order = false;
143
+ }
144
+ }
145
+ }
146
+
147
+ // Empty awaiting payment session.
148
+ unset( WC()->session->order_awaiting_payment );
149
+
150
+ if ( null !== WC()->session ) {
151
+ if ( ! isset( WC()->cart ) || '' === WC()->cart ) {
152
+ WC()->cart = new WC_Cart();
153
+ }
154
+
155
+ if ( ! WC()->cart->is_empty() ) {
156
+ // wc_empty_cart();
157
+ // Empty current cart.
158
+ WC()->cart->empty_cart( true );
159
+
160
+ wc_clear_notices();
161
+ }
162
+
163
+ wc_print_notices();
164
+ }
165
+
166
+ do_action( 'cartflows_thankyou_details_before', $order );
167
+
168
+ ob_start();
169
+ echo "<div class='wcf-thankyou-wrap' id='wcf-thankyou-wrap'>";
170
+ wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) );
171
+ echo '</div>';
172
+ $output = ob_get_clean();
173
+ }
174
+
175
+ return $output;
176
+ }
177
+
178
+ /**
179
+ * Load Thank You scripts.
180
+ *
181
+ * @return void
182
+ */
183
+ public function thank_you_scripts() {
184
+
185
+ if ( _is_wcf_thankyou_type() ) {
186
+
187
+ do_action( 'cartflows_thank_you_scripts' );
188
+
189
+ $thank_you_dynamic_css = apply_filters( 'cartflows_thank_you_enable_dynamic_css', true );
190
+
191
+ if ( $thank_you_dynamic_css ) {
192
+
193
+ $style = $this->generate_thank_you_style();
194
+
195
+ wp_add_inline_style( 'wcf-frontend-global', $style );
196
+
197
+ }
198
+ }
199
+ }
200
+
201
+ /**
202
+ * Load DIVI compatibility Thank You style.
203
+ *
204
+ * @return void
205
+ */
206
+ public function add_divi_compatibility_css() {
207
+
208
+ global $post;
209
+
210
+ $thank_you_id = $post->ID;
211
+
212
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
213
+ Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id )
214
+ ) {
215
+ wp_enqueue_style( 'wcf-frontend-global-divi', wcf()->utils->get_css_url( 'frontend-divi' ), array(), CARTFLOWS_VER );
216
+ }
217
+ }
218
+
219
+ /**
220
+ * Set thank you as a order received page.
221
+ *
222
+ * @param boolean $is_order_page order page.
223
+ * @return boolean
224
+ */
225
+ public function set_order_received_page( $is_order_page ) {
226
+
227
+ if ( _is_wcf_thankyou_type() ) {
228
+ $is_order_page = true;
229
+ }
230
+
231
+ return $is_order_page;
232
+ }
233
+
234
+ /**
235
+ * Generate Thank You Styles.
236
+ *
237
+ * @return string
238
+ */
239
+ public function generate_thank_you_style() {
240
+
241
+ global $post;
242
+
243
+ if ( _is_wcf_thankyou_type() ) {
244
+ $thank_you_id = $post->ID;
245
+ } else {
246
+ $thank_you_id = _get_wcf_thankyou_id( $post->post_content );
247
+ }
248
+
249
+ CartFlows_Font_Families::render_fonts( $thank_you_id );
250
+
251
+ $text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text-color' );
252
+ $text_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-family' );
253
+ $text_font_size = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-font-size' );
254
+ $heading_text_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-color' );
255
+ $heading_font_family = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-family' );
256
+ $heading_font_weight = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-heading-font-wt' );
257
+ $container_width = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-container-width' );
258
+ $section_bg_color = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-section-bg-color' );
259
+
260
+ $show_order_review = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-overview-section' );
261
+
262
+ $show_order_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-details-section' );
263
+
264
+ $show_billing_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-billing-section' );
265
+
266
+ $show_shipping_details = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-show-shipping-section' );
267
+
268
+ if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() ||
269
+ Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $thank_you_id ) ) {
270
+
271
+ include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-divi-css.php';
272
+
273
+ } else {
274
+ include CARTFLOWS_THANKYOU_DIR . 'includes/thankyou-dynamic-css.php';
275
+ }
276
+
277
+ return $output;
278
+ }
279
+
280
+ /**
281
+ * Set as a checkout page if it is thank you page.
282
+ * Thank you page need to be set as a checkout page.
283
+ * Becauye ayment gateways will not load if it is not checkout.
284
+ *
285
+ * @param bool $is_checkout is checkout.
286
+ *
287
+ * @return bool
288
+ */
289
+ public function woo_checkout_flag( $is_checkout ) {
290
+
291
+ if ( ! is_admin() ) {
292
+ if ( _is_wcf_thankyou_type() ) {
293
+ $is_checkout = true;
294
+ }
295
+ }
296
+
297
+ return $is_checkout;
298
+ }
299
+
300
+ /**
301
+ * Add custom text on thank you page.
302
+ *
303
+ * @param string $woo_text Default text.
304
+ * @param int $order order.
305
+ */
306
+ public function custom_tq_text( $woo_text, $order ) {
307
+
308
+ global $post;
309
+
310
+ $thank_you_id = $post->ID;
311
+ $new_text = wcf()->options->get_thankyou_meta_value( $thank_you_id, 'wcf-tq-text' );
312
+
313
+ if ( ! empty( $new_text ) ) {
314
+ $woo_text = do_shortcode( $new_text );
315
+ }
316
+
317
+ return $woo_text;
318
+ }
319
+ }
320
+
321
+ /**
322
+ * Kicking this off by calling 'get_instance()' method
323
+ */
324
+ Cartflows_Thankyou_Markup::get_instance();
modules/thankyou/classes/class-cartflows-thankyou-meta.php CHANGED
@@ -1,423 +1,482 @@
1
- <?php
2
- /**
3
- * Checkout post meta box
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- /**
9
- * Meta Boxes setup
10
- */
11
- class Cartflows_Thankyou_Meta extends Cartflows_Meta {
12
-
13
- /**
14
- * Instance
15
- *
16
- * @var $instance
17
- */
18
- private static $instance;
19
-
20
- /**
21
- * Meta Option
22
- *
23
- * @var $meta_option
24
- */
25
- private static $meta_option = null;
26
-
27
- /**
28
- * Initiator
29
- */
30
- public static function get_instance() {
31
- if ( ! isset( self::$instance ) ) {
32
- self::$instance = new self();
33
- }
34
-
35
- return self::$instance;
36
- }
37
-
38
- /**
39
- * Constructor
40
- */
41
- public function __construct() {
42
-
43
- /* Init Metabox */
44
- add_action( 'load-post.php', array( $this, 'init_metabox' ) );
45
- add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
46
- }
47
-
48
- /**
49
- * Init Metabox
50
- */
51
- public function init_metabox() {
52
-
53
- add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) );
54
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
55
- }
56
-
57
- /**
58
- * Setup Metabox
59
- */
60
- public function setup_meta_box() {
61
-
62
- if ( _is_wcf_thankyou_type() ) {
63
- add_meta_box(
64
- 'wcf-thankyou-settings', // Id.
65
- __( 'Thank You Page Settings', 'cartflows' ), // Title.
66
- array( $this, 'markup_meta_box' ), // Callback.
67
- wcf()->utils->get_step_post_type(), // Post_type.
68
- 'normal', // Context.
69
- 'high' // Priority.
70
- );
71
- }
72
- }
73
-
74
- /**
75
- * Metabox Markup
76
- *
77
- * @param object $post Post object.
78
- * @return void
79
- */
80
- public function markup_meta_box( $post ) {
81
-
82
- wp_nonce_field( 'save-nonce-thankyou-step-meta', 'nonce-thankyou-step-meta' );
83
- $stored = get_post_meta( $post->ID );
84
-
85
- $checkout_meta = self::get_meta_option( $post->ID );
86
-
87
- // Set stored and override defaults.
88
- foreach ( $stored as $key => $value ) {
89
- if ( array_key_exists( $key, $checkout_meta ) ) {
90
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
91
- } else {
92
- self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
93
- }
94
- }
95
-
96
- // Get defaults.
97
- $meta = self::get_meta_option( $post->ID );
98
-
99
- /**
100
- * Get options
101
- */
102
- $thankyou_data = array();
103
-
104
- foreach ( $meta as $key => $value ) {
105
-
106
- $thankyou_data[ $key ] = $meta[ $key ]['default'];
107
- }
108
-
109
- do_action( 'wcf_thankyou_settings_markup_before', $meta );
110
- $this->page_header_tab( $thankyou_data, $post->ID );
111
- do_action( 'wcf_thankyou_settings_markup_after', $meta );
112
- }
113
-
114
- /**
115
- * Page Header Tabs
116
- *
117
- * @param array $options Post meta.
118
- * @param int $post_id Post ID.
119
- */
120
- public function page_header_tab( $options, $post_id ) {
121
-
122
- $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
123
-
124
- if ( empty( $active_tab ) ) {
125
- $active_tab = 'wcf-thankyou-shortcodes';
126
- }
127
-
128
- $tabs = array(
129
- array(
130
- 'title' => __( 'Shortcodes', 'cartflows' ),
131
- 'id' => 'wcf-thankyou-shortcodes',
132
- 'class' => 'wcf-thankyou-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
133
- 'icon' => 'dashicons-editor-code',
134
- ),
135
- array(
136
- 'title' => __( 'Design', 'cartflows' ),
137
- 'id' => 'wcf-thankyou-design',
138
- 'class' => 'wcf-thankyou-design' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
139
- 'icon' => 'dashicons-admin-customizer',
140
- ),
141
- array(
142
- 'title' => __( 'Edit Fields', 'cartflows' ),
143
- 'id' => 'wcf-thankyou-fields',
144
- 'class' => 'wcf-thankyou-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
145
- 'icon' => 'dashicons-welcome-widgets-menus',
146
- ),
147
- array(
148
- 'title' => __( 'Settings', 'cartflows' ),
149
- 'id' => 'wcf-thankyou-redirect',
150
- 'class' => 'wcf-thankyou-redirect' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
151
- 'icon' => 'dashicons-randomize',
152
- ),
153
- array(
154
- 'title' => __( 'Custom Script', 'cartflows' ),
155
- 'id' => 'wcf-thankyou-custom-script-header',
156
- 'class' => 'wcf-thankyou-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
157
- 'icon' => 'dashicons-format-aside',
158
- ),
159
- );
160
-
161
- ?>
162
- <div class="wcf-thankyou-table wcf-metabox-wrap widefat">
163
- <div class="wcf-table-container">
164
- <div class="wcf-column-left">
165
- <div class="wcf-tab-wrapper">
166
-
167
- <?php foreach ( $tabs as $key => $tab ) { ?>
168
- <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
169
- <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
170
- <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
171
- </div>
172
- <?php } ?>
173
- <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
174
-
175
- </div>
176
- </div>
177
- <div class="wcf-column-right">
178
- <div class="wcf-thankyou-shortcodes wcf-tab-content active widefat">
179
- <?php
180
- echo wcf()->meta->get_shortcode_field(
181
- array(
182
- 'label' => __( 'Order Details', 'cartflows' ),
183
- 'name' => 'wcf-order-details',
184
- 'content' => esc_html( '[cartflows_order_details]' ),
185
- )
186
- );
187
- ?>
188
- </div>
189
- <div class="wcf-thankyou-design wcf-tab-content widefat">
190
- <?php
191
-
192
- echo wcf()->meta->get_section(
193
- array(
194
- 'label' => __( 'Text', 'cartflows' ),
195
- )
196
- );
197
-
198
- echo wcf()->meta->get_color_picker_field(
199
- array(
200
- 'label' => __( 'Color', 'cartflows' ),
201
- 'name' => 'wcf-tq-text-color',
202
- 'value' => $options['wcf-tq-text-color'],
203
- )
204
- );
205
-
206
- echo wcf()->meta->get_font_family_field(
207
- array(
208
- 'for' => 'wcf-tq-font-family',
209
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
210
- 'name' => 'wcf-tq-font-family',
211
- 'value' => $options['wcf-tq-font-family'],
212
- )
213
- );
214
-
215
- echo wcf()->meta->get_number_field(
216
- array(
217
- 'label' => __( 'Font Size', 'cartflows' ),
218
- 'name' => 'wcf-tq-font-size',
219
- 'value' => $options['wcf-tq-font-size'],
220
- )
221
- );
222
-
223
- echo wcf()->meta->get_section(
224
- array(
225
- 'label' => __( 'Heading', 'cartflows' ),
226
- )
227
- );
228
-
229
- echo wcf()->meta->get_color_picker_field(
230
- array(
231
- 'label' => __( 'Color', 'cartflows' ),
232
- 'name' => 'wcf-tq-heading-color',
233
- 'value' => $options['wcf-tq-heading-color'],
234
- )
235
- );
236
-
237
- echo wcf()->meta->get_font_family_field(
238
- array(
239
- 'for' => 'wcf-tq-heading-font-family',
240
- 'label' => esc_html__( 'Font Family', 'cartflows' ),
241
- 'name' => 'wcf-tq-heading-font-family',
242
- 'value' => $options['wcf-tq-heading-font-family'],
243
- )
244
- );
245
-
246
- echo wcf()->meta->get_font_weight_field(
247
- array(
248
- 'for' => 'wcf-tq-heading-font-family',
249
- 'label' => esc_html__( 'Font Weight', 'cartflows' ),
250
- 'name' => 'wcf-tq-heading-font-wt',
251
- 'value' => $options['wcf-tq-heading-font-wt'],
252
- )
253
- );
254
-
255
- echo wcf()->meta->get_checkbox_field(
256
- array(
257
- 'label' => __( 'Advanced Options', 'cartflows' ),
258
- 'name' => 'wcf-tq-advance-options-fields',
259
- 'value' => $options['wcf-tq-advance-options-fields'],
260
- 'after' => 'Enable',
261
- )
262
- );
263
-
264
- echo wcf()->meta->get_number_field(
265
- array(
266
- 'for' => 'wcf-heading',
267
- 'label' => esc_html__( 'Container Width (In px)', 'cartflows' ),
268
- 'name' => 'wcf-tq-container-width',
269
- 'value' => $options['wcf-tq-container-width'],
270
- )
271
- );
272
-
273
- echo wcf()->meta->get_color_picker_field(
274
- array(
275
- 'label' => __( 'Section Background Color', 'cartflows' ),
276
- 'name' => 'wcf-tq-section-bg-color',
277
- 'value' => $options['wcf-tq-section-bg-color'],
278
- )
279
- );
280
-
281
- ?>
282
- </div>
283
- <div class="wcf-thankyou-fields wcf-tab-content widefat">
284
- <?php
285
- echo wcf()->meta->get_checkbox_field(
286
- array(
287
- 'name' => 'wcf-show-overview-section',
288
- 'value' => $options['wcf-show-overview-section'],
289
- 'after' => esc_html__( 'Enable Order Overview ', 'cartflows' ),
290
- )
291
- );
292
-
293
- echo wcf()->meta->get_checkbox_field(
294
- array(
295
- 'name' => 'wcf-show-details-section',
296
- 'value' => $options['wcf-show-details-section'],
297
- 'after' => esc_html__( 'Enable Order Details ', 'cartflows' ),
298
- )
299
- );
300
-
301
- echo wcf()->meta->get_checkbox_field(
302
- array(
303
- 'name' => 'wcf-show-billing-section',
304
- 'value' => $options['wcf-show-billing-section'],
305
- 'after' => esc_html__( 'Enable Billing Details ', 'cartflows' ),
306
- )
307
- );
308
-
309
- echo wcf()->meta->get_checkbox_field(
310
- array(
311
- 'name' => 'wcf-show-shipping-section',
312
- 'value' => $options['wcf-show-shipping-section'],
313
- 'after' => esc_html__( 'Enable Shipping Details ', 'cartflows' ),
314
- )
315
- );
316
-
317
- echo wcf()->meta->get_hidden_field(
318
- array(
319
- 'name' => 'wcf-field-google-font-url',
320
- 'value' => $options['wcf-field-google-font-url'],
321
- )
322
- );
323
- ?>
324
- </div>
325
- <div class="wcf-thankyou-redirect wcf-tab-content widefat" >
326
- <?php
327
- echo wcf()->meta->get_text_field(
328
- array(
329
- 'label' => __( 'Thank You Page Text', 'cartflows' ),
330
- 'name' => 'wcf-tq-text',
331
- 'value' => $options['wcf-tq-text'],
332
- 'attr' => array(
333
- 'placeholder' => __( 'Thank you. Your order has been received.', 'cartflows' ),
334
- ),
335
- 'help' => __( 'It will change the default text on thank you page.', 'cartflows' ),
336
- )
337
- );
338
-
339
- echo wcf()->meta->get_hr_line_field( array() );
340
-
341
- echo wcf()->meta->get_checkbox_field(
342
- array(
343
- 'label' => __( 'Redirect After Purchase', 'cartflows' ),
344
- 'name' => 'wcf-show-tq-redirect-section',
345
- 'value' => $options['wcf-show-tq-redirect-section'],
346
- 'after' => 'Enable',
347
- )
348
- );
349
-
350
- echo wcf()->meta->get_text_field(
351
- array(
352
- 'label' => __( 'Redirect Link', 'cartflows' ),
353
- 'name' => 'wcf-tq-redirect-link',
354
- 'value' => $options['wcf-tq-redirect-link'],
355
- 'attr' => array(
356
- 'placeholder' => __( 'https://', 'cartflows' ),
357
- ),
358
- )
359
- );
360
-
361
- ?>
362
- </div>
363
-
364
- <?php $this->tab_custom_script( $options, $post_id ); ?>
365
-
366
- <?php $this->right_column_footer( $options, $post_id ); ?>
367
- </div>
368
- </div>
369
- </div>
370
-
371
- <?php
372
-
373
- }
374
-
375
- /**
376
- * Get metabox options
377
- *
378
- * @param int $post_id post ID.
379
- * @return array
380
- */
381
- public static function get_meta_option( $post_id ) {
382
-
383
- if ( null === self::$meta_option ) {
384
-
385
- /**
386
- * Set metabox options
387
- *
388
- * @see http://php.net/manual/en/filter.filters.sanitize.php
389
- */
390
- self::$meta_option = wcf()->options->get_thankyou_fields( $post_id );
391
- }
392
-
393
- return self::$meta_option;
394
-
395
- }
396
-
397
- /**
398
- * Metabox Save
399
- *
400
- * @param number $post_id Post ID.
401
- * @return void
402
- */
403
- public function save_meta_box( $post_id ) {
404
-
405
- // Checks save status.
406
- $is_autosave = wp_is_post_autosave( $post_id );
407
- $is_revision = wp_is_post_revision( $post_id );
408
-
409
- $is_valid_nonce = ( isset( $_POST['nonce-thankyou-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-thankyou-step-meta'] ) ), 'save-nonce-thankyou-step-meta' ) ) ? true : false;
410
-
411
- // Exits script depending on save status.
412
- if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
413
- return;
414
- }
415
-
416
- wcf()->options->save_thankyou_fields( $post_id );
417
- }
418
- }
419
-
420
- /**
421
- * Kicking this off by calling 'get_instance()' method
422
- */
423
- Cartflows_Thankyou_Meta::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout post meta box
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ /**
9
+ * Meta Boxes setup
10
+ */
11
+ class Cartflows_Thankyou_Meta extends Cartflows_Meta {
12
+
13
+ /**
14
+ * Instance
15
+ *
16
+ * @var $instance
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * Meta Option
22
+ *
23
+ * @var $meta_option
24
+ */
25
+ private static $meta_option = null;
26
+
27
+ /**
28
+ * Meta Options map key->value map,
29
+ *
30
+ * @var $meta_option_data
31
+ */
32
+ private static $meta_option_data = array();
33
+
34
+ /**
35
+ * Initiator
36
+ */
37
+ public static function get_instance() {
38
+ if ( ! isset( self::$instance ) ) {
39
+ self::$instance = new self();
40
+ }
41
+
42
+ return self::$instance;
43
+ }
44
+
45
+ /**
46
+ * Constructor
47
+ */
48
+ public function __construct() {
49
+
50
+ /* Init Metabox */
51
+ add_action( 'load-post.php', array( $this, 'init_metabox' ) );
52
+ add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
53
+ }
54
+
55
+ /**
56
+ * Init Metabox
57
+ */
58
+ public function init_metabox() {
59
+
60
+ add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ), 10, 2 );
61
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
62
+ }
63
+
64
+ /**
65
+ * Setup Metabox
66
+ *
67
+ * @param string $post_type post type.
68
+ * @param object $post post object.
69
+ */
70
+ public function setup_meta_box( $post_type, $post ) {
71
+
72
+ if ( _is_wcf_thankyou_type() ) {
73
+
74
+ $stored_meta = get_post_meta( $post->ID );
75
+ $thank_meta = self::get_meta_option( $post->ID );
76
+
77
+ // Set stored and override defaults.
78
+ foreach ( $stored_meta as $key => $value ) {
79
+ if ( array_key_exists( $key, $thank_meta ) ) {
80
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? maybe_unserialize( $stored_meta[ $key ][0] ) : '';
81
+ } else {
82
+ self::$meta_option[ $key ]['default'] = ( isset( $stored_meta[ $key ][0] ) ) ? $stored_meta[ $key ][0] : '';
83
+ }
84
+ }
85
+
86
+ // Get defaults.
87
+ $new_meta = self::get_meta_option( $post->ID );
88
+
89
+ foreach ( $new_meta as $key => $value ) {
90
+ self::$meta_option_data[ $key ] = $new_meta[ $key ]['default'];
91
+ }
92
+
93
+ add_meta_box(
94
+ 'wcf-thankyou-settings', // Id.
95
+ __( 'Thank You Settings', 'cartflows' ), // Title.
96
+ array( $this, 'settings_markup_meta_box' ), // Callback.
97
+ $post_type, // Post_type.
98
+ 'normal', // Context.
99
+ 'high' // Priority.
100
+ );
101
+
102
+ add_meta_box(
103
+ 'wcf-thankyou-design-settings', // Id.
104
+ __( 'Thank You Design', 'cartflows' ), // Title.
105
+ array( $this, 'design_markup_meta_box' ), // Callback.
106
+ $post_type, // Post_type.
107
+ 'normal', // Context.
108
+ 'high' // Priority.
109
+ );
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Metabox Markup
115
+ *
116
+ * @param object $post Post object.
117
+ * @return void
118
+ */
119
+ public function settings_markup_meta_box( $post ) {
120
+
121
+ wp_nonce_field( 'save-nonce-thankyou-step-meta', 'nonce-thankyou-step-meta' );
122
+
123
+ do_action( 'wcf_thankyou_settings_markup_before' );
124
+ $this->settings_tabs( self::$meta_option_data, $post->ID );
125
+ do_action( 'wcf_thankyou_settings_markup_after' );
126
+ }
127
+
128
+ /**
129
+ * Page Header Tabs
130
+ *
131
+ * @param array $options Post meta.
132
+ * @param int $post_id Post ID.
133
+ */
134
+ public function settings_tabs( $options, $post_id ) {
135
+
136
+ $active_tab = 'wcf-thankyou-redirect';
137
+
138
+ $tabs = array(
139
+ array(
140
+ 'title' => __( 'Settings', 'cartflows' ),
141
+ 'id' => 'wcf-thankyou-redirect',
142
+ 'class' => 'wcf-thankyou-redirect' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
143
+ 'icon' => 'dashicons-randomize',
144
+ ),
145
+ array(
146
+ 'title' => __( 'Custom Script', 'cartflows' ),
147
+ 'id' => 'wcf-thankyou-custom-script-header',
148
+ 'class' => 'wcf-thankyou-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
149
+ 'icon' => 'dashicons-format-aside',
150
+ ),
151
+ );
152
+
153
+ ?>
154
+ <div class="wcf-thankyou-table wcf-metabox-wrap widefat">
155
+ <div class="wcf-table-container">
156
+ <div class="wcf-column-left">
157
+ <div class="wcf-tab-wrapper">
158
+
159
+ <?php foreach ( $tabs as $key => $tab ) { ?>
160
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
161
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
162
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
163
+ </div>
164
+ <?php } ?>
165
+ </div>
166
+ </div>
167
+ <div class="wcf-column-right">
168
+ <div class="wcf-thankyou-redirect wcf-tab-content widefat" >
169
+ <?php
170
+ echo wcf()->meta->get_text_field(
171
+ array(
172
+ 'label' => __( 'Thank You Page Text', 'cartflows' ),
173
+ 'name' => 'wcf-tq-text',
174
+ 'value' => $options['wcf-tq-text'],
175
+ 'attr' => array(
176
+ 'placeholder' => __( 'Thank you. Your order has been received.', 'cartflows' ),
177
+ ),
178
+ 'help' => __( 'It will change the default text on thank you page.', 'cartflows' ),
179
+ )
180
+ );
181
+
182
+ echo wcf()->meta->get_hr_line_field( array() );
183
+
184
+ echo wcf()->meta->get_checkbox_field(
185
+ array(
186
+ 'label' => __( 'Redirect After Purchase', 'cartflows' ),
187
+ 'name' => 'wcf-show-tq-redirect-section',
188
+ 'value' => $options['wcf-show-tq-redirect-section'],
189
+ 'after' => 'Enable',
190
+ )
191
+ );
192
+
193
+ echo wcf()->meta->get_text_field(
194
+ array(
195
+ 'label' => __( 'Redirect Link', 'cartflows' ),
196
+ 'name' => 'wcf-tq-redirect-link',
197
+ 'value' => $options['wcf-tq-redirect-link'],
198
+ 'attr' => array(
199
+ 'placeholder' => __( 'https://', 'cartflows' ),
200
+ ),
201
+ )
202
+ );
203
+
204
+ ?>
205
+ </div>
206
+
207
+ <?php $this->tab_custom_script( $options, $post_id ); ?>
208
+
209
+ <?php $this->right_column_footer( $options, $post_id ); ?>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <?php
215
+ }
216
+
217
+ /**
218
+ * Metabox Markup
219
+ *
220
+ * @param object $post Post object.
221
+ * @return void
222
+ */
223
+ public function design_markup_meta_box( $post ) {
224
+
225
+ wp_nonce_field( 'save-nonce-thankyou-step-meta', 'nonce-thankyou-step-meta' );
226
+
227
+ do_action( 'wcf_thankyou_design_settings_markup_before' );
228
+ $this->design_settings_tabs( self::$meta_option_data, $post->ID );
229
+ do_action( 'wcf_thankyou_design_settings_markup_after' );
230
+ }
231
+
232
+ /**
233
+ * Page Header Tabs
234
+ *
235
+ * @param array $options Post meta.
236
+ * @param int $post_id Post ID.
237
+ */
238
+ public function design_settings_tabs( $options, $post_id ) {
239
+
240
+ $active_tab = 'wcf-thankyou-design';
241
+
242
+ $tabs = array(
243
+ array(
244
+ 'title' => __( 'Shortcodes', 'cartflows' ),
245
+ 'id' => 'wcf-thankyou-shortcodes',
246
+ 'class' => 'wcf-thankyou-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
247
+ 'icon' => 'dashicons-editor-code',
248
+ ),
249
+ array(
250
+ 'title' => __( 'Design', 'cartflows' ),
251
+ 'id' => 'wcf-thankyou-design',
252
+ 'class' => 'wcf-thankyou-design' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
253
+ 'icon' => 'dashicons-admin-customizer',
254
+ ),
255
+ array(
256
+ 'title' => __( 'Edit Fields', 'cartflows' ),
257
+ 'id' => 'wcf-thankyou-fields',
258
+ 'class' => 'wcf-thankyou-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
259
+ 'icon' => 'dashicons-welcome-widgets-menus',
260
+ ),
261
+ );
262
+
263
+ ?>
264
+ <div class="wcf-thankyou-design-table wcf-metabox-wrap widefat">
265
+ <div class="wcf-table-container">
266
+ <?php echo wcf_get_page_builder_notice(); ?>
267
+ <div class="wcf-column-left">
268
+ <div class="wcf-tab-wrapper">
269
+
270
+ <?php foreach ( $tabs as $key => $tab ) { ?>
271
+ <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
272
+ <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
273
+ <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
274
+ </div>
275
+ <?php } ?>
276
+ </div>
277
+ </div>
278
+ <div class="wcf-column-right">
279
+ <div class="wcf-thankyou-shortcodes wcf-tab-content active widefat">
280
+ <?php
281
+
282
+ echo wcf()->meta->get_shortcode_field(
283
+ array(
284
+ 'label' => __( 'Order Details', 'cartflows' ),
285
+ 'name' => 'wcf-order-details',
286
+ 'content' => esc_html( '[cartflows_order_details]' ),
287
+ )
288
+ );
289
+ ?>
290
+ </div>
291
+ <div class="wcf-thankyou-design wcf-tab-content widefat">
292
+ <?php
293
+
294
+ echo wcf()->meta->get_section(
295
+ array(
296
+ 'label' => __( 'Text', 'cartflows' ),
297
+ )
298
+ );
299
+
300
+ echo wcf()->meta->get_color_picker_field(
301
+ array(
302
+ 'label' => __( 'Color', 'cartflows' ),
303
+ 'name' => 'wcf-tq-text-color',
304
+ 'value' => $options['wcf-tq-text-color'],
305
+ )
306
+ );
307
+
308
+ echo wcf()->meta->get_font_family_field(
309
+ array(
310
+ 'for' => 'wcf-tq-font-family',
311
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
312
+ 'name' => 'wcf-tq-font-family',
313
+ 'value' => $options['wcf-tq-font-family'],
314
+ )
315
+ );
316
+
317
+ echo wcf()->meta->get_number_field(
318
+ array(
319
+ 'label' => __( 'Font Size', 'cartflows' ),
320
+ 'name' => 'wcf-tq-font-size',
321
+ 'value' => $options['wcf-tq-font-size'],
322
+ )
323
+ );
324
+
325
+ echo wcf()->meta->get_section(
326
+ array(
327
+ 'label' => __( 'Heading', 'cartflows' ),
328
+ )
329
+ );
330
+
331
+ echo wcf()->meta->get_color_picker_field(
332
+ array(
333
+ 'label' => __( 'Color', 'cartflows' ),
334
+ 'name' => 'wcf-tq-heading-color',
335
+ 'value' => $options['wcf-tq-heading-color'],
336
+ )
337
+ );
338
+
339
+ echo wcf()->meta->get_font_family_field(
340
+ array(
341
+ 'for' => 'wcf-tq-heading-font-family',
342
+ 'label' => esc_html__( 'Font Family', 'cartflows' ),
343
+ 'name' => 'wcf-tq-heading-font-family',
344
+ 'value' => $options['wcf-tq-heading-font-family'],
345
+ )
346
+ );
347
+
348
+ echo wcf()->meta->get_font_weight_field(
349
+ array(
350
+ 'for' => 'wcf-tq-heading-font-family',
351
+ 'label' => esc_html__( 'Font Weight', 'cartflows' ),
352
+ 'name' => 'wcf-tq-heading-font-wt',
353
+ 'value' => $options['wcf-tq-heading-font-wt'],
354
+ )
355
+ );
356
+
357
+ echo wcf()->meta->get_checkbox_field(
358
+ array(
359
+ 'label' => __( 'Advanced Options', 'cartflows' ),
360
+ 'name' => 'wcf-tq-advance-options-fields',
361
+ 'value' => $options['wcf-tq-advance-options-fields'],
362
+ 'after' => 'Enable',
363
+ )
364
+ );
365
+
366
+ echo wcf()->meta->get_number_field(
367
+ array(
368
+ 'for' => 'wcf-heading',
369
+ 'label' => esc_html__( 'Container Width (In px)', 'cartflows' ),
370
+ 'name' => 'wcf-tq-container-width',
371
+ 'value' => $options['wcf-tq-container-width'],
372
+ )
373
+ );
374
+
375
+ echo wcf()->meta->get_color_picker_field(
376
+ array(
377
+ 'label' => __( 'Section Background Color', 'cartflows' ),
378
+ 'name' => 'wcf-tq-section-bg-color',
379
+ 'value' => $options['wcf-tq-section-bg-color'],
380
+ )
381
+ );
382
+
383
+ ?>
384
+ </div>
385
+ <div class="wcf-thankyou-fields wcf-tab-content widefat">
386
+ <?php
387
+ echo wcf()->meta->get_checkbox_field(
388
+ array(
389
+ 'name' => 'wcf-show-overview-section',
390
+ 'value' => $options['wcf-show-overview-section'],
391
+ 'after' => esc_html__( 'Enable Order Overview ', 'cartflows' ),
392
+ )
393
+ );
394
+
395
+ echo wcf()->meta->get_checkbox_field(
396
+ array(
397
+ 'name' => 'wcf-show-details-section',
398
+ 'value' => $options['wcf-show-details-section'],
399
+ 'after' => esc_html__( 'Enable Order Details ', 'cartflows' ),
400
+ )
401
+ );
402
+
403
+ echo wcf()->meta->get_checkbox_field(
404
+ array(
405
+ 'name' => 'wcf-show-billing-section',
406
+ 'value' => $options['wcf-show-billing-section'],
407
+ 'after' => esc_html__( 'Enable Billing Details ', 'cartflows' ),
408
+ )
409
+ );
410
+
411
+ echo wcf()->meta->get_checkbox_field(
412
+ array(
413
+ 'name' => 'wcf-show-shipping-section',
414
+ 'value' => $options['wcf-show-shipping-section'],
415
+ 'after' => esc_html__( 'Enable Shipping Details ', 'cartflows' ),
416
+ )
417
+ );
418
+
419
+ echo wcf()->meta->get_hidden_field(
420
+ array(
421
+ 'name' => 'wcf-field-google-font-url',
422
+ 'value' => $options['wcf-field-google-font-url'],
423
+ )
424
+ );
425
+ ?>
426
+ </div>
427
+ <?php $this->right_column_footer( $options, $post_id ); ?>
428
+ </div>
429
+ </div>
430
+ </div>
431
+ <?php
432
+ }
433
+
434
+ /**
435
+ * Get metabox options
436
+ *
437
+ * @param int $post_id post ID.
438
+ * @return array
439
+ */
440
+ public static function get_meta_option( $post_id ) {
441
+
442
+ if ( null === self::$meta_option ) {
443
+
444
+ /**
445
+ * Set metabox options
446
+ *
447
+ * @see http://php.net/manual/en/filter.filters.sanitize.php
448
+ */
449
+ self::$meta_option = wcf()->options->get_thankyou_fields( $post_id );
450
+ }
451
+
452
+ return self::$meta_option;
453
+
454
+ }
455
+
456
+ /**
457
+ * Metabox Save
458
+ *
459
+ * @param number $post_id Post ID.
460
+ * @return void
461
+ */
462
+ public function save_meta_box( $post_id ) {
463
+
464
+ // Checks save status.
465
+ $is_autosave = wp_is_post_autosave( $post_id );
466
+ $is_revision = wp_is_post_revision( $post_id );
467
+
468
+ $is_valid_nonce = ( isset( $_POST['nonce-thankyou-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-thankyou-step-meta'] ) ), 'save-nonce-thankyou-step-meta' ) ) ? true : false;
469
+
470
+ // Exits script depending on save status.
471
+ if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
472
+ return;
473
+ }
474
+
475
+ wcf()->options->save_thankyou_fields( $post_id );
476
+ }
477
+ }
478
+
479
+ /**
480
+ * Kicking this off by calling 'get_instance()' method
481
+ */
482
+ Cartflows_Thankyou_Meta::get_instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.1
7
- Stable tag: 1.5.17
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -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.17 - Tuesday, 8th September 2020 =
131
  * New: Added Braintree subscription product compatibility. Now, you can select it on the checkout page meta setting.
132
  * Improvement: Added compatibility for a future release of CartFlows Pro.
4
  Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
5
  Requires at least: 4.4
6
  Tested up to: 5.5.1
7
+ Stable tag: 1.5.18
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
127
 
128
  == Changelog ==
129
 
130
+ = Version 1.5.18 - Tuesday, 29th September 2020 =
131
+ * New: Introduced Elementor widgets.
132
+ * Improvement: Added split test compatibility for a global checkout.
133
+ * Improvement: Added compatibility for a future release of CartFlows Pro.
134
+ * Fix: Place order button text option was not working for the optin page when the optin page was set as homepage.
135
+
136
  = Version 1.5.17 - Tuesday, 8th September 2020 =
137
  * New: Added Braintree subscription product compatibility. Now, you can select it on the checkout page meta setting.
138
  * Improvement: Added compatibility for a future release of CartFlows Pro.
woocommerce/template/checkout/form-billing.php CHANGED
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
28
 
29
  <?php else : ?>
30
 
31
- <h3><?php _e( 'Billing details', 'woocommerce' ); ?></h3>
32
 
33
  <?php endif; ?>
34
 
28
 
29
  <?php else : ?>
30
 
31
+ <h3><?php echo apply_filters( 'cartflows_woo_billling_text', __( 'Billing details', 'woocommerce' ) ); ?></h3>
32
 
33
  <?php endif; ?>
34
 
woocommerce/template/checkout/form-checkout.php CHANGED
@@ -48,16 +48,21 @@ if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_requir
48
  <?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
49
 
50
  <?php endif; ?>
 
 
51
 
52
- <h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
53
 
54
- <?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
55
 
56
- <div id="order_review" class="woocommerce-checkout-review-order">
57
- <?php do_action( 'woocommerce_checkout_order_review' ); ?>
58
- </div>
59
 
60
- <?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
 
 
 
 
 
61
 
62
  </form>
63
 
48
  <?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
49
 
50
  <?php endif; ?>
51
+
52
+ <div class='wcf-order-wrap'>
53
 
54
+ <?php do_action( 'cartflows_woocommerce_checkout_before_order_heading' ); ?>
55
 
56
+ <h3 id="order_review_heading"><?php echo apply_filters( 'cartflows_woo_your_order_text', esc_html__( 'Your order', 'woocommerce' ) ); ?></h3>
57
 
58
+ <?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
 
 
59
 
60
+ <div id="order_review" class="woocommerce-checkout-review-order">
61
+ <?php do_action( 'woocommerce_checkout_order_review' ); ?>
62
+ </div>
63
+
64
+ <?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
65
+ </div>
66
 
67
  </form>
68
 
woocommerce/template/checkout/form-shipping.php CHANGED
@@ -23,7 +23,7 @@ defined( 'ABSPATH' ) || exit;
23
 
24
  <h3 id="ship-to-different-address">
25
  <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
26
- <input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" <?php checked( apply_filters( 'woocommerce_ship_to_different_address_checked', 'shipping' === get_option( 'woocommerce_ship_to_destination' ) ? 1 : 0 ), 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" /> <span><?php esc_html_e( 'Ship to a different address?', 'woocommerce' ); ?></span>
27
  </label>
28
  </h3>
29
 
23
 
24
  <h3 id="ship-to-different-address">
25
  <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
26
+ <input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" <?php checked( apply_filters( 'woocommerce_ship_to_different_address_checked', 'shipping' === get_option( 'woocommerce_ship_to_destination' ) ? 1 : 0 ), 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" /> <span><?php echo apply_filters( 'cartflows_woo_shipping_text', esc_html__( 'Ship to a different address?', 'woocommerce' ) ); ?></span>
27
  </label>
28
  </h3>
29