• Resolved gmbjason

    (@gmbjason)


    Hi all!

    I have been working within the Woo Commerce environment for years but recently (about 3 months ago) I was moving a website to a new host for one of my clients and all was going well until now a couple of months later when random products were starting to be added to customers carts.

    At first, I thought this could be a caching issue so I spent hours going through every possible setting, enabling and disabling but would still get an email from my client saying it had happened again. This made me very confident that caching wasn’t the issue and I had to look somewhere else for an explanation.

    After a solid amount of research, I came across a GitHub forum from years gone by about the same issue and it was due to the wp_posts and wc_order table ID’s being out of sync and surely enough when I went into the database they have gone out of sync by at least a thousand…

    I looked back at the copy on my server and the ID’s were fine so I can only presume it happened during the migration process but it has been months later and my client wants to keep all her orders on the website as that is how she handles tax calculations, income calculations etc.

    So my question after my little story is does anyone have a possible solution? Or maybe someone thinks there is another cause?

    I am very keen to get this fixed and can supply screenshots if it helps!

    Thank you, the WP community!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @gmbjason,

    No worries, we’ll do our best to help you figure it out. ??

    First, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Also, please check the fatal error logs (if there are any) from WooCommerce > Status > Logs and choose from the drop-down menu the fatal-errors.log.

    Look forward to hearing back from you.

    Thread Starter gmbjason

    (@gmbjason)

    @babylon1999 Thanks for getting back to me, here is the logs.

    Here is my latest fatal errors log:
    2022-11-13T03:20:57+00:00 CRITICAL Uncaught Error: Call to undefined function wc_empty_cart() in /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php:372
    Stack trace:
    #0 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(363): WC_Session_Handler->forget_session()
    #1 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(99): WC_Session_Handler->destroy_session()
    #2 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(71): WC_Session_Handler->init_session_cookie()
    #3 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-woocommerce.php(860): WC_Session_Handler->init()
    #4 /nas/content/live/gettinglost/wp-content/plugins/woocommerce-payments/includes/multi-currency/MultiCurrency.php(916): WooCommerce->initialize_session()
    #5 /nas/content/live/gettinglost/wp-content/plugins/woocommerce-payments/includes/multi-currency/MultiCurrency.php(616): WCP in /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php on line 372

    2022-11-13T05:33:47+00:00 CRITICAL Uncaught Error: Call to undefined function wc_empty_cart() in /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php:372
    Stack trace:
    #0 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(363): WC_Session_Handler->forget_session()
    #1 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(99): WC_Session_Handler->destroy_session()
    #2 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(71): WC_Session_Handler->init_session_cookie()
    #3 /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-woocommerce.php(860): WC_Session_Handler->init()
    #4 /nas/content/live/gettinglost/wp-content/plugins/woocommerce-payments/includes/multi-currency/MultiCurrency.php(916): WooCommerce->initialize_session()
    #5 /nas/content/live/gettinglost/wp-content/plugins/woocommerce-payments/includes/multi-currency/MultiCurrency.php(616): WCP in /nas/content/live/gettinglost/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php on line 372

    Would you like my system status report too?

    Thanks, Jason

    Howdy @gmbjason ??

    Would you like my system status report too?

    Thanks for reaching back with the error logs. To have a better image of the store’s setup, it would be necessary to check out the site’s System Status Report, correct.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ID’s out of sync after migration’ is closed to new replies.