WP CLI commands are disabled
-
There is a function in the plugin.php
__construct
method forcheck_if_blocksy_is_activated()
, and at the top of that function is a check to see if the request is coming from WPCLI:public function check_if_blocksy_is_activated() { if (defined('WP_CLI') && WP_CLI) { return false; }
When coming from WPCLI, the check fails, which then fails to run the following init hook, which includes the loading of the WPCLI commands:
// Fails here, does not continue. if (! $this->check_if_blocksy_is_activated()) { return; } $this->early_init_with_blocksy_theme(); // This init loads the WPCLI commands, but is never reached. add_action('init', [$this, 'init'], 0);
Commenting out the
if (defined('WP_CLI')...
code then allows the WP CLI commands to be registered and available to use. I would recommend this snippet get removed, and then also add annotations for how the WP CLI commands work.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.