• Resolved byweris

    (@byweris)


    Hi guys,

    In pdf invoice there is line for shipping but instead of showing shipping costs (Shipping : 0.00€) it shows (Shipping : Omniva courier). It is cause we offer free delivery ? In checkout free delivery is shown as 0,00€.

    Let me know how can we display shipping amount even if its 0,00.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    Thread Starter byweris

    (@byweris)

    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€.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @byweris and @martje65,

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display shiiping cost instead of shipping method’ is closed to new replies.