Hi pyarasujal,
Yes, you can. It’s probably a little crude, but this is how you can do it.
In your (child)themes directory, you should create a subdirectory structure like this :
yourthemedir/woocommerce
yourthemedir/woocommerce/loop
yourthemedir/woocommerce/single-product
Next copy
yourplugindir/woocommerce/templates/loop/price.php
to
yourthemedir/woocommerce/loop/price.php
and copy
yourplugindir/woocommerce/templates/single-product/price.php
to
yourthemedir/woocommerce/single-product/price.php
Edit both price.php files and add the following code between the <?php and ?> (just before the $global line is best in my opinion)
if (!is_user_logged_in()) return;
This will prevent prices showing up in the catalogue, search pages and single product page. If you’re using widgets however, this will not stop showing the price, I think.
Hello ZjanPreijde
I was looking for the same option, I tried your reply/suggestions and it worked!!!
The only thing I cant figure out how to hide for logged out users is the add to cart, since when adding a product to the cart even if not logged in, it still displays the price, also on my homepage where I have sliders with the products.
Do you have any suggestions there?
Thank you in advanced.
Mimi