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 f69bf0c + 67b690e commit c2302d6Copy full SHA for c2302d6
app/code/Magento/Sales/Model/Order.php
@@ -1298,12 +1298,12 @@ public function getTrackingNumbers()
1298
* Retrieve shipping method
1299
*
1300
* @param bool $asObject return carrier code and shipping method data as object
1301
- * @return string|\Magento\Framework\DataObject
+ * @return string|null|\Magento\Framework\DataObject
1302
*/
1303
public function getShippingMethod($asObject = false)
1304
{
1305
$shippingMethod = parent::getShippingMethod();
1306
- if (!$asObject) {
+ if (!$asObject || !$shippingMethod) {
1307
return $shippingMethod;
1308
} else {
1309
list($carrierCode, $method) = explode('_', $shippingMethod, 2);
0 commit comments