Skip to content Skip to sidebar

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

Problem:

You are experiencing a translation issue on your WooCommerce frontend after updating to WordPress 6.7, despite implementing a fix from a Git repository.

Solution:

We recommend following these steps to address the issue:

1) Navigate to WPML>>Settings>>Custom XML Configuration.
2) Insert the following language configuration code in the Custom XML Configuration editor and save:

<wpml-config>
  <elementor-widgets>
    <widget name="pp-woo-cart">
      <fields>
        <field>update_cart_button_text</field>
        <field>apply_coupon_button_text</field>
        <field>totals_section_title</field>
        <field>update_shipping_button_text</field>
        <field>checkout_button_text</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

3) Visit the frontend.
4) Go to WPML>>String Translation and translate the strings, then visit the cart page.

Ensure to perform a full site backup before applying these changes. If necessary, adjust the language of the strings to English or add strings for the Cart page in German using the PowerPack Pro widget, as detailed in our guide on how to change the source language of strings.

If this solution does not resolve your issue or seems outdated, please check our related known issues 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 for further assistance.

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

Last updated by Bigul 9 months ago.

Assisted by: Bigul.

Author Posts
November 19, 2024 at 2:08 pm #16420185

jenK-2

Background of the issue:
I am trying to fix a translation issue on my WooCommerce frontend after updating to WordPress 6.7. I have implemented a fix from a Git repository, but it did not resolve the issue.

Symptoms:
My frontend WooCommerce translation is broken after updating to WordPress 6.7.

Questions:
Is this issue part of the known issue described here: https://wpml.org/errata/missing-translations-on-front-end/?
Is the issue I am experiencing the same as described in the documentation?

November 19, 2024 at 5:45 pm #16420960

Bigul

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

This may be related to this errata - https://wpml.org/errata/missing-translations-on-front-end/ and expected to fix in upcoming WordPress 6.7.1 version.

Please try the workaround suggested in the following ticket after a full site backup and make sure the bug existing or not.

https://core.trac.wordpress.org/ticket/62337#comment:19

--
Thanks!

Bigul

November 19, 2024 at 6:16 pm #16421002

jenK-2

Hi

Can you assist me a little further.

I need to paste this entirely in my functions.php file of the Elementor child theme?
Or do I need changes on this snippet.

add_action('after_setup_theme', function() {
load_theme_textdomain('our_theme_name_domain', get_template_directory() . '/languages');

add_action('init', function() {
global $l10n, $wp_textdomain_registry;
$domain = 'our_theme_name_domain';
$locale = get_locale();
$wp_textdomain_registry->set($domain, $locale, get_template_directory() . '/languages');
if ( isset( $l10n[ $domain ] )) {
unset( $l10n[ $domain ] );
}
load_theme_textdomain($domain, get_template_directory() . '/languages');
});

November 20, 2024 at 3:09 am #16422165

Bigul

Hello,

Thank you for the updates. Please add the following code in functions.php of your child theme after a full site backup as a workaround for now.

add_action('init', function() {
  global $l10n, $wp_textdomain_registry;
  //Use your theme domain name here
  $domain = 'our_theme_name_domain';
  $locale = get_locale();
  $wp_textdomain_registry->set($domain, $locale, get_template_directory() . '/languages');
  if ( isset( $l10n[ $domain ] )) {
    unset( $l10n[ $domain ] );
  }
  load_theme_textdomain($domain, get_template_directory() . '/languages');
});

--
Thanks!

Bigul

November 20, 2024 at 8:27 am #16422857

jenK-2

Hi,

Unfortunately this does not fix the issue. Cart text remains untranslated.

Thanks

November 20, 2024 at 8:34 am #16422947

jenK-2

About the snippet: theme domain name:
I changed this value to my theme name, I hope this was right? Tried several options, but none of them worked.

November 20, 2024 at 11:53 am #16424344

Bigul

Hello,

Thank you for the updates. We kindly request you to wait for one more day as the release of WordPress 6.7.1 is expected tomorrow. This update includes a fix for the bug. Thank you for your understanding.

--
Thanks!

Bigul

November 24, 2024 at 1:15 pm #16437070

jenK-2

Hi

Unfortunately, the WordPress update does not fix the issue.
Can you assist further please?

Kind regards
Jen

November 25, 2024 at 10:37 am #16439189

Bigul

Hi Jen,

Thank you for the feedback. I am consulting with our developers for an expert opinion. We will get back to you soon. Please wait and refer to the following errata for more details.

https://wpml.org/errata/missing-translations-on-front-end/

https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/

--
Thanks!

Bigul

November 26, 2024 at 12:30 pm #16444619

jenK-2

Hi

Thanks, have you heard any feedback yet?

Thanks

November 27, 2024 at 11:05 am #16448763

Bigul

Hi Jen,

Our developers are still working on this bug. We will get back to you as soon as possible. Thank you for being so patient. Please wait.

--
Thanks!

Bigul

December 2, 2024 at 7:35 pm #16468258

jenK-2

Hi

Since there is not yet a solution available: what will be the WPML timeframe for looking at the issue? The issue has been reported 14 days ago.

Thanks, Jen

December 3, 2024 at 7:44 am #16469646

Bigul

Hi Jen,

Sorry for the late response. One request. We have released a new version of WPML String Translation (3.2.16). It has included the fixes for similar issues. So please upgrade to the latest version after a full site backup and clear all types of caches. Then make sure the bug exists or not.

You may have to visit the Plugins>>Add New>> Commercial tab and click on the *Check for updates* button to get the WPML automatic upgrade links for the latest version. This step will help us refresh the installer caches.

--
Thanks!

Bigul

December 3, 2024 at 7:14 pm #16473506

jenK-2

Hi

I have updated String Translation. Unfortunately the cart translation is still not applied.

Thanks

Jen

December 4, 2024 at 6:47 am #16474442

Bigul

Hi Jen,

Thank you for the updates. A few requests for tracking the issue.

1) Please share the exact steps to reproduce the bug on your site. It would be great if you could share a screencast or a couple of screenshots for a better understanding.

2) Please fill in the private details fields after a full site backup. I would like to access the admin area of your site to check further. Refer to the following links for more details about our private information sharing policies.

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

hidden link

3) Please allow me to make a duplicator copy of your site using the Duplicator plugin (https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the issue without affecting your live site.

--
Thanks!

Bigul