Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
32cb4da to
aaedbc8
Compare
04f9469 to
bce6ffc
Compare
aaedbc8 to
ad445a5
Compare
ad445a5 to
8444e31
Compare
kdaviduik
commented
Jan 28, 2026
| variables: { | ||
| cartId: optionalParams?.cartId || options.getCartId(), | ||
| attributes, | ||
| ...optionalParams, |
Contributor
Author
There was a problem hiding this comment.
this was missing before. it's present in the other ones
Adds Storefront API 2025-10 parity for the `visitorConsent` parameter in `@inContext` directives across all cart operations. **Important:** Most Hydrogen storefronts do NOT need this feature. If you're using Hydrogen's analytics provider or Shopify's Customer Privacy API (including third-party consent services), consent is handled automatically. This feature is primarily intended for Checkout Kit and other non-Hydrogen integrations that manage consent outside Shopify's standard consent flow. Changes: - Add `visitorConsent` to `CartOptionalInput` type with clear JSDoc explaining the niche use case - Update all cart mutation/query defaults to accept and pass through `visitorConsent` to the `@inContext` directive - Update `hydrogen-react` cart queries with `visitorConsent` variable support
8444e31 to
a2645af
Compare
graygilmore
approved these changes
Jan 30, 2026
Merged
This was referenced Feb 6, 2026
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Closes https://github.com/Shopify/developer-tools-team/issues/967.
Adds Storefront API 2025-10 parity for the
visitorConsentparameter in@inContextdirectives.Note: Most Hydrogen storefronts do NOT need this feature. If you're using:
then consent is already handled automatically and you don't need to use this.
This feature is primarily intended for Checkout Kit and other non-Hydrogen integrations that manage consent outside Shopify's standard consent flow.
WHAT is this pull request doing?
Adds
visitorConsentsupport to all cart operations in both@shopify/hydrogenand@shopify/hydrogen-react:@shopify/hydrogenvisitorConsenttoCartOptionalInputtype; update all 17 cart mutations/queries with@inContext(visitorConsent: $visitorConsent)@shopify/hydrogen-reactvisitorConsentvariable supportWhen provided,
visitorConsentencodes buyer consent preferences (analytics, marketing, preferences, saleOfData) into the cart'scheckoutUrlvia the_csparameter.HOW to test your changes?
Cart operations now accept
visitorConsentas an optional parameter:Checklist