Code-Snippets-Functions/Execute a function on a child site/WooCommerce/remove-shipping-labels-from-cart-and-checkout.txt

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;
}