You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current
removeFromCart
Endpoint for removing product from the cart. By default, it uses the updateCartDefaultQuery GraphQL query
Signature
export declare function removeFromCart(
context: SetupContext,
cart: RemoveFromCartParams,
product: LineItem,
customQuery?: CustomQuery,
responseOptions?: ResponseOptions
): Promise<RemoveFromCartResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SetupContext | Automatically injected context. Refer to SetupContext |
cart | Required | RemoveFromCartParams | |
product | Required | LineItem | Product information |
customQuery | Optional | CustomQuery | Custom queries included in the request |
responseOptions | Optional | ResponseOptions |
Returns
User cart information