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.

How to Change the Label for the 'Flat Rate' Shipping Method in WooCommerce? - Tyche Softwares

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:

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