Merge pull request #19555 from woocommerce/update/19547-wp-cli-pagination
WP-CLI integration per_page default
This commit is contained in:
commit
35b75b5beb
|
@ -206,6 +206,10 @@ class WC_CLI_REST_Command {
|
|||
$method = 'GET';
|
||||
}
|
||||
|
||||
if ( ! isset( $assoc_args['per_page'] ) || empty( $assoc_args['per_page'] ) ) {
|
||||
$assoc_args['per_page'] = '100';
|
||||
}
|
||||
|
||||
list( $status, $body, $headers ) = $this->do_request( $method, $this->get_filled_route( $args ), $assoc_args );
|
||||
if ( ! empty( $assoc_args['format'] ) && 'ids' === $assoc_args['format'] ) {
|
||||
$items = array_column( $body, 'id' );
|
||||
|
|
Loading…
Reference in New Issue