• Resolved Lotster

    (@lotster)


    Hi

    I Googled for this extensively and couldn’t find a solution. I hope someone here can assist.

    Tonight I updated Woocommerce on my website, and after the update I got the following error:

    Fatal error: Class WC_Product_Data_Store_CPT contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (WC_Product_Data_Store_Interface::update_product_stock) in /home/romantic/public_html/shop/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 17

    I tried disabling all plugins one by one but still get the same error. Based on one result I got on Google I checked, my server is running PHP7.2 so it isn’t caused by an outdated PHP version.

    Can anyone assist me please?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Weird, try removing WC completely and install anew.

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    Did you have any kind of custom code added to your site (to the theme or plugin)?

    Otherwise, I would try disabling and reenabling WooCommerce to be sure.

    Hopefully that helps! Have a great one!

    Thread Starter Lotster

    (@lotster)

    Hi Andrew and Soft79,

    Thanks for the feedback!

    @slash1andy, No I don’t have any custom code on the site, all standard plugins and themes.

    However, I did get it working. For anyone else stumbling onto this post with the same issue, here’s what I did:

    I went into cPanel and renamed the /wp-content/plugins directory. After this I could access my wp-admin page and log in successfully. Once I logged in, I went back to cPanel file manager and renamed the /plugins directory back to /plugins. Now I went back to wp-admin (which was still open in another tab) and went into Plugins. All my plugins were there but disabled. I enabled Woocommerce first, but immediately got the error that Woocommerce could not be enabled due to a fatal error – this was without any other plugins activated.

    So I went to the Woocommerce download page on www.remarpro.com and downloaded the installer ZIP, which I then uploaded using my cPanel file manager to the wp-content directory. I then extracted it so that it replaced all the files in the /plugins/woocommerce directory. Then, going back to wp-admin I enabled Woocommerce again and it worked. Then I enabled all my other plugins one by one and refreshed my site’s home page after each plugin was enabled to ensure that it’s still working. No further issues! I obviously immediately made a backup of my site afterwards.

    The moral of the story – That tip that you always see that says “Ensure that you have a backup of your website before updating”? Yeah, turns out it’s kind of important. I lost an entire evening of sales just because I didn’t do that.

    Thanks for the assistance guys!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error on WordPress / Woocommerce website’ is closed to new replies.