Skip to content

Commit

Permalink
magento#26682 Disallow setting extension attributes as data array
Browse files Browse the repository at this point in the history
  • Loading branch information
amenk committed Mar 18, 2020
1 parent ecaa3b7 commit ea70c0b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/code/Magento/Quote/Model/ShippingMethodManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,13 @@ private function getShippingMethods(Quote $quote, $address)
{
$output = [];
$shippingAddress = $quote->getShippingAddress();
$shippingAddress->addData($this->extractAddressData($address));

$extractedAddressData = $this->extractAddressData($address);
if (array_key_exists('extension_attributes', $extractedAddressData)) {
unset($extractedAddressData['extension_attributes']);
}
$shippingAddress->addData($extractedAddressData);

$shippingAddress->setCollectShippingRates(true);

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

0 comments on commit ea70c0b

Please sign in to comment.