-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed as not planned
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
In a object cache (object-cache.php) drop-in, any do_hook and 'when' are not executed.
function foo() {
echo 'hello' . PHP_EOL;
}
WP_CLI::add_command( 'bar', 'foo', array( 'when' => 'run_this_early' ) );
WP_CLI::do_hook( 'run_this_early' );Describe what you expect as the correct outcome
It should run the callback of the command where the do_hook is, but instead it won't but load the rest of WP
Let us know what environment you are running this on
WP CLI 2.12.0