• Resolved hommealone

    (@hommealone)


    Hi,

    After updating to the latest version of WooCommerce (2.6.4) I am having the following problem:

    I receive the notice: “WooCommerce Data Update – We need to update your store’s database to the latest version. [Run the updater]”

    After I run the updater, I get a message that the update ran successfully. But then within a few page changes, I get the same message again, asking me to run the updater. This loop seems to repeat endlessly.

    What’s up?

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Sounds like this is your problem: https://ww.wp.xz.cn/support/topic/database-only-updating-temporarily

    The problem isn’t coming from WooCommerce core, the lead developer has looked into it thoroughly. So you need to try and find what is changing the database version.

    1) Download your whole website (mainly themes/plugin folders) locally and run a global search for the string woocommerce_db_version. See if there is anything external affecting it that could be running this query.

    2) Add a logging function here on your live site: https://github.com/woothemes/woocommerce/blob/dff1fc84de77d14351c354e6c76a41ed8079ce68/includes/class-wc-install.php#L246. Something like this:

    public static function update_db_version( $version = null ) {
        error_log( 'Something is updating the DB version to ' . $version  );
        delete_option( 'woocommerce_db_version' );
        add_option( 'woocommerce_db_version', is_null( $version ) ? WC()->version : $version );
    }

    This will then add to the log every time that function is called. So run the update again, and then wait for the database version to be reverted. Once it is, take a look at your logs and see if there is a new error log entry for the 2.5.5 update. If there isn’t, then something outside of WooCommerce core is for sure causing this.

    Thread Starter hommealone

    (@hommealone)

    Caleb,

    Thanks you VERY much for your response! I went to the link you referenced, and the last reply that you made on that thread flashed a lightbulb over my head. You wrote:

    Just helped somebody debug this issue, and turned out they had a dev install of WooCommerce on 2.5.5 that still had access to the live site’s database. Worth checking on if your situation may be similar.

    We have recently duplicated our site from a dev server to a Live site, and yes, they were both accessing the same database. I’m betting that you hit the nail on the head.

    I’ve de-activated the WooCommerce plugin on that dev site, then again updated the WooCommerce database from the new live site, and I have my fingers crossed that the problem won’t return; I’ll post back here with the outcome once I know for certain if it sticks this time…

    Thanks again!

    Thread Starter hommealone

    (@hommealone)

    Just curious, wondering how the not-updated version of the WooCommerce plugin on the development site (which no one had touched or visited) was having an effect on the shared database. Does it run some kind of check or update on a chron job of some kind?

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Does it run some kind of check or update on a chron job of some kind?

    Not 100% sure, but could be a cron running over there. Definiltey seems like the problem causer since it’s been confirmed twice now 🙂

    Check if you have other developer installs of WooCommerce with access to the same database. If so, disable/remove them. See: https://ww.wp.xz.cn/support/topic/database-only-updating-temporarily/page/3/

    Thread Starter hommealone

    (@hommealone)

    Yes, this issue was resolved by removing dev site access to same database.

    Hi, we are having the exact same issue, only this time it involves the recent versions.

    After updating to WC 3.0, this notice popped up: “WooCommerce Data Update – We need to update your store’s database to the latest version. [Run the updater]”.

    We ran the updater and the database was updated. But after a while like 5 minutes, the db version will go back to 2.6.14. The updater reappeared, we updated again. This cycle keeps repeating.

    We tried all solutions suggested here but still the same. We have no other dev sites accessing the same database. We also tried deactivating all plugins (except WC) before updating WC db but still the same. We contacted our theme developer, they too can’t help.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WooCommerce Data Update Problem’ is closed to new replies.