The cart is showing the incorrect price after applying the discount
You may occasionally see rounding errors in the cart or checkout when using the Buy X products for Y discount and Free Products discount types. For example, if you have a "Buy 3 for $10" deal then the cart may show as $9.99 instead of $10.
This is caused by a bug in WooCommerce rather than the Discount Manager plugin. It is related to way WooCommerce calculates taxes at checkout under certain conditions. You can read more about the issue here and here.
From our testing, the WooCommerce bug appears if you have the following settings:
- Taxes are enabled in WooCommerce
- Under WooCommerce → Settings → Tax, "Yes, I will enter prices inclusive of tax" is selected
- "Round tax at subtotal level, instead of rounding per line" is not selected
With these settings, WooCommerce needs to subtract the tax amounts from each line item (as the price includes tax), then recalculate the totals. Depending on the tax percentage and discount applied, this can result in a rounding error. You can verify this bug by deactivating the Discount Manager plugin, and changing the prices of your products to match the discounted amount.
There are two solutions which you can use:
- Go to WooCommerce → Settings → Tax and enable the Rounding option.
- Or, go to WooCommerce → Settings → General and set the number of decimals to anything other than 2.