Skip to main content

cartGiftCardCodesAddDefault

Creates a function that adds gift card codes to a cart without replacing existing ones

Adds gift card codes to the cart without replacing existing ones.

This function sends a mutation to the Storefront API to add one or more gift card codes to the cart. Unlike cartGiftCardCodesUpdate which replaces all codes, this mutation appends new codes to existing ones.

Anchor to options
options
required

The options for the cart query, including the storefront API client and cart fragment.

  • A function that takes an array of gift card codes and optional parameters, and returns the result of the API call.


Was this page helpful?