Removes line items from the current site visitor's cart.
The removeLineItemsFromCurrentCart()
function returns a Promise that resolves to the updated current cart when the line items are removed.
function removeLineItemsFromCurrentCart(
lineItemIds: Array<string>,
): Promise<RemoveLineItemsResponse>;
IDs of the line items to remove from the cart.
import { currentCart } from "@wix/ecom";
async function removeLineItemsFromCurrentCart(lineItemIds) {
const response =
await currentCart.removeLineItemsFromCurrentCart(lineItemIds);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.