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

This commit is contained in:
Gerhard 2019-05-09 11:24:49 +02:00
parent 380ff713c2
commit c633c46045
1 changed files with 2 additions and 0 deletions

View File

@ -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;