removeProduct( )


Removes a specified product from the cart.

について removeProduct() function returns a Promise that resolves to the updated cart after the product is removed. Every line item in a cart has an ID. Pass this to removeProduct() to remove that line item/product from the cart.

注釈

  • removeProduct() does not decrement the line item's quantity, it removes the line item/product altogether.
  • When editing a site as a contributor, removeProduct() will only work when viewing the live site.
メソッド宣言
コピー
メソッド・パラメータ
cartLineItemIdnumberRequired

ID of the cart line item to remove.

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