Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
00 Days
00 Hours
00 Minutes
00 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.”

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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;
}
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; }
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
Newest
Oldest
Inline Feedbacks
View all comments
reCaptcha Error: grecaptcha is not defined
0
Would love your thoughts, please comment.x
()
x
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.