Title: Sub Total
Last modified: October 20, 2020

---

# Sub Total

 *  Resolved [loopforever](https://wordpress.org/support/users/loopforever/)
 * (@loopforever)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/sub-total/)
 * Hello, I am adding these two codes inside the child theme. However it doesn’t
   work. Is there any other alternative?
 * [Link-StackOver](https://stackoverflow.com/questions/38655887/how-to-show-zero-rate-value-of-shipping-class-in-cart-page-woocommerce)
 *     ```
       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;
       }
       ```
   
 *     ```
       add_filter( 'woocommerce_order_shipping_to_display', 'add_free_shipping_label_email', 10, 2 );
       function add_free_shipping_label_email( $label, $method ) {
           if ( $method->cost == 0 ) {
               $label = 'Free shipping'; //not quite elegant hard coded string
           }
           return $label;
       }
       ```
   
 * I enabled a flate price for a region. I created three different classes. The 
   delivery fee in one of these classes is 0. If the delivery fee is 0, when the
   customer purchases the product, on the Order Details page:
    It says **“Subtotal:
   Flat Rate”.** I want to make this “Free Shipping”. Is there a way? two code above
   shows “Free Shipping” if there is a shipping fee. So, **“Sub Total: Free Shipping”.**

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [5 years, 7 months ago](https://wordpress.org/support/topic/sub-total/#post-13566646)
 * Hi [@loopforever](https://wordpress.org/support/users/loopforever/)!
 * The second code snippet you added in your response works for me.
 * How are you adding the code, and where?
 * See if following the steps here, to add the code, helps :
 * [http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/](http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/)
 * If it isn’t working for you, then there might be a conflict from either your 
   theme or another plugin. In that case, I would recommend you temporarily switch
   to another theme, like [Storefront](https://wordpress.org/themes/storefront/),
   and disable all your plugins except for WooCommerce core (keeping the code snippet
   in place), and see if that resolves your issue.
 * You can learn more about the process of testing for conflict here:
 * [https://docs.woocommerce.com/document/how-to-test-for-conflicts/](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 * Please let us know how it goes.
 * Cheers!
 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [5 years, 7 months ago](https://wordpress.org/support/topic/sub-total/#post-13594765)
 * Howdy.
 * We haven’t heard back from you in a while, so I’m going to go ahead and mark 
   this thread as resolved. If you have any other questions please start a new thread.
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sub Total’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/sub-total/#post-13594765)
 * Status: resolved