We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4ac222 + 6b01abb commit fb59ad1Copy full SHA for fb59ad1
app/code/Magento/Sales/Model/Order.php
@@ -1311,12 +1311,12 @@ public function getTrackingNumbers()
1311
* Retrieve shipping method
1312
*
1313
* @param bool $asObject return carrier code and shipping method data as object
1314
- * @return string|\Magento\Framework\DataObject
+ * @return string|null|\Magento\Framework\DataObject
1315
*/
1316
public function getShippingMethod($asObject = false)
1317
{
1318
$shippingMethod = parent::getShippingMethod();
1319
- if (!$asObject) {
+ if (!$asObject || !$shippingMethod) {
1320
return $shippingMethod;
1321
} else {
1322
list($carrierCode, $method) = explode('_', $shippingMethod, 2);
0 commit comments