@tristadeleon,
Thank you for using my plugin, and I apologize for the delayed response.
The best way to achieve this would be to make use of the built in export / import feature that was added to WooCommerce in 3.1. I have outlined the steps below, and here is a quick video on how to do it: https://youtu.be/2X5bnIR4b4o
- In the WP admin, navigate to: Products > All Products > Export.
- For “Which columns should be exported?”, select “ID”, and “Categories”.
- Click “Generate CSV”.
- Open the downloaded CSV.
- Add a third column and for the column header add
meta:_is_discontinued
.
- Freeze the header row and sort the rows by the category column.
- Locate the groups of products that have your “Discontinued” category in the category column.
- Add “yes” to the cells and save the document as a CSV.
- In the WP admin, navigate to: Products > All Products > Import.
- Choose your newly created CSV file.
- Check the box for “Update existing products”.
- Click “Continue”.
- Confirm the three columns are mapped correctly: ID > ID, Categories > Categories, meta:_is_discontinued > Import as meta.
- Click “Run the importer”.