Skip to main content
Removes all items from the cart, leaving it empty.

Parameters

None

Returns

Promise<ShopifyCart>

Examples

Clear cart

Clear cart button

Clear before adding new items

This method removes all line items but keeps the same cart session. The cart ID remains unchanged.