I'm trying to get the shipping method or cost of shipping for a WooCommerce order - I'm writing a custom email template that is different depending on free delivery vs paid delivery.
I found a function called get_total_shipping()
, but this is now deprecated and I cannot find a replacement - does one exist?
I've noticed that the shipping amount is stored in a hidden meta field (_order_shipping
), which I can access, but I worry that this might break on future WooCommerce updates.