Sometimes your client asks you to delete all out-of-stock WooCommerce variations, but it can be painful if you have hundreds of variable products and want to identify which of them are out of stock.
The normal WP editor doesn’t give you any tool to filter your products and apply changes to hundreds of them at once.
That’s why in this entry we’ll show you how to delete all out-of-stock variations using WP Sheet Editor.
1. Install WP Sheet Editor
Sheet Editor is a plugin that makes it simpler for you to apply changes to hundreds of products at once with its bulk updates tool. It’s designed to help you make thousands of changes with a few clicks.
You can skip this step if you have the plugin installed and activated.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features
Once you open the plugin, you’ll find a spreadsheet showing all your products and their complete information.
2. Find all the out-of-stock variations
For this, you need to open the Search tool located in the plugin’s toolbar.
After that, enter the following values to search for all the out-of-stock variations:
- Tick the Search on variations
- Tick the Enable advanced filters
- Field key: Stock status (_stock_status)
- Operator: =
- Value: Select Out of stock
Finally, click on Run search.
After the plugin has filtered the products, the ones that meet the search criteria will be displayed.
3. Delete the filtered variations with the Bulk edit tool
This tool allows you to edit hundreds of products with a few clicks. It’s really easy to use.
It’s located on the plugin’s toolbar, so just click to open it.
Now use these values to delete the filtered variations:
- Select the rows that you want to update: Edit all the rows from my current search
- What field do you want to edit: Status
- Select the type of edit: Set value
- Replace existing value with this value: Delete completely or Trash
- Edit only variations
- Click on Execute now
It’s really easy!
As you can see, deleting out-of-stock WooCommerce variations is really easy with WP Sheet Editor.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features