From 2bfb4d04742d1dbe1469ca9b0922506a911075f8 Mon Sep 17 00:00:00 2001 From: "d.phan" Date: Thu, 26 Feb 2026 11:50:57 -0500 Subject: [PATCH 1/2] @W-21362507: Fix for custom billing address as registered shoppers Signed-off-by: d.phan --- .../app/pages/checkout-one-click/index.jsx | 4 +++- .../partials/one-click-contact-info.jsx | 9 +++++---- .../partials/one-click-payment.jsx | 20 +++++++------------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx b/packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx index 1b6274dc2d..ad1fe8d3a6 100644 --- a/packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx +++ b/packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx @@ -284,8 +284,10 @@ const CheckoutOneClick = () => { } const latestBasketId = currentBasketQuery.data?.basketId || basket.basketId + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {addressId, creationDate, lastModified, preferred, ...address} = billingAddress return await updateBillingAddressForBasket({ - body: billingAddress, + body: address, parameters: {basketId: latestBasketId} }) } diff --git a/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx b/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx index d82a56610b..c059af760a 100644 --- a/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx +++ b/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx @@ -483,12 +483,13 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG // Save phone number to basket billing address for guest shoppers if (phone) { + const billingBody = {...basket?.billingAddress, phone} + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {addressId, creationDate, lastModified, preferred, ...address} = + billingBody await updateBillingAddressForBasket.mutateAsync({ parameters: {basketId: basket.basketId}, - body: { - ...basket?.billingAddress, - phone: phone - } + body: address }) } diff --git a/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-payment.jsx b/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-payment.jsx index 551b2fe69d..af7bef8e7c 100644 --- a/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-payment.jsx +++ b/packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-payment.jsx @@ -286,14 +286,11 @@ const Payment = ({ }) if (isPickupOnly && paymentInstrument.billingAddress) { - const addr = {...paymentInstrument.billingAddress} - delete addr.addressId - delete addr.creationDate - delete addr.lastModified - delete addr.preferred - + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {addressId, creationDate, lastModified, preferred, ...address} = + paymentInstrument.billingAddress await updateBillingAddressForBasket({ - body: addr, + body: address, parameters: { basketId: activeBasketIdRef.current || basket.basketId } @@ -349,13 +346,10 @@ const Payment = ({ ) const addr = saved?.billingAddress if (addr) { - const cleaned = {...addr} - delete cleaned.addressId - delete cleaned.creationDate - delete cleaned.lastModified - delete cleaned.preferred + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {addressId, creationDate, lastModified, preferred, ...address} = addr await updateBillingAddressForBasket({ - body: cleaned, + body: address, parameters: {basketId: activeBasketIdRef.current || basket.basketId} }) await currentBasketQuery.refetch() From 65c125769a0413c8c7ba293d37c2f7e1e6f8fb28 Mon Sep 17 00:00:00 2001 From: "d.phan" Date: Thu, 26 Feb 2026 11:53:38 -0500 Subject: [PATCH 2/2] add changelog Signed-off-by: d.phan --- packages/template-retail-react-app/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/template-retail-react-app/CHANGELOG.md b/packages/template-retail-react-app/CHANGELOG.md index db6b8e30a0..f567f4438e 100644 --- a/packages/template-retail-react-app/CHANGELOG.md +++ b/packages/template-retail-react-app/CHANGELOG.md @@ -1,6 +1,7 @@ ## v9.1.0-dev - Add Node 24 support. Drop Node 16 support [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652) - [Feature] Subscribe to marketing communications. Email capture component updated in footer section to use Shopper Consents API. [#3674](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3674) +- [Bugfix] Fix for custom billing address as returning shoppers in 1CC [#3693](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3693) ## v9.0.0 (Feb 12, 2026) - [Feature] One Click Checkout (in Developer Preview) [#3552](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3552)