useCartUpdateNote

A cart hook that helps you easily add or update the cart note.

// import
import { useCartUpdateNote } from '@backpackjs/storefront';

// instantiation
const { cartUpdateNote, ...updateNoteStatus } = useCartUpdateNote();

// use
const cartNote = await cartUpdateNote({
  note: 'MY-CART-NOTE'
})

note

a cart note string e.g 'My cart note'

Last updated