Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying the shipping method of the order in "Thank you" page

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.

like image 437
be well Avatar asked Dec 08 '25 11:12

be well


1 Answers

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();
like image 130
LoicTheAztec Avatar answered Dec 09 '25 23:12

LoicTheAztec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!