Home›Support›English Support›[Escalated to WPML Developers team] Order Prices Change on Status Change in alternative Currency (WooCommerce Multilingual), V2
[Escalated to WPML Developers team] Order Prices Change on Status Change in alternative Currency (WooCommerce Multilingual), V2
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.
Background of the issue:
I am facing the same issue as described here: https://wpml.org/forums/topic/order-prices-change-on-status-change-in-alternative-currency-woocommerce-multilingual/. Orders process as expected, but if an order needs to be re-triggered (e.g., for a repeated API call to the warehouse system – WooCommerce status changes from 'Completed' back to 'In Progress'), the order prices lose their separators, which causes them to be manipulated. I have installed the most recent update of WooCommerce and Multicurrency. The default currency in WooCommerce is EUR, and the secondary currency is USD. Unfortunately, the suggested solution (matching the separators with those of WooCommerce's native format) is not an option for me. I tried that, and while it does solve the bug, it results in incorrect separators for my USD prices.
Symptoms:
Order prices lose their separators and are manipulated, resulting in significantly higher prices when the order status changes from 'Completed' back to 'In Progress'.
Questions:
How can I prevent order prices from losing their separators when the order status changes?
Is there an alternative solution to matching the separators with WooCommerce's native format that does not result in incorrect separators for USD prices?
I have escalated this issue to our developers. In the meantime, there is a workaround but I must warn that it has not been tested and while it resolves the issue on my test site, I don't know what other issues it could cause, so please proceed with a full back up and caution.
We disable our logic by going to : wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php and comment-out the line:
After I did this on my test site, the issue was resolved. The other option is to change the USD decimal separator to a comman. This makes the price look a bit funny on the frontend, but it wouldn't have unknown consequences like editing the code.
I will update you here once our developers have a more pernament solution.
Hello Lauren, i solved it for my case now with this Hardcode:
In the unit mentioned: wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-prices.php , manipulate the line with an is_admin switch:
Thanks for the update! We will be including a permanent resolution in a future release. Glad to know the workaroudn resolves it temporarily. I will let you know once we have a confirmed release available.
Is there an update aviable, yet?
Another question: I am struggeling to identify which changelog this issue actually belongs to - wpml or wcml, actually?
Other than the previous workaround, we do not have a permanent fix yet. The workaround earlier provided is what is suggested, and this is still escalated to our developers. Ultimately it's up to our developers to determine priority and schedule, and I will update here once I have more information.