Skip Navigation

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

Problem:
After updating to WPML 4.6.14 and WordPress 6.7, translations for standard WooCommerce fields such as the 'Add to cart' button, checkout fields, labels, and notifications are missing. Rolling back to WordPress 6.6.2 resolved the issue, suggesting a compatibility problem with the theme's outdated code for loading text domains.

Solution:
If you're experiencing missing translations after a WPML update, we recommend the following steps:
1. Ensure that WooCommerce is updated to the latest version.
2. Deactivate WooCommerce and then reactivate it.
3. Clear all caches on your site.
Additionally, check your theme's code for loading text domains. Replace:

load_theme_textdomain('YOURTEXTDOMAIN', get_template_directory() . '/languages');

with:

load_textdomain('YOURTEXTDOMAIN', get_template_directory() . '/languages/' . determine_locale() . '.mo');

Please remember to take a full backup of your website and database before making these changes.

If these steps do not resolve your issue, or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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 0 replies, has 1 voice.

Last updated by janH-16 5 days, 10 hours ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 13, 2024 at 10:10 am #16396447

morteF

Background of the issue: ...
I was trying to maintain translations on my Woocommerce site after updating to WPML 4.6.14 and WordPress 6.7. The issue can be seen at hidden link.

Symptoms:
Translations are suddenly missing for standard Woocommerce fields, including the 'Add to cart button', checkout fields and labels, and Woocommerce notifications. This issue started after the WPML update.

Questions:
Why are translations missing after the WPML update?
How can I restore the missing translations for Woocommerce fields?

November 13, 2024 at 10:43 am #16396658

morteF

How will I send the backup to you?

November 13, 2024 at 10:44 am #16396661

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Hi,

Reference to our recent chat, please provide the duplicator package of your site, or, temporary access (WP-Admin and FTP) for a detailed investigation, preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely. Please fill in whatever is suitable or you want to share.

Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss, in case you're providing a temporary access.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

Regards.

November 13, 2024 at 10:57 am #16396694

morteF

Hi again: I tried the following:

I rescanned Woocommerce in string translations and now all of the strings have re-appeared in the backend in all languages (I see little pencils next to all the missing strings).

They are still not visible in the frontend however!

If I access one of the strings in string translation, the old translation will appear, and save. Then it will appear in the frontend.

I'm not going to do the above for 8000 standard strings in Woocommerce (whatever else might be missing translations now).

Is there a way to mass save all strings?

udklip5.JPG
udklip6.JPG
November 13, 2024 at 11:06 am #16396768

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates.

As discussed earlier, unfortunately there's no way of updating all translations in bulk without resending for translations (or manually updating, as you noted).

That's why our team requested for a site package or a test/staging site where this issue can be observed and investigated.

We'll try our best to reflect on the matter on priority basis.

Your next answer will be private, to share this information safely. Please fill in whatever is suitable or you want to share.

November 13, 2024 at 11:56 am #16397040

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates.

Meanwhile I'm downloading and checking with the package, can you check the following quickly in your site?

IMPORTANT: Please take full backup of your website and database beforehand. 

- Make sure WooCommerce is updated to latest version.
- Deactivate Woocommerce and activate again.
- Clear all caches and check again.

Please let me know, thanks.

November 13, 2024 at 1:39 pm #16397907

morteF

I've rolle back to WordPress 6.6.2, and the problem have been resolved.

I suspect the following:
The theme is the problem. The following is no longer supported, but still contained in the theme I'm using:

load_theme_textdomain( 'YOURTEXTDOMAIN', get_template_directory() . '/languages' );

This is correct:
load_textdomain( 'YOURTEXTDOMAIN', get_template_directory() . '/languages/' . determine_locale() . '.mo' );

Thank you for your help.

November 14, 2024 at 9:05 am #16401319

janH-16

This issue is actually caused by a mistake in WordPress core where translations file are not loaded correctly anymore. See the ticket 62337 in WordPress Core Trac for more information: https://core.trac.wordpress.org/ticket/62337.

The issue should be solved in WordPress 6.7.1, according to this ticket.