useCartLine

The useCartLine hook provides access to the cart line object. It must be a descendent of a CartProvider component.

Example code

Return value

The useCartLine hook returns an object with the following keys:

Name Description
id The cart line's ID.
quantity The cart line's quantity.
attributes The cart line's attributes.
merchandise The cart line's associated merchandise.