Storefront GraphQL API2026-07

A new warning code in Cart
PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION
Products you can't sell in a region are now flagged explicitly

Starting with the 2026-07 Storefront API, when a Cart line contains a product that isn't carried in the buyer's location, the Cart returns a warning for each affected line. The target field holds the CartLine ID, so it maps directly to the line in your UI.

On this page
  1. What's changing (in 30 seconds)
  2. How it works: from fetching the Cart to showing the warning
  3. What's in the warning (code / target / granularity)
  4. Before vs. the new warning code
  5. Requirements
  6. Implementation flow (3 steps)
  7. 5 points developers should know
  8. 3 use cases you can apply
  9. A one-line summary for your pitch

1What's changing

Until now, the Cart never spelled out, at the cart-line level, that a product unavailable in the buyer's region was mixed in.
Starting in 2026-07, that situation is now returned as a separate warning for each cart line .
?

Before: left implicit

Even when a product that can't be sold in the region stayed in the cart, there was no dedicated warning code, so it tended to be noticed right before checkout or to turn into a support inquiry.

New: a warning per line

The Cart's warnings now include PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION , andtarget holds the matching CartLine ID is placed in. You can pinpoint that exact line and highlight it in red in the UI.

2How it works: from fetching the Cart to showing the warning

Buyer Location: e.g. London Storefront 2026-07 Issue a cart query Read warnings Hydrogen / Headless Cart Line A ✓ region OK Line B ⚠ unavailable Line C ✓ region OK Warning code: PRODUCT_UNAVAILABLE _IN_BUYER_LOCATION target: CartLine B's ID One issued per line
Warnings are returned one per cart line . If multiple unavailable products are mixed in, a warning is issued for each one, making it easy to handle them differently in the UI—for example, highlighting all the affected lines in red in a list, or showing a remove CTA.

3What the warning contains (code / target / granularity)

CODE

code

PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION. Indicates that a cart line contains a product not available for sale in the buyer's location.

TARGET

target

Applies CartLine ID. You can directly pinpoint which line in the UI the warning is about.

Granularity

One warning is issued per affected cart line (multiple affected lines = multiple warnings).

4Legacy vs. new warning code comparison

ItemLegacy2026-07 and later
Detecting products not purchasable in a region Custom implementation You need your own check logic The API notifies you Returned as a Cart warning
Identifying the affected line Ambiguous across the whole cart CartLine ID A target is tied to it
Handling multiple lines at once A separate warning is issued per line
UI reflection Tends to be delayed until checkout Can immediately flag it in red / show a removal path on the cart page
Positioning warning Builds on the existing cart warnings mechanism

5Requirements

Storefront API 2026-07 and later

Cart will start issuing it in the 2026-07 version. Clients pinned to older versions won't benefit.

Subscribe to Cart warnings

In the Cart query response, warnings you need to include and fetch it, andcode and target read it.

The specific logic for how "buyer's location" is determined (IP / shipping address / market settings, etc.) isnot described. Verify hands-on alongside the behavior of markets and per-country publishing settings.

6Implementation flow (3 steps)

1
2026-07

Set the API version to 2026-07

Update your Storefront client's version to 2026-07 or later.

2

Fetch warnings in the cart query

cart { warnings { code target } } Request and retrieve it.

3

Flag the relevant CartLine in red / removal path

Map the target's CartLine ID to the row in the UI to show a warning and a remove CTA.

For the background and how to handle this alongside other cart warning codes, the article points to the official "cart warnings" documentation.

7Five points developers should know

WARN

1. warnings, not errors

GraphQL's errors , but rather the Cart's warnings is how it's returned. The query still succeeds, and the design layers this information on as a business-level note.

2. One issued per line

The behavior is "2 unavailable products in the cart → 2 warnings." Build the UI implementation on the assumption that you loop over them as an array.

3. target = CartLine ID

When reconciling against the UI's data, you need a design that joins warnings using the CartLine ID as the key. Note that it's not the product ID.

4. Released starting in 2026-07

If your client pins the API version, this warning won't come through unless you explicitly bump to 2026-07. Include it in your version-upgrade plan.

5. You can redesign so issues don't carry over to the checkout screen

Cases that previously "errored out right before checkout" can now besurfaced proactively on the cart screen. This is a design change you can use as the basis for UX improvements that reduce abandonment and support costs.

8Three use cases you can apply in practice

!
USE CASE 1

Move the "right-before-checkout error" earlier to the cart stage in cross-border ecommerce

Challenge
In a cross-border store that sets product availability per market, a buyer "adds a Japan-only item to the cart from London → gets rejected at the checkout screen," leading to abandonment and support inquiries.
Solution
Upgrade to Storefront 2026-07 and, from the Cart's warnings, PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION pick up, then flag the affected CartLine in red on the cart screen with a remove CTA.
Impact
Error-driven abandonment at the cart-to-checkout transition drops, and CS inquiries decrease as well.
Technical note
target = CartLine ID. Since it's not the product ID, build the UI to match CartLine and warning by ID.
Hydrogen
USE CASE 2

Build it into the general-purpose handler for Hydrogen / headless stores

Challenge
In a headless store, cart-warning handling is scattered code by code, so each new code requires individual handling on every screen.
Solution
the Cart's warnings Set up a shared hook that collects in one place, andcode === 'PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION' centrally manage known codes—including—in an enum.
Impact
The cost of changes when adding a new warning code goes down, and you also prevent inconsistency in UI presentation.
Technical note
Align with the official "cart warnings" docs and consolidate display text in your i18n dictionary. Since target is per line, passing it to the row component via props is the safest design.
cart→checkout conversion rate
USE CASE 3

Use as an event for analyzing cart-abandonment causes

Challenge
Cart abandonment is measured, but the breakdown of "why customers abandon" is thin, so the impact of region-restricted products can't be quantified.
Approach
When fetching the Cart, PRODUCT_UNAVAILABLE_IN_BUYER_LOCATION tag the sessions where a warning was raised and emit the event to your analytics stack (GA4 / BigQuery, etc.).
Impact
You get a sense of the scale of "cart abandonment caused by region-restricted products," letting you prioritize per-market assortment and sales-region settings.
Technical notes
A warning is emitted once per line, so before aggregating by session, decide whether to deduplicate (distinct CartLine) or count occurrences.

9One-line summary you can use in a proposal

"As of Storefront API 2026-07, the Cart warns, on each cart line, about 'products that can't be bought in the buyer's region' .
Errors that used to be rejected right before checkout can now be moved forward to the cart screen , directly improving abandonment rates for cross-border and Headless stores."