• Resolved royalmicer

    (@royalmicer)


    Hi there,

    I’m running WordPress 6.7.0 and I’ve started seeing the following PHP Notice in my debug log whenever your plugin loads:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. 
    Translation loading for the “<your-textdomain>” domain was triggered too early. 
    Translations should be loaded at the init action or later. 
    (This message was added in version 6.7.0.)  
    in /…/wp-includes/functions.php on line 6121
    

    What’s happening:
    WordPress 6.7 introduced a just-in-time translation loader that expects all calls to load a plugin’s textdomain to occur at or after the init hook. If your code calls _load_textdomain_just_in_time() (or internally triggers translation loading) on plugin-file load, WP throws this notice.

    Why it matters:

    • Early translation loading can lead to missing strings or conflicts with other plugins/themes that haven’t initialized yet.
    • It clutters debug logs, making it harder to spot real errors.

    How to fix:
    Wrap your load_plugin_textdomain() (or equivalent) call in an init callback, for example:

    add_action( 'init', function() {
        load_plugin_textdomain( '<your-textdomain>', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    }, 5 );
    

    This ensures translations are loaded at the correct time in WordPress’s lifecycle.

    I hope this helps! Please let me know if you need any further details.

    Thanks for all your hard work on the plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Taha

    (@tahaamin)

    Hi @royalmicer,

    Thank you for reaching out and for your kind words. I’m sorry to hear about the error message you encountered.

    I’ve forwarded your message to our development team, and we’ll make sure to address this issue in the next release. Thank you for bringing it to our attention—we’ll get back to you soon with an update.

    Best regards,

    Plugin Author Algoritmika

    (@algoritmika)

    Hi, @royalmicer,

    Thank you for pointing it out. Please update the plugin to the latest v5.4.6 and let me know if the issue is resolved.

    Thread Starter royalmicer

    (@royalmicer)

    Thank you for the fast action taken, I have updated and seems all ok now.
    Good service, thank you

    Plugin Author Algoritmika

    (@algoritmika)

    Hi, @royalmicer,

    Happy to hear that it’s fixed 🙂

    Please let me know if you notice anything else.

    And if you like the plugin, please consider leaving me a rating.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Notice: Function _load_textdomain_just_in_time was called incorrectly’ is closed to new replies.