Skip Navigation

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

Problem:
The client needed to update a custom field (barcode) for a large number of WooCommerce products that were already translated from Greek to Bulgarian. The client wanted to know if changing the translation preference from 'Translate' to 'Copy' would automatically update the already translated Bulgarian products with the new barcode values.

Solution:
We first asked the client to confirm if the barcode field should have the same value in both Greek and Bulgarian products. If so, we instructed to go to WPML > Settings > Custom field translations and change the translation preference for the 'barcode' field from 'Translate' to 'Copy'.
However, we also clarified that WPML does not have a native feature to automatically update the custom fields for already translated products. We suggested that the client could use the Bulk Update option by selecting all products in the source language from the admin listing, using bulk edit, and then 'Update' without making any changes. This action should trigger WPML filters to synchronize custom fields from the source to the target language.
We provided a reference to a forum topic for further assistance: https://wpml.org/forums/topic/need-to-synchronize-the-custom-field-of-an-attribute-wc/

If you still need assistance, please open a new support ticket: https://wpml.org/forums/forum/english-support/

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: 

This topic contains 3 replies, has 3 voices.

Last updated by Waqas Bin Hasan 9 months, 1 week ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 12, 2024 at 7:59 am #15291183

Logothetis

hi,
i add products in my woocommerce site with xml, in greek language . then i translated all products to bulgarian language. Now there is a need for barcode field. i added it to xml so the greek products now have the field barcode with a value ( number). I try to find a way to update the same field in bulgarian products. there are a lot of products so i cant update them one by one.

February 12, 2024 at 12:01 pm #15292967

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

Welcome to the WPML support forum. Thanks for contacting us.

We are currently handling a high amount of ticket and while waiting for one of my colleagues to help with this ticket, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

Could you please specify if the barcode field should have the exact same value in the Greek and Bulgarian or if they have different values?

If they should have the same value, then please go to "WPML > Settings > Custom field translations" and change the translation preference for the field "barcode" from "Translate" to "Copy".

February 12, 2024 at 12:40 pm #15293186

Logothetis

hi. They should have the same value, so i changed the barcode field from translate to copy. does it means that the allready translated products will be updated ?

February 13, 2024 at 7:05 am #15295667

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support. I am assigned this ticket and 'll try my best to help you further.

Unfortunately, we don't have a native feature for this and therefore it's not possible to achieve it without custom code. When the fields are created, there is a setting to adjust the translation preference, but if you change the setting later on, you need to edit each post in default language and update accordingly.

However, you can try the following method too:

For custom fields, you can always update the associated post type in bulk by using the Bulk Update option from the source language post type admin listing. Select all posts, use bulk edit, and then "Update" without doing any changes. This should trigger our filters to sync custom fields on update of the **source language** product/post type.

Just try out a few post types as a test.

Remember that it will sync FROM the source language TO the target language and never the reverse direction.

For example: hidden link

Ref: https://wpml.org/forums/topic/need-to-synchronize-the-custom-field-of-an-attribute-wc/

I hope this 'll help you achieve the results.

Regards.

February 13, 2024 at 10:41 am #15296794

Logothetis

thank you for your help.