After having put all products on sale, a client of mine couldn’t remove all WooCommerce products from sale at once, without going through each product one by one!
Recently a client of mine asked if he could bulk revert sale prices from all products once the sale period was over, the answer wasn’t a straightforward yes, instead I said that I would do it for him once he was ready.
So today was the day, it turns out a few solutions available with a quick search but none however worked for me, so if you are in this position now where you are not able to bulk update sales prices or remove all WooCommerce products from sale, then have try this solution. It worked for me and it should work for you if it doesn’t then you can revert back to your old prices easily without messing up your database or WordPress install.
So here’s the scenario, you have put a lot of items on sale indefinitely because you are running a promotion or it is holiday season but then once the promotion is over you want to revert all sale prices back to normal.
Putting products on sale in WooCommerce adds a badge to all products that are on sale, now you want to remove all products from sale at once without going through each product one by one. Here’s the solution.
Remove all WooCommerce Products from Sale at once
To bulk update sale prices to regular price in WooCommerce this is what you’ll need to do, we are going to export all our products, then delete all the sale prices and then re-upload the CSV file. Follow the instructions from below to avoid duplicating your products.
As good practice always create a back up of your database in case something happens.
This is tested on WordPress version 4+ and WooCommerce version 3.4.
To complete the entire process you’ll need Microsoft Excel or a CSV file editor. No plugin is required.
- Log in to your WordPress Dashboard
- Products > All Products
- Export all columns, Export all products, check Yes, export all custom meta
- Generate CSV
Open up the CSV file with Excel or another similar program and do the following:
- Locate the Sale Price column (was X column in Excel so near the end)
- You’ll see the Sale Prices that you set, remove that by deleting the value from all the rows that have a sale price in it.
Your file should stay exactly the same except the Sale Price field should now be empty. Your CSV file should look like the one on the right after you have deleted the Sale price.
Once you have done that it is now time to import all the products, to avoid duplicating the products follow the steps below.
- Save the CSV file as a .csv file
- Return to WordPress Dashboard
- Products > All Products
- Click Browse and select the updated CSV file
- Check Update existing products (to make sure you don’t duplicate products and this to work properly)
- Click Continue
- On the next screen all the fields should be mapped correctly but just double-check and if you don’t want to import any fields then just choose Do not import, and that field will be skipped. This is useful if you have non-latin characters that need to be uploaded which can cause issues, so you can just skip those fields.
Once the import process is complete all your sale prices should be gone and reverted back to how it was originally!
So there you have it, how to remove all WooCommerce Sale prices at once without any plugins and it didn’t take that long depending on the number of products you have.