When no per_page is defined for list wp-cli command default to displaying all items as per the wp-cli standard.
This commit is contained in:
parent
cdb8cf86af
commit
1f2468ca3e
|
@ -223,6 +223,10 @@ class WC_CLI_REST_Command {
|
|||
$assoc_args['format'] = 'table';
|
||||
}
|
||||
|
||||
if ( empty( $assoc_args['per_page'] ) ) {
|
||||
$assoc_args['per_page'] = '-1';
|
||||
}
|
||||
|
||||
if ( ! empty( $assoc_args['format'] ) && 'count' === $assoc_args['format'] ) {
|
||||
echo (int) $headers['X-WP-Total'];
|
||||
} elseif ( 'headers' === $assoc_args['format'] ) {
|
||||
|
|
Loading…
Reference in New Issue