Skip to content

Commit 1f3cf94

Browse files
author
Jeremy Ward
committed
Register cli_init action on plugins_loaded at beginning of Runner::start process.
1 parent 56e2b61 commit 1f3cf94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

php/WP_CLI/Runner.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,9 @@ private function set_alias( $alias ) {
966966
}
967967

968968
public function start() {
969+
WP_CLI::add_wp_hook( 'plugins_loaded', function () {
970+
do_action( 'cli_init' );
971+
} );
969972

970973
// Enable PHP error reporting to stderr if testing. Will need to be re-enabled after WP loads.
971974
if ( getenv( 'BEHAT_RUN' ) ) {

0 commit comments

Comments
 (0)