Skip to content

Commit 4f55601

Browse files
committed
ACP2E-1117: CustomerAddressId not set for new billing address
1 parent ed54ca8 commit 4f55601

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

app/code/Magento/Checkout/Model/AddressMapper.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types = 1);
6+
declare(strict_types=1);
77

88
namespace Magento\Checkout\Model;
99

@@ -51,7 +51,9 @@ public function __construct(
5151

5252
/**
5353
* @inheritDoc
54+
*
5455
* @throws LocalizedException
56+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5557
*/
5658
public function customerCheckoutAddressMapper(
5759
int $cartId,
@@ -96,8 +98,8 @@ public function customerCheckoutAddressMapper(
9698
* @inheritDoc
9799
*/
98100
public function guestCheckoutAddressMapper(
99-
string $cartId,
100-
string $email,
101+
int|string $cartId,
102+
string $email,
101103
PaymentInterface $paymentMethod,
102104
AddressInterface $billingAddress = null
103105
): void {
@@ -107,7 +109,10 @@ public function guestCheckoutAddressMapper(
107109
$shippingAddress = $quote->getShippingAddress();
108110

109111
if (!empty($billingAddress)) {
110-
$sameAsBillingFlag = $this->checkIfShippingAddressMatchesWithBillingAddress($shippingAddress, $billingAddress);
112+
$sameAsBillingFlag = $this->checkIfShippingAddressMatchesWithBillingAddress(
113+
$shippingAddress,
114+
$billingAddress
115+
);
111116
} else {
112117
$sameAsBillingFlag = 0;
113118
}

app/code/Magento/Checkout/Model/AddressMapperInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public function customerCheckoutAddressMapper(
2929
/**
3030
* Process guest address information for same as billing
3131
*
32-
* @param string $cartId
32+
* @param int|string $cartId
3333
* @param string $email
3434
* @param PaymentInterface $paymentMethod
3535
* @param AddressInterface|null $billingAddress
3636
* @return void
3737
*/
3838
public function guestCheckoutAddressMapper(
39-
string $cartId,
39+
int|string $cartId,
4040
string $email,
4141
PaymentInterface $paymentMethod,
4242
AddressInterface $billingAddress = null

app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public function getPaymentInformation($cartId)
207207
*
208208
* @return \Psr\Log\LoggerInterface
209209
* @deprecated 100.1.8
210+
* @see not in use anymore
210211
*/
211212
private function getLogger()
212213
{

app/code/Magento/Checkout/Model/PaymentInformationManagement.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PaymentInformationManagement implements \Magento\Checkout\Api\PaymentInfor
2323
/**
2424
* @var \Magento\Quote\Api\BillingAddressManagementInterface
2525
* @deprecated 100.1.0 This call was substituted to eliminate extra quote::save call
26+
* @see not in use anymore
2627
*/
2728
protected $billingAddressManagement;
2829

@@ -208,6 +209,7 @@ public function getPaymentInformation($cartId)
208209
*
209210
* @return \Psr\Log\LoggerInterface
210211
* @deprecated 100.1.8
212+
* @see not in use anymore
211213
*/
212214
private function getLogger()
213215
{

0 commit comments

Comments
 (0)