Use table format as default.

This commit is contained in:
Tiago Hillebrandt 2018-01-10 22:32:40 -02:00
parent a94ef8dcdc
commit 8c4a0dfefe
1 changed files with 4 additions and 0 deletions

View File

@ -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'] ) {