Table of Content

HomeBlogPlugin UsageHow to hide the price or add-t...

How to hide the price or add-to-cart button for guest users?

It is very common for store owners to decide to hide product prices or add-to-cart buttons for guest users and prevent them from ordering products before registration. Although WooCommerce has no option for hiding product prices or add-to-cart buttons, the WooCommerce Role Based pricing plugin provides you with all the necessary tools for doing this task perfectly.

Hide the Add to Cart button for Guest users

If you want to hide the add to cart button for guest users, follow the below steps:

  1. Go to the iThemeland -> Role Based Pricing.
  2. Go to the Hide price tab.
  3. Mark the Enable Hide Price & Add to Cart and Hide for Guest users, respectively. 
Hide add-to-cart btn for guest users in role-based pricing plugin in woocommerce
  1. Mark Hide Add to cart button which means guest users will not see this button in the archive or product page anymore. However, you can also show a custom text to the guest users or lead them to a new page by adjusting the following settings:
    • Add to cart button text: You can write a custom text in this field to be displayed in the archive or product page to the guest users like “Register to buy”.
    • Add to cart link: You can insert a URL in this field to lead the guest users to a page like the registration page to fill in the related form.
  2. Click on the Save Settings to prevent the add to cart button from being displayed to the guest users as shown below:

Hide product price for guest users

To hide the product price for guest users, first, you need to follow these steps: 

  1. Go to the iThemeland -> Role Based Pricing.
  2. Go to the Hide price tab.
  3. Mark the Enable Hide Price & Add to Cart and Hide for Guest users. Then follow the below steps:
    • Mark Hide price field to prevent the prices displayed on the archive and product pages.
    • Write a text in the Price Text box if you want to display a custom to the guest users instead of product prices. If you leave this box empty, simply the prices will be removed from the product and archive pages. Nothing will show instead of it.
  4. You can choose one or more products/Categories in the related fields to hide the price of those selected products/ categories for the guest users- 

Read More: How to hide the price or add-to-cart button on a specific product or category?

mark hide price for guest users option
  1. Click on the Save Settings to apply the rule. 

So, when guest users visit your website, the product price won’t be displayed to them.

If you mark both Hide prices and Hide add to cart button, the guest users won’t see any of them in the archive and product pages:

Show result of guest user by hide price and add-to-cart btn rule
Like this tutorial?

Do you still have a problem?

If you still have unanswered questions or need custom work for your plugin, contact iThemeland Support.

Comments

Comments are closed.