Skip to content

Commit 2cb1751

Browse files
authored
Merge branch 'develop' into W-21177051-node-24-v3-update-dependencies
2 parents 816bbe1 + 2c5d8ab commit 2cb1751

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Update jest-fetch-mock and Jest 29 dependencies [#3663](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3663)
33
- Add Node 24 support. Drop Node 16 support [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
44
- [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)
5+
- [Bugfix] Fix for custom billing address as returning shoppers in 1CC [#3693](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3693)
56

67
## v9.0.0 (Feb 12, 2026)
78
- [Feature] One Click Checkout (in Developer Preview) [#3552](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3552)

packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ const CheckoutOneClick = () => {
284284
}
285285

286286
const latestBasketId = currentBasketQuery.data?.basketId || basket.basketId
287+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
288+
const {addressId, creationDate, lastModified, preferred, ...address} = billingAddress
287289
return await updateBillingAddressForBasket({
288-
body: billingAddress,
290+
body: address,
289291
parameters: {basketId: latestBasketId}
290292
})
291293
}

packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,13 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG
483483

484484
// Save phone number to basket billing address for guest shoppers
485485
if (phone) {
486+
const billingBody = {...basket?.billingAddress, phone}
487+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
488+
const {addressId, creationDate, lastModified, preferred, ...address} =
489+
billingBody
486490
await updateBillingAddressForBasket.mutateAsync({
487491
parameters: {basketId: basket.basketId},
488-
body: {
489-
...basket?.billingAddress,
490-
phone: phone
491-
}
492+
body: address
492493
})
493494
}
494495

packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-payment.jsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,11 @@ const Payment = ({
286286
})
287287

288288
if (isPickupOnly && paymentInstrument.billingAddress) {
289-
const addr = {...paymentInstrument.billingAddress}
290-
delete addr.addressId
291-
delete addr.creationDate
292-
delete addr.lastModified
293-
delete addr.preferred
294-
289+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
290+
const {addressId, creationDate, lastModified, preferred, ...address} =
291+
paymentInstrument.billingAddress
295292
await updateBillingAddressForBasket({
296-
body: addr,
293+
body: address,
297294
parameters: {
298295
basketId: activeBasketIdRef.current || basket.basketId
299296
}
@@ -349,13 +346,10 @@ const Payment = ({
349346
)
350347
const addr = saved?.billingAddress
351348
if (addr) {
352-
const cleaned = {...addr}
353-
delete cleaned.addressId
354-
delete cleaned.creationDate
355-
delete cleaned.lastModified
356-
delete cleaned.preferred
349+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
350+
const {addressId, creationDate, lastModified, preferred, ...address} = addr
357351
await updateBillingAddressForBasket({
358-
body: cleaned,
352+
body: address,
359353
parameters: {basketId: activeBasketIdRef.current || basket.basketId}
360354
})
361355
await currentBasketQuery.refetch()

0 commit comments

Comments
 (0)