Allow payment requests inside the hosted cart iframe - #852
Merged
Merged
Conversation
The hosted cart iframe did not declare a Permissions Policy, so the Payment Request API was blocked inside it. Add `allow="payment"` to both the mini cart iframe and the inline one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for commercelayer-react-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
gciotola
approved these changes
Oct 1, 2026
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.
Problem
The hosted cart
<iframe>did not declare a Permissions Policy. Without one, the browser blocks the Payment Request API inside the frame, so payment flows that rely on it cannot start from the embedded cart.Change
Add
allow="payment"to both iframes rendered byHostedCart:Two lines, no behaviour change beyond lifting the policy restriction.
Notes for the reviewer
v5.0.6-beta.0version bump commit, already tagged and published to thenextdist-tag.v4.29.8-beta.1. The diff there is byte-identical.Verification
allowis a valid property ofIframeHTMLAttributesin the installed React types. Worth flagging honestly: the local install has React 19 types while the v4 backport declares@types/react ^18.3.1, so the backport was checked against the v5 types rather than its own. In the worst case that would surface as a type error, never at runtime.🤖 Generated with Claude Code