File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/code/Magento/Tax/Model/Plugin Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \Tax \Model \Plugin ;
99
10+ use Magento \Tax \Api \Data \OrderTaxDetailsAppliedTaxExtension ;
11+
1012class 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 ) {
You can’t perform that action at this time.
0 commit comments