In WooCommerce, I would like to display the name of chosen shipping method for the current order in "Thank you" (order received) page…
How can I get the name of this chosen shipping methods in Thank you page?
All I can get is the shipping address, instead I would like to display the shipping method name.
If you look in WC_Abstract_Order available methods, you have get_shipping_method() that is going to display the title of the shipping method used with your order.
Now you can use this method in your code with the $order object this way
echo $order->get_shipping_method();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With