PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 1.1.2
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v1.1.2
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / checkout / classes / class-cartflows-checkout-meta.php

class-cartflows-checkout-meta.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 1.1.2, at modules/checkout/classes/class-cartflows-checkout-meta.php

760 lines 20.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 * 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 function setup_meta_box() {
61
62 // Get all posts.
63 $post_types = get_post_types();
64
65 if ( _is_wcf_checkout_type() ) {
66 add_meta_box(
67 'wcf-checkout-settings', // Id.
68 __( 'Checkout Layout', 'cartflows' ), // Title.
69 array( $this, 'markup_meta_box' ), // Callback.
70 wcf()->utils->get_step_post_type(), // Post_type.
71 'normal', // Context.
72 'high' // Priority.
73 );
74 }
75 }
76
77 /**
78 * Metabox Markup
79 *
80 * @param object $post Post object.
81 * @return void
82 */
83 function markup_meta_box( $post ) {
84
85 wp_nonce_field( 'save-nonce-checkout-step-meta', 'nonce-checkout-step-meta' );
86
87 $stored = get_post_meta( $post->ID );
88
89 $checkout_meta = self::get_meta_option( $post->ID );
90
91 // Set stored and override defaults.
92 foreach ( $stored as $key => $value ) {
93 if ( array_key_exists( $key, $checkout_meta ) ) {
94 self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : '';
95 } else {
96 self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : '';
97 }
98 }
99
100 // Get defaults.
101 $meta = self::get_meta_option( $post->ID );
102 $checkout_data = array();
103
104 foreach ( $meta as $key => $value ) {
105
106 $checkout_data[ $key ] = $meta[ $key ]['default'];
107 }
108
109 /*
110 $billing_fields = Cartflows_Helper::get_checkout_fields( 'billing', $post->ID );
111
112 foreach ( $billing_fields as $key => $value ) {
113
114 $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
115 }
116
117 $shipping_fields = Cartflows_Helper::get_checkout_fields( 'shipping', $post->ID );
118
119 foreach ( $shipping_fields as $key => $value ) {
120
121 $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
122 }
123
124 $additional_fields = Cartflows_Helper::get_checkout_fields( 'additional', $post->ID );
125
126 foreach ( $additional_fields as $key => $value ) {
127
128 $checkout_data[ 'wcf-' . $key ] = $meta[ 'wcf-' . $key ]['default'];
129 }
130 */
131
132 do_action( 'wcf_checkout_settings_markup_before' );
133 $this->tabs_markup( $checkout_data, $post->ID );
134 do_action( 'wcf_checkout_settings_markup_after' );
135 }
136
137 /**
138 * Page Header Tabs
139 *
140 * @param array $options options.
141 * @param int $post_id post ID.
142 */
143 function tabs_markup( $options, $post_id ) {
144
145 $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true );
146
147 if ( empty( $active_tab ) ) {
148 $active_tab = 'wcf-checkout-shortcodes';
149 }
150
151 $tabs = array(
152 array(
153 'title' => __( 'Shortcodes', 'cartflows' ),
154 'id' => 'wcf-checkout-shortcodes',
155 'class' => 'wcf-checkout-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
156 'icon' => 'dashicons-editor-code',
157 'help_text' => 'Help Helpppp...',
158 ),
159 array(
160 'title' => __( 'Select Product', 'cartflows' ),
161 'id' => 'wcf-checkout-general',
162 'class' => 'wcf-checkout-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
163 'icon' => 'dashicons-info',
164 ),
165 array(
166 'title' => __( 'Order Bump', 'cartflows' ),
167 'id' => 'wcf-product-order-bump',
168 'class' => 'wcf-product-order-bump' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
169 'icon' => 'dashicons-cart',
170 ),
171 array(
172 'title' => __( 'Checkout Design', 'cartflows' ),
173 'id' => 'wcf-checkout-style',
174 'class' => 'wcf-checkout-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
175 'icon' => 'dashicons-admin-customizer',
176 ),
177 array(
178 'title' => __( 'Checkout Fields', 'cartflows' ),
179 'id' => 'wcf-checkout-custom-fields',
180 'class' => 'wcf-checkout-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
181 'icon' => 'dashicons-welcome-widgets-menus',
182 ),
183 array(
184 'title' => __( 'Logo ( Optional )', 'cartflows' ),
185 'id' => 'wcf-checkout-header',
186 'class' => 'wcf-checkout-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab',
187 'icon' => 'dashicons-format-image',
188 ),
189 );
190
191 ?>
192 <div class="wcf-checkout-table wcf-metabox-wrap widefat">
193 <div class="wcf-table-container">
194 <div class="wcf-column-left">
195 <div class="wcf-tab-wrapper">
196
197 <?php foreach ( $tabs as $key => $tab ) { ?>
198 <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>">
199 <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span>
200 <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
201 </div>
202 <?php } ?>
203
204 <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" />
205 </div>
206 </div>
207 <div class="wcf-column-right">
208 <?php $this->tab_shortcodes( $options, $post_id ); ?>
209 <?php $this->tab_general( $options, $post_id ); ?>
210 <?php $this->tab_style( $options, $post_id ); ?>
211 <?php $this->tab_product_bump( $options, $post_id ); ?>
212 <?php $this->tab_custom_fields( $options, $post_id ); ?>
213 <?php $this->tab_header_content( $options, $post_id ); ?>
214 <?php $this->right_column_footer( $options, $post_id ); ?>
215 </div>
216 </div>
217 </div>
218
219 <?php
220 }
221
222 /**
223 * Shortcodes tab
224 *
225 * @param array $options options.
226 * @param int $post_id post ID.
227 */
228 function tab_shortcodes( $options, $post_id ) {
229 ?>
230 <div class="wcf-checkout-shortcodes wcf-tab-content widefat">
231
232 <?php
233
234 echo wcf()->meta->get_shortcode_field(
235 array(
236 'label' => 'Checkout Page',
237 'name' => 'wcf-checkout-shortcode',
238 'content' => '[cartflows_checkout]',
239 'help' => __( 'Add this shortcode to your checkout page', 'cartflows' ),
240 )
241 );
242 ?>
243 </div>
244 <?php
245 }
246
247
248 /**
249 * General tab
250 *
251 * @param array $options options.
252 * @param int $post_id post ID.
253 */
254 function tab_general( $options, $post_id ) {
255 ?>
256 <div class="wcf-checkout-general wcf-tab-content widefat">
257
258 <?php
259
260 echo wcf()->meta->get_product_selection_repeater(
261 array(
262 'name' => 'wcf-checkout-products',
263 'value' => $options['wcf-checkout-products'],
264 'allow_clear' => true,
265 )
266 );
267
268 do_action( 'cartflows_checkout_general_tab_content', $options, $post_id );
269
270 ?>
271 </div>
272 <?php
273 }
274
275 /**
276 * Product bump tab
277 *
278 * @param array $options options.
279 * @param int $post_id post ID.
280 */
281 function tab_product_bump( $options, $post_id ) {
282 ?>
283 <div class="wcf-product-order-bump wcf-tab-content widefat">
284 <?php
285 if ( ! _is_cartflows_pro() ) {
286
287 echo wcf()->meta->get_description_field(
288 array(
289 'name' => 'wcf-upgrade-to-pro',
290 /* translators: %s: link */
291 'content' => '<i>' . sprintf( __( 'Upgrade to %1$sCartFlows Pro%2$s for Order Bump feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
292 )
293 );
294 }
295 ?>
296
297 <?php do_action( 'cartflows_order_bump_tab_content', $options, $post_id ); ?>
298 </div>
299 <?php
300 }
301 /**
302 * Tab custom fields
303 *
304 * @param array $options options.
305 * @param int $post_id post ID.
306 */
307 function tab_custom_fields( $options, $post_id ) {
308 ?>
309 <div class="wcf-checkout-custom-fields wcf-tab-content widefat">
310 <?php
311 /* Custom Checkout Fields Section */
312
313 if ( ! _is_cartflows_pro() ) {
314
315 echo wcf()->meta->get_description_field(
316 array(
317 'name' => 'wcf-upgrade-to-pro',
318 /* translators: %s: link */
319 'content' => '<i>' . sprintf( __( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>',
320 )
321 );
322 }
323 ?>
324 <?php do_action( 'cartflows_custom_fields_tab_content', $options, $post_id ); ?>
325 </div>
326 <?php
327 }
328
329 /**
330 * Tab style
331 *
332 * @param array $options options.
333 * @param int $post_id post ID.
334 */
335 function tab_style( $options, $post_id ) {
336 ?>
337
338 <div class="wcf-checkout-style wcf-tab-content widefat">
339 <div class="wcf-cs-fields">
340 <div class="wcf-cs-checkbox-field">
341 <?php
342
343 $layout_pro_option = array();
344
345 if ( ! _is_cartflows_pro() ) {
346 $layout_pro_option = array(
347 'one-column' => __( 'One Column (Available in CartFlows Pro) ', 'cartflows' ),
348 );
349 }
350
351 echo wcf()->meta->get_select_field(
352 array(
353 'label' => __( 'Checkout Skin', 'cartflows' ),
354 'name' => 'wcf-checkout-layout',
355 'value' => $options['wcf-checkout-layout'],
356 'options' => array(
357 'one-column' => __( 'One Column', 'cartflows' ),
358 'two-column' => __( 'Two Column', 'cartflows' ),
359 ),
360 'pro-options' => $layout_pro_option,
361
362 )
363 );
364
365 echo wcf()->meta->get_color_picker_field(
366 array(
367 'label' => __( 'Primary Color', 'cartflows' ),
368 'name' => 'wcf-primary-color',
369 'value' => $options['wcf-primary-color'],
370 )
371 );
372
373 echo wcf()->meta->get_font_family_field(
374 array(
375 'for' => 'wcf-base',
376 'label' => __( 'Font Family', 'cartflows' ),
377 'name' => 'wcf-base-font-family',
378 'value' => $options['wcf-base-font-family'],
379 )
380 );
381
382 echo wcf()->meta->get_checkbox_field(
383 array(
384 'label' => __( 'Advance Options', 'cartflows' ),
385 'name' => 'wcf-advance-options-fields',
386 'value' => $options['wcf-advance-options-fields'],
387 'after' => 'Enable',
388 )
389 );
390 ?>
391 </div>
392 <div class="wcf-cs-fields-options">
393 <?php
394 echo wcf()->meta->get_section(
395 array(
396 'label' => __( 'Heading', 'cartflows' ),
397 )
398 );
399
400 echo wcf()->meta->get_color_picker_field(
401 array(
402 'label' => __( 'Heading Color', 'cartflows' ),
403 'name' => 'wcf-heading-color',
404 'value' => $options['wcf-heading-color'],
405 )
406 );
407
408 echo wcf()->meta->get_font_family_field(
409 array(
410 'for' => 'wcf-heading',
411 'label' => __( 'Font Family', 'cartflows' ),
412 'name' => 'wcf-heading-font-family',
413 'value' => $options['wcf-heading-font-family'],
414 )
415 );
416
417 echo wcf()->meta->get_font_weight_field(
418 array(
419 'for' => 'wcf-heading',
420 'label' => __( 'Font Weight', 'cartflows' ),
421 'name' => 'wcf-heading-font-weight',
422 'value' => $options['wcf-heading-font-weight'],
423 )
424 );
425
426 echo wcf()->meta->get_section(
427 array(
428 'label' => __( 'Input Fields', 'cartflows' ),
429 )
430 );
431
432 $fields_skin_pro_option = array();
433
434 if ( ! _is_cartflows_pro() ) {
435 $fields_skin_pro_option = array(
436 'skin-one' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ),
437 );
438 }
439
440 echo wcf()->meta->get_select_field(
441 array(
442 'label' => __( 'Style', 'cartflows' ),
443 'name' => 'wcf-fields-skins',
444 'value' => $options['wcf-fields-skins'],
445 'options' => array(
446 'default' => __( 'Default', 'cartflows' ),
447 'style-one' => __( 'Floating Labels', 'cartflows' ),
448 ),
449 'pro-options' => $fields_skin_pro_option,
450
451 )
452 );
453
454 echo wcf()->meta->get_font_family_field(
455 array(
456 'for' => 'wcf-input',
457 'label' => __( 'Font Family', 'cartflows' ),
458 'name' => 'wcf-input-font-family',
459 'value' => $options['wcf-input-font-family'],
460 )
461 );
462
463 echo wcf()->meta->get_font_weight_field(
464 array(
465 'for' => 'wcf-input',
466 'label' => __( 'Font Weight', 'cartflows' ),
467 'name' => 'wcf-input-font-weight',
468 'value' => $options['wcf-input-font-weight'],
469 )
470 );
471
472 echo wcf()->meta->get_select_field(
473 array(
474 'label' => __( 'Size', 'cartflows' ),
475 'name' => 'wcf-input-field-size',
476 'value' => $options['wcf-input-field-size'],
477 'options' => array(
478 '33px' => __( 'Extra Small', 'cartflows' ),
479 '38px' => __( 'Small', 'cartflows' ),
480 '44px' => __( 'Medium', 'cartflows' ),
481 '58px' => __( 'Large', 'cartflows' ),
482 '68px' => __( 'Extra Large', 'cartflows' ),
483 'custom' => __( 'Custom', 'cartflows' ),
484 ),
485 )
486 );
487
488 echo wcf()->meta->get_number_field(
489 array(
490 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
491 'name' => 'wcf-field-tb-padding',
492 'value' => $options['wcf-field-tb-padding'],
493 )
494 );
495
496 echo wcf()->meta->get_number_field(
497 array(
498 'label' => __( 'Left Right Spacing', 'cartflows' ),
499 'name' => 'wcf-field-lr-padding',
500 'value' => $options['wcf-field-lr-padding'],
501 )
502 );
503
504 echo wcf()->meta->get_color_picker_field(
505 array(
506 'label' => __( 'Text / Placeholder Color', 'cartflows' ),
507 'name' => 'wcf-field-color',
508 'value' => $options['wcf-field-color'],
509 )
510 );
511
512 echo wcf()->meta->get_color_picker_field(
513 array(
514 'label' => __( 'Background Color', 'cartflows' ),
515 'name' => 'wcf-field-bg-color',
516 'value' => $options['wcf-field-bg-color'],
517 )
518 );
519
520 echo wcf()->meta->get_color_picker_field(
521 array(
522 'label' => __( 'Border Color', 'cartflows' ),
523 'name' => 'wcf-field-border-color',
524 'value' => $options['wcf-field-border-color'],
525 )
526 );
527 echo wcf()->meta->get_color_picker_field(
528 array(
529 'label' => __( 'Label Color', 'cartflows' ),
530 'name' => 'wcf-field-label-color',
531 'value' => $options['wcf-field-label-color'],
532 )
533 );
534
535 ?>
536 </div>
537 <div class="wcf-cs-button-options">
538 <?php
539
540 echo wcf()->meta->get_section(
541 array(
542 'label' => __( 'Buttons', 'cartflows' ),
543 )
544 );
545
546 echo wcf()->meta->get_font_family_field(
547 array(
548 'for' => 'wcf-button',
549 'label' => __( 'Font Family', 'cartflows' ),
550 'name' => 'wcf-button-font-family',
551 'value' => $options['wcf-button-font-family'],
552 )
553 );
554
555 echo wcf()->meta->get_font_weight_field(
556 array(
557 'for' => 'wcf-button',
558 'label' => __( 'Font Weight', 'cartflows' ),
559 'name' => 'wcf-button-font-weight',
560 'value' => $options['wcf-button-font-weight'],
561 )
562 );
563
564 echo wcf()->meta->get_select_field(
565 array(
566 'label' => __( 'Size', 'cartflows' ),
567 'name' => 'wcf-input-button-size',
568 'value' => $options['wcf-input-button-size'],
569 'options' => array(
570 '33px' => __( 'Extra Small', 'cartflows' ),
571 '38px' => __( 'Small', 'cartflows' ),
572 '44px' => __( 'Medium', 'cartflows' ),
573 '58px' => __( 'Large', 'cartflows' ),
574 '68px' => __( 'Extra Large', 'cartflows' ),
575 'custom' => __( 'Custom', 'cartflows' ),
576 ),
577 )
578 );
579
580 echo wcf()->meta->get_number_field(
581 array(
582 'label' => __( 'Top Bottom Spacing', 'cartflows' ),
583 'name' => 'wcf-submit-tb-padding',
584 'value' => $options['wcf-submit-tb-padding'],
585 )
586 );
587
588 echo wcf()->meta->get_number_field(
589 array(
590 'label' => __( 'Left Right Spacing', 'cartflows' ),
591 'name' => 'wcf-submit-lr-padding',
592 'value' => $options['wcf-submit-lr-padding'],
593 )
594 );
595
596 echo wcf()->meta->get_color_picker_field(
597 array(
598 'label' => __( 'Text Color', 'cartflows' ),
599 'name' => 'wcf-submit-color',
600 'value' => $options['wcf-submit-color'],
601 )
602 );
603
604 echo wcf()->meta->get_color_picker_field(
605 array(
606 'label' => __( 'Text Hover Color', 'cartflows' ),
607 'name' => 'wcf-submit-hover-color',
608 'value' => $options['wcf-submit-hover-color'],
609 )
610 );
611
612 echo wcf()->meta->get_color_picker_field(
613 array(
614 'label' => __( 'Background Color', 'cartflows' ),
615 'name' => 'wcf-submit-bg-color',
616 'value' => $options['wcf-submit-bg-color'],
617 )
618 );
619
620 echo wcf()->meta->get_color_picker_field(
621 array(
622 'label' => __( 'Background Hover Color', 'cartflows' ),
623 'name' => 'wcf-submit-bg-hover-color',
624 'value' => $options['wcf-submit-bg-hover-color'],
625 )
626 );
627
628 echo wcf()->meta->get_color_picker_field(
629 array(
630 'label' => __( 'Border Color', 'cartflows' ),
631 'name' => 'wcf-submit-border-color',
632 'value' => $options['wcf-submit-border-color'],
633 )
634 );
635
636 echo wcf()->meta->get_color_picker_field(
637 array(
638 'label' => __( 'Border Hover Color', 'cartflows' ),
639 'name' => 'wcf-submit-border-hover-color',
640 'value' => $options['wcf-submit-border-hover-color'],
641 )
642 );
643
644 ?>
645 </div>
646 <div class="wcf-cs-section-options">
647 <?php
648
649 echo wcf()->meta->get_section(
650 array(
651 'label' => __( 'Sections', 'cartflows' ),
652 )
653 );
654
655 echo wcf()->meta->get_color_picker_field(
656 array(
657 'label' => __( 'Highlight Area Background Color', 'cartflows' ),
658 'name' => 'wcf-hl-bg-color',
659 'value' => $options['wcf-hl-bg-color'],
660 )
661 );
662
663 echo wcf()->meta->get_hidden_field(
664 array(
665 'name' => 'wcf-field-google-font-url',
666 'value' => $options['wcf-field-google-font-url'],
667 )
668 );
669 ?>
670 </div>
671 <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
672 </div>
673 </div>
674 <?php
675 }
676
677
678 /**
679 * Tab Header (Used for add logo into header)
680 *
681 * @param array $options options.
682 * @param int $post_id post ID.
683 */
684 function tab_header_content( $options, $post_id ) {
685 ?>
686
687 <div class="wcf-checkout-header wcf-tab-content widefat">
688 <?php
689
690 $layout_pro_option = array();
691
692 echo wcf()->meta->get_image_field(
693 array(
694 'name' => 'wcf-header-logo-image',
695 'value' => $options['wcf-header-logo-image'],
696 'label' => __( 'Header Logo', 'cartflows' ),
697 )
698 );
699
700 echo wcf()->meta->get_number_field(
701 array(
702 'name' => 'wcf-header-logo-width',
703 'value' => $options['wcf-header-logo-width'],
704 'label' => __( 'Logo Width (In px)', 'cartflows' ),
705 )
706 );
707 ?>
708 <?php do_action( 'cartflows_checkout_style_tab_content', $options, $post_id ); ?>
709 </div>
710 <?php
711 }
712 /**
713 * Get metabox options
714 *
715 * @param int $post_id post ID.
716 */
717 public static function get_meta_option( $post_id ) {
718
719 if ( null === self::$meta_option ) {
720
721 /**
722 * Set metabox options
723 *
724 * @see http://php.net/manual/en/filter.filters.sanitize.php
725 */
726 self::$meta_option = wcf()->options->get_checkout_fields( $post_id );
727 }
728
729 return self::$meta_option;
730 }
731
732 /**
733 * Metabox Save
734 *
735 * @param number $post_id Post ID.
736 * @return void
737 */
738 function save_meta_box( $post_id ) {
739
740 // Checks save status.
741 $is_autosave = wp_is_post_autosave( $post_id );
742 $is_revision = wp_is_post_revision( $post_id );
743
744 $is_valid_nonce = ( isset( $_POST['nonce-checkout-step-meta'] ) && wp_verify_nonce( $_POST['nonce-checkout-step-meta'], 'save-nonce-checkout-step-meta' ) ) ? true : false;
745
746 // Exits script depending on save status.
747 if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
748 return;
749 }
750
751 wcf()->options->save_checkout_fields( $post_id );
752 }
753
754 }
755
756 /**
757 * Kicking this off by calling 'get_instance()' method
758 */
759 Cartflows_Checkout_Meta::get_instance();
760