useCartAttributesUpdateCallback

The useCartAttributesUpdateCallback hook returns a callback that can be used to update the cart's attributes. It must be a descendent of a CartProvider component.

Example code

Return value

A callback to update the cart's attributes. The callback expects one argument corresponding to the value of the array of attributes.