From 147a7f9419f9f9291375bf779b7eee30153c8e8a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 14 Aug 2017 10:45:44 +0100 Subject: [PATCH] Switch CLI tools command over to v2 API Closes #16432 --- includes/cli/class-wc-cli-tool-command.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/cli/class-wc-cli-tool-command.php b/includes/cli/class-wc-cli-tool-command.php index f2859cd4b12..5c91585d42a 100644 --- a/includes/cli/class-wc-cli-tool-command.php +++ b/includes/cli/class-wc-cli-tool-command.php @@ -23,7 +23,7 @@ class WC_CLI_Tool_Command { public static function register_commands() { global $wp_rest_server; - $request = new WP_REST_Request( 'OPTIONS', '/wc/v1/system_status/tools' ); + $request = new WP_REST_Request( 'OPTIONS', '/wc/v2/system_status/tools' ); $response = $wp_rest_server->dispatch( $request ); $response_data = $response->get_data(); if ( empty( $response_data ) ) { @@ -42,7 +42,7 @@ class WC_CLI_Tool_Command { 'optional' => false, ); $method = 'update_item'; - $route = '/wc/v1/system_status/tools/(?P[\w-]+)'; + $route = '/wc/v2/system_status/tools/(?P[\w-]+)'; } elseif ( 'list' === $command ) { $synopsis[] = array( 'name' => 'fields', @@ -75,7 +75,7 @@ class WC_CLI_Tool_Command { ), ); $method = 'list_items'; - $route = '/wc/v1/system_status/tools'; + $route = '/wc/v2/system_status/tools'; } $before_invoke = null;