removeCoupon( )


Deprecated. This function will continue to work, but a newer version is available at wix-ecom-backend.currentCart.removeCouponFromCurrentCart().

Migration Instructions

If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to wix-ecom-backend.currentCart.removeCouponFromCurrentCart().

To migrate to the new function:

  1. Add the new import statement:

    Copy
  2. Look for any code that uses cart.removeCoupon(), and replace it with currentCart.removeCouponFromCurrentCart(). Update your code to work with the new currentCart.removeCouponFromCurrentCart() call and response properties.

  3. Test your changes to make sure your code behaves as expected.

Removes the coupon currently applied to the cart.

The removeCoupon() function returns a Promise that resolves to the current site visitor's cart when the currently applied coupon has been removed.

Note: When editing a site as a contributor, removeCoupon() will only work when viewing the live site.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<CartObj>
Did this help?