Skip Navigation

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

Problem:
The client is experiencing a PHP error related to WooCommerce, indicating that the function

_load_textdomain_just_in_time

was called incorrectly, suggesting that translation loading for the WooCommerce domain was triggered too early.

Solution:
We recommend updating all plugins to their latest versions, as this issue has been addressed in recent updates of WooCommerce, WPML, and other popular plugins. Before updating, please ensure to take a full backup of your website and database. It is highly advised to perform these updates on a staging or development site first to avoid compromising your live website.

If you encounter a fatal error during the update, try disabling all other plugins except for WPML and WooCommerce to check if the error persists. If the issue continues, please provide us with more details, and we will assist you further.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable 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 further assistance is needed, 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 1 reply, has 0 voices.

Last updated by Waqas Bin Hasan 1 week, 1 day ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 18, 2025 at 12:53 am #16716726

johnH-47

<b>Background of the issue: </b>
I'm trying to resolve a PHP error related to WooCommerce. The error log states: Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ for more information. (This message was added in version 6.7.0.) in /home/at2x74b09u7k/staging.abmxray.com/wp-includes/functions.php on line 6114. I have a staging site if you want to play with it.

<b>Symptoms: </b>
I'm encountering a PHP error log indicating that the function _load_textdomain_just_in_time was called incorrectly, suggesting that translation loading for the woocommerce domain was triggered too early.

<b>Questions: </b>
Know how to fix this?
Note: I'm not updating because doing so causes a fatal error

February 18, 2025 at 12:18 pm #16718709

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting the support.

Since WP 6.7, translations should be loaded after WP init hook.

This issue has been reported to several times. The only solution is to update the plugins to the latest versions.

WooCommerce, WPML and several other popular plugins and themes have fixed this issue in their newer versions. Since you're using latest WooCommerce while the error is still pointing to the WooCommerce, that's probably coming from another plugin (either outdated or hasn't been released a fix yet).

For now, I'll again recommend updating WPML to the latest versions. Please take full backup of your website and database beforehand. It is highly advised to try this on a staging/dev site first, so your live website isn't compromised.

I'm not sure what other fatal error you're referring to. However, you can try the above mentioned with only WPML and WooCommerce plugins enabled (while others are inactive), to ensure if that fatal error is really coming from WPML. In this case, please feel free to let me know the details and I'll try my best to help you accordingly.

Regards.