Each payment method on the WooCommerce Checkout page comes with a description right below the label. What if we could achieve something similar for the shipping rates, so that we can explain to the customer the difference between each method?
This question came up today in our private Slack channel for Woo developers, and we were able to write a quick snippet that does the trick. Here’s the complete code – enjoy!

PHP Snippet: Display Shipping Method Description in the WooCommerce Checkout Page
This code is a WooCommerce snippet that adds a custom description after a specific shipping method on the checkout page. Here’s a breakdown of what each part of the code does:
- add_action(): This function adds an action hook that triggers the bbloomer_shipping_rate_description function after the shipping rate is displayed on the checkout page. The hook used here is woocommerce_after_shipping_rate.
- bbloomer_shipping_rate_description() function: This function defines the custom behavior for displaying the shipping rate description. It takes the shipping method object as a parameter.
- Conditional Check: Inside the function, there’s a conditional check to determine if the shipping method being displayed has a specific ID (free_shipping:6). If it does, a custom HTML message is echoed out to explain the benefits of choosing this shipping rate.
- HTML Output: The HTML output is a simple paragraph tag containing the desired message. This message could contain any information deemed relevant for the specific shipping method identified by its ID.
Overall, this code allows you to customize the display of shipping method descriptions on the WooCommerce checkout page, specifically targeting a shipping method with the ID free_shipping:6.
For more info on how to find your shipping rate IDs, check the “How to Find Shipping Class ID” paragraph here: https://businessbloomer.com/woocommerce-disable-free-shipping-if-cart-has-shipping-class
/**
* @snippet Shipping Method Description @ WooCommerce Checkout
* @tutorial Get CustomizeWoo.com FREE
* @author Rodolfo Melogli, Business Bloomer
* @compatible WooCommerce 8
* @community Join https://businessbloomer.com/club/
*/
add_action( 'woocommerce_after_shipping_rate', 'bbloomer_shipping_rate_description' );
function bbloomer_shipping_rate_description( $method ) {
if ( $method->id === 'free_shipping:6' ) {
echo '<p>Some HTML in here where you can explain the benefits of choosing this shipping rate</p>';
}
}
Works perfectly. Thank you. As always, excellent work 😉
Cheers!
Hi,
Thanks, could you please tell me how you made these shipping charges look in a line?
In my theme, it shows as:
Shipping on the left table and then on the right shows options to select the shipping method.
Could you help me with this? I want to show the charges like this. First shipping and then on left label of the shipping option and on the right the charges of that shipping option.
Thanks in advance!
It’s just the theme, hence just some custom HTML/CSS, nothing special
Hi, thank you for your reply. Could you please tell me which theme it is?
Shoptimizer
I was so pleasantly surprised by how seamlessly this integrated. Thanks a bunch!
Wonderful!
Thanks! Works great. Does this works for multiple shipping ID’s? If so, could you provide an example?
Menno, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Perfect. Thank you men
You’re welcome!