• WooCommerce Plugins
  • Support
  • Blog
  • About
  • FAQ
Menu
  • WooCommerce Plugins
  • Support
  • Blog
  • About
  • FAQ
$0.00 Cart

How to Show Price for a Free Shipping Method in WooCommerce

  • February 19, 2020
  • -
  • Lauri Karisola

WooCommerce hides prices for free shipping methods. This may be confusing for customers but fortunately, it’s easy to show the price $0,00 for shipping methods with a short code snippet.

Snippets may be added using functions.php in the theme files or even better, by using Code Snippets plugin.

Here’s the code for showing price for free shipping methods:

<?php
add_filter('woocommerce_cart_shipping_method_full_label', 'snippet_show_zero_price', 10, 2);
function snippet_show_zero_price($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()->cart->prices_include_tax ) {
      $label .= ' ' . WC()->countries->ex_tax_or_vat() . '';
    }
  } else {
    $label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() );
    if ( $method->get_shipping_tax() > 0 && ! WC()->cart->prices_include_tax ) {
      $label .= ' ' . WC()->countries->inc_tax_or_vat() . '';
    }
  }

  return $label;
}

 

Add this to functions.php in your theme or by using Code Snippets. Here’s how it should look:

Latest Posts

Version 2 of Stock Sync – Migration Guide
How to Display “Add $ X to cart and get free shipping” on Checkout
How to Add Extra Shipping Charge For a Product
How To Disable WooCommerce Shipping Methods Based on Category
How to Show Price for a Free Shipping Method in WooCommerce

Plugins

WooCommerce Conditional Payments Pro
WooCommerce Conditional Shipping Pro
WooCommerce Stock Sync Pro

WooElements extensions make managing WooCommerce stores easier. Save time and get more sales with WooElements plugins for WooCommerce. Should you have any questions, our support is happy to help!

WooElements

  • Support
  • Blog
  • About
  • FAQ
Menu
  • Support
  • Blog
  • About
  • FAQ

Plugins

  • Plugins
  • Docs
Menu
  • Plugins
  • Docs