update logic
This commit is contained in:
parent
5d4ff86e55
commit
a183b84b43
|
@ -79,18 +79,19 @@ function do_install_woocommerce() {
|
|||
woocommerce_compile_less_styles();
|
||||
|
||||
}
|
||||
|
||||
// Update version
|
||||
update_option( 'woocommerce_version', $woocommerce->version );
|
||||
|
||||
// Queue upgrades
|
||||
$current_version = get_option( 'woocommerce_version', null );
|
||||
$current_db_version = get_option( 'woocommerce_db_version', null );
|
||||
|
||||
if ( version_compare( $current_db_version, '1.7', '<' ) && null !== $current_db_version ) {
|
||||
if ( version_compare( $current_db_version, '1.7', '<' ) && null !== $current_version ) {
|
||||
update_option( 'woocommerce_needs_update', 1 );
|
||||
} else {
|
||||
update_option( 'woocommerce_db_version', $woocommerce->version );
|
||||
}
|
||||
|
||||
// Update version
|
||||
update_option( 'woocommerce_version', $woocommerce->version );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue