Skip to content

feat(checkout): CHECKOUT-10150 add billing same as shipping toggle#3154

Merged
richapatel1510 merged 5 commits into
masterfrom
CHECKOUT-10151
Jul 16, 2026
Merged

feat(checkout): CHECKOUT-10150 add billing same as shipping toggle#3154
richapatel1510 merged 5 commits into
masterfrom
CHECKOUT-10151

Conversation

@richapatel1510

@richapatel1510 richapatel1510 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What/Why?

  • Add "same as shipping" toggle in payment step for themeV2.
  • Hide the toggle from Shipping step when themeV2 is enabled.

Rollout/Rollback

Revert this PR.

Testing

  • CI checks
  • Manual testing
CHECKOUT-10151.mov

Note

Medium Risk
Changes billing address persistence and order-submit gating on the payment step; incorrect toggle or copy-to-billing behavior could place orders with wrong billing data.

Overview
For themeV2, the “same as shipping address” control moves from the shipping step into the payment step billing block, with checkout-level state wired through CheckoutPage → payment components.

When the toggle is on, billing fields collapse, place-order pre-save skips manual billing persistence, and checking the box copies the shipping address to billing (with revert + error if updateBillingAddress fails). The shared checkbox supports a payment-specific label, can be disabled while billing updates, and stays hidden for Amazon Pay and when capabilities hide it.

Shipping no longer shows the checkbox under themeV2. A new locale string supports the shorter payment-step label.

Reviewed by Cursor Bugbot for commit d18f5ab. Bugbot is set up for automated code reviews on this repo. Configure here.

@richapatel1510

Copy link
Copy Markdown
Contributor Author

cursor review

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingBlock.tsx
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx
@richapatel1510

Copy link
Copy Markdown
Contributor Author

cursor review

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingBlock.tsx
Base automatically changed from CHECKOUT-10150 to master July 14, 2026 06:28
@richapatel1510

Copy link
Copy Markdown
Contributor Author

cursor review

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx Outdated
@richapatel1510

Copy link
Copy Markdown
Contributor Author

cursor review

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingBlock.tsx
Comment thread packages/core/src/app/shipping/SingleShippingForm.tsx
@richapatel1510

Copy link
Copy Markdown
Contributor Author

cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 43a1019. Configure here.

@richapatel1510 richapatel1510 marked this pull request as ready for review July 14, 2026 23:26
@richapatel1510 richapatel1510 requested a review from a team as a code owner July 14, 2026 23:26

@bc-maxy bc-maxy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Added a few small comments

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx Outdated
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx Outdated
Comment thread packages/core/src/app/payment/billingForm/PaymentBillingBlock.tsx
@richapatel1510

Copy link
Copy Markdown
Contributor Author

Just curious: If the billing update call fails, do we block the users from submitting the order?

Yes, we block user from submitting order if billing address is invalid or the update API fails

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingForm.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 31af17c. Configure here.

Comment thread packages/core/src/app/payment/billingForm/PaymentBillingBlock.tsx
bc-peng
bc-peng previously approved these changes Jul 16, 2026

@bc-maxy bc-maxy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👏

@richapatel1510 richapatel1510 merged commit 4c2623d into master Jul 16, 2026
17 checks passed
@richapatel1510 richapatel1510 deleted the CHECKOUT-10151 branch July 16, 2026 01:12
@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Integration US
success 20260716012814 by Launchbay

@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Staging US
success 20260716012814 by Launchbay

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse results

🖥️ Desktop:

Category Score
🟢 Performance 92
🟢 Accessibility 90
🟠 Best practices 78

📱 Mobile:

Category Score
🟠 Performance 86
🟢 Accessibility 90
🟠 Best practices 78

@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Production US
success 20260716012814 by Launchbay

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants