Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Cart Instructions API

Instructions used to create the checkout.

The base API object provided to purchase extension targets.

Anchor to instructions
instructions
StatefulRemoteSubscribable<>
required

The cart instructions used to create the checkout and possibly limit extension capabilities.

These instructions should be checked prior to performing any actions that may be affected by them.

For example, if you intend to add a discount code via the applyDiscountCodeChange method, check discounts.canUpdateDiscountCodes to ensure it's supported in this checkout.

Caution

Check cart instructions before calling select APIs, as > some may not be available. See the > Cart Instructions API > for more information.

Anchor to useInstructions
useInstructions()

Returns the cart instructions used to create the checkout and possibly limit extension capabilities.



Was this page helpful?