create_discount
Create a new discount code for food orders with customizable type, amount, and restrictions.
Instructions
[WPCafe Pro] Create a new discount code for food orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Discount code customers enter at checkout | |
| type | Yes | Discount type: percentage off or fixed amount off | |
| amount | Yes | Discount value (e.g. 10 for 10% or $10) | |
| max_uses | No | Maximum number of times this code can be used (0 = unlimited) | |
| description | No | Internal description of the discount | |
| expiry_date | No | Expiry date (YYYY-MM-DD), leave empty for no expiry | |
| location_id | No | Restrict to a specific location | |
| min_order_amount | No | Minimum order total required to use this code |