-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Title:
_load_textdomain_just_in_time called too early – triggers notice in WP 6.8
Describe the bug
After updating WordPress to version 6.8, the following notice appears when using the Cloudinary plugin:
Notice: Function _load_textdomain_just_in_time was called incorrectly.
Translation loading for the cloudinary 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 /application/www/wp/wp-includes/functions.php on line 6121
Steps to reproduce
- Update to WordPress 6.8.
- Enable
WP_DEBUG. - Activate and use the Cloudinary plugin.
- The notice appears immediately on load.
Expected behavior
Translations should be loaded later in the WordPress lifecycle (e.g., during the init action) to comply with changes introduced in WordPress 6.7+.
Environment:
- WordPress version: 6.8
- Cloudinary plugin version: 3.2.7
- PHP version: 8.2
Additional context
The issue is caused by calling load_plugin_textdomain() too early. Since WP 6.7, loading translation domains before the init hook results in a warning.