We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bfad0 commit a547916Copy full SHA for a547916
includes/CLI.php
@@ -81,6 +81,14 @@ public static function orders( $args, $assoc_args ) {
81
$amount = 100;
82
}
83
84
+ if ( ! empty( $assoc_args['status'] ) ) {
85
+ $status = $assoc_args['status'];
86
+ if ( ! wc_is_order_status( 'wc-' . $status ) ) {
87
+ WP_CLI::log( "The argument \"$status\" is not a valid order status." );
88
+ return;
89
+ }
90
91
+
92
if ( $amount > 0 ) {
93
$progress = \WP_CLI\Utils\make_progress_bar( 'Generating orders', $amount );
94
for ( $i = 1; $i <= $amount; $i++ ) {
0 commit comments