Delete Coupon
Remove WooCommerce coupons automatically.
Overview
The Delete Coupon action removes a WooCommerce coupon from your store. Use this for cleaning up expired coupons, one-time use codes, or invalidating compromised coupons.
Configuration
Required Fields
| Field | Type | Description |
|---|
| Coupon | integer/string | Coupon ID or code |
Optional Fields
| Field | Type | Default | Description |
|---|
| Force Delete | boolean | false | Permanently delete (skip trash) |
Example Configurations
Delete by ID
Coupon: {{Trigger.coupon_id}}
Force Delete: true
Delete by Code
Coupon: EXPIRED-CODE-123
Soft Delete
Coupon: {{Trigger.coupon_code}}
Force Delete: false
Output Data
| Variable | Type | Description |
|---|
{{Action.coupon_id}} | integer | Deleted coupon ID |
{{Action.deleted}} | boolean | Success status |
Common Workflows
Clean Up Used Coupons
- Trigger: Coupon usage limit reached
- Action: Delete Coupon
Expiry Cleanup
- Trigger: Daily schedule
- Loop: Expired coupons
- Action: Delete Coupon
Security Invalidation
- Trigger: Abuse detected
- Action: Delete Coupon
Best Practices
- Log deletions for audit
- Consider soft delete for recovery
- Clean up regularly to maintain performance
- Verify before permanent deletion
Trash vs Permanent
| Force Delete | Result |
|---|
false | Moves to trash (recoverable) |
true | Permanent deletion |