Skip to main content

cartNoteUpdateDefault

Creates a function that accepts a string and attaches it as a note to a cart.

required

CartNoteUpdateFunction

export type = ( note: string, optionalParams?: , ) => Promise<>;
Examples

JavaScript

import {cartNoteUpdateDefault} from '@shopify/hydrogen';

const cartNote = cartNoteUpdateDefault({
storefront,
getCartId,
});

const result = await cartNote('This is a note');
Was this page helpful?