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

How to Change the Label for the ‘Flat Rate’ Shipping Method in WooCommerce?

Do you want to replace the default shipping label names with more personalized ones?

This code allows you to change the default label “Flat Rate” to a more personalized one, such as “Call Us For Rates.”

add_filter('woocommerce_cart_shipping_method_full_label', 'ts_change_shipping_label', 10, 2);

function ts_change_shipping_label($full_label, $method) {
    $search_string = 'Flat rate';
    $replacement = 'Call Us For Rates';

    // Case-insensitive replacement
    $full_label = preg_replace('/' . preg_quote($search_string, '/') . '/i', $replacement, $full_label);

    return $full_label;
}

Output

In the below output, the code helps to modify the label name of the ‘Flat rate’ shipping method.

In addition to replacing the label name to something understandable by customers, you can also add a note below each label. Add a note below each shipping method in WooCommerce cart that will help you to convey clear and additional information here.

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

Share It:

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible.

Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

By using our site, you acknowledge that you have read and understood our Privacy Policy and Terms & Conditions.