diff --git a/includes/cli/class-wc-cli-rest-command.php b/includes/cli/class-wc-cli-rest-command.php index 72a3ef65525..520af32e2f0 100644 --- a/includes/cli/class-wc-cli-rest-command.php +++ b/includes/cli/class-wc-cli-rest-command.php @@ -157,6 +157,10 @@ class WC_CLI_REST_Command { $body = self::limit_item_to_fields( $body, $assoc_args['fields'] ); } + if ( ! isset( $assoc_args['format'] ) ) { + $assoc_args['format'] = 'table'; + } + if ( 'headers' === $assoc_args['format'] ) { echo json_encode( $headers ); } elseif ( 'body' === $assoc_args['format'] ) {