diff --git a/includes/cli/class-wc-cli-rest-command.php b/includes/cli/class-wc-cli-rest-command.php index be2a050835d..9a5adca6fb9 100644 --- a/includes/cli/class-wc-cli-rest-command.php +++ b/includes/cli/class-wc-cli-rest-command.php @@ -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'] ) {