Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 -
- 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 -

Supporter timezone: Europe/Vienna (GMT+01:00)

Tagged: 

This topic contains 6 replies, has 0 voices.

Last updated by Bigul 4 days 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
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

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
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

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
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

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