Created
August 15, 2024 15:38
-
-
Save TimBHowe/eacfbf13e107df69c4713b7b5f7e625e to your computer and use it in GitHub Desktop.
Run WP WC CLI command to delete all coupons.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all_coupons=($(wp wc shop_coupon list --user=1 --field=id)) | |
for i in $all_coupons; do | |
wp wc shop_coupon delete $i --user=1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment