Skip to content

Commit a54d73a

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
namespace Magento\Tax\Model\Plugin;
99

10+
use Magento\Tax\Api\Data\OrderTaxDetailsAppliedTaxExtension;
11+
1012
class OrderSave
1113
{
1214
/**
@@ -123,7 +125,9 @@ protected function saveOrderTax(\Magento\Sales\Api\Data\OrderInterface $order)
123125
foreach ($taxes as $row) {
124126
$id = $row['id'];
125127
if (isset($row['extension_attributes'])) {
126-
$taxRates = $row['extension_attributes']['rates'];
128+
$taxRates = $row['extension_attributes'] instanceof OrderTaxDetailsAppliedTaxExtension
129+
? $row['extension_attributes']->getRates()
130+
: $row['extension_attributes']['rates'];
127131
if (is_array($taxRates)) {
128132
foreach ($taxRates as $tax) {
129133
if ($row['percent'] == null) {

0 commit comments

Comments
 (0)