{"id":3909,"date":"2024-12-15T10:47:21","date_gmt":"2024-12-15T10:47:21","guid":{"rendered":"https:\/\/ithemelandco.com\/docs\/woorbp\/?p=3909"},"modified":"2025-11-08T12:13:40","modified_gmt":"2025-11-08T12:13:40","slug":"hide-add-to-cart-button-for-user-role","status":"publish","type":"post","link":"https:\/\/ithemelandco.com\/docs\/woorbp\/hide-add-to-cart-button-for-user-role\/","title":{"rendered":"How to hide the add-to-cart button for special user roles?"},"content":{"rendered":"\n<p>If you want to prevent some users from ordering products directly from your site, it is very important to hide the add to cart button on the product page and archive page for those specific users.&nbsp;<\/p>\n\n\n\n<p>You have no option in WooCommerce to make this happen, so, in the following, we want to show you how to hide the add-to-cart button for a particular user role in the <a href=\"https:\/\/ithemelandco.com\/plugins\/role-based-pricing-for-woocommerce\/?utm_source=docs&amp;utm_content=hide-add-to-cart-for-spscific-role\" target=\"_blank\" rel=\"noreferrer noopener\">ROLEPRICEiT &#8211; Role Based Pricing for WooCommerce<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hide add to cart button for special user roles<\/h2>\n\n\n\n<p>To hide the add-to-cart button for special user roles using the ROLEPRICEiT &#8211; Role Based Pricing for WooCommerce, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the<strong> iThemeland<\/strong> -&gt; <strong>Role Based Pricing<\/strong>.<\/li>\n\n\n\n<li>Go to the <strong>Hide price<\/strong> tab.<\/li>\n\n\n\n<li>Mark <strong>Enable Hide Price &amp; Add to Cart<\/strong> <strong>button<\/strong> field.<\/li>\n\n\n\n<li>Mark <strong>Hide for Registered users<\/strong> then open the drop-down list of <strong>Select User Roles<\/strong> and choose the specific user roles from the list. All user roles that you have defined in WordPress will be automatically displayed to you in this list. So, you can add as many user roles as you need.<\/li>\n\n\n\n<li>Mark <strong>Hide add to cart button<\/strong> to prevent showing the add to cart button on the WooCommerce archive and product page. You can also set the following fields:\n<ul class=\"wp-block-list\">\n<li><strong>Add to cart button text<\/strong>: To show a text instead of the Add to cart button to the specified users like \u201cContact us\u201d.<\/li>\n\n\n\n<li><strong>Add to cart Button link<\/strong>: To lead the users to a specific URL like the Contact Us page.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Choose products or categories in the <strong>Select products <\/strong>and<strong> Select Categories<\/strong> fields, if you want to hide the add to cart button of some products or categories for a particular user role<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Read More:<\/strong> <a href=\"https:\/\/ithemelandco.com\/docs\/woorbp\/hide-prices-on-product-or-category\/?utm_source=docs&amp;utm_content=hide-add-to-cart-for-spscific-role\" data-type=\"link\" data-id=\"https:\/\/ithemelandco.com\/docs\/woorbp\/hide-prices-on-product-or-category\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"text-decoration: underline;\">How to hide the price or add-to-cart button on a specific product or category?<\/span><\/a><\/p>\n<\/blockquote>\n\n\n\n<p>Step 6: Press <strong>Save settings <\/strong>to apply the rule&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/01-hide-price-for-particular-user-roles.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"945\" height=\"600\" src=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/01-hide-price-for-particular-user-roles.png\" alt=\"Woo role-based pricing plugin hide price for particular user role\" class=\"wp-image-4039\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Example: Hide add to cart button for contributor and subscriber roles<\/h3>\n\n\n\n<p>To hide the add to cart button for <strong>Contributor<\/strong> and <strong>Subscriber <\/strong>roles, first, you need to mark <strong>Enable Hide Price &amp; Add to Cart<\/strong> and <strong>Hide for registered users<\/strong>.&nbsp;<\/p>\n\n\n\n<p>Then, you need to select <strong>Contributor<\/strong> and <strong>Subscriber<\/strong> from the list of users roles in the <strong>Select User Roles<\/strong> field.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/02-hide-price-and-add-to-cart-btn-for-specific-users-role.png\"><img decoding=\"async\" width=\"929\" height=\"591\" src=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/02-hide-price-and-add-to-cart-btn-for-specific-users-role.png\" alt=\"Hide price and add-to-cart btn for specific user roles\" class=\"wp-image-4040\"\/><\/a><\/figure>\n\n\n\n<p>Now, you can mark <strong>Hide Add to Cart button<\/strong> and press <strong>Save changes<\/strong> to prevent displaying the Add to Cart button on the product page and archive page as illustrated below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/03-result-of-hide-add-to-cart-btn.png\"><img decoding=\"async\" width=\"998\" height=\"404\" src=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/03-result-of-hide-add-to-cart-btn.png\" alt=\"Result of hiding add-to-cart btn in role-based pricing plugin\" class=\"wp-image-4041\"\/><\/a><\/figure>\n\n\n\n<p>If you set a message like <strong>Contact Us<\/strong> in the <strong>Add to Cart button text<\/strong>, your text will be replaced with the Add to Cart button for the specified user roles as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/04-show-custom-txt-on-hide-price-and-add-to-cart-btn.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"639\" src=\"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-content\/uploads\/sites\/20\/2024\/12\/04-show-custom-txt-on-hide-price-and-add-to-cart-btn.png\" alt=\"Show custom text on hide price and ann-to-cart btn rule using woo role-based pricing plugin\" class=\"wp-image-4042\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you want to prevent some users from ordering products directly from your site, it is very important to hide the add to cart button on the product page and archive page for those specific users.&nbsp; You have no option in WooCommerce to make this happen, so, in the following, we want to show you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3909","post","type-post","status-publish","format-standard","hentry","category-plugin-usage"],"_links":{"self":[{"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/posts\/3909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/comments?post=3909"}],"version-history":[{"count":2,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/posts\/3909\/revisions"}],"predecessor-version":[{"id":4468,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/posts\/3909\/revisions\/4468"}],"wp:attachment":[{"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/media?parent=3909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/categories?post=3909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woorbp\/wp-json\/wp\/v2\/tags?post=3909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}