diff --git a/includes/CLI.php b/includes/CLI.php index 823b3fe..da0d710 100644 --- a/includes/CLI.php +++ b/includes/CLI.php @@ -115,6 +115,10 @@ function () use ( $progress ) { $execution_time = round( ( $time_end - $time_start ), 2 ); $display_time = $execution_time < 60 ? $execution_time . ' seconds' : human_time_diff( $time_start, $time_end ); + if ( $generated === 0 && $amount > 0 ) { + WP_CLI::error( 'No orders were generated. Make sure there are published products in your store.' ); + } + WP_CLI::success( $generated . ' orders generated in ' . $display_time ); }