Merge pull request #1691 from thenbrent/master

Don't run data upgrade on first install
This commit is contained in:
Mike Jolley 2012-11-06 01:49:40 -08:00
commit c4e4ccf398
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 );
// 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 );
} else {
update_option( 'woocommerce_db_version', $woocommerce->version );