Support » Plugin: WooCommerce » Round issues on order-receive page and confirmation mail

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    An update on my part: been looking a bit further into this rounding issue. The problem also occurs in the back-end.

    Please look at this documentation I made:

    I assume it’s more or less the same behaviour …
    Where does this come from? I want the correct numbers seen, on the order-received page and in the confirmation mail.

    Any help where this is located please?

    Coming closer now to the issue.

    I was told by an expert that Woocommerce never ever uses comma’s in their database. Because the store is set-up with comma as a decimal seperator, I did some checking. Could be WC was expecting a point and show number incorrectly because there is a comma.

    I first thought that the prices of products were stored with a comma. (wp_posts and wp_postsmeta DB files) But it wasn’t and as I tested, creating a new product the prices are saved with a point. So that’s working correctly.

    But while examining the order details (wp_woocommerce_order_itemmeta DB file), I saw the values were saved with a comma, like 38,23 instead of 38.23

    Change these entries directly in the DB from comma to a point and the the prices are shown correctly on the checkout/order-received page.

    The question now is, why is a product saved with a point in the values and an order with a comma in the prices, tax and other values?


    you need to remember the differences between your price input and your “displayed” price.

    when adding/editing price in your product, do not use thousand separator and always use point for decimal separator. this is the safest way to do.

    for example: 2500.50

    this is the format that is used for your database.

    if you need comma for your decimal separator, this can be configured from WooCommerce – Settings – General page. This setting will be used to format your “displayed” price using wc_price function. You can changed the format anytime when you need it.

    So, 2500.50 (in database) = 2.500,50 (displayed) or 2,500.50 (displayed), depends on your settings

    Note: I tried to put 2500,50 when editing my product and later version of WooCommerce looks convert it to 2500.50, which is good.

    Hello Agus,

    Thanks for you comments. Already some feedback:

    • Woocommerce is configured for comma as a decimal seperator.
    • Do not use the thousand seperator, correct. But it’s not used, the prices are not that high. 🙂
    • When I create a new product and give in a price 20,30 it gets saved in the database 20.30 This is OK.
      But in the order_itemmeta DB file, all prices, taxes are saved with a comma. That’s not OK. Why is Woocommerce saving all the numbers (in a string because it’s meta data) with a comma.

    I also used the hook woocommerce_get_price to manipulate the price. It affects the prices throughout the complete order process, but not on the checkout/order-received page. It seems like that step in the order proces is not using the standard.

    Main question now is, why are values (prices, taxes, ..) stored with a comma during the order proces. Where is the code doing this.

    Kind regards,

    hmmm, nobody?

    Hi there,

    I got exactly the same problem. I have searched the forums and Googled this problem many times. It seems as if the checkout/order-received got it’s own will.

    I would like to know if there is any solution to this issue also.

    Good luck on solving this issue.

    Today I got the confirmation of Woocommerce that there is a bug in their plugin WPEC convertor.

    Did you use that Woocommerce plugin?

    I got a fix for the convertor plugin but that doesn’t solve the issue. Conversion is done.

    Found the problem. WPEC convertor create products with a comma in the database. Once that was corrected, the orders were still saved with a comma. FYI: WC save all values like prices, tax, e.a. with a point, even if de decimal seperator a comma.

    It was due to another plugin,

    Once disabled solved the problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Round issues on order-receive page and confirmation mail’ is closed to new replies.