Woocommerce - Hide Price in Specific Category

  • Our resources on Babiato Forum is CLEAN and SAFE. So you can use it for development or production. But sometime the antivirus will warn the JS code. It's no problem. So before downloading, you need to disable the antivirus tools and then enjoy your "Party"!

xlx

Member
Dec 13, 2018
72
22
8
Hello,

I have a ecommerce cart, built on woocommerce.
I need to hide the price in the category page for specific categories.
But the price should be displayed in the individual product page

Ive used this piece of code

PHP:
You don't have permission to view the code content. Log in or register now.
following this article

The only issue being it hides the price for all categories, not specific ones
for example i want to hide headphones and covers.

Can someone please edit the code to hide only specific categories.

Thanks for helping
 
Last edited:

xlx

Member
Dec 13, 2018
72
22
8
@slvrsteele Thanks for your awesome help.

This code does work on the shop page, and it does not show the price in the selected category.
But it also hides the price once i click the product, i do want to show the price when the user clicks on the individual product.

Thanks again for helping
 

xlx

Member
Dec 13, 2018
72
22
8
@slvrsteele This works fantastic. thanks for helping bro,

Now i realize i failed to share a vital piece of information, the above code works flawlessly on my shop page. I have made a separate page for sale and have used wpbakery to pull products from my special categories on this page.

Can the same functionality be added to this specific page?
Really appreciate for your patience.
 

Forum statistics

Threads
25,237
Messages
221,724
Members
71,798
Latest member
rajshreelc