DocumentationCartFunctions

Remove Coupon

amerta


amerta / Cart / removeCoupon

Function: removeCoupon()

removeCoupon(locale): Promise<{ cart: CartWithCalculations; error?: null; } | { cart?: null; error: ApiError; }>

Defined in: amerta/theme/utilities/cart.client.ts:172

Removes the applied coupon from the cart.

Parameters

| Parameter | Type | | ------ | ------ | | locale | string |

Returns

Promise<{ cart: CartWithCalculations; error?: null; } | { cart?: null; error: ApiError; }>

The updated cart or an error object.

Example

const res = await removeCoupon();