applyDiscountCode
Applies a discount code to a cart.
To remove an applied discount code from a cart, use the removeDiscountCodeFromCart mutation.
If you don't have a cart ID yet, you can use the applyCodeToNewCart mutation to create a new cart and
apply a discount code to it in one step.
Use Shop.acceptsDiscountCodes to check if the shop accepts discount codes.
Arguments
| Argument | Description | Type |
|---|---|---|
| input | ApplyDiscountCodeInput! |
Type
This field resolves to ApplyDiscountCodePayload, which has the following fields:
| Field | Description | Type |
|---|---|---|
cart | The cart after applying the discount code. | Cart |