Recurring “_load_textdomain_just_in_time was called incorrect”

Recurring “_load_textdomain_just_in_time was called incorrect”

1 minute, 9 seconds Read

I have a modified plug-in for a non-English client, so I translated a. MO file. Although I charge the textdomain on the “init” hook, the error logs accumulate with the error “_load_textdomain_just_in_time incorrect” error.

My code is so (I have taken out other functions/hooks for the demo)

 * Text Domain: 
 * Domain Path: /languages
 */
namespace ;

class Core {

    public function __construct() {
        add_action('init', [$this, 'init'], 10, 0);
    }

    public function init() {
        load_plugin_textdomain(, false, WP_PLUGIN_DIR . "https://wordpress.stackexchange.com/" . dirname(plugin_basename(__FILE__)) . '/languages');
    }

}
new Core();

As far as I can see, I call the load after ‘init’ and I charge it correctly (load the translation series).

Is it perhaps a problem with “after_setup_theme” not loading properly? It is not my server or theme, so if that is the case, I will have to leave it, but all ideas will be appreciated.

Editing notes: This is not the same as the proposed question function _load_textdomain_just_in_time was called incorrect because the question in that question used the hook “plugins_loaded” to load the Textdomain. I use “Init”, which should take place after “after_setup_theme”. “After_Setup_Theme” is also the hook that is being tested, so I thought it would not be loaded somehow, although I have no idea how that would be possible.

#Recurring #_load_textdomain_just_in_time #called #incorrect

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *