PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.2.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.2.1
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 / admin-core / inc / step-meta.php

step-meta.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.2.1, at admin-core/inc/step-meta.php

66 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CartFlows Step Meta Helper.
4 *
5 * @package CartFlows
6 */
7
8 namespace CartflowsAdmin\AdminCore\Inc;
9
10 // Exit if accessed directly.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * Class StepMeta.
17 */
18 class StepMeta {
19
20
21 /**
22 * Get flow meta options.
23 *
24 * @param int $step_id step id.
25 * @param string $step_type type.
26 */
27 public static function get_meta_settings( $step_id, $step_type ) {
28
29 $settings = array(
30 'tabs' => array(),
31 );
32
33 /**
34 * Set metabox options
35 */
36 switch ( $step_type ) {
37 case 'landing':
38 $settings = \Cartflows_Landing_Meta_Data::get_instance()->get_settings( $step_id );
39 break;
40 case 'checkout':
41 if ( class_exists( 'WooCommerce' ) ) {
42 $settings = \Cartflows_Checkout_Meta_Data::get_instance()->get_settings( $step_id );
43 }
44 break;
45 case 'optin':
46 if ( class_exists( 'WooCommerce' ) ) {
47 $settings = \Cartflows_Optin_Meta_Data::get_instance()->get_settings( $step_id );
48 }
49 break;
50 case 'thankyou':
51 if ( class_exists( 'WooCommerce' ) ) {
52 $settings = \Cartflows_Thankyou_Meta_Data::get_instance()->get_settings( $step_id );
53 }
54 break;
55 default:
56 break;
57 }
58
59 // Added WP Fusion filter compatibility.
60 $settings = wcf_apply_filters_deprecated( 'cartflows_' . $step_type . '_step_meta_settings', array( $settings, $step_id ), '1.8.0', 'cartflows_admin_' . $step_type . '_step_meta_settings' );
61 $settings = apply_filters( 'cartflows_admin_' . $step_type . '_step_meta_settings', $settings, $step_id );
62 return $settings;
63 }
64
65 }
66