WooCommerce remove Add to Cart based on user role
-
Hi all, I hope someone is able to point me into the right direction.
I’m looking for a method to remove the “Add to Cart” buttons (both on the shop/archive pages as well as on the product page) for only a selected set of products.
This should be user role based. So IF someone is logged in AND belongs to the required user role then that user should just see the Add to Cart to allow that user to order the product.
ALL OTHER users, including not logged in users, should NOT be able to order the product and should just see “View Product” (or “Read More” in some themes) when they are on the shop/archive pages and on the product page they should NOT see the button to add the product to their cart.Does anyone know how to do this?
- The topic ‘WooCommerce remove Add to Cart based on user role’ is closed to new replies.