Learn in this tutorial how to get all WooCommerce data deleted when uninstalling WooCommerce using code.
When you deactivate and uninstall the WooCommerce plugin you are only deleting the plugin and its files, but all the data (products, orders, settings…) are still in the database.
So, if you want to delete ALL data you must perform a step before deactivating and uninstalling the plugin.
Let’s take a look at it:
Snippet to remove all data when uninstalling WooCommerce
Add this code just before the line containing “/* That’s all, stop editing! Happy publishing. */“ in the wp-config.php file:
Once you have added this, when you deactivate and uninstall WooCommerce it will not only delete the plugin files but also all the plugin data (products, orders, settings…).
Now you know what step you need to perform before uninstalling WooCommerce to make sure all the plugin data is removed.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