Hide add-ons cost on the checkout page


With WooCommerce you are free to add as many fees as you need to your orders. There are various ways to do that, like payment gateways or proper extensions to up-sell on the checkout page.

One of these extension is WooCommerce Checkout Add-ons. It’s a great tool to create checkout fields which can be both free or paid.

In the case they are paid, there’s not any problem. The fee will be included in the order review table before to checkout. The same happens with free add-ons. This means that you will see the fee in the review table and it’s price like $0.00.

This is not always the best thing. They are free, why should i show a cost? With a PHP snippet you can remove the cost only for free add-ons.

Open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of it:


Contribute to Improving This Blog

Did you enjoy this article? Was it helpful? Contribute to help me writing more articles! The funds collected from this blog are reinvested directly into improving my skills or the blog so that I can provide more and better content!


Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount


Or enter a custom amount


Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly

Do you prefer using cryptocurrency? I’ve got you covered! You can donate at the following wallets:

  • BTC: bc1q87nxpdpqw323ccmerrzyeffs72wnxpw93x7pzk / 17Gtc5e8yoh2LZzokoyK8P5DWbToBwztok
  • ETH: 0xA5C89Be1df2896C3942DBEf751cCeacC7929388b

13 replies
  1. Wayne
    Wayne says:

    Hi Nicola,
    I have the same problem with Ninja form add-on. It shows price ($0.00) after add on item, how can I hide it? I have try to and ninja form at:
    $hide_for = array(
    // Add here as many add-ons as you need
    but it’s not working. Can you help me? Thank you!

  2. Soufiane
    Soufiane says:

    Hi Nicola,
    I included the code in function.php but showing the $0.00 in the checkout table? Any thought?


  3. Kit
    Kit says:

    Dropped in the script but not working…. I have an add-on with the name marketing that I want to hide, but when I replace ‘add-on-slug’ with ‘marketing’ in the script it still shows up on the checkout page. Is marketing the actual slug of the add-on?

  4. Mike
    Mike says:

    bump ^^^
    How do you find the slug for the add-on? I’ve looked through the database and there is only “_wc_checkout_add_on_id” which does not work

  5. Menderes
    Menderes says:

    Hello Nicola,

    I tried several times but I could not. Is slug instead of name value added is exactly what will be included in the page manager. My English is not very good level. Can you help me?

    Best Regards.

  6. Tim
    Tim says:

    I seem to be having a similar issue. Just want to confirm that if the name of my add on is “Are you a new donor?” that the slug would be ‘are-you-a-new-donor’. This isn’t working as I still see the name and 0.00 fee in the order summary. Thoughts?

  7. Luke
    Luke says:

    Hi Nicola,
    Thanks for posting this article. I’d really love some extra help for myself and future people reading this so hope you can help.

    I have a text field with a text title of
    Add message: [input]

    I’ve added your code verbatum changing ‘add-on-slug’ to be ‘add-message’, I’ve also tried adding different strings here from the input name in the source code but nothing seems to work.

    Any idea what is wrong here?



Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply