From e0de059f235f517dd046c15ad6721f40f6bd9934 Mon Sep 17 00:00:00 2001 From: vedanshujain Date: Thu, 4 Jun 2020 22:38:13 +0530 Subject: [PATCH] Use seperate db version to better track changes --- includes/class-wc-install.php | 2 +- includes/class-woocommerce.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 4173fe5bbd8..f3f0a6b7e45 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -335,7 +335,7 @@ class WC_Install { if ( $modify_notice ) { WC_Admin_Notices::remove_notice( 'base_tables_missing' ); } - update_option( 'woocommerce_schema_version', WC()->version ); + update_option( 'woocommerce_schema_version', WC()->db_version ); delete_option( 'woocommerce_schema_missing_tables' ); } return $missing_tables; diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index 6b1b3334185..467b66b9b70 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -22,6 +22,15 @@ final class WooCommerce { */ public $version = '4.3.0'; + /** + * WooCommerce Schema version. + * + * @since 4.3 started with version string 430. + * + * @var string + */ + public $db_version = '430'; + /** * The single instance of the class. *