From c633c46045e88a0ee32aaef2f67d2b3f500c7d7b Mon Sep 17 00:00:00 2001 From: Gerhard Date: Thu, 9 May 2019 11:24:49 +0200 Subject: [PATCH] When no update is found then just call WC_Install::update_db_version(); to ensure db version is set to current WC version, same as per WC_Admin_Notices::update_notice --- includes/cli/class-wc-cli-update-command.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/cli/class-wc-cli-update-command.php b/includes/cli/class-wc-cli-update-command.php index 204c188bc5a..b9cfe0525f1 100644 --- a/includes/cli/class-wc-cli-update-command.php +++ b/includes/cli/class-wc-cli-update-command.php @@ -49,6 +49,8 @@ class WC_CLI_Update_Command { } if ( empty( $callbacks_to_run ) ) { + // Ensure DB version is set to the current WC version to match WP-Admin update routine. + WC_Install::update_db_version(); /* translators: %s Database version number */ WP_CLI::success( sprintf( __( 'No updates required. Database version is %s', 'woocommerce' ), get_option( 'woocommerce_db_version' ) ) ); return;