Dear @byweris,
Normal it show “Shipping : € 7,00”, if you give them free shipping it will show “Shipping : Omniva courier”
The € 7,00 is the cost for Flat rate shipping and the Omniva courier is the text for Free shipping.
You can change it in woocommerce / settings / shipping / shipping zone
Hi,
I am afraid not, i dont have any shipping zones set, there is separate omniva plugin and section in path woocommerce / settings / shipping.
You are right when shipping is more than 0.00 it shows price, if its 0.00 shows “Omniva shipping”. Tho in checkout page even if its 0.00 numbers are shown not text.
I assume there should be simple code to get around it, can you please make one ? If shipping is 0.00 show 0.00€.
This is something handled by WooCommerce directly (source).
The easiest way to make clear that the shipping is free is to write it directly in the shipping name, e.g. Omniva courier (Free).
That said, you could also try to filter the shipping value to display 0,00€ when the shipping is free, as you want.
To do so, please try this code snippet:
add_filter( 'woocommerce_order_shipping_to_display', function( $shipping, $order, $tax_display ) {
if ( $order->get_shipping_total() == 0 ) {
$shipping = wc_price( 0 );
}
return $shipping;
}, 10, 3 );
If you haven’t worked with code snippets (actions/filters) or functions.php
before, read this guide: How to use filters