Skip Navigation

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

Problem:
You are experiencing issues with a custom checkbox field in WooCommerce products not saving its state across translations. You need the checkbox to be consistent for all languages and editable only for the original product.
Solution:
1) Navigate to WPML-> Settings-> Custom Fields Translation section, search for your fields, and set them to Copy.
2) After setting the fields to copy, update the products in the default language and check if the field values are copied correctly.
3) We also recommend providing your Debug information to help us better understand your site configuration. You can find a detailed explanation on how to provide this information here.

If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket here.

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 6 replies, has 2 voices.

Last updated by Osama Mersal 2 months, 2 weeks ago.

Assisted by: Osama Mersal.

Author Posts
October 11, 2024 at 3:18 pm #16280387

mathiasJ-2

Background of the issue:
I'm having trouble with a custom checkbox field I've added to some of my WooCommerce products via custom code. The checkbox state isn’t saving across translations, and I want it to be consistent for all languages. The checkbox should only be editable for the original product, not for translations.

Symptoms:
The checkbox state isn't saving across translations in WooCommerce products.

Questions:
How can I ensure the checkbox state is consistent across all language translations?
How do I make the checkbox editable only for the original product and not for translations?

October 13, 2024 at 10:43 am #16283035

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply; it was due to a higher workload.

1) Please go to WPML-> Settings-> Custom Fields Translation section, search for your fields, and set them to Copy.

After that, please update the products in the default language and check if the field values are copied correctly.

2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.

Best regards,
Osama

October 21, 2024 at 9:13 am #16311108

mathiasJ-2

Hello,

Thank you for your response.

Unfortunately, your solution didn't resolve the issue. I believe I have correctly configured my custom fields in the WPML settings, but it hasn’t made any difference in the back office. The "base" product and its translations remain unsynchronized.

Could you assist me further in resolving this problem?

BR

October 21, 2024 at 9:15 am #16311131

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

October 21, 2024 at 9:41 am #16311344

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. I checked a hidden link">product.

The custom field was set correctly, but you need to update the product in the default language in order to apply the new translation preference. Please check this hidden link">video.

Kindly let me know if this is the checkbox you need it to be copied.

Best regards,
Osama

October 21, 2024 at 10:02 am #16311453

mathiasJ-2

I don't understand why it's not working when I test it on my side. It might be because I had already manually translated the product you chose to test your solution on.
Could you please try another product ?

You can try this one : Osmium tetroxide waste neutralizer.

Ideally I'd like the field to be "locked" like the on the screenshot below.

Capture d’écran 2024-10-21 à 11.59.45.png
October 21, 2024 at 10:07 am #16311543

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

This field won't be locked because it's a custom field. However, it will be copied from the default language. Kindly check this hidden link">video.

Even if you manually change the translated product checkbox, it will revert to the default language value.

Best regards,
Osama

October 21, 2024 at 10:26 am #16311625

mathiasJ-2

It's working now; I'm not sure what happened earlier.

Thank you, you've been very helpful!

Best regards,