Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an issue where the prices in orders placed in an alternative currency (USD) changed dramatically when the order status was set to complete. The prices would inflate from a normal amount (e.g., $519.37) to an exaggerated figure (e.g., $519,370,000.00). The client suspected a mismatch in the currency settings between WooCommerce and WPML WooCommerce Multilingual.
Solution:
The client resolved the issue by aligning the currency settings in WPML WooCommerce Multilingual with those in WooCommerce. Specifically, the thousand separator and decimal separator settings for the USD currency in WPML needed to match the WooCommerce settings, which are typically used in Europe (thousand separator: . , decimal separator: ,). This adjustment prevented the prices from changing incorrectly when the order status was updated to complete.

If you're experiencing a similar issue, we recommend checking and ensuring that your currency settings in WPML match those in your WooCommerce settings. If this solution does not resolve your issue or seems outdated, please visit our known issues page, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, do not hesitate to open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by Itamar 3 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
June 4, 2024 at 7:24 am

marioH-8

Background of the issue:
We are using WPML WooCommerce Multilingual with 2 currencies (EUR / USD). When a customer orders a product in alternative currency (USD) the prices in the order are ok. But as soon as we set the order to complete, the prices in the order change from e.g. $ 519,37 to $519.370.000,00. I've found this support ticket: https://wpml.org/forums/topic/orders-placed-in-alternative-currency-have-their-prices-changed/ but the solutions there are not working. When I try the Code workaround there, the prices still change from e.g. $509,40 to $5.094,00.

Symptoms:
When setting an order to complete, the prices in the order change from e.g. $ 519,37 to $519.370.000,00.

Questions:
How can we solve the issue of prices changing when an order is set to complete?

June 4, 2024 at 8:03 am
June 4, 2024 at 8:04 am #15700064

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Please try my suggestion and reply here if you need further help.

Regards,
Itamar.

June 4, 2024 at 8:23 am #15700132

marioH-8

I've done what you said (changed to standard theme, disabled all plugins (except woocommerce and wpml) but the problem still persists. Prices in alternative Currency are still changed when i set the order status to complete. there must be a problem in wpml multicurrency i guess.

June 4, 2024 at 5:09 pm #15703584

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for trying my suggestions.

On your site in WPML -> Strings Translation, I searched for the comma (,) and full stop (.) price operators. Those strings' language was German and not English. Please see the attached screenshots. So, I switched it to English and translated it (put the same values) into all the other languages. Unfortunately, it didn't fix the issue.

I want to ask for your help in replicating this problem. I created a test site with a fresh WordPress installation with WooCommerce and WPML. I tried to replicate this problem there but couldn't. Maybe I missed some settings, as they are on your site.

Can you please access the test site and help me to replicate this problem?

You can access it with this direct link.

hidden link

PLease let me know if you can replicate the problem on the test site.

Thanks,
Itamar.

2024-06-04_19-56-28.jpg
2024-06-04_19-52-48.jpg
June 4, 2024 at 7:33 pm #15704147

marioH-8

i think i found out what caused the problem...

the settings for second currency (USD) were:
thousand seperator: ,
decimal seperator: .

but in woocommerce settings it's:
thousand seperator: .
decimal seperator: ,

like it's used to be in europe. i've changed the settings in the secondary currency (USD) to match woocommerce settings and now the price stays like it should. I guess this is still a bug in wpml multicurrency function, because it is bound to the woocommerce settings and ignores different settings in alternative currencies and causing this error. can you check if i'm right with my theory?

thanks for your help!

June 6, 2024 at 4:17 pm #15712635

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'm glad you have found the source of the problem and were able to solve it on your site!

I tried replicating the issue on a fresh test site with WooCommerce and WPML. However, I was not able to reproduce it. As you explained, I set the currency settings in WooCommerce -> Settings and WooCommerce -> WooCommerce Multilingual & Multicurrency. Still, I didn't get the price changed, as it happened on your site. It might be I missed some settings. It would be great if you could help us replicate this issue. If you are willing, access my test site using this direct link.

hidden link

Everything is already set up there.

Are you able to replicate the issue there?

If so, then I can escalate it to our second-tier supporters.

Thanks,
Itamar.

June 6, 2024 at 7:35 pm #15713172

marioH-8

Hm i've just tried to replicate the issue on your latest testsite - but was not able to replicate it. it seems to work there. maybe there are really some settings that cause this, but i havent found them unfortunately.

for my part the issue is resolved, it seems to work with same settings in woocommerce and secondary currency.

thank you for your help!

June 9, 2024 at 6:18 am #15718796

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

You are welcome!

I'm closing this ticket.

Don't hesitate to contact us again with any WPML issues or questions.

Regards,
Itamar.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.