After upgrade WordPress 6.7

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the x 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 Debugging in WordPress for more information. (This message was added in version 6.7.0.) in wp-includes/functions.php on line 6114

Hey @WPIDev,

Thanks for reaching out!

I updated my local environment, and I don’t see the issue you’re experiencing. Maybe one of your plugins is causing the issue. With that said, I highly recommend that you try disabling your plugins one by one to find the culprit.

Hope that helps.

Have you enabled debug mode? https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/

Despite deactivating all the plugins, the error message still appears.

From what I have read, it seems the last WordPress update to 6.7 out of a sudden removed a filter hook called plugin_locale.

It seems many many plugin and theme developers are using this hook like Yoast SEO or WooCommerce.

You find lots of these errors on the WordPress forums and Reddit since yesterday.

As far as I understood, every plugin and theme developer has to adopt the code. I have a customer with a German shop that is displaying everything in English now in the frontend. Also, the emails that are sent by WooCommerce are all English now.

If your website language is in English, there should be no problem. You can hide the message with WordPress Debug settings in wp-config.

Really don’t know how this happend – lack of communication by WordPress I guess.
That is not a nice one :frowning: I’m currently researching how to do a proper WordPress Core roll back.

I have a whole bunch of websites suddenly breaking on me because of this error. Spending my Friday afternoon doing manual WP Core updates by FTP :frowning: This break sucks.

Yes, it sucks :frowning:

@marc_a From what I can see in my error logs, Themeco is also affected. I think this error message belongs to Themeco what @WPIDev in the OP already stated:

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the __x__ 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 Debugging in WordPress for more information. (This message was added in version 6.7.0.)

2 Likes

Hi @raye, you’re right, the issue impacted several plugins and themes.

There’s some ongoing discussion about it here:

@ChrisDeBruyne, if you’re familiar with WP CLI, you can easily roll back to an earlier WordPress version. Here’s a guide for that: WP CLI Core Update Command.

I recommend disabling automatic updates on live websites to avoid future issues.

2 Likes

Thanks for the info everybody. Let’s see if 6.7.1 handles this issue. It might be a pretty large change on our end to comply with this. I also don’t see the warnings if anybody knows how to trigger this?

1 Like

@charlie it seems this is all language related. So maybe you need to change the language in the settings of WordPress to something different than english?

1 Like

Thanks Raye. Yes that was my issue with recreating it.

This is more related to this article:

If you use something like get_plugin_data it could also trigger this notice, you should set translate parameter to false!

Like

/**
 * Plugin Name: Awesome Plugin
 */

function myplugin_get_version() {
	require_once ABSPATH . 'wp-admin/includes/plugin.php';
	// Prevent early translation call by setting $translate to false.
	$plugin_data = get_plugin_data( __FILE__, false, /* $translate */ false );
	return $plugin_data['Version'];
}

define( 'MYPLUGIN_VERSION', myplugin_get_version() );

Hope this helps