I am having a hard time finding any documents based on the WooCommerce Subscription plugin to adjust shipping label names.
I would like to remove the word: FREE at the end.
I have tried using this function from another Stack Overflow user, but it doesn't even seem to fire in the 'cart':
/**
* Remove shipping name from the label in Cart and Checkout pages
*/
function sticky_wc_cart_totals_shipping_method_label( $method ) {
$label = $method->get_label();
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 class="tax_label">' . 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 class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
}
}
}
return apply_filters( 'woocommerce_cart_shipping_method_full_label', $label, $method );
}
add_filter( 'woocommerce_cart_shipping_method_full_label', 'sticky_wc_cart_totals_shipping_method_label', 10, 2 );
What I don't know, is if this is only for the CART TOTALS, and not the recurring total shipping.
Any thoughts on this?