Skip to content

_load_textdomain_just_in_time called too early – triggers notice in WP 6.8 #1038

@RomanZhakhovTR

Description

@RomanZhakhovTR

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

  1. Update to WordPress 6.8.
  2. Enable WP_DEBUG.
  3. Activate and use the Cloudinary plugin.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions