From 6eca1ed56124ffccfb084cb3f28243ddff4d43f2 Mon Sep 17 00:00:00 2001 From: Vedanshu Jain Date: Thu, 6 Apr 2023 15:14:06 +0530 Subject: [PATCH] Prevent errors from being logged twice when verbose is passed. --- .../src/Database/Migrations/CustomOrderTable/CLIRunner.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php b/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php index 4393ffc9b26..2a210e453a9 100644 --- a/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php +++ b/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php @@ -294,7 +294,7 @@ class CLIRunner { * default: -1 * --- * - * [--verbose=] + * [--verbose] * : Whether to output errors as they happen in batch, or output them all together at the end. * --- * default: false @@ -425,6 +425,9 @@ class CLIRunner { ) ); } else { + if ( $verbose ) { + return; + } $errors = print_r( $failed_ids, true ); return WP_CLI::error(