applyCoupon( )


Adds and applies a coupon to the cart.

について applyCoupon() function returns a Promise that resolves to the current site visitor's cart when the specified coupon has been applied.

The cart can only hold one coupon. If a coupon is already applied to the cart, passing a different couponCode to applyCoupon() will replace the existing one.

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

メソッド宣言
コピー
メソッド・パラメータ
couponCodestringRequired

The code of the coupon to be applied to the cart.

リターン
Return Type:Promise<CartObj>
役に立ちましたか?
はい
いいえ