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.