Don't require DB update on first install

This commit is contained in:
Brent Shepherd 2012-11-06 17:23:41 +10:00
parent a8a2eb02f2
commit 9779e25059
1 changed files with 2 additions and 2 deletions

View File

@ -84,9 +84,9 @@ function do_install_woocommerce() {
update_option( 'woocommerce_version', $woocommerce->version ); update_option( 'woocommerce_version', $woocommerce->version );
// Queue upgrades // Queue upgrades
$current_db_version = get_option( 'woocommerce_db_version' ); $current_db_version = get_option( 'woocommerce_db_version', null );
if ( version_compare( $current_db_version, '1.7', '<' ) ) { if ( version_compare( $current_db_version, '1.7', '<' ) && null !== $current_db_version ) {
update_option( 'woocommerce_needs_update', 1 ); update_option( 'woocommerce_needs_update', 1 );
} else { } else {
update_option( 'woocommerce_db_version', $woocommerce->version ); update_option( 'woocommerce_db_version', $woocommerce->version );