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.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| - | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
| - | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - |
Supporter timezone: Europe/Vienna (GMT+01:00)
Tagged: Bug
This topic contains 6 replies, has 0 voices.
Last updated by Lucas Vidal de Andrade 2 days, 7 hours ago.
Assisted by: Lucas Vidal de Andrade.
| Author | Posts |
|---|---|
| November 6, 2025 at 3:04 pm #17554546 | |
|
kateS-9 |
Background of the issue: Symptoms: Questions: |
| November 7, 2025 at 10:48 am #17556731 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Thanks for the details. Since the issue only occurs on production and is hard to reproduce, we’ll need a copy of the site where the problem can also be observed. Please try to replicate the issue as best as you can on a staging copy and let us know once it’s ready. This will help us investigate further. |
| November 14, 2025 at 5:30 pm #17580008 | |
|
kateS-9 |
Thank you for your message. I’m sending over the details for the staging copy shortly after this message. We’ve been looking into this in depth, and here’s what we’ve observed so far: What makes this even more unusual is that fixing a variable product with incorrect translated prices only requires opening the product in the default language in the admin area and clicking “Update”. No data changes are needed, and all translated prices instantly realign with the default language. The GBP price still creeps back into the main translated price later on. The price update script is located here: This behaviour is quite complex to summarise, so we’re more than happy to jump on a call to walk you through everything if that helps. For the staging copy, we tried to reproduce the issue but couldn’t replicate it. The change in prices only happens on the production site. These are the only differences between production and the staging copy we have made for you: We’re not fully clear on how WPML keeps prices synchronised internally or how the wcml_sync_hash metavalue works (deleting this value caused all variable products to end up with incorrect translated prices in less than a day – we normally see around ten affected products per day at most). We’ve searched extensively for any process responsible for syncing or overwriting prices, but we haven’t been able to identify what is triggering the overwriting. We’ve also attempted to log product changes via WordPress hooks, but we haven’t been able to identify a process that alters the main price in translations. We also tried partially commenting out the function processDelayedFields in: At this stage, we suspect there may be some form of caching involved, as the prices begin to shift one by one throughout the day. We haven’t yet tested clearing caches programmatically after running the script (for example using wc_delete_product_transients or wp_cache_delete), because the prices also become incorrect even when they are updated directly through the admin area, but we are willing to try this approach.. Once the staging details are added below, please let me know if you need anything else from us. |
| November 14, 2025 at 5:41 pm #17580032 | |
|
kateS-9 |
Here are the details to the staging copy site: hidden link Basic auth: hidden link Site login details here: hidden link |
| November 17, 2025 at 4:17 pm #17585220 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Hello there, Thank you for sharing the staging website, but since the issue is not happening there, is not of much use. Since you shared that updating a product via the UI also leads to the same issue, it seems that the script is not part of the cause of the issue. Can you please confirm that? If the issue still happens after a manual update via WordPress admin. Also, our best guess so far is that cached value is causing that. Can you please deactivate the cache and compare the behavior? Check if the issue is there even without the cache activated. |
| November 23, 2025 at 12:50 pm #17602032 | |
|
kateS-9 |
We believe we may have isolated the cause of WCML incorrectly overwriting variable product base currency prices (EUR) with values from a secondary currency. In our case, it appears to be a conflict involving WCML and two plugins, Optimization Detective and Image Prioritizer. However, the behaviour is not necessarily limited to those plugins. Any plugin, scheduled task, or process that triggers save_post outside of the normal admin context, particularly when $_POST is empty, could potentially lead to the same issue where WCML overwrites the base currency prices using the currently active secondary currency. I have not yet put a proof of concept together, but I wanted to share this update in case it helps narrow the investigation. It is not yet clear whether WCML should be accounting for this scenario or whether it is stemming from unintended behaviour within Optimization Detective. Optimization Detective triggers a background cache invalidation routine which fires the save_post action. Normally, when a product is saved in the admin, $_POST is populated. In this scenario, $_POST is empty because the update is initiated in the background via a scheduled event. Optimization Detective and Image Prioritizer run on the front end using real traffic to detect LCP images across different screen sizes, sending this data back via the REST API. The issue may not have appeared in local or staging environments simply because there was not enough real front end activity or variety of screen sizes to trigger the update and cache invalidation. hidden link |
| November 24, 2025 at 1:30 pm #17605046 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Hello there, Thank you for bringing that to my attention. Nonetheless, we can't really investigate the live website, as we don't have a consistent way to reproduce the issue, and we can't apply tests on it, since it might compromise its functioning. It seems, though, as you are getting close to isolating and reproducing the issue. You shared that “… Any plugin, scheduled task, or process that triggers save_post outside of the normal admin context, particularly when $_POST is empty, could potentially lead to the same issue where WCML overwrites the base currency prices using the currently active secondary currency.” Is there a way you could force that to happen and test if the prices would change? Please let me know if you can get to a proof of concept or consistent way to reproduce the issue. Again, preferably on staging or in a copy I can invetigate. Thank you for your patience. |