mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-30 11:42:22 +08:00
https://stackoverflow.com/questions/76626647/how-do-i-change-the-text-of-the-delivery-method-in-the-woocommerce-checkout
8 lines
283 B
Text
8 lines
283 B
Text
add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_delivery_method_label', 10, 2 );
|
|
function remove_delivery_method_label( $label, $method ) {
|
|
if ( $method->cost > 0 ) {
|
|
$label = '';
|
|
$label .= wc_price( $method->cost );
|
|
}
|
|
return $label;
|
|
}
|