PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.12.11
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.12.11
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / public / modules / checkout / templates / checkout.php

checkout.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.12.11, at public/modules/checkout/templates/checkout.php

30 lines 1.1 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
6 */
7 ?>
8 <div id="wpfunnels-checkout-form" class="wpfunnels-checkout-form">
9 <?php
10 if ( WC()->cart && WC()->cart->is_empty() ) {
11 // WC shortcode redirects to cart when empty — bypass it and render the
12 // checkout form template directly so the design is visible without products.
13 // Set a session flag so the woocommerce_checkout_update_order_review_expired
14 // filter can suppress the "session expired" AJAX response for this session.
15 wc_clear_notices();
16 WC()->session->set( 'wpfnl_checkout_preview_mode', true );
17 ob_start();
18 wc_get_template( 'checkout/form-checkout.php', array( 'checkout' => WC()->checkout() ) );
19 echo ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
20 } else {
21 $checkout_html = do_shortcode( '[woocommerce_checkout]' );
22 if ( empty( $checkout_html ) || trim( $checkout_html ) === '<div class="woocommerce"></div>' ) {
23 echo esc_html__( 'Your cart is currently empty.', 'wpfnl' );
24 } else {
25 echo $checkout_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
26 }
27 }
28 ?>
29 </div>
30