disable “add to cart” based on user role
-
Hello,
I was just referred to this forum and I am re-posting my inquiry, I would like to disable the “add to cart” functionality on ALL products based on user role, say for instance all users that are “subscribers” should ONLY be allowed to see the product prices and should NOT be able to add products to the cart and place orders.
I know i would have to add a conditional statement on the “woocommerce.php” file, all I need is the attributes and logical statement, can someone help?
Also, I would rather hard code this instead of using a plugin as I already have a few hooks implemented on this file (hide prices for non-logged in users).
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘disable “add to cart” based on user role’ is closed to new replies.