transactionShippingMethod was unconditionally attempting to output the
shipping "Carrier Code". This is fine in most cases, but for "virtual"
orders, no CarrierCode is defined, resulting in an illegal offset error
(internal to Magento) when the non-existent carrier information is
requested.
To avoid this, add a ->getIsVirtual() check on the $order, and only
request Shipping Carrier information for non-Virtual orders. This is the
same logic (though not exactly the same method) used within core Magento
code within the Checkout process, and so appears to be an expected
condition for accessing such data.
transactionShippingMethod was unconditionally attempting to output the shipping "Carrier Code". This is fine in most cases, but for "virtual" orders, no CarrierCode is defined, resulting in an illegal offset error (internal to Magento) when the non-existent carrier information is requested.
To avoid this, add a ->getIsVirtual() check on the $order, and only request Shipping Carrier information for non-Virtual orders. This is the same logic (though not exactly the same method) used within core Magento code within the Checkout process, and so appears to be an expected condition for accessing such data.