perch_shop_set_discount_code()
Programmatically apply a discount code to the cart with perch_shop_set_discount_code()
.
Requires
- Perch Shop installed
Parameters
Type | Description |
---|---|
String | The discount code to apply |
Usage examples
Set the discount code FREESHIPPING
.
perch_shop_set_discount_code('FREESHIPPING');