diff --git a/classes/class-wc-cart.php b/classes/class-wc-cart.php index a562e8e5278..ec1bc1f9719 100644 --- a/classes/class-wc-cart.php +++ b/classes/class-wc-cart.php @@ -1436,7 +1436,8 @@ class WC_Cart { * @return bool */ function needs_payment() { - if ( $this->total > 0 ) return true; else return false; + $needs_payment = ( $this->total > 0 ) ? true : false; + return apply_filters( 'woocommerce_cart_needs_payment', $needs_payment, $this ); } /*-----------------------------------------------------------------------------------*/ diff --git a/templates/checkout/review-order.php b/templates/checkout/review-order.php index fc82cec9502..6dec6898c07 100755 --- a/templates/checkout/review-order.php +++ b/templates/checkout/review-order.php @@ -121,9 +121,9 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods(); cart->get_cart_tax()) : + $taxes = $woocommerce->cart->get_formatted_taxes(); - $taxes = $woocommerce->cart->get_formatted_taxes(); + if ( $woocommerce->cart->get_cart_tax() || ! empty( $taxes ) ) : if (sizeof($taxes)>0) :