WordPress translation loading error hits thousands of sites overnight

6.7 internationalization improvements trigger widespread notices as plugin developers scramble to update code.

WordPress translation error frustrates developers while proper code implementation succeeds with init hooks and action timing.
WordPress translation error frustrates developers while proper code implementation succeeds with init hooks and action timing.

Over 11,700 WordPress sites are reporting a new error message following recent WordPress updates, impacting major plugins like WooCommerce, Yoast SEO, and Jetpack. The warning, related to translation loading timing, appeared suddenly as websites updated to the latest WordPress version.

The message, "Notice: Function _load_textdomain_just_in_time was called incorrectly," has filled error logs and debug consoles since the WordPress 6.7 release 5 months ago, but saw a dramatic surge in occurrence as WordPress 6.8 rolled out through auto-updates.

WordPress 6.7 introduced significant changes to how translations are handled. The core system now requires plugins and themes to load their translations only after WordPress has fully set up the current user, specifically during or after the 'init' action hook.

According to WordPress core ticket #44937, many plugins have been loading translations prematurely before the user's preferred language settings could be properly established. This practice, while previously tolerated, could lead to users seeing the wrong language in multilingual setups.

Core developer Pascal Birchler spearheaded this improvement to ensure translations work correctly across all site configurations. "If a plugin loads translations too early, a code path as follows will be executed: load_plugin_textdomain (or _load_textdomain_just_in_time) → load_textdomain → determine_locale → get_user_locale → wp_get_current_user → wp_set_current_user," Birchler explained in the ticket discussion.

SPONSORED
CTA Image

Want to reach marketing professionals and decision-makers? Showcase your brand, tools, or services with our sponsored content opportunities.

Advertise Now

Widespread impact across the plugin ecosystem

The issue affects numerous popular plugins, even those from major developers. Social media posts show thousands of site owners encountering the error, with new Google search results for the exact error phrase increasing daily.

Satinder Singh, co-founder of Cool Plugins, highlighted the scale of the problem on social media: "Thousands of WordPress sites are showing this error after the 6.8 auto-update. Just checked Google — thousands of results indexed in the last 24 hours with that error."

User reports indicate the errors appear with multiple plugins simultaneously, creating a cascade of notices that can overwhelm error logs. One site administrator reported seeing warnings from three different plugins after a minimal WordPress 6.8 installation.

Technical details of the requirement

The core issue involves the timing of translation loading in WordPress's initialization sequence. Plugins that call translation functions outside of appropriate action hooks are now flagged with a warning.

WordPress developer Threadi explained in a support forum: "These PHP notices appear because some of your plugins are not compatible with changes in WordPress 6.7.x. To solve this you can install all pending updates, disable the output of PHP notices, downgrade to WordPress 6.2.2, or simply wait until the plugin developers make changes."

Initially, WordPress 6.7.0 displayed warnings for all early translation loading, but this created excessive noise as almost every plugin using standard translation functions triggered the warning. In WordPress 6.7.1, the approach was refined to reduce unnecessary warnings while maintaining the important signal about improper loading patterns.

How developers can fix the issue

The solution for plugin and theme developers is straightforward but requires code changes. Instead of loading translations directly in the plugin's global scope, developers must defer loading until WordPress signals it's ready.

Correct implementation involves hooking translation loading to the 'init' action:

add_action('init', function() {
    load_plugin_textdomain('my-plugin', false, dirname(plugin_basename(__FILE__)) . '/languages');
});

For theme developers, the 'after_setup_theme' hook is also acceptable.

Options for WordPress site administrators

Website owners facing these errors have several options:

  1. Update affected plugins to their latest versions
  2. Disable PHP notice display in WordPress configuration
  3. Implement a temporary workaround using a must-use plugin
  4. Wait for plugin developers to release updates

For those needing an immediate solution, developer Kishore Sahoo published a simple must-use plugin that filters out these specific warnings without hiding other important notices:

add_filter('doing_it_wrong_trigger_error', function($doing_it_wrong, $function_name) {
    if ('_load_textdomain_just_in_time' === $function_name) {
        return false;
    }
    return $doing_it_wrong;
}, 10, 2);

Why this matters for marketers

For marketing professionals managing WordPress sites, these translation loading warnings represent both a challenge and an opportunity. While the errors don't directly impact site functionality for most users, they signal important shifts in WordPress development practices that could affect future compatibility.

Marketing teams relying on WordPress for content delivery should ensure their development partners are aware of these changes. The internationalization improvements actually strengthen WordPress's capabilities for global audiences, potentially enhancing reach for marketing campaigns targeting multiple language markets.

Additionally, the error logs generated by these notices could potentially mask more serious issues. Marketing teams monitoring site performance should work with their technical teams to address these warnings properly rather than simply suppressing them.

Timeline of WordPress translation changes

  • October 21, 2023: WordPress core team announces internationalization improvements planned for 6.7
  • November 12, 2023: WordPress 6.7.0 released with initial implementation of translation loading warnings
  • November 26, 2023: WordPress 6.7.1 released with refined approach to reduce excessive warnings
  • April 16, 2024: WordPress 6.8 released with auto-update enabled, triggering widespread notices
  • April 17, 2024: Thousands of Google search results appear for the specific error message
  • Present: Plugin developers continue releasing updates to conform to the new standards

As the WordPress ecosystem adapts to these translation loading requirements, the temporary flood of warnings is expected to subside. In the meantime, site administrators should work with their development teams to ensure all plugins follow WordPress best practices to avoid future compatibility issues.