Skip to content

Commit c2302d6

Browse files
authored
ENGCOM-4361: [Backport] Issue #20380 fixed for 2.2 #20866
2 parents f69bf0c + 67b690e commit c2302d6

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
@@ -1298,12 +1298,12 @@ public function getTrackingNumbers()
12981298
* Retrieve shipping method
12991299
*
13001300
* @param bool $asObject return carrier code and shipping method data as object
1301-
* @return string|\Magento\Framework\DataObject
1301+
* @return string|null|\Magento\Framework\DataObject
13021302
*/
13031303
public function getShippingMethod($asObject = false)
13041304
{
13051305
$shippingMethod = parent::getShippingMethod();
1306-
if (!$asObject) {
1306+
if (!$asObject || !$shippingMethod) {
13071307
return $shippingMethod;
13081308
} else {
13091309
list($carrierCode, $method) = explode('_', $shippingMethod, 2);

0 commit comments

Comments
 (0)