,

WooCommerce Fatal Error: Call to a member function get_data_store()

6 Comments

  1. Thanks for posting this, Bryan. I had the exact same error regarding WooCommerce Subscriptions class-wcs-initial-cart-stock-manager.php:85 when using my primary Administrator user account. The crash occurred each time I tried to add or remove something from the cart. It also crashed when I used a Run Once Code Snippet to empty my cart programmatically (my first attempt to solve the problem).

    I ended-up solving it a bit differently than your solution and figured I’d chime in. I temporarily deactivated Woo Subscriptions, cleared my cart on the front end, then re-activated WooCommerce Subscriptions. So far the problem has yet to return. Thanks again for posting this seemingly rare problem! It helped me isolate to my user account and provides a workable solution.

    1. Bryan Hoffman

      Thanks for taking the time to post your solution Sean. Much more elegant than mine. I’ve updated the post, thanks again.

  2. rumano

    Under WooCommerce > Status > Tools, there is an option for “Clear customer sessions. This tool will delete all customer session data from the database.

    1. Bryan Hoffman

      Thanks rumano, hopefully this works for others. Seems even easier if it works.

    2. Worked perfectly for me. Thanks for posting your solution!

      1. Bryan Hoffman

        Thanks for verifying that Don. I’ve updated the post as well.

Comments are closed.