Merge pull request #1527 from thenbrent/master
Add filter to needs_payment() and display formatted taxes if set
This commit is contained in:
commit
1f91f66b8f
|
@ -1436,7 +1436,8 @@ class WC_Cart {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function needs_payment() {
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -121,10 +121,10 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($woocommerce->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) :
|
if (sizeof($taxes)>0) :
|
||||||
|
|
||||||
$has_compound_tax = false;
|
$has_compound_tax = false;
|
||||||
|
|
Loading…
Reference in New Issue