diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index c99fd0c5a8b..b9d67571b57 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1890,12 +1890,12 @@ class WC_Cart { $discount_amount = min( $price, $discount_amount ); $price = max( $price - $discount_amount, 0 ); - // Store the totals for DISPLAY in the cart + // Store the totals for DISPLAY in the cart. if ( $add_totals ) { $total_discount = $discount_amount * $values['quantity']; $total_discount_tax = 0; - if ( wc_tax_enabled() ) { + if ( wc_tax_enabled() && $product->is_taxable() ) { $tax_rates = WC_Tax::get_rates( $product->get_tax_class() ); $taxes = WC_Tax::calc_tax( $discount_amount, $tax_rates, $this->prices_include_tax ); $total_discount_tax = WC_Tax::get_tax_total( $taxes ) * $values['quantity'];