Hello @michel7,
You can try to paste this code in your child theme’s functions.php:
/**
* Remove shipping name from the label in Cart and Checkout pages
*/
add_filter( 'woocommerce_cart_shipping_method_full_label', 'wc_custom_shipping_labels', 10, 2 );
function wc_custom_shipping_labels( $label, $method ) {
if ( $method->cost > 0 ) {
if ( WC()->cart->tax_display_cart == 'excl' ) {
$label = wc_price( $method->cost );
if ( $method->get_shipping_tax() > 0 && WC()->cart->prices_include_tax ) {
$label .= ' <small>' . WC()->countries->ex_tax_or_vat() . '</small>';
}
} else {
$label = wc_price( $method->cost + $method->get_shipping_tax() );
if ( $method->get_shipping_tax() > 0 && ! WC()->cart->prices_include_tax ) {
$label = ' <small>' . WC()->countries->inc_tax_or_vat() . '</small>';
}
}
}
return $label;
}
See https://support.woothemes.com/hc/communities/public/questions/202866646-Remove-label-for-shipping-method-
Let me know if this works.
Hi wooassist.
Txs & sorry for the late response: missed your post for some reason
Yes it works txs.!
New challenge now is that you first have the standard line: ‘shipping (-methode)’, than on the next line, which used to start with what now is deleted: the actually shipping methode and the price. So in other words the shipping price is now one line below the text ‘shipping’ which looks a bit awkward. Can’t find the solution myself is this easily resolvable or a theme author thing?
txs. once again.
Michel