WooCommerce:删除购物车上的运输标签(例如“统一费率”)

仿牌独立站出海专家
例如这些:
5天交付: €25.00
当地取货
免费送货
将显示为:
€25.00
当地取货
免费送货


add_filter( 'woocommerce_cart_shipping_method_full_label', 'bbloomer_remove_shipping_label', 9999, 2 );
   
function bbloomer_remove_shipping_label( $label, $method ) {
    $new_label = preg_replace( '/^.+:/', '', $label );
    return $new_label;
}