Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Add a Note Below Each Shipping Method in WooCommerce Cart?

Suppose you need to customize your shipping method descriptions on the WooCommerce cart page. In that case, this code snippet can help you to improve the user experience by conveying clear and compelling messages during checkout.

add_action('woocommerce_after_shipping_rate', 'ts_after_shipping_rate', 20, 2);

function ts_after_shipping_rate($method) {
    // Targeting cart page only:
    if (!is_cart()) {
        return; // Exit if not on the cart page
    }

    // Display message for flat_rate
    if ($method->get_method_id() === 'flat_rate') {
        echo __("<p>Arriving on your chosen date between 9am - 1pm. Perfect for business addresses & special occasions</p>");
    }

    // Display message for free shipping
    if ($method->get_method_id() === 'free_shipping') {
        echo __("<p>Free Shipping: Your items will be shipped for free!</p>");
    }

    // Display message for local pickup
    if ($method->get_method_id() === 'local_pickup') {
        echo __("<p>Local Pickup: Pick up your items at our location during business hours.</p>");
    }
}

Output

After a customer views the cart page in WooCommerce, a custom shipping method description will be displayed beside each shipping method.

How to Add a Note Below Each Shipping Method in WooCommerce Cart? - Tyche Softwares

The default shipping method description that is displayed on the WooCommerce cart page is shown below.

How to Add a Note Below Each Shipping Method in WooCommerce Cart? - Tyche Softwares

Similarly, if you want to set descriptions from the admin side, you can follow this guide that will add the short descriptions for WooCommerce shipping methods below each title. This will create a new description field on the backend.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x