| 1 |
<?php |
| 2 |
/** |
| 3 |
* Checkout template |
| 4 |
* |
| 5 |
* @package CartFlows |
| 6 |
*/ |
| 7 |
|
| 8 |
// Exit if accessed directly. |
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
$optin_layout = 'one-column'; |
| 13 |
$fields_skins = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-fields-skins' ); |
| 14 |
?> |
| 15 |
<div id="wcf-optin-form" class="wcf-optin-form wcf-optin-form-one-column wcf-field-<?php echo esc_attr( $fields_skins ); ?>"> |
| 16 |
|
| 17 |
<!-- CHECKOUT SHORTCODE --> |
| 18 |
<?php do_action( 'cartflows_optin_before_main_section', $optin_layout ); ?> |
| 19 |
|
| 20 |
<?php |
| 21 |
|
| 22 |
$checkout_html = do_shortcode( '[woocommerce_checkout]' ); |
| 23 |
|
| 24 |
if ( |
| 25 |
empty( $checkout_html ) || |
| 26 |
trim( $checkout_html ) == '<div class="woocommerce"></div>' |
| 27 |
) { |
| 28 |
|
| 29 |
echo esc_html__( 'Your cart is currently empty.', 'cartflows' ); |
| 30 |
} else { |
| 31 |
// Ignoring the escaping rule as we are echoing shortcode. |
| 32 |
echo $checkout_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 33 |
} |
| 34 |
?> |
| 35 |
|
| 36 |
<?php do_action( 'cartflows_optin_after_main_section', $optin_layout ); ?> |
| 37 |
<!-- END CHECKOUT SHORTCODE --> |
| 38 |
</div> |
| 39 |
|