Pass is_ajax through from the ajax handler

Fixes #5910
This commit is contained in:
Mike Jolley 2014-07-31 10:00:16 +01:00
parent 727e49c097
commit 6e540c3bda
3 changed files with 5 additions and 5 deletions

View File

@ -256,7 +256,7 @@ class WC_AJAX {
WC()->cart->calculate_totals();
do_action( 'woocommerce_checkout_order_review' ); // Display review order table
do_action( 'woocommerce_checkout_order_review', true ); // Display review order table
die();
}

View File

@ -1296,8 +1296,8 @@ if ( ! function_exists( 'woocommerce_order_review' ) ) {
* @subpackage Checkout
* @return void
*/
function woocommerce_order_review() {
wc_get_template( 'checkout/review-order.php', array( 'checkout' => WC()->checkout() ) );
function woocommerce_order_review( $is_ajax = false ) {
wc_get_template( 'checkout/review-order.php', array( 'checkout' => WC()->checkout(), 'is_ajax' => $is_ajax ) );
}
}

View File

@ -10,7 +10,7 @@
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<?php if ( ! is_ajax() ) : ?><div id="order_review"><?php endif; ?>
<?php if ( ! $is_ajax ) : ?><div id="order_review"><?php endif; ?>
<table class="shop_table">
<thead>
@ -191,4 +191,4 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
<?php do_action( 'woocommerce_review_order_after_payment' ); ?>
<?php if ( ! is_ajax() ) : ?></div><?php endif; ?>
<?php if ( ! $is_ajax ) : ?></div><?php endif; ?>