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 e5c1527 + ccd3014 commit 79a20f5Copy full SHA for 79a20f5
app/code/Magento/Sales/Model/Order.php
@@ -1279,12 +1279,12 @@ public function getTrackingNumbers()
1279
* Retrieve shipping method
1280
*
1281
* @param bool $asObject return carrier code and shipping method data as object
1282
- * @return string|\Magento\Framework\DataObject
+ * @return string|null|\Magento\Framework\DataObject
1283
*/
1284
public function getShippingMethod($asObject = false)
1285
{
1286
$shippingMethod = parent::getShippingMethod();
1287
- if (!$asObject) {
+ if (!$asObject || !$shippingMethod) {
1288
return $shippingMethod;
1289
} else {
1290
list($carrierCode, $method) = explode('_', $shippingMethod, 2);
0 commit comments