Skip to content

Commit 24dc904

Browse files
committed
MAGETWO-90971: Error is returned when customer checks out with multiple addresses
1 parent 7370938 commit 24dc904

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Tax/Model/Plugin/OrderSave.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ protected function saveOrderTax(\Magento\Sales\Api\Data\OrderInterface $order)
8080
$ratesIdQuoteItemId = [];
8181
foreach ($taxesForItems as $taxesArray) {
8282
foreach ($taxesArray['applied_taxes'] as $rates) {
83-
if (isset($rates['extension_attributes']['rates'])) {
84-
$taxRates = $rates['extension_attributes']['rates'];
83+
if (isset($rates['extension_attributes'])) {
84+
$taxRates = $rates['extension_attributes'] instanceof OrderTaxDetailsAppliedTaxExtension
85+
? $rates['extension_attributes']->getRates()
86+
: $rates['extension_attributes']['rates'];
8587
if (is_array($taxRates)) {
8688
if (count($taxRates) == 1) {
8789
$ratesIdQuoteItemId[$rates['id']][] = [

0 commit comments

Comments
 (0)