While the command to
DELETE ALL CATEGORIES IS - wp term list product_cat --field=term_id | xargs wp term delete product_cat
AND
DELETE ALL THE PRODUCTS IS - wp post list —field=ID —post_type=product | xargs wp post delete —force
what would be the command to select products from a specific category/categories and delete them.
Help much appreciated.
You use the category specifier
--category="your category"
.For example
wp post delete $(wp wc product list --user=1 --format=ids --category=64) --force
.