Fixed payment actions executing multiple times, closes #7226

This commit is contained in:
Claudio Sanches 2015-01-29 16:36:05 -02:00
parent d3ac28fbb3
commit d0f4b43c96
1 changed files with 8 additions and 2 deletions

View File

@ -11,7 +11,11 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
do_action( 'woocommerce_review_order_before_payment' ); ?>
?>
<?php if ( ! is_ajax() ) : ?>
<?php do_action( 'woocommerce_review_order_before_payment' ); ?>
<?php endif; ?>
<div id="payment" class="woocommerce-checkout-payment">
<?php if ( WC()->cart->needs_payment() ) : ?>
@ -58,4 +62,6 @@ do_action( 'woocommerce_review_order_before_payment' ); ?>
<div class="clear"></div>
</div>
<?php do_action( 'woocommerce_review_order_after_payment' ); ?>
<?php if ( ! is_ajax() ) : ?>
<?php do_action( 'woocommerce_review_order_after_payment' ); ?>
<?php endif; ?>