Use update_option instead of delete_option + add_option (https://github.com/woocommerce/woocommerce-admin/pull/8421)

This commit is contained in:
Moon 2022-03-07 17:58:51 -08:00 committed by GitHub
parent 834307e155
commit 1860aeba28
1 changed files with 1 additions and 2 deletions

View File

@ -514,8 +514,7 @@ class Install {
* @param string|null $version New WooCommerce Admin DB version or null.
*/
public static function update_db_version( $version = null ) {
delete_option( self::VERSION_OPTION );
add_option( self::VERSION_OPTION, is_null( $version ) ? WC_ADMIN_VERSION_NUMBER : $version );
update_option( self::VERSION_OPTION, is_null( $version ) ? WC_ADMIN_VERSION_NUMBER : $version );
}
/**