Delete All WooCommerce Default Product Variations

Remi | April 7, 2014 | in WooCommerce

WooCommerce has a really nice feature that allows you to define default product variations for your variable products. I have to admit that it’s pretty awesome! But if you’d like to remove all default product variations at once, well that’s a bit complicate, especially when you have many products. There’s no easy way to do it from the administration, and doing it manually would take you a long time.

The only way to proceed is to perform a manual query, you can do it from PhMyAdmin for example. Please make a backup before playing with custom queries, you could mess up your whole site, and I don’t want to be responsible of that ;-) !

Here is the MySQL query to delete ALL default product variations:

DELETE FROM wp_postmeta WHERE meta_key =’_default_attributes’

Pretty simple right? But really useful!

The author

About the author Remi: Hey! My name is RĂ©mi Corson, i'm a WordPress Expert Developer, i create high level themes and plugins, and i provide free stuff every week on this website!

One comment

Leave a reply