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

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.8
Comparing to
See all releases

Code changes from version 1.5.7 to 1.5.8

cartflows.php CHANGED
@@ -1,24 +1,24 @@
1
- <?php
2
- /**
3
- * Plugin Name: CartFlows
4
- * Plugin URI: https://cartflows.com/
5
- * Description: Create beautiful checkout pages & sales flows for WooCommerce.
6
- * Version: 1.5.7
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.0.1
12
- *
13
- * @package CartFlows
14
- */
15
-
16
- /**
17
- * Set constants.
18
- */
19
- define( 'CARTFLOWS_FILE', __FILE__ );
20
-
21
- /**
22
- * Loader
23
- */
24
- require_once 'classes/class-cartflows-loader.php';
1
+ <?php
2
+ /**
3
+ * Plugin Name: CartFlows
4
+ * Plugin URI: https://cartflows.com/
5
+ * Description: Create beautiful checkout pages & sales flows for WooCommerce.
6
+ * Version: 1.5.8
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.1.0
12
+ *
13
+ * @package CartFlows
14
+ */
15
+
16
+ /**
17
+ * Set constants.
18
+ */
19
+ define( 'CARTFLOWS_FILE', __FILE__ );
20
+
21
+ /**
22
+ * Loader
23
+ */
24
+ require_once 'classes/class-cartflows-loader.php';
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  Version 1.5.7 - Monday, 4th May 2020
2
  - New: Gutenberg support added for steps.
3
  - Fix: Astra's mini cart icon display issue on the CartFlows steps.
1
+ Version 1.5.8 - Saturday, 9th May 2020
2
+ - Fix: Incorrect required field error messages with PayPal.
3
+
4
  Version 1.5.7 - Monday, 4th May 2020
5
  - New: Gutenberg support added for steps.
6
  - Fix: Astra's mini cart icon display issue on the CartFlows steps.
classes/class-cartflows-functions.php CHANGED
@@ -1,541 +1,539 @@
1
- <?php
2
- /**
3
- * CartFlows Functions.
4
- *
5
- * @package CARTFLOWS
6
- */
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit; // Exit if accessed directly.
10
- }
11
-
12
- /**
13
- * Fatal error mb_strpos fallback.
14
- *
15
- * @param string $string string where to find.
16
- * @param string $search string to search.
17
- * @since 1.0.0
18
- */
19
- function wcf_mb_strpos( $string, $search ) {
20
-
21
- if ( function_exists( 'mb_strpos' ) ) {
22
- return mb_strpos( $string, $search, 0, 'utf-8' );
23
- } else {
24
- return strpos( $string, $search );
25
- }
26
- }
27
-
28
- /**
29
- * Check if cartflows pro activated.
30
- *
31
- * @since 1.0.0
32
- */
33
- function _is_cartflows_pro() {
34
-
35
- if ( defined( 'CARTFLOWS_PRO_FILE' ) ) {
36
- return true;
37
- }
38
-
39
- return false;
40
-
41
- }
42
-
43
- /**
44
- * Returns pro version number.
45
- *
46
- * @param int $version version number.
47
- * @since 1.0.0
48
- */
49
- function _is_cartflows_pro_ver_less_than( $version ) {
50
-
51
- if ( defined( 'CARTFLOWS_PRO_VER' ) && version_compare( CARTFLOWS_PRO_VER, $version, '<' ) ) {
52
- return true;
53
- }
54
-
55
- return false;
56
- }
57
-
58
- /**
59
- * Returns step id.
60
- *
61
- * @since 1.0.0
62
- */
63
- function _get_wcf_post_id() {
64
-
65
- global $post;
66
-
67
- if ( isset( $post->ID ) ) {
68
- return $post->ID;
69
- }
70
-
71
- return 0;
72
- }
73
-
74
- /**
75
- * Returns step id.
76
- *
77
- * @since 1.0.0
78
- */
79
- function _get_wcf_step_id() {
80
-
81
- if ( wcf()->utils->is_step_post_type() ) {
82
-
83
- global $post;
84
-
85
- return $post->ID;
86
- }
87
-
88
- return false;
89
- }
90
-
91
- /**
92
- * Check if it is a landing page?
93
- *
94
- * @since 1.0.0
95
- */
96
- function _is_wcf_landing_type() {
97
-
98
- if ( wcf()->utils->is_step_post_type() ) {
99
-
100
- global $post;
101
-
102
- if ( 'landing' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
103
-
104
- return true;
105
- }
106
- }
107
-
108
- return false;
109
- }
110
-
111
- /**
112
- * Returns landing id.
113
- *
114
- * @since 1.0.0
115
- */
116
- function _get_wcf_landing_id() {
117
-
118
- if ( _is_wcf_landing_type() ) {
119
-
120
- global $post;
121
-
122
- return $post->ID;
123
- }
124
-
125
- return false;
126
- }
127
-
128
- /**
129
- * Is custom checkout?
130
- *
131
- * @param int $checkout_id checkout ID.
132
- * @since 1.0.0
133
- */
134
- function _is_wcf_meta_custom_checkout( $checkout_id ) {
135
-
136
- $is_custom = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-custom-checkout-fields' );
137
-
138
- if ( 'yes' === $is_custom ) {
139
-
140
- return true;
141
- }
142
-
143
- return false;
144
- }
145
-
146
- /**
147
- * Check if page is cartflow checkout.
148
- *
149
- * @since 1.0.0
150
- * @return bool
151
- */
152
- function _is_wcf_checkout_type() {
153
-
154
- if ( wcf()->utils->is_step_post_type() ) {
155
-
156
- global $post;
157
-
158
- if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
159
-
160
- return true;
161
- }
162
- }
163
-
164
- return false;
165
- }
166
-
167
- /**
168
- * Check if AJAX call is in progress.
169
- *
170
- * @since 1.0.0
171
- * @return bool
172
- */
173
- function _is_wcf_doing_checkout_ajax() {
174
-
175
- if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
176
-
177
- if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
178
- 'checkout' === $_GET['wc-ajax'] && //phpcs:ignore
179
- isset( $_POST['_wcf_checkout_id'] ) //phpcs:ignore
180
- ) {
181
- return true;
182
- }
183
- }
184
-
185
- return false;
186
- }
187
-
188
- /**
189
- * Check if optin AJAX call is in progress.
190
- *
191
- * @since 1.0.0
192
- * @return bool
193
- */
194
- function _is_wcf_doing_optin_ajax() {
195
-
196
- if ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) { //phpcs:ignore
197
-
198
- if ( isset( $_GET['wc-ajax'] ) && //phpcs:ignore
199
- 'checkout' === $_GET['wc-ajax'] && //phpcs:ignore
200
- isset( $_POST['_wcf_optin_id'] ) //phpcs:ignore
201
- ) {
202
- return true;
203
- }
204
- }
205
-
206
- return false;
207
- }
208
-
209
- /**
210
- * Returns checkout ID.
211
- *
212
- * @since 1.0.0
213
- * @return int/bool
214
- */
215
- function _get_wcf_checkout_id() {
216
-
217
- if ( _is_wcf_checkout_type() ) {
218
-
219
- global $post;
220
-
221
- return $post->ID;
222
- }
223
-
224
- return false;
225
- }
226
-
227
- /**
228
- * Check if it is checkout shortcode.
229
- *
230
- * @since 1.0.0
231
- * @return bool
232
- */
233
- function _is_wcf_checkout_shortcode() {
234
-
235
- global $post;
236
-
237
- if ( ! empty( $post ) && has_shortcode( $post->post_content, 'cartflows_checkout' ) ) {
238
-
239
- return true;
240
- }
241
-
242
- return false;
243
- }
244
-
245
- /**
246
- * Check if it is checkout shortcode.
247
- *
248
- * @since 1.0.0
249
- * @param string $content shortcode content.
250
- * @return bool
251
- */
252
- function _get_wcf_checkout_id_from_shortcode( $content = '' ) {
253
-
254
- $checkout_id = 0;
255
-
256
- if ( ! empty( $content ) ) {
257
-
258
- $regex_pattern = get_shortcode_regex( array( 'cartflows_checkout' ) );
259
-
260
- preg_match( '/' . $regex_pattern . '/s', $content, $regex_matches );
261
-
262
- if ( ! empty( $regex_matches ) ) {
263
-
264
- if ( 'cartflows_checkout' == $regex_matches[2] ) {
265
-
266
- $attribure_str = str_replace( ' ', '&', trim( $regex_matches[3] ) );
267
- $attribure_str = str_replace( '"', '', $attribure_str );
268
-
269
- $attributes = wp_parse_args( $attribure_str );
270
-
271
- if ( isset( $attributes['id'] ) ) {
272
- $checkout_id = $attributes['id'];
273
- }
274
- }
275
- }
276
- }
277
-
278
- return $checkout_id;
279
- }
280
-
281
- /**
282
- * Check if post type is upsell.
283
- *
284
- * @since 1.0.0
285
- * @return bool
286
- */
287
- function _is_wcf_upsell_type() {
288
-
289
- if ( wcf()->utils->is_step_post_type() ) {
290
-
291
- global $post;
292
-
293
- if ( 'upsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
294
-
295
- return true;
296
- }
297
- }
298
-
299
- return false;
300
- }
301
-
302
- /**
303
- * Returns upsell ID.
304
- *
305
- * @since 1.0.0
306
- * @return int/bool
307
- */
308
- function _get_wcf_upsell_id() {
309
-
310
- if ( _is_wcf_upsell_type() ) {
311
-
312
- global $post;
313
-
314
- return $post->ID;
315
- }
316
-
317
- return false;
318
- }
319
-
320
- /**
321
- * Check if post is of type downsell.
322
- *
323
- * @since 1.0.0
324
- * @return int/bool
325
- */
326
- function _is_wcf_downsell_type() {
327
-
328
- if ( wcf()->utils->is_step_post_type() ) {
329
-
330
- global $post;
331
-
332
- if ( 'downsell' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
333
-
334
- return true;
335
- }
336
- }
337
-
338
- return false;
339
- }
340
-
341
- /**
342
- * Get downsell page ID.
343
- *
344
- * @since 1.0.0
345
- * @return int/bool
346
- */
347
- function _get_wcf_downsell_id() {
348
-
349
- if ( _is_wcf_downsell_type() ) {
350
-
351
- global $post;
352
-
353
- return $post->ID;
354
- }
355
-
356
- return false;
357
- }
358
-
359
- /**
360
- * Check if page is of thank you type.
361
- *
362
- * @since 1.0.0
363
- * @return int/bool
364
- */
365
- function _is_wcf_thankyou_type() {
366
-
367
- if ( wcf()->utils->is_step_post_type() ) {
368
-
369
- global $post;
370
-
371
- if ( 'thankyou' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
372
-
373
- return true;
374
- }
375
- }
376
-
377
- return false;
378
- }
379
-
380
- /**
381
- * Get thank you page ID.
382
- *
383
- * @since 1.0.0
384
- * @return int/bool
385
- */
386
- function _get_wcf_thankyou_id() {
387
-
388
- if ( _is_wcf_thankyou_type() ) {
389
-
390
- global $post;
391
-
392
- return $post->ID;
393
- }
394
-
395
- return false;
396
- }
397
-
398
-
399
- /**
400
- * Check if post type is upsell.
401
- *
402
- * @since 1.0.0
403
- * @return bool
404
- */
405
- function _is_wcf_base_offer_type() {
406
-
407
- if ( wcf()->utils->is_step_post_type() ) {
408
-
409
- global $post;
410
-
411
- $step_type = get_post_meta( $post->ID, 'wcf-step-type', true );
412
-
413
- if ( 'upsell' === $step_type || 'downsell' === $step_type ) {
414
-
415
- return true;
416
- }
417
- }
418
-
419
- return false;
420
- }
421
-
422
- /**
423
- * Returns upsell ID.
424
- *
425
- * @since 1.0.0
426
- * @return int/bool
427
- */
428
- function _get_wcf_base_offer_id() {
429
-
430
- if ( _is_wcf_base_offer_type() ) {
431
-
432
- global $post;
433
-
434
- return $post->ID;
435
- }
436
-
437
- return false;
438
- }
439
-
440
- /**
441
- * Check if page is of optin type.
442
- *
443
- * @since 1.0.0
444
- * @return int/bool
445
- */
446
- function _is_wcf_optin_type() {
447
-
448
- if ( wcf()->utils->is_step_post_type() ) {
449
-
450
- global $post;
451
-
452
- if ( 'optin' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) {
453
-
454
- return true;
455
- }
456
- }
457
-
458
- return false;
459
- }
460
-
461
- /**
462
- * Get optin page ID.
463
- *
464
- * @since 1.0.0
465
- * @return int/bool
466
- */
467
- function _get_wcf_optin_id() {
468
-
469
- if ( _is_wcf_optin_type() ) {
470
-
471
- global $post;
472
-
473
- return $post->ID;
474
- }
475
-
476
- return false;
477
- }
478
-
479
- /**
480
- * Define a constant if it is not already defined.
481
- *
482
- * @since 3.0.0
483
- * @param string $name Constant name.
484
- * @param mixed $value Value.
485
- */
486
- function wcf_maybe_define_constant( $name, $value ) {
487
- if ( ! defined( $name ) ) {
488
- define( $name, $value );
489
- }
490
- }
491
-
492
-
493
- if ( ! function_exists( 'wp_body_open' ) ) {
494
- /**
495
- * Fire the wp_body_open action.
496
- *
497
- * Added for backwards compatibility to support WordPress versions prior to 5.2.0.
498
- */
499
- function wp_body_open() {
500
- /**
501
- * Triggered after the opening <body> tag.
502
- */
503
- do_action( 'wp_body_open' );
504
- }
505
- }
506
-
507
- /**
508
- * Check if type is optin by id.
509
- *
510
- * @param int $post_id post id.
511
- *
512
- * @return int/bool
513
- * @since 1.0.0
514
- */
515
- function _wcf_check_is_optin_by_id( $post_id ) {
516
-
517
- if ( 'optin' === get_post_meta( $post_id, 'wcf-step-type', true ) ) {
518
-
519
- return true;
520
- }
521
-
522
- return false;
523
- }
524
-
525
- /**
526
- * Supported Page Template
527
- *
528
- * @param string $page_template current page template.
529
- *
530
- * @return int/bool
531
- * @since 1.5.7
532
- */
533
- function _wcf_supported_template( $page_template ) {
534
-
535
- if ( in_array( $page_template, array( 'cartflows-default', 'cartflows-canvas' ), true ) ) {
536
-
537
- return true;
538
- }
539
-
540
- return false;
541
- }
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
+ }
 
 
classes/class-cartflows-loader.php CHANGED
@@ -1,560 +1,560 @@
1
- <?php
2
- /**
3
- * CartFlows Loader.
4
- *
5
- * @package CartFlows
6
- */
7
-
8
- if ( ! class_exists( 'Cartflows_Loader' ) ) {
9
-
10
- /**
11
- * Class Cartflows_Loader.
12
- */
13
- final class Cartflows_Loader {
14
-
15
- /**
16
- * Member Variable
17
- *
18
- * @var instance
19
- */
20
- private static $instance = null;
21
-
22
- /**
23
- * Member Variable
24
- *
25
- * @var utils
26
- */
27
- public $utils = null;
28
-
29
- /**
30
- * Member Variable
31
- *
32
- * @var logger
33
- */
34
- public $logger = null;
35
-
36
- /**
37
- * Member Variable
38
- *
39
- * @var options
40
- */
41
- public $options = null;
42
-
43
- /**
44
- * Member Variable
45
- *
46
- * @var meta
47
- */
48
- public $meta = null;
49
-
50
- /**
51
- * Member Variable
52
- *
53
- * @var Tracking_Data
54
- */
55
- public $alldata;
56
-
57
- /**
58
- * Member Variable
59
- *
60
- * @var flow
61
- */
62
- public $flow = null;
63
-
64
- /**
65
- * Member Variable
66
- *
67
- * @var assets_vars
68
- */
69
- public $assets_vars = null;
70
-
71
- /**
72
- * Member Variable
73
- *
74
- * @var assets_vars
75
- */
76
-
77
- public $is_woo_active = true;
78
-
79
- /**
80
- * Initiator
81
- */
82
- public static function get_instance() {
83
-
84
- if ( is_null( self::$instance ) ) {
85
-
86
- self::$instance = new self();
87
-
88
- /**
89
- * CartFlows loaded.
90
- *
91
- * Fires when Cartflows was fully loaded and instantiated.
92
- *
93
- * @since 1.0.0
94
- */
95
- do_action( 'cartflows_loaded' );
96
- }
97
-
98
- return self::$instance;
99
- }
100
-
101
- /**
102
- * Constructor
103
- */
104
- public function __construct() {
105
-
106
- $this->define_constants();
107
-
108
- // Activation hook.
109
- register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
110
-
111
- // deActivation hook.
112
- register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
113
-
114
- add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
115
- add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
116
- }
117
-
118
- /**
119
- * Defines all constants
120
- *
121
- * @since 1.0.0
122
- */
123
- public function define_constants() {
124
-
125
- define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
126
- define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
127
- define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
128
- define( 'CARTFLOWS_VER', '1.5.7' );
129
- define( 'CARTFLOWS_SLUG', 'cartflows' );
130
- define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
131
-
132
- define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
133
- define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
134
-
135
- if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
136
- define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
137
- }
138
- define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
139
- define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
140
- define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
141
- define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
142
-
143
- if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
144
- define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
145
- }
146
- if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
147
- define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
148
- }
149
- if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
150
- define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
151
- }
152
-
153
- if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
154
-
155
- $upload_dir = wp_upload_dir( null, false );
156
-
157
- define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
158
- }
159
- }
160
-
161
- /**
162
- * Loads plugin files.
163
- *
164
- * @since 1.0.0
165
- *
166
- * @return void
167
- */
168
- public function load_plugin() {
169
-
170
- $this->load_helper_files_components();
171
- $this->load_core_files();
172
- $this->load_core_components();
173
-
174
- add_action( 'wp_loaded', array( $this, 'initialize' ) );
175
- add_action( 'cartflows_pro_init', array( $this, 'after_cartflows_pro_init' ) );
176
-
177
- if ( ! $this->is_woo_active ) {
178
- add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
179
- }
180
-
181
- /**
182
- * CartFlows Init.
183
- *
184
- * Fires when Cartflows is instantiated.
185
- *
186
- * @since 1.0.0
187
- */
188
- do_action( 'cartflows_init' );
189
- }
190
-
191
- /**
192
- * After CartFlows Pro init.
193
- *
194
- * @since 1.1.19
195
- *
196
- * @return void
197
- */
198
- public function after_cartflows_pro_init() {
199
-
200
- if ( ! is_admin() ) {
201
- return;
202
- }
203
-
204
- if ( version_compare( CARTFLOWS_PRO_VER, '1.4.0', '<' ) ) {
205
- add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
206
- }
207
- }
208
-
209
- /**
210
- * Required CartFlows Pro Notice.
211
- *
212
- * @since 1.1.19
213
- *
214
- * @return void
215
- */
216
- public function required_cartflows_pro_notice() {
217
-
218
- $required_pro_version = '1.4.0';
219
-
220
- $class = 'notice notice-warning';
221
- /* translators: %s: html tags */
222
- $message = sprintf( __( 'You are using an older version of %1$sCartFlows Pro%2$s. Please update %1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher.', 'cartflows' ), '<strong>', '</strong>', $required_pro_version );
223
-
224
- printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
225
- }
226
-
227
- /**
228
- * Load Helper Files and Components.
229
- *
230
- * @since 1.0.0
231
- *
232
- * @return void
233
- */
234
- public function load_helper_files_components() {
235
-
236
- $this->is_woo_active = function_exists( 'WC' );
237
-
238
- /* Public Utils */
239
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
240
-
241
- /* Public Global Namespace Function */
242
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
243
-
244
- /* Admin Helper */
245
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
246
-
247
- /* Meta Default Values */
248
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
249
-
250
- require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
251
-
252
- $this->utils = Cartflows_Utils::get_instance();
253
- $this->options = Cartflows_Default_Meta::get_instance();
254
- $this->alldata = Cartflows_Tracking::get_instance();
255
- }
256
-
257
- /**
258
- * Init hooked function.
259
- *
260
- * @since 1.0.0
261
- *
262
- * @return void
263
- */
264
- public function initialize() {
265
- $this->assets_vars = $this->utils->get_assets_path();
266
- }
267
-
268
- /**
269
- * Load Core Files.
270
- *
271
- * @since 1.0.0
272
- *
273
- * @return void
274
- */
275
- public function load_core_files() {
276
-
277
- /* Update compatibility. */
278
- require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
279
-
280
- /* Page builder compatibilty class */
281
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
282
-
283
- /* Theme support */
284
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
285
-
286
- /* Admin Meta Fields*/
287
- include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
288
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
289
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
290
-
291
- /* Cloning */
292
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
293
-
294
- /* Admin Settings */
295
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
296
-
297
- /* Logger */
298
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-interface.php';
299
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler.php';
300
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-file.php';
301
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-levels.php';
302
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-logger-interface.php';
303
- include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-wc-logger.php';
304
-
305
- /* Core Modules */
306
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
307
-
308
- /* Frontend Global */
309
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
310
- require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
311
-
312
- /* Modules */
313
- include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
314
- include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
315
-
316
- if ( $this->is_woo_active ) {
317
- include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
318
- include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
319
- include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
320
- }
321
-
322
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
323
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
324
-
325
- include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
326
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
327
-
328
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-wizard.php';
329
-
330
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
331
-
332
- include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
333
-
334
- }
335
-
336
- /**
337
- * Load Core Components.
338
- *
339
- * @since 1.0.0
340
- *
341
- * @return void
342
- */
343
- public function load_core_components() {
344
-
345
- $this->meta = Cartflows_Meta_Fields::get_instance();
346
- $this->logger = Cartflows_Logger::get_instance();
347
- $this->flow = Cartflows_Flow_Frontend::get_instance();
348
- }
349
-
350
- /**
351
- * Create files/directories.
352
- */
353
- public function create_files() {
354
-
355
- // Install files and folders for uploading files and prevent hotlinking.
356
- $upload_dir = wp_upload_dir();
357
-
358
- $files = array(
359
- array(
360
- 'base' => CARTFLOWS_LOG_DIR,
361
- 'file' => '.htaccess',
362
- 'content' => 'deny from all',
363
- ),
364
- array(
365
- 'base' => CARTFLOWS_LOG_DIR,
366
- 'file' => 'index.html',
367
- 'content' => '',
368
- ),
369
- );
370
-
371
- foreach ( $files as $file ) {
372
- if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
373
- $file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore
374
- if ( $file_handle ) {
375
- fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
376
- fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
377
- }
378
- }
379
- }
380
- }
381
- /**
382
- * Load CartFlows Pro Text Domain.
383
- * This will load the translation textdomain depending on the file priorities.
384
- * 1. Global Languages /wp-content/languages/cartflows/ folder
385
- * 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
386
- *
387
- * @since 1.0.3
388
- * @return void
389
- */
390
- public function load_cf_textdomain() {
391
-
392
- // Default languages directory for CartFlows Pro.
393
- $lang_dir = CARTFLOWS_DIR . 'languages/';
394
-
395
- /**
396
- * Filters the languages directory path to use for CartFlows Pro.
397
- *
398
- * @param string $lang_dir The languages directory path.
399
- */
400
- $lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
401
-
402
- // Traditional WordPress plugin locale filter.
403
- global $wp_version;
404
-
405
- $get_locale = get_locale();
406
-
407
- if ( $wp_version >= 4.7 ) {
408
- $get_locale = get_user_locale();
409
- }
410
-
411
- /**
412
- * Language Locale for CartFlows Pro
413
- *
414
- * @var $get_locale The locale to use.
415
- * Uses get_user_locale()` in WordPress 4.7 or greater,
416
- * otherwise uses `get_locale()`.
417
- */
418
- $locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
419
- $mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
420
-
421
- // Setup paths to current locale file.
422
- $mofile_local = $lang_dir . $mofile;
423
- $mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
424
-
425
- if ( file_exists( $mofile_global ) ) {
426
- // Look in global /wp-content/languages/cartflows/ folder.
427
- load_textdomain( 'cartflows', $mofile_global );
428
- } elseif ( file_exists( $mofile_local ) ) {
429
- // Look in local /wp-content/plugins/cartflows/languages/ folder.
430
- load_textdomain( 'cartflows', $mofile_local );
431
- } else {
432
- // Load the default language files.
433
- load_plugin_textdomain( 'cartflows', false, $lang_dir );
434
- }
435
- }
436
-
437
- /**
438
- * Fires admin notice when Elementor is not installed and activated.
439
- *
440
- * @since 1.0.0
441
- *
442
- * @return void
443
- */
444
- public function fails_to_load() {
445
-
446
- $screen = get_current_screen();
447
-
448
- if ( ! wcf()->utils->is_step_post_type() ) {
449
- return;
450
- }
451
-
452
- if ( ! wcf()->utils->check_is_woo_required_page() ) {
453
- return;
454
- }
455
-
456
- $skip_notice = false;
457
-
458
- wp_localize_script( 'wcf-global-admin', 'cartflows_woo', array( 'show_update_post' => $skip_notice ) );
459
-
460
- $class = 'notice notice-warning';
461
- /* translators: %s: html tags */
462
- $message = sprintf( __( 'This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
463
-
464
- $plugin = 'woocommerce/woocommerce.php';
465
-
466
- if ( _is_woo_installed() ) {
467
- if ( ! current_user_can( 'activate_plugins' ) ) {
468
- return;
469
- }
470
-
471
- $action_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
472
- $button_label = __( 'Activate WooCommerce', 'cartflows' );
473
-
474
- } else {
475
- if ( ! current_user_can( 'install_plugins' ) ) {
476
- return;
477
- }
478
-
479
- $action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
480
- $button_label = __( 'Install WooCommerce', 'cartflows' );
481
- }
482
-
483
- $button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
484
-
485
- printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
486
- }
487
-
488
- /**
489
- * Activation Reset
490
- */
491
- public function activation_reset() {
492
-
493
- if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
494
-
495
- $upload_dir = wp_upload_dir( null, false );
496
-
497
- define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
498
- }
499
-
500
- $this->create_files();
501
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
502
- include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
503
- include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
504
- include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
505
-
506
- Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
507
- Cartflows_Step_Post_Type::get_instance()->step_post_type();
508
- flush_rewrite_rules();
509
- }
510
-
511
- /**
512
- * Deactivation Reset
513
- */
514
- public function deactivation_reset() {
515
- }
516
-
517
- /**
518
- * Logger Class Instance
519
- */
520
- public function logger() {
521
- return Cartflows_Logger::get_instance();
522
- }
523
-
524
-
525
- }
526
-
527
- /**
528
- * Prepare if class 'Cartflows_Loader' exist.
529
- * Kicking this off by calling 'get_instance()' method
530
- */
531
- Cartflows_Loader::get_instance();
532
- }
533
-
534
- /**
535
- * Get global class.
536
- *
537
- * @return object
538
- */
539
- function wcf() {
540
- return Cartflows_Loader::get_instance();
541
- }
542
-
543
-
544
- if ( ! function_exists( '_is_woo_installed' ) ) {
545
-
546
- /**
547
- * Is woocommerce plugin installed.
548
- *
549
- * @since 1.0.0
550
- *
551
- * @access public
552
- */
553
- function _is_woo_installed() {
554
-
555
- $path = 'woocommerce/woocommerce.php';
556
- $plugins = get_plugins();
557
-
558
- return isset( $plugins[ $path ] );
559
- }
560
- }
1
+ <?php
2
+ /**
3
+ * CartFlows Loader.
4
+ *
5
+ * @package CartFlows
6
+ */
7
+
8
+ if ( ! class_exists( 'Cartflows_Loader' ) ) {
9
+
10
+ /**
11
+ * Class Cartflows_Loader.
12
+ */
13
+ final class Cartflows_Loader {
14
+
15
+ /**
16
+ * Member Variable
17
+ *
18
+ * @var instance
19
+ */
20
+ private static $instance = null;
21
+
22
+ /**
23
+ * Member Variable
24
+ *
25
+ * @var utils
26
+ */
27
+ public $utils = null;
28
+
29
+ /**
30
+ * Member Variable
31
+ *
32
+ * @var logger
33
+ */
34
+ public $logger = null;
35
+
36
+ /**
37
+ * Member Variable
38
+ *
39
+ * @var options
40
+ */
41
+ public $options = null;
42
+
43
+ /**
44
+ * Member Variable
45
+ *
46
+ * @var meta
47
+ */
48
+ public $meta = null;
49
+
50
+ /**
51
+ * Member Variable
52
+ *
53
+ * @var Tracking_Data
54
+ */
55
+ public $alldata;
56
+
57
+ /**
58
+ * Member Variable
59
+ *
60
+ * @var flow
61
+ */
62
+ public $flow = null;
63
+
64
+ /**
65
+ * Member Variable
66
+ *
67
+ * @var assets_vars
68
+ */
69
+ public $assets_vars = null;
70
+
71
+ /**
72
+ * Member Variable
73
+ *
74
+ * @var assets_vars
75
+ */
76
+
77
+ public $is_woo_active = true;
78
+
79
+ /**
80
+ * Initiator
81
+ */
82
+ public static function get_instance() {
83
+
84
+ if ( is_null( self::$instance ) ) {
85
+
86
+ self::$instance = new self();
87
+
88
+ /**
89
+ * CartFlows loaded.
90
+ *
91
+ * Fires when Cartflows was fully loaded and instantiated.
92
+ *
93
+ * @since 1.0.0
94
+ */
95
+ do_action( 'cartflows_loaded' );
96
+ }
97
+
98
+ return self::$instance;
99
+ }
100
+
101
+ /**
102
+ * Constructor
103
+ */
104
+ public function __construct() {
105
+
106
+ $this->define_constants();
107
+
108
+ // Activation hook.
109
+ register_activation_hook( CARTFLOWS_FILE, array( $this, 'activation_reset' ) );
110
+
111
+ // deActivation hook.
112
+ register_deactivation_hook( CARTFLOWS_FILE, array( $this, 'deactivation_reset' ) );
113
+
114
+ add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 99 );
115
+ add_action( 'plugins_loaded', array( $this, 'load_cf_textdomain' ) );
116
+ }
117
+
118
+ /**
119
+ * Defines all constants
120
+ *
121
+ * @since 1.0.0
122
+ */
123
+ public function define_constants() {
124
+
125
+ define( 'CARTFLOWS_BASE', plugin_basename( CARTFLOWS_FILE ) );
126
+ define( 'CARTFLOWS_DIR', plugin_dir_path( CARTFLOWS_FILE ) );
127
+ define( 'CARTFLOWS_URL', plugins_url( '/', CARTFLOWS_FILE ) );
128
+ define( 'CARTFLOWS_VER', '1.5.8' );
129
+ define( 'CARTFLOWS_SLUG', 'cartflows' );
130
+ define( 'CARTFLOWS_SETTINGS', 'cartflows_settings' );
131
+
132
+ define( 'CARTFLOWS_FLOW_POST_TYPE', 'cartflows_flow' );
133
+ define( 'CARTFLOWS_STEP_POST_TYPE', 'cartflows_step' );
134
+
135
+ if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) {
136
+ define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' );
137
+ }
138
+ define( 'CARTFLOWS_DOMAIN_URL', 'https://cartflows.com/' );
139
+ define( 'CARTFLOWS_TEMPLATES_URL', 'https://templates.cartflows.com/' );
140
+ define( 'CARTFLOWS_TAXONOMY_STEP_TYPE', 'cartflows_step_type' );
141
+ define( 'CARTFLOWS_TAXONOMY_STEP_FLOW', 'cartflows_step_flow' );
142
+
143
+ if ( ! defined( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER' ) ) {
144
+ define( 'CARTFLOWS_TAXONOMY_STEP_PAGE_BUILDER', 'cartflows_step_page_builder' );
145
+ }
146
+ if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER' ) ) {
147
+ define( 'CARTFLOWS_TAXONOMY_FLOW_PAGE_BUILDER', 'cartflows_flow_page_builder' );
148
+ }
149
+ if ( ! defined( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY' ) ) {
150
+ define( 'CARTFLOWS_TAXONOMY_FLOW_CATEGORY', 'cartflows_flow_category' );
151
+ }
152
+
153
+ if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
154
+
155
+ $upload_dir = wp_upload_dir( null, false );
156
+
157
+ define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
158
+ }
159
+ }
160
+
161
+ /**
162
+ * Loads plugin files.
163
+ *
164
+ * @since 1.0.0
165
+ *
166
+ * @return void
167
+ */
168
+ public function load_plugin() {
169
+
170
+ $this->load_helper_files_components();
171
+ $this->load_core_files();
172
+ $this->load_core_components();
173
+
174
+ add_action( 'wp_loaded', array( $this, 'initialize' ) );
175
+ add_action( 'cartflows_pro_init', array( $this, 'after_cartflows_pro_init' ) );
176
+
177
+ if ( ! $this->is_woo_active ) {
178
+ add_action( 'admin_notices', array( $this, 'fails_to_load' ) );
179
+ }
180
+
181
+ /**
182
+ * CartFlows Init.
183
+ *
184
+ * Fires when Cartflows is instantiated.
185
+ *
186
+ * @since 1.0.0
187
+ */
188
+ do_action( 'cartflows_init' );
189
+ }
190
+
191
+ /**
192
+ * After CartFlows Pro init.
193
+ *
194
+ * @since 1.1.19
195
+ *
196
+ * @return void
197
+ */
198
+ public function after_cartflows_pro_init() {
199
+
200
+ if ( ! is_admin() ) {
201
+ return;
202
+ }
203
+
204
+ if ( version_compare( CARTFLOWS_PRO_VER, '1.4.0', '<' ) ) {
205
+ add_action( 'admin_notices', array( $this, 'required_cartflows_pro_notice' ) );
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Required CartFlows Pro Notice.
211
+ *
212
+ * @since 1.1.19
213
+ *
214
+ * @return void
215
+ */
216
+ public function required_cartflows_pro_notice() {
217
+
218
+ $required_pro_version = '1.4.0';
219
+
220
+ $class = 'notice notice-warning';
221
+ /* translators: %s: html tags */
222
+ $message = sprintf( __( 'You are using an older version of %1$sCartFlows Pro%2$s. Please update %1$sCartFlows Pro%2$s plugin to version %1$s%3$s%2$s or higher.', 'cartflows' ), '<strong>', '</strong>', $required_pro_version );
223
+
224
+ printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
225
+ }
226
+
227
+ /**
228
+ * Load Helper Files and Components.
229
+ *
230
+ * @since 1.0.0
231
+ *
232
+ * @return void
233
+ */
234
+ public function load_helper_files_components() {
235
+
236
+ $this->is_woo_active = function_exists( 'WC' );
237
+
238
+ /* Public Utils */
239
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-utils.php';
240
+
241
+ /* Public Global Namespace Function */
242
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
243
+
244
+ /* Admin Helper */
245
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
246
+
247
+ /* Meta Default Values */
248
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-default-meta.php';
249
+
250
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-tracking.php';
251
+
252
+ $this->utils = Cartflows_Utils::get_instance();
253
+ $this->options = Cartflows_Default_Meta::get_instance();
254
+ $this->alldata = Cartflows_Tracking::get_instance();
255
+ }
256
+
257
+ /**
258
+ * Init hooked function.
259
+ *
260
+ * @since 1.0.0
261
+ *
262
+ * @return void
263
+ */
264
+ public function initialize() {
265
+ $this->assets_vars = $this->utils->get_assets_path();
266
+ }
267
+
268
+ /**
269
+ * Load Core Files.
270
+ *
271
+ * @since 1.0.0
272
+ *
273
+ * @return void
274
+ */
275
+ public function load_core_files() {
276
+
277
+ /* Update compatibility. */
278
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-update.php';
279
+
280
+ /* Page builder compatibilty class */
281
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-compatibility.php';
282
+
283
+ /* Theme support */
284
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-theme-support.php';
285
+
286
+ /* Admin Meta Fields*/
287
+ include_once CARTFLOWS_DIR . 'classes/fields/typography/class-cartflows-font-families.php';
288
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta-fields.php';
289
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-meta.php';
290
+
291
+ /* Cloning */
292
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-cloning.php';
293
+
294
+ /* Admin Settings */
295
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-admin.php';
296
+
297
+ /* Logger */
298
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-interface.php';
299
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler.php';
300
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-handler-file.php';
301
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-log-levels.php';
302
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-logger-interface.php';
303
+ include_once CARTFLOWS_DIR . 'classes/logger/class-cartflows-wc-logger.php';
304
+
305
+ /* Core Modules */
306
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-logger.php';
307
+
308
+ /* Frontend Global */
309
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-frontend.php';
310
+ require_once CARTFLOWS_DIR . 'classes/class-cartflows-flow-frontend.php';
311
+
312
+ /* Modules */
313
+ include_once CARTFLOWS_DIR . 'modules/flow/class-cartflows-flow.php';
314
+ include_once CARTFLOWS_DIR . 'modules/landing/class-cartflows-landing.php';
315
+
316
+ if ( $this->is_woo_active ) {
317
+ include_once CARTFLOWS_DIR . 'modules/checkout/class-cartflows-checkout.php';
318
+ include_once CARTFLOWS_DIR . 'modules/thankyou/class-cartflows-thankyou.php';
319
+ include_once CARTFLOWS_DIR . 'modules/optin/class-cartflows-optin.php';
320
+ }
321
+
322
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-api.php';
323
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer-core.php';
324
+
325
+ include_once CARTFLOWS_DIR . 'classes/batch-process/class-cartflows-batch-process.php';
326
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-importer.php';
327
+
328
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-wizard.php';
329
+
330
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-metabox.php';
331
+
332
+ include_once CARTFLOWS_DIR . 'classes/deprecated/deprecated-hooks.php';
333
+
334
+ }
335
+
336
+ /**
337
+ * Load Core Components.
338
+ *
339
+ * @since 1.0.0
340
+ *
341
+ * @return void
342
+ */
343
+ public function load_core_components() {
344
+
345
+ $this->meta = Cartflows_Meta_Fields::get_instance();
346
+ $this->logger = Cartflows_Logger::get_instance();
347
+ $this->flow = Cartflows_Flow_Frontend::get_instance();
348
+ }
349
+
350
+ /**
351
+ * Create files/directories.
352
+ */
353
+ public function create_files() {
354
+
355
+ // Install files and folders for uploading files and prevent hotlinking.
356
+ $upload_dir = wp_upload_dir();
357
+
358
+ $files = array(
359
+ array(
360
+ 'base' => CARTFLOWS_LOG_DIR,
361
+ 'file' => '.htaccess',
362
+ 'content' => 'deny from all',
363
+ ),
364
+ array(
365
+ 'base' => CARTFLOWS_LOG_DIR,
366
+ 'file' => 'index.html',
367
+ 'content' => '',
368
+ ),
369
+ );
370
+
371
+ foreach ( $files as $file ) {
372
+ if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
373
+ $file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore
374
+ if ( $file_handle ) {
375
+ fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
376
+ fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
377
+ }
378
+ }
379
+ }
380
+ }
381
+ /**
382
+ * Load CartFlows Pro Text Domain.
383
+ * This will load the translation textdomain depending on the file priorities.
384
+ * 1. Global Languages /wp-content/languages/cartflows/ folder
385
+ * 2. Local dorectory /wp-content/plugins/cartflows/languages/ folder
386
+ *
387
+ * @since 1.0.3
388
+ * @return void
389
+ */
390
+ public function load_cf_textdomain() {
391
+
392
+ // Default languages directory for CartFlows Pro.
393
+ $lang_dir = CARTFLOWS_DIR . 'languages/';
394
+
395
+ /**
396
+ * Filters the languages directory path to use for CartFlows Pro.
397
+ *
398
+ * @param string $lang_dir The languages directory path.
399
+ */
400
+ $lang_dir = apply_filters( 'cartflows_languages_directory', $lang_dir );
401
+
402
+ // Traditional WordPress plugin locale filter.
403
+ global $wp_version;
404
+
405
+ $get_locale = get_locale();
406
+
407
+ if ( $wp_version >= 4.7 ) {
408
+ $get_locale = get_user_locale();
409
+ }
410
+
411
+ /**
412
+ * Language Locale for CartFlows Pro
413
+ *
414
+ * @var $get_locale The locale to use.
415
+ * Uses get_user_locale()` in WordPress 4.7 or greater,
416
+ * otherwise uses `get_locale()`.
417
+ */
418
+ $locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows' );
419
+ $mofile = sprintf( '%1$s-%2$s.mo', 'cartflows', $locale );
420
+
421
+ // Setup paths to current locale file.
422
+ $mofile_local = $lang_dir . $mofile;
423
+ $mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
424
+
425
+ if ( file_exists( $mofile_global ) ) {
426
+ // Look in global /wp-content/languages/cartflows/ folder.
427
+ load_textdomain( 'cartflows', $mofile_global );
428
+ } elseif ( file_exists( $mofile_local ) ) {
429
+ // Look in local /wp-content/plugins/cartflows/languages/ folder.
430
+ load_textdomain( 'cartflows', $mofile_local );
431
+ } else {
432
+ // Load the default language files.
433
+ load_plugin_textdomain( 'cartflows', false, $lang_dir );
434
+ }
435
+ }
436
+
437
+ /**
438
+ * Fires admin notice when Elementor is not installed and activated.
439
+ *
440
+ * @since 1.0.0
441
+ *
442
+ * @return void
443
+ */
444
+ public function fails_to_load() {
445
+
446
+ $screen = get_current_screen();
447
+
448
+ if ( ! wcf()->utils->is_step_post_type() ) {
449
+ return;
450
+ }
451
+
452
+ if ( ! wcf()->utils->check_is_woo_required_page() ) {
453
+ return;
454
+ }
455
+
456
+ $skip_notice = false;
457
+
458
+ wp_localize_script( 'wcf-global-admin', 'cartflows_woo', array( 'show_update_post' => $skip_notice ) );
459
+
460
+ $class = 'notice notice-warning';
461
+ /* translators: %s: html tags */
462
+ $message = sprintf( __( 'This %1$sCartFlows%2$s page requires %1$sWooCommerce%2$s plugin installed & activated.', 'cartflows' ), '<strong>', '</strong>' );
463
+
464
+ $plugin = 'woocommerce/woocommerce.php';
465
+
466
+ if ( _is_woo_installed() ) {
467
+ if ( ! current_user_can( 'activate_plugins' ) ) {
468
+ return;
469
+ }
470
+
471
+ $action_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
472
+ $button_label = __( 'Activate WooCommerce', 'cartflows' );
473
+
474
+ } else {
475
+ if ( ! current_user_can( 'install_plugins' ) ) {
476
+ return;
477
+ }
478
+
479
+ $action_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
480
+ $button_label = __( 'Install WooCommerce', 'cartflows' );
481
+ }
482
+
483
+ $button = '<p><a href="' . $action_url . '" class="button-primary">' . $button_label . '</a></p><p></p>';
484
+
485
+ printf( '<div class="%1$s"><p>%2$s</p>%3$s</div>', esc_attr( $class ), $message, $button );
486
+ }
487
+
488
+ /**
489
+ * Activation Reset
490
+ */
491
+ public function activation_reset() {
492
+
493
+ if ( ! defined( 'CARTFLOWS_LOG_DIR' ) ) {
494
+
495
+ $upload_dir = wp_upload_dir( null, false );
496
+
497
+ define( 'CARTFLOWS_LOG_DIR', $upload_dir['basedir'] . '/cartflows-logs/' );
498
+ }
499
+
500
+ $this->create_files();
501
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-helper.php';
502
+ include_once CARTFLOWS_DIR . 'classes/class-cartflows-functions.php';
503
+ include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-flow-post-type.php';
504
+ include_once CARTFLOWS_DIR . 'modules/flow/classes/class-cartflows-step-post-type.php';
505
+
506
+ Cartflows_Flow_Post_Type::get_instance()->flow_post_type();
507
+ Cartflows_Step_Post_Type::get_instance()->step_post_type();
508
+ flush_rewrite_rules();
509
+ }
510
+
511
+ /**
512
+ * Deactivation Reset
513
+ */
514
+ public function deactivation_reset() {
515
+ }
516
+
517
+ /**
518
+ * Logger Class Instance
519
+ */
520
+ public function logger() {
521
+ return Cartflows_Logger::get_instance();
522
+ }
523
+
524
+
525
+ }
526
+
527
+ /**
528
+ * Prepare if class 'Cartflows_Loader' exist.
529
+ * Kicking this off by calling 'get_instance()' method
530
+ */
531
+ Cartflows_Loader::get_instance();
532
+ }
533
+
534
+ /**
535
+ * Get global class.
536
+ *
537
+ * @return object
538
+ */
539
+ function wcf() {
540
+ return Cartflows_Loader::get_instance();
541
+ }
542
+
543
+
544
+ if ( ! function_exists( '_is_woo_installed' ) ) {
545
+
546
+ /**
547
+ * Is woocommerce plugin installed.
548
+ *
549
+ * @since 1.0.0
550
+ *
551
+ * @access public
552
+ */
553
+ function _is_woo_installed() {
554
+
555
+ $path = 'woocommerce/woocommerce.php';
556
+ $plugins = get_plugins();
557
+
558
+ return isset( $plugins[ $path ] );
559
+ }
560
+ }
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.7\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
7
- "POT-Creation-Date: 2020-05-04 05:04:33+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -261,19 +261,19 @@ msgid "Sales Landing"
261
  msgstr ""
