Remove Product Prices

In this tutorial – the most correct and clean way of removing product prices on the shop page, product archive pages, related products, upsells, cross-sells and single product pages.

Why am I saying “the most correct way”? Because there are plenty of tutorials where it is recommended to do with woocommerce_get_price_html filter hook. I disagree with that approach, because this hook is intended to edit the html of the price element lol 😁

Maybe somebody doesn’t like WooCommerce much but I am happy with it, everything coded in an awesome way. Just take a look at this article as an example – we do not have to edit any of the theme templates – just turn off the appropriate action hook!

WooCommerce product prices are connected to woocommerce_after_shop_loop_item_title (product archive pages) and woocommerce_single_product_summary (single product pages)

The detailed examples are below.

Shop Page, Product Categories, Product Tags, Search Page, Related Products, Upsells, Cross-Sells

Hide product prices in WooCommerce on the shop page and product archive pages

The code below can be inserted to your current theme functions.php file. Please consider using child themes if necessary.

remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

This hook affects:

Single Product Pages

Remove product prices from WooCommerce single product pages
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );

Hmm… looking at this screenshot I also have a feeling, that we do not need a “Sale” badge after all, you can read here how to remove it.

If you have any questions – maybe you would like to hide prices in certain product categories only or only for some user roles – feel free to ask in comments below.

Related

Misha Rudrastyh

Misha Rudrastyh

I love WordPress, WooCommerce and Gutenberg so much. 10 yrs of experience.

Need some custom developer help? Let me know

Follow Misha

Need some help with WooCommerce?

If you need some professional developer help, I will be happy to assist you.

Contact me Who I am?

Leave a comment

php js HTML CSS Code