Create Coupon
woo_create_couponCreate a new WooCommerce coupon. Supports percentage, fixed cart, and fixed product discounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Coupon code (e.g. "SAVE20", "FREESHIP") | |
| amount | Yes | Discount amount (percentage or fixed amount) | |
| site_id | No | Site ID to target (optional if you have only one connected site) | |
| description | No | Coupon description (internal use) | |
| product_ids | No | Limit to specific product IDs | |
| usage_limit | No | Total usage limit (null = unlimited) | |
| date_expires | No | Expiry date (ISO 8601, e.g. "2025-12-31") | |
| discount_type | Yes | Type of discount | |
| free_shipping | No | If true, grants free shipping | |
| individual_use | No | If true, cannot be used with other coupons | |
| maximum_amount | No | Maximum order amount allowed | |
| minimum_amount | No | Minimum order amount required | |
| email_restrictions | No | Limit to specific customer emails | |
| product_categories | No | Limit to specific category IDs | |
| excluded_product_ids | No | Exclude specific product IDs | |
| usage_limit_per_user | No | Usage limit per customer | |
| excluded_product_categories | No | Exclude specific category IDs |