Merge pull request #18372 from woocommerce/fix/17996

Round correctly when removing taxes from prices.
This commit is contained in:
Claudiu Lodromanean 2018-01-05 11:14:30 -08:00 committed by GitHub
commit 1ae74a56f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ final class WC_Cart_Totals {
$taxes = WC_Tax::calc_tax( $item->price, $base_tax_rates, true );
// Now we have a new item price (excluding TAX).
$item->price = absint( $item->price - array_sum( $taxes ) );
$item->price = round( $item->price - array_sum( $taxes ) );
$item->price_includes_tax = false;
}
return $item;