wp_woocommerce_create_coupon
Create WooCommerce coupons with discount rules, including amount, type, expiry, product restrictions, usage limits, and free shipping.
Instructions
Create a new WooCommerce coupon with discount rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Coupon code (e.g. "SUMMER2024") | |
| amount | Yes | Discount amount (percentage or fixed amount) | |
| expiry_date | No | Expiry date (YYYY-MM-DD) | |
| product_ids | No | Restrict to specific product IDs | |
| usage_limit | No | Maximum number of times this coupon can be used | |
| discount_type | No | "percent" (default), "fixed_cart", or "fixed_product" | |
| free_shipping | No | Grant free shipping (default: false) | |
| individual_use | No | Cannot be combined with other coupons | |
| maximum_amount | No | Maximum cart total allowed | |
| minimum_amount | No | Minimum cart total required |