Cannot open order in backend without a shipping method.
This happens e.g when only virtual products are purchased (downloads, gift cards, ...)
|
if (strpos($this->getOrder()->getShippingMethod(), 'intelipost') !== false) { |
Changing that line to this one would fix it:
if (strpos($this->getOrder()->getShippingMethod() ?? '', 'intelipost') !== false) {