Merge pull request #12815 from woocommerce/fix-tool-command-notice

Fix notice that displays when activating WC via the command-line.
This commit is contained in:
Claudio Sanches 2017-01-13 22:52:33 -02:00 committed by GitHub
commit a5055ec2cf
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ class WC_CLI_Tool_Command {
$request = new WP_REST_Request( 'OPTIONS', '/wc/v1/system_status/tools' );
$response = $wp_rest_server->dispatch( $request );
$response_data = $response->get_data();
if ( empty( $response_data ) ) {
return;
}
$parent = "wc tool";
$supported_commands = array( 'list', 'run' );