Woocommerce rounding cart totals with tax up


I have a fairly common issue with Woocommerce when using product value includes tax.

When products are set to say 9.99 when added to the cart the total will display 10.00. Now I know why this happens. It’s because Woo uses four decimal places for the tax calculation. So when you use 9.99 as a product price woo calculates the tax as 1.665 and if you add that to the calculated discounted price of 8.33 is 9.9950 put up to 2 decimal points its forced into 10.00.

So basically I was wondering if there is a way to always force the rounding of the totals to go down so it takes a lower value as opposed to a higher one. so that 9.9950 instead of being 10 would display as 9.99.

DCdaz 2 years 2019-05-28T11:33:18-05:00 0 Answers 83 views 0

Leave an answer