Merge pull request #18420 from tiagohillebrandt/master

Use table format as default.
This commit is contained in:
Claudio Sanches 2018-01-11 12:29:29 -02:00 committed by GitHub
commit 4586eadcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 ( empty( $assoc_args['format'] ) ) {
$assoc_args['format'] = 'table';
}
if ( 'headers' === $assoc_args['format'] ) {
echo json_encode( $headers );
} elseif ( 'body' === $assoc_args['format'] ) {