WooCommerce – Delete Product Vatiations by Category, Attribute, Keyword

posted in: Guides | 0

What do you do when you want to delete product variations to hundreds of products?

With the normal WordPress product editor you can do it, but it takes you lots of hours or even days, depending on how much products you have. But what if you need to do it in just some minutes? Do you think you’ll be able to delete product variations for two thousand products in a single day? It sounds exhausting and boring, doesn’t it?

That’s why in this article we’ll show you how to delete product variations by category, keyword, etc.

1- Install the Sheet Editor Plugin

This is a WordPress plugin that provides a Products Spreadsheet where you can see all the product information and you can edit freely.

You can skip this step if you already have the plugin installed and activated.

You can download the plugin here:

- or - Read more about it

2- Setup the WooCommerce Products Spreadsheet

The setup is easy and it only takes 2 minutes. Please follow this tutorial for the quick setup.

3- Open the Sheet Editor Plugin

You will find the plugin in the left menu. Just click Edit Products, and it will open.

Once opened, you’ll see the spreadsheet with all your products info.

Suppose you want to delete variations under all the products within the “Fashion” category. So you need to take these steps:

a) Open the “Apply changes in bulk” tool: This tool allows you make changes to hundreds or thousands of products all at once. It’s a matter of just a few clicks.

b) Hit the “Select rows” button: That’ll help you filter the products you want to modify.

c) Look for the product category: In this case, we’ll modify the products within the Fashion category, so just write “Fashion” in the “Enter Product category” field.

d) Set the values to delete the product variations:

  • Make sure you check the “I understand it will update the posts from my search” checkbox.
  • In “What field do you want to edit”, write “Status” and select it.
  • In “Select type of edit”, select “Set value”.
  • Write “trash” in the “Replace the existing value with this value” field.
  • Make sure you check “Execute formula only on product variations”. This will help you not to send your selected products to trash but to modify just the variations.
  • After you make sure all the new values are set, just hit the “Execute now” button, and done!

If you want to delete product variations by keyword, you need to open the “Apply changes in bulk” tool and hit the “Select rows” button.

After you hit the “Select rows” button, you need to use the “Contains keyword” field to write the keyword of the product you want to modify.

In this example, we’re looking for the “Smartphone” keyword. This keyword must be contained in the products’ name; that’s crucial.

After you write the keyword, just hit the “Run search” button.

Set the new values:

  • Make sure you check the “I understand it will update the posts from my search” checkbox.
  • In “What field do you want to edit”, write “Status” and select it.
  • In “Select type of edit”, select “Set value”.
  • Write “trash” in the “Replace the existing value with this value” field.
  • Make sure you check “Execute formula only on product variations”. This will help you not to send your selected products to trash but to modify just the variations.
  • After you make sure all the new values are set, just hit the “Execute now” button, and done!

Your product categories will be deleted.

If you want to delete product variations by attribute, you need to open the “Apply changes in bulk” tool and hit the “Select rows” button.

Then, write your product attribute in the “Enter product attribute” field, which is also the same you use for categories and tags.

If for example you want to look for the “yellow” products, just write that attribute in the field and select it.

After writing the product attribute, you just need to hit the “Run search” to filter your products!

After that, just set the new values:

  • Make sure you check the “I understand it will update the posts from my search” checkbox.
  • In “What field do you want to edit”, write “Status” and select it.
  • In “Select type of edit”, select “Set value”.
  • Write “trash” in the “Replace the existing value with this value” field.
  • Make sure you check “Execute formula only on product variations”. This will help you not to send your selected products to trash but to modify just the variations.
  • After you make sure all the new values are set, just hit the “Execute now” button, and done!

Your products categories will be deleted.

If you want to delete product variations in downloadable products, just go to Apply changes in bulk → Select rows.

Remember that the “Select rows” tool is to help you filter the products you want to modify.

Once there, enable the advanced filters to search for the downloadable products.

After that, you need to look for the downloadable products.

  • Write “_downloadable” in the “Field key”.
  • Make sure the “Operator” is equal.
  • Write “yes” in the “Value” field.
  • Hit the “Run search” field.

After filtering the products, just set the new values…

  • Make sure you check the “I understand it will update the posts from my search” checkbox.
  • In “What field do you want to edit”, write “Status” and select it.
  • In “Select type of edit”, select “Set value”.
  • Write “trash” in the “Replace the existing value with this value” field.
  • Make sure you check “Execute formula only on product variations”. This will help you not to send your selected products to trash but to modify just the variations.
  • After you make sure all the new values are set, just hit the “Execute now” button, and done!

Done!

Do you see how easy it is to delete your products variations? Save lots of time; start using Sheet Editor!

You can download the plugin here:

- or - Read more about it

Leave a Reply