Skip to content

Commit ea70c0b

Browse files
committed
magento#26682 Disallow setting extension attributes as data array
1 parent ecaa3b7 commit ea70c0b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,13 @@ private function getShippingMethods(Quote $quote, $address)
309309
{
310310
$output = [];
311311
$shippingAddress = $quote->getShippingAddress();
312-
$shippingAddress->addData($this->extractAddressData($address));
312+
313+
$extractedAddressData = $this->extractAddressData($address);
314+
if (array_key_exists('extension_attributes', $extractedAddressData)) {
315+
unset($extractedAddressData['extension_attributes']);
316+
}
317+
$shippingAddress->addData($extractedAddressData);
318+
313319
$shippingAddress->setCollectShippingRates(true);
314320

315321
$this->totalsCollector->collectAddressTotals($quote, $shippingAddress);

0 commit comments

Comments
 (0)