Removes the coupon from a specified checkout.
The removeCoupon()
function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
Note: A checkout can only hold 1 coupon.
function removeCoupon(_id: string): Promise<RemoveCouponResponse>;
ID of the checkout to remove the coupon from.
import { checkout } from "@wix/ecom";
async function removeCoupon(id) {
const response = await checkout.removeCoupon(id);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.