Skip to content

Commit fb59ad1

Browse files
authored
ENGCOM-3910: Order shipping method bug #20381
2 parents d4ac222 + 6b01abb commit fb59ad1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,12 +1311,12 @@ public function getTrackingNumbers()
13111311
* Retrieve shipping method
13121312
*
13131313
* @param bool $asObject return carrier code and shipping method data as object
1314-
* @return string|\Magento\Framework\DataObject
1314+
* @return string|null|\Magento\Framework\DataObject
13151315
*/
13161316
public function getShippingMethod($asObject = false)
13171317
{
13181318
$shippingMethod = parent::getShippingMethod();
1319-
if (!$asObject) {
1319+
if (!$asObject || !$shippingMethod) {
13201320
return $shippingMethod;
13211321
} else {
13221322
list($carrierCode, $method) = explode('_', $shippingMethod, 2);

0 commit comments

Comments
 (0)