Wipe line tax when an order is tax exempt

This commit is contained in:
Mike Jolley 2012-08-24 18:14:18 +01:00
parent 251bbe75d1
commit ca5fca4455
1 changed files with 2 additions and 0 deletions

View File

@ -1396,6 +1396,8 @@ class WC_Cart {
if ( $woocommerce->customer->is_vat_exempt() || ( is_cart() && get_option('woocommerce_display_cart_taxes') == 'no' ) ) {
$this->shipping_tax_total = $this->tax_total = 0;
$this->taxes = $this->shipping_taxes = array();
foreach ( $this->cart_contents as $cart_item_key => $item )
$this->cart_contents[$cart_item_key]['line_subtotal_tax'] = $this->cart_contents[$cart_item_key]['line_tax'] = 0;
}
// Cart Discounts (after tax)