Skip to content

Commit

Permalink
issue/26526 Fix orderRepository does not check if there are no extens…
Browse files Browse the repository at this point in the history
…ionAttributes
  • Loading branch information
PascalBrouwers committed Jan 24, 2020
1 parent dbf2d34 commit 7a04c04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/code/Magento/Sales/Model/OrderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public function get($id)
private function setOrderTaxDetails(OrderInterface $order)
{
$extensionAttributes = $order->getExtensionAttributes();
if ($extensionAttributes === null) {
$extensionAttributes = $this->orderExtensionFactory->create();
}
$orderTaxDetails = $this->orderTaxManagement->getOrderTaxDetails($order->getEntityId());
$appliedTaxes = $orderTaxDetails->getAppliedTaxes();

Expand All @@ -180,6 +183,9 @@ private function setOrderTaxDetails(OrderInterface $order)
private function setPaymentAdditionalInfo(OrderInterface $order): void
{
$extensionAttributes = $order->getExtensionAttributes();
if ($extensionAttributes === null) {
$extensionAttributes = $this->orderExtensionFactory->create();
}
$paymentAdditionalInformation = $order->getPayment()->getAdditionalInformation();

$objects = [];
Expand Down

0 comments on commit 7a04c04

Please sign in to comment.