Remove rounding from individual item discount taxes.

Rounding here conflicts with round at subtotal settings becase we would round at line item level irrespective of settings.
This commit is contained in:
vedanshujain 2021-02-22 15:18:05 +05:30
parent 0d59195657
commit 43822b7401
1 changed files with 1 additions and 1 deletions

View File

@ -788,7 +788,7 @@ final class WC_Cart_Totals {
if ( $item->product->is_taxable() ) { if ( $item->product->is_taxable() ) {
// Item subtotals were sent, so set 3rd param. // Item subtotals were sent, so set 3rd param.
$item_tax = wc_round_tax_total( array_sum( WC_Tax::calc_tax( $coupon_discount, $item->tax_rates, $item->price_includes_tax ) ), 0 ); $item_tax = array_sum( WC_Tax::calc_tax( $coupon_discount, $item->tax_rates, $item->price_includes_tax ) );
// Sum total tax. // Sum total tax.
$coupon_discount_tax_amounts[ $coupon_code ] += $item_tax; $coupon_discount_tax_amounts[ $coupon_code ] += $item_tax;