262
 
263
  #: classes/class-cartflows-importer.php:1234
264
- #: modules/flow/classes/class-cartflows-step-post-type.php:252
265
  #: modules/flow/view/meta-flow-steps.php:12
266
  msgid "Checkout (Woo)"
267
  msgstr ""
268
 
269
  #: classes/class-cartflows-importer.php:1238
270
- #: modules/flow/classes/class-cartflows-step-post-type.php:259
271
  #: modules/flow/view/meta-flow-steps.php:13
272
  msgid "Thank You (Woo)"
273
  msgstr ""
274
 
275
  #: classes/class-cartflows-importer.php:1246
276
- #: modules/flow/classes/class-cartflows-step-post-type.php:238
277
  #: modules/flow/view/meta-flow-steps.php:11
278
  msgid "Landing"
279
  msgstr ""
@@ -1373,8 +1373,8 @@ msgstr ""
1373
 
1374
  #: modules/flow/classes/class-cartflows-flow-post-type.php:105
1375
  #: modules/flow/classes/class-cartflows-flow-post-type.php:107
1376
- #: modules/flow/classes/class-cartflows-step-post-type.php:166
1377
- #: modules/flow/classes/class-cartflows-step-post-type.php:168
1378
  msgid "Add New"
1379
  msgstr ""
1380
 
@@ -1400,57 +1400,57 @@ msgstr ""
1400
 
1401
  #: modules/flow/classes/class-cartflows-flow-post-type.php:354
1402
  #: modules/flow/classes/class-cartflows-flow-post-type.php:360
1403
- #: modules/flow/classes/class-cartflows-step-post-type.php:398
1404
- #: modules/flow/classes/class-cartflows-step-post-type.php:404
1405
  #. translators: %s: singular custom post type name
1406
  msgid "%s updated."
1407
  msgstr ""
1408
 
1409
  #: modules/flow/classes/class-cartflows-flow-post-type.php:356
1410
- #: modules/flow/classes/class-cartflows-step-post-type.php:400
1411
  #. translators: %s: singular custom post type name
1412
  msgid "Custom %s updated."
1413
  msgstr ""
1414
 
1415
  #: modules/flow/classes/class-cartflows-flow-post-type.php:358
1416
- #: modules/flow/classes/class-cartflows-step-post-type.php:402
1417
  #. translators: %s: singular custom post type name
1418
  msgid "Custom %s deleted."
1419
  msgstr ""
1420
 
1421
  #: modules/flow/classes/class-cartflows-flow-post-type.php:362
1422
- #: modules/flow/classes/class-cartflows-step-post-type.php:406
1423
  #. translators: %1$s: singular custom post type name ,%2$s: date and time of
1424
  #. the revision
1425
  msgid "%1$s restored to revision from %2$s"
1426
  msgstr ""
1427
 
1428
  #: modules/flow/classes/class-cartflows-flow-post-type.php:364
1429
- #: modules/flow/classes/class-cartflows-step-post-type.php:408
1430
  #. translators: %s: singular custom post type name
1431
  msgid "%s published."
1432
  msgstr ""
1433
 
1434
  #: modules/flow/classes/class-cartflows-flow-post-type.php:366
1435
- #: modules/flow/classes/class-cartflows-step-post-type.php:410
1436
  #. translators: %s: singular custom post type name
1437
  msgid "%s saved."
1438
  msgstr ""
1439
 
1440
  #: modules/flow/classes/class-cartflows-flow-post-type.php:368
1441
- #: modules/flow/classes/class-cartflows-step-post-type.php:412
1442
  #. translators: %s: singular custom post type name
1443
  msgid "%s submitted."
1444
  msgstr ""
1445
 
1446
  #: modules/flow/classes/class-cartflows-flow-post-type.php:370
1447
- #: modules/flow/classes/class-cartflows-step-post-type.php:414
1448
  #. translators: %s: singular custom post type name
1449
  msgid "%s scheduled for."
1450
  msgstr ""
1451
 
1452
  #: modules/flow/classes/class-cartflows-flow-post-type.php:372
1453
- #: modules/flow/classes/class-cartflows-step-post-type.php:416
1454
  #. translators: %s: singular custom post type name
1455
  msgid "%s draft updated."
1456
  msgstr ""
@@ -1460,51 +1460,51 @@ msgstr ""
1460
  msgid "Next Step"
1461
  msgstr ""
1462
 
1463
- #: modules/flow/classes/class-cartflows-step-post-type.php:162
1464
  msgid "Search Steps"
1465
  msgstr ""
1466
 
1467
- #: modules/flow/classes/class-cartflows-step-post-type.php:163
1468
  msgid "All Steps"
1469
  msgstr ""
1470
 
1471
- #: modules/flow/classes/class-cartflows-step-post-type.php:164
1472
  #: modules/flow/view/meta-flow-steps.php:106
1473
  msgid "Edit Step"
1474
  msgstr ""
1475
 
1476
- #: modules/flow/classes/class-cartflows-step-post-type.php:165
1477
  #: modules/flow/view/meta-flow-steps.php:102
1478
  msgid "View Step"
1479
  msgstr ""
1480
 
1481
- #: modules/flow/classes/class-cartflows-step-post-type.php:167
1482
  msgid "Update Step"
1483
  msgstr ""
1484
 
1485
- #: modules/flow/classes/class-cartflows-step-post-type.php:169
1486
  msgid "New Step Name"
1487
  msgstr ""
1488
 
1489
- #: modules/flow/classes/class-cartflows-step-post-type.php:210
1490
  msgid "Step Type"
1491
  msgstr ""
1492
 
1493
- #: modules/flow/classes/class-cartflows-step-post-type.php:220
1494
  msgid "Step Flow"
1495
  msgstr ""
1496
 
1497
- #: modules/flow/classes/class-cartflows-step-post-type.php:245
1498
  #: modules/flow/view/meta-flow-steps.php:16
1499
  msgid "Optin (Woo)"
1500
  msgstr ""
1501
 
1502
- #: modules/flow/classes/class-cartflows-step-post-type.php:266
1503
  #: modules/flow/view/meta-flow-steps.php:14
1504
  msgid "Upsell (Woo)"
1505
  msgstr ""
1506
 
1507
- #: modules/flow/classes/class-cartflows-step-post-type.php:273
1508
  #: modules/flow/view/meta-flow-steps.php:15
1509
  msgid "Downsell (Woo)"
1510
  msgstr ""
@@ -1981,22 +1981,22 @@ msgctxt "flow singular name"
1981
  msgid "Flow"
1982
  msgstr ""
1983
 
1984
- #: modules/flow/classes/class-cartflows-step-post-type.php:160
1985
  msgctxt "flow step general name"
1986
  msgid "Steps"
1987
  msgstr ""
1988
 
1989
- #: modules/flow/classes/class-cartflows-step-post-type.php:161
1990
  msgctxt "flow step singular name"
1991
  msgid "Step"
1992
  msgstr ""
1993
 
1994
- #: modules/flow/classes/class-cartflows-step-post-type.php:314
1995
  msgctxt "cartflows"
1996
  msgid "CartFlows — Boxed"
1997
  msgstr ""
1998
 
1999
- #: modules/flow/classes/class-cartflows-step-post-type.php:315
2000
  msgctxt "cartflows"
2001
  msgid "Template for Page Builders"
2002
  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.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows\n"
7
+ "POT-Creation-Date: 2020-05-09 08:37:14+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
261
  msgstr ""
262
 
263
  #: classes/class-cartflows-importer.php:1234
264
+ #: modules/flow/classes/class-cartflows-step-post-type.php:253
265
  #: modules/flow/view/meta-flow-steps.php:12
266
  msgid "Checkout (Woo)"
267
  msgstr ""
268
 
269
  #: classes/class-cartflows-importer.php:1238
270
+ #: modules/flow/classes/class-cartflows-step-post-type.php:260
271
  #: modules/flow/view/meta-flow-steps.php:13
272
  msgid "Thank You (Woo)"
273
  msgstr ""
274
 
275
  #: classes/class-cartflows-importer.php:1246
276
+ #: modules/flow/classes/class-cartflows-step-post-type.php:239
277
  #: modules/flow/view/meta-flow-steps.php:11
278
  msgid "Landing"
279
  msgstr ""
1373
 
1374
  #: modules/flow/classes/class-cartflows-flow-post-type.php:105
1375
  #: modules/flow/classes/class-cartflows-flow-post-type.php:107
1376
+ #: modules/flow/classes/class-cartflows-step-post-type.php:167
1377
+ #: modules/flow/classes/class-cartflows-step-post-type.php:169
1378
  msgid "Add New"
1379
  msgstr ""
1380
 
1400
 
1401
  #: modules/flow/classes/class-cartflows-flow-post-type.php:354
1402
  #: modules/flow/classes/class-cartflows-flow-post-type.php:360
1403
+ #: modules/flow/classes/class-cartflows-step-post-type.php:399
1404
+ #: modules/flow/classes/class-cartflows-step-post-type.php:405
1405
  #. translators: %s: singular custom post type name
1406
  msgid "%s updated."
1407
  msgstr ""
1408
 
1409
  #: modules/flow/classes/class-cartflows-flow-post-type.php:356
1410
+ #: modules/flow/classes/class-cartflows-step-post-type.php:401
1411
  #. translators: %s: singular custom post type name
1412
  msgid "Custom %s updated."
1413
  msgstr ""
1414
 
1415
  #: modules/flow/classes/class-cartflows-flow-post-type.php:358
1416
+ #: modules/flow/classes/class-cartflows-step-post-type.php:403
1417
  #. translators: %s: singular custom post type name
1418
  msgid "Custom %s deleted."
1419
  msgstr ""
1420
 
1421
  #: modules/flow/classes/class-cartflows-flow-post-type.php:362
1422
+ #: modules/flow/classes/class-cartflows-step-post-type.php:407
1423
  #. translators: %1$s: singular custom post type name ,%2$s: date and time of
1424
  #. the revision
1425
  msgid "%1$s restored to revision from %2$s"
1426
  msgstr ""
1427
 
1428
  #: modules/flow/classes/class-cartflows-flow-post-type.php:364
1429
+ #: modules/flow/classes/class-cartflows-step-post-type.php:409
1430
  #. translators: %s: singular custom post type name
1431
  msgid "%s published."
1432
  msgstr ""
1433
 
1434
  #: modules/flow/classes/class-cartflows-flow-post-type.php:366
1435
+ #: modules/flow/classes/class-cartflows-step-post-type.php:411
1436
  #. translators: %s: singular custom post type name
1437
  msgid "%s saved."
1438
  msgstr ""
1439
 
1440
  #: modules/flow/classes/class-cartflows-flow-post-type.php:368
1441
+ #: modules/flow/classes/class-cartflows-step-post-type.php:413
1442
  #. translators: %s: singular custom post type name
1443
  msgid "%s submitted."
1444
  msgstr ""
1445
 
1446
  #: modules/flow/classes/class-cartflows-flow-post-type.php:370
1447
+ #: modules/flow/classes/class-cartflows-step-post-type.php:415
1448
  #. translators: %s: singular custom post type name
1449
  msgid "%s scheduled for."
1450
  msgstr ""
1451
 
1452
  #: modules/flow/classes/class-cartflows-flow-post-type.php:372
1453
+ #: modules/flow/classes/class-cartflows-step-post-type.php:417
1454
  #. translators: %s: singular custom post type name
1455
  msgid "%s draft updated."
1456
  msgstr ""
1460
  msgid "Next Step"
1461
  msgstr ""
1462
 
1463
+ #: modules/flow/classes/class-cartflows-step-post-type.php:163
1464
  msgid "Search Steps"
1465
  msgstr ""
1466
 
1467
+ #: modules/flow/classes/class-cartflows-step-post-type.php:164
1468
  msgid "All Steps"
1469
  msgstr ""
1470
 
1471
+ #: modules/flow/classes/class-cartflows-step-post-type.php:165
1472
  #: modules/flow/view/meta-flow-steps.php:106
1473
  msgid "Edit Step"
1474
  msgstr ""
1475
 
1476
+ #: modules/flow/classes/class-cartflows-step-post-type.php:166
1477
  #: modules/flow/view/meta-flow-steps.php:102
1478
  msgid "View Step"
1479
  msgstr ""
1480
 
1481
+ #: modules/flow/classes/class-cartflows-step-post-type.php:168
1482
  msgid "Update Step"
1483
  msgstr ""
1484
 
1485
+ #: modules/flow/classes/class-cartflows-step-post-type.php:170
1486
  msgid "New Step Name"
1487
  msgstr ""
1488
 
1489
+ #: modules/flow/classes/class-cartflows-step-post-type.php:211
1490
  msgid "Step Type"
1491
  msgstr ""
1492
 
1493
+ #: modules/flow/classes/class-cartflows-step-post-type.php:221
1494
  msgid "Step Flow"
1495
  msgstr ""
1496
 
1497
+ #: modules/flow/classes/class-cartflows-step-post-type.php:246
1498
  #: modules/flow/view/meta-flow-steps.php:16
1499
  msgid "Optin (Woo)"
1500
  msgstr ""
1501
 
1502
+ #: modules/flow/classes/class-cartflows-step-post-type.php:267
1503
  #: modules/flow/view/meta-flow-steps.php:14
1504
  msgid "Upsell (Woo)"
1505
  msgstr ""
1506
 
1507
+ #: modules/flow/classes/class-cartflows-step-post-type.php:274
1508
  #: modules/flow/view/meta-flow-steps.php:15
1509
  msgid "Downsell (Woo)"
1510
  msgstr ""
1981
  msgid "Flow"
1982
  msgstr ""
1983
 
1984
+ #: modules/flow/classes/class-cartflows-step-post-type.php:161
1985
  msgctxt "flow step general name"
1986
  msgid "Steps"
1987
  msgstr ""
1988
 
1989
+ #: modules/flow/classes/class-cartflows-step-post-type.php:162
1990
  msgctxt "flow step singular name"
1991
  msgid "Step"
1992
  msgstr ""
1993
 
1994
+ #: modules/flow/classes/class-cartflows-step-post-type.php:315
1995
  msgctxt "cartflows"
1996
  msgid "CartFlows — Boxed"
1997
  msgstr ""
1998
 
1999
+ #: modules/flow/classes/class-cartflows-step-post-type.php:316
2000
  msgctxt "cartflows"
2001
  msgid "Template for Page Builders"
2002
  msgstr ""
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.4
7
- Stable tag: 1.5.7
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -125,6 +125,9 @@ Glad you asked! CartFlows Pro is an optional add-on to CartFlows that adds addit
125
 
126
  == Changelog ==
127
 
 
 
 
128
  = Version 1.5.7 - Monday, 4th May 2020 =
129
  * New: Gutenberg support added for steps.
130
  * Fix: Astra's mini cart icon display issue on the CartFlows steps.
4
  Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder
5
  Requires at least: 4.4
6
  Tested up to: 5.4
7
+ Stable tag: 1.5.8
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
125
 
126
  == Changelog ==
127
 
128
+ = Version 1.5.8 - Saturday, 9th May 2020 =
129
+ - Fix: Incorrect required field error messages with PayPal.
130
+
131
  = Version 1.5.7 - Monday, 4th May 2020 =
132
  * New: Gutenberg support added for steps.
133
  * Fix: Astra's mini cart icon display issue on the CartFlows steps.