Skip to content

Commit 39ffaf4

Browse files
Copilotmehul0810
andcommitted
Move load_plugin_textdomain to plugins_loaded hook to fix WordPress 6.7.0+ warning
Co-authored-by: mehul0810 <[email protected]>
1 parent f493de1 commit 39ffaf4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public function register() {
3030
register_activation_hook( PERFORM_PLUGIN_FILE, [ $this, 'activate' ] );
3131
register_deactivation_hook( PERFORM_PLUGIN_FILE, [ $this, 'deactivate' ] );
3232

33-
// Register services used throughout the plugin.
34-
add_action( 'plugins_loaded', [ $this, 'register_services' ] );
35-
3633
// Load text domain.
37-
add_action( 'init', [ $this, 'load_plugin_textdomain' ] );
34+
add_action( 'plugins_loaded', [ $this, 'load_plugin_textdomain' ], 9 );
35+
36+
// Register services used throughout the plugin.
37+
add_action( 'plugins_loaded', [ $this, 'register_services' ], 10 );
3838
}
3939

4040
/**

0 commit comments

Comments
 (0)