Skip to content

Commit

Permalink
Use table format as default.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagohillebrandt committed Jan 11, 2018
1 parent a94ef8d commit 8c4a0df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/cli/class-wc-cli-rest-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ public function get_item( $args, $assoc_args ) {
$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'] ) {
Expand Down

0 comments on commit 8c4a0df

Please sign in to comment.