Skip to content

Commit fdf855c

Browse files
pmclaingelanivishal
authored andcommitted
Allow set billing information via API with existing address
Not setting the customerId with an existing address caused a `NoSuchEntityException` to be thrown during address validation https://github.com/magento/magento2/blob/56af1e73ce21867b770a7458ab6e109f4a1eface/app/code/Magento/Quote/Model/QuoteAddressValidator.php#L84 Fixes #17485
1 parent 0f57a30 commit fdf855c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/code/Magento/Quote/Model/BillingAddressManagement.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
7676
{
7777
/** @var \Magento\Quote\Model\Quote $quote */
7878
$quote = $this->quoteRepository->getActive($cartId);
79+
$address->setCustomerId($quote->getCustomerId());
7980
$quote->removeAddress($quote->getBillingAddress()->getId());
8081
$quote->setBillingAddress($address);
8182
try {

0 commit comments

Comments
 (0)