Skip to content

SAE — Normalize Checkout shipping defaults - #6865

Open
gbirch-stripe wants to merge 4 commits into
masterfrom
gbirch/normalize-checkout-shipping-defaults
Open

SAE — Normalize Checkout shipping defaults#6865
gbirch-stripe wants to merge 4 commits into
masterfrom
gbirch/normalize-checkout-shipping-defaults

Conversation

@gbirch-stripe

@gbirch-stripe gbirch-stripe commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • normalize configured shipping defaults through the Shipping Address Element before applying them to Checkout
  • leave invalid or disallowed defaults in the form for correction instead of updating the Checkout Session
  • initialize payment elements after the normalized shipping address is applied

Testing

added unit tests

@gbirch-stripe
gbirch-stripe requested review from a team as code owners August 6, 2026 21:45
@gbirch-stripe
gbirch-stripe requested review from porter-stripe and wooj-stripe and removed request for a team August 6, 2026 21:45
@gbirch-stripe
gbirch-stripe force-pushed the gbirch/normalize-checkout-shipping-defaults branch from 50a6d0c to a906bee Compare August 6, 2026 22:10
@gbirch-stripe
gbirch-stripe force-pushed the gbirch/initialize-sae branch from 2c13a93 to f8c712a Compare August 6, 2026 22:13
@gbirch-stripe
gbirch-stripe force-pushed the gbirch/normalize-checkout-shipping-defaults branch from a906bee to eefdbff Compare August 6, 2026 22:13
Base automatically changed from gbirch/initialize-sae to master August 6, 2026 23:00
@gbirch-stripe
gbirch-stripe force-pushed the gbirch/normalize-checkout-shipping-defaults branch from eefdbff to e3c8621 Compare August 6, 2026 23:00
XCTAssertNil(checkout.session.shippingAddress)
}

func testInitDoesNotApplyDisallowedShippingDefault() async throws {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a duplicate pretty much of testInitIgnoresShippingDefaultsWithDisallowedCountry? How does it differ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point — now that we have handling + testing of this case via the Checkout initialization we don't need to test it on the SAE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants