Skip to main content

useSavedProductsActions

The useSavedProductsActions hook provides mutation functions to save and unsave products (favorites). Returns saveProduct() and unsaveProduct() functions that accept product IDs and variant information. Saving a product adds it to the user's products collection in the Shop app. Use with useSavedProducts() to display current saved status and implement optimistic UI updates.

Caution

This hook requires adding the following scopes to the manifest file:

product_list:write

For more details, see manifest.json.

Anchor to useSavedProductsActions
useSavedProductsActions()


Was this page helpful?