Hide add-ons cost on the checkout page

With a PHP snippet you can remove the cost only for add-ons on the checkout page in WooCommerce. Learn how with this tutorial.

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:


Data di pubblicazione: 09 May 2023


Lascia il tuo primo commento!

Inserisci il tuo commento