| 1 |
<?php |
| 2 |
$wpfunnels_dir = dirname( dirname( dirname( __FILE__ ) ) ); |
| 3 |
if ( ! defined( 'WPFNL_DIR' ) ) { |
| 4 |
define( 'WPFNL_DIR', $wpfunnels_dir ); |
| 5 |
} |
| 6 |
|
| 7 |
$checkout_layout = ''; |
| 8 |
if( class_exists( '\WPFunnels\Wpfnl_functions' ) && \WPFunnels\Wpfnl_functions::is_wpfnl_pro_activated() && isset( $_SESSION[ 'checkout_layout' ] ) && 'wpfnl-express-checkout' === $_SESSION[ 'checkout_layout' ] ) { |
| 9 |
$checkout_layout = $_SESSION[ 'checkout_layout' ]; |
| 10 |
unset( $_SESSION[ 'checkout_layout' ] ); |
| 11 |
// load when funnel checkout step is express checkout |
| 12 |
require_once WPFNL_DIR . '/public/modules/checkout/templates/express-checkout-form.php'; |
| 13 |
|
| 14 |
} else if( class_exists( '\WPFunnels\Wpfnl_functions' ) && \WPFunnels\Wpfnl_functions::is_wpfnl_pro_activated() && isset( $_SESSION[ 'checkout_layout' ] ) && 'wpfnl-2-step' === $_SESSION[ 'checkout_layout' ] ) { |
| 15 |
$checkout_layout = $_SESSION[ 'checkout_layout' ]; |
| 16 |
unset( $_SESSION[ 'checkout_layout' ] ); |
| 17 |
|
| 18 |
require_once WPFNL_DIR . '/public/modules/checkout/templates/two-step-checkout.php'; |
| 19 |
|
| 20 |
} else if( isset( $_SESSION[ 'checkout_layout' ] ) && ('wpfnl-modern-checkout' === $_SESSION[ 'checkout_layout' ]) || ('wpfnl-modern-one-column' === $_SESSION[ 'checkout_layout' ]) ) { |
| 21 |
require_once WPFNL_DIR . '/public/modules/checkout/templates/modern-checkout-form.php'; |
| 22 |
|
| 23 |
} else { |
| 24 |
if ( isset( $_SESSION[ 'checkout_layout' ] ) && ('wpfnl-modern-multistep' === $_SESSION[ 'checkout_layout' ]) ) { |
| 25 |
require_once WPFNL_DIR . '/public/modules/checkout/templates/modern-checkout-form.php'; |
| 26 |
|
| 27 |
}else { |
| 28 |
require_once WPFNL_DIR . '/public/modules/checkout/templates/default-checkout-form.php'; |
| 29 |
} |
| 30 |
|
| 31 |
} |
| 32 |
// session_destroy(); |
| 33 |
?> |
| 34 |
|