PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
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 / templates / embed / checkout-template-simple.php

checkout-template-simple.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.3.0, at modules/checkout/templates/embed/checkout-template-simple.php

58 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' );
13 $fields_skins = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-fields-skins' );
14 $checkout_skin = '';
15
16 /**
17 * Added this condition to add backward compatibility of the floating labes styles
18 *
19 * @since 1.9.0
20 *
21 * @to-do: Remove this condition after 2-3 update.
22 * */
23 if ( 'style-one' === $fields_skins ) {
24 $fields_skins = 'modern-label';
25 }
26
27 if ( 'modern-one-column' === $checkout_layout || 'modern-checkout' === $checkout_layout ) {
28 // Adding a layout specific classes depending on the checkout style modern-checout OR modern-one-Column.
29 $checkout_skin = 'modern-checkout' === $checkout_layout ? 'wcf-modern-skin-two-column' : 'wcf-modern-skin-one-column';
30 $checkout_layout = 'modern-checkout'; // Keeping the style and a common to modern checkout class for one and two column layouts.
31 }
32
33 $checkout_layout = apply_filters( 'cartflows_checkout_form_layout', $checkout_layout );
34
35 ?>
36 <div id="wcf-embed-checkout-form" class="wcf-embed-checkout-form wcf-embed-checkout-form-<?php echo esc_attr( $checkout_layout ); ?> <?php echo esc_attr( $checkout_skin ); ?> wcf-field-<?php echo esc_attr( $fields_skins ); ?>">
37 <!-- CHECKOUT SHORTCODE -->
38 <?php do_action( 'cartflows_add_before_main_section', $checkout_layout ); ?>
39
40 <?php
41 $checkout_html = do_shortcode( '[woocommerce_checkout]' );
42
43 if (
44 empty( $checkout_html ) ||
45 trim( $checkout_html ) == '<div class="woocommerce"></div>'
46 ) {
47 do_action( 'cartflows_checkout_cart_empty', $checkout_id );
48 echo esc_html( apply_filters( 'cartflows_checkout_cart_empty_message', __( 'Your cart is currently empty.', 'cartflows' ) ) );
49 } else {
50 // Ignoring the escaping rule as we are echoing shortcode.
51 echo $checkout_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
52 }
53 ?>
54
55 <?php do_action( 'cartflows_add_after_main_section', $arg = '' ); ?>
56 <!-- END CHECKOUT SHORTCODE -->
57 </div>
58