Skip to content

Commit 27f3eb1

Browse files
committed
MAGETWO-46720: [Github] Shipping Address not exposed for orders api #2628
1 parent 9cff299 commit 27f3eb1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Sales/Model/Order/ShippingBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ public function create()
8080
if ($this->order->getEntityId()) {
8181
/** @var ShippingInterface $shipping */
8282
$shipping = $this->shippingFactory->create();
83-
$shipping->setAddress($this->order->getShippingAddress());
83+
$shippingAddress = $this->order->getShippingAddress();
84+
if ($shippingAddress) {
85+
$shipping->setAddress($shippingAddress);
86+
}
8487
$shipping->setMethod($this->order->getShippingMethod());
8588
$shipping->setTotal($this->getTotal());
8689
}

0 commit comments

Comments
 (0)