mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
https://businessbloomer.com/woocommerce-remove-shipping-labels-cart-checkout-page-e-g-flat-rate/
6 lines
226 B
Text
6 lines
226 B
Text
add_filter( 'woocommerce_cart_shipping_method_full_label', 'wc_remove_shipping_label', 10, 2 );
|
|
|
|
function wc_remove_shipping_label( $label, $method ) {
|
|
$new_label = preg_replace( '/^.+:/', '', $label );
|
|
return $new_label;
|
|
}
|