From 9dc38fcee0b759396fa72342f61691f068e3bce1 Mon Sep 17 00:00:00 2001 From: Justin Shreve Date: Fri, 13 Jan 2017 10:47:10 -0800 Subject: [PATCH] Fix notice that displays when activating WC via the command-line. --- includes/cli/class-wc-cli-tool-command.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/cli/class-wc-cli-tool-command.php b/includes/cli/class-wc-cli-tool-command.php index 30b2f7c77b6..745688d7321 100644 --- a/includes/cli/class-wc-cli-tool-command.php +++ b/includes/cli/class-wc-cli-tool-command.php @@ -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' );