I am not sure about your problem, because you mentionede that some are wrong some are correct!
But I can suggest you to look for the “Tax” section of Woocommerce.
There has to be a “rounding” setting which will cause calculating and of course displaying wrong prices.
Hello ManusH,
Thank you for your quick reply. I tried to disable rounding for the tax section of WooCommerce. I deleted cache and transients afterwards, unfortunately that didn’t solve the problem.
Your prices include tax. Prices will be shown to the user excluding tax if they are outside of the tax zone. The customer location is geolocated, or follows the ‘default customer address’ setting.
If you go to the cart page, enter an address in your country, the prices will reflect this.
Hello Mike,
Thank you kindly for your reply.
All prices do include tax, which is 21%. We’re talking about a difference of € 0,95 instead of the excluding tax, of about € 4,18.
I’ve managed to solve the problem by deleting the price and saving the product, and then re-adding the price and saving the product.
I think we might be looking at a bug.
Did you import said products? Maybe imported with comma which is invalid. We STORE prices with ‘.’ decimals to avoid the cent figure being discarded when converted to a float.
Hello Mike,
No, I did not import any products.
It sometimes happens with existing product and also with adding new products.
We do however use commas for our prices.
When saved, commas are converted to decimals. If the prices was imported, or set via 3rd party plugin, it may lack this conversion and show the issue you mentioned..
I’ve checked if there’s any 3rd party plugin that might cause the issue that you mentioned, but I couldn’t find any.
Do you happen to know which template is most likely to cause this issue? I’ve checked the archive and single, but both seem ok.
It’s not a template issue. When the price is retrieved from the database as a string, its converted to a float.
19.95 string = 19.95 float
19,95 string = 19.00 float.
Thank you kindly for your reply, I think I get what you mean.
I still wonder why it happens with just a few products, and not all products.