I have a problem in WooCommerce when the shipment is 0.00 euros from a certain amount.The question is that the cart page does not appear 0.00 euros or free.
This is solved by entering this code in the php functions file. I saw it in this post.
add_filter( 'woocommerce_cart_shipping_method_full_label', 'add_free_shipping_label', 10, 2 );
function add_free_shipping_label( $label, $method ) {
if ( $method->cost == 0 ) {
$label = 'Free shipping'; //not quite elegant hard coded string
}
return $label;
}
There is also another option if you want 0.00 Euros to appear. I discovered it in the following article.
function my_custom_show_price_with_free_shipping( $label, $method ) {
$label = $method->get_label();
if ( WC()->cart->tax_display_cart == 'excl' ) {
$label .= ': ' . wc_price( $method->cost );
if ( $method->get_shipping_tax() > 0 && wc_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_prices_include_tax() ) {
$label .= ' <small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
}
}
return $label;
}
add_filter( 'woocommerce_cart_shipping_method_full_label', 'my_custom_show_price_with_free_shipping', 10, 2 );
The question is that in the notifications that the client receives via e-mail of his purchase and invoices in the sending part he does not put anything. As much as I have investigated, I have not found anything.
I have searched but I have not found anything. Can you help me with this?
Thank you