• Resolved anbumz

    (@anbumz)


    Hi there, you deleted my comment on the same issue in this support forum which you marked solved although it persists:

    Please update your plugin code to get rid of the PHP error notice in the WordPress debugging log as follows:

    function imagify_load_translations() {
    static $done = false;

    if ( $done ) {
        return;
    }
    
    $done = true;
    
    // Load translations after the 'init' action
    add_action('init', function() {
        load_plugin_textdomain( 'imagify', false, dirname( plugin_basename( IMAGIFY_FILE ) ) . '/languages/' );
    });

    }

    You are welcome.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP Media

    (@wp_media)

    Hey @anbumz

    Thanks for your initiative.

    I have created GitHub issue and our developers will take a closer look at it. Is there any chance to give me exact PHP notice message you get?

    Best Regards
    Marko

    Thread Starter anbumz

    (@anbumz)

    This was the error notice:
    [1024] Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the imagify 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

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

The topic ‘Error notice _load_textdomain_just_in_time’ is closed to new replies.