Merge pull request #18420 from tiagohillebrandt/master
Use table format as default.
This commit is contained in:
commit
4586eadcd7
|
@ -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'] ) {
|
||||
|
|
Loading…
Reference in New Issue