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.
Tagged: Documentation request
This topic contains 3 replies, has 2 voices.
Last updated by Dražen 1 year, 8 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
August 25, 2023 at 9:11 am #14290453 | |
janisS-4 |
Hi! I'm writing to seek assistance with an issue we've encountered concerning price synchronization across languages within our WooCommerce website that utilizes WPML. Here are the details of the matter: Issue Description: Observations: When we update a product's price in the main language, the change often reflects accurately in at least one other language. Queries: 1) Could this behavior be due to a configuration issue or potentially a bug within WPML? Thanks! |
August 28, 2023 at 7:21 am #14297607 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for contacting us. It is expected as WPML runs sync on save post. Our hooks are registered on save_post action so updating only the post meta will not trigger our hooks to sync custom fields. However, we introduced some hooks you can also use: https://wpml.org/wpml-hook/wpml_sync_all_custom_fields/ I haven't replied to each of your questions, since I think my reply sums it up, but if you have any other doubts please let me know. Regards, |
August 29, 2023 at 1:28 pm #14307615 | |
janisS-4 |
Thanks! Is there anything to know about situations when these hooks wouldn't sync woocommerce product prices? Should it work for single product variations as well? Anything else to be aware of? |
August 30, 2023 at 6:40 am #14310211 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, they should work fine, on save/update post, as this is also triggered when you regularly save your products, and price and rest of the fields are synced. I am not sure about single variations, but I think it would be needed to call regular product ID and then all of the variations of this product will be synced. Regards, |