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