Delete All WooCommerce Default Product Variations

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!

About the author

Remi Hey! My name is Rémi Corson, I'm a French WordPress Developer, I code stuff and I write from time to time ;-) Buy a coffee
Show your support

Related Posts

1 comment

  1. lamberbee:

    Nice Tip!!
    Any suggestions on how getting variations deleted in bulk? Found a suggestion, but that didn’t work.
    Thanks.

Leave a Reply