How to hide price in WooCommerce until login (+ video)

Would you like to hide the prices of your WooCommerce products until after users login? In this article we’ll look at how to allow all users to browse your products while only displaying the price and ‘add to cart’ buttons to users who are logged in.
By default, WooCommerce doesn’t have a feature to hide prices until after users have logged in – so you’ll need an extra plugin to achieve this.
Which plugin you use will depend on your exact requirements. In this article, we’ll look at three options:
- WooCommerce Members Only: this plugin allows you to hide some or all product prices from users who are not logged in (guest users). You can also modify the ‘add to cart’ button and direct users to special landing pages
- WooCommerce Request a Quote: with this plugin, you can hide prices from users who are not logged in and require them to submit a quote request
- Through code: if you’re comfortable adding some custom code to your site, we have included some code snippets to implement this functionality
Hide price in WooCommerce until login with the Members Only plugin
Members Only is the perfect WooCommerce hide price until login plugin. Not only can you hide prices, you can also hide the ‘add to cart’ button – or even display alternative content in its place. You can also direct non-logged-in users to dedicated landing pages to encourage them to register.
In this article, we’ll walk through how to set the plugin up to hide prices until login. It will only take a few minutes to get up and running.
You can also check out the video below.
How to hide WooCommerce product prices until login – video
Here’s a video tutorial on now to hide WooCommerce product prices until after login.
Why hide prices until login?
There are lots of reasons you might want to hide prices till after users have logged into your site. Some sites might want to keep prices hidden from the general public so that only their customer can see product prices and make purchases. Requiring a log-in helps ensure that users must be approved before they can make a purchase.
Let’s have a look at a couple of examples.
Wholesale sites
Wholesale sites might want to display their full inventory to all users – while keeping prices concealed until after their customers log in. This prevents competitors from viewing prices, while keeping product information available – which is great for SEO. Then, when a registered user logs in, pricing information is available.
Private stores
Private stores are another example where hiding prices before log-in might be required. If your product range is age-sensitive or otherwise restricted to certain customers, then hiding prices and preventing purchase before a user logs in is ideal.
Membership sites
Membership sites, like clubs, might require users to purchase a membership before they can purchase any other products. Members Only is a fully featured membership plugin so it’s designed to help you build a membership site.
Affiliate marketing websites
Affiliate marketing websites can offer exclusive content to specific clients only by hiding the price until login. This helps enhance the user experience on your website by offering content that’s most relevant to the user.
Tutorial: How to hide price until login in WooCommerce with Members Only
Members Only is a membership plugin for WooCommerce which allows you to restrict products and other content. You can use it to hide prices for all products or for specific categories.
In this article, we’re focusing on hiding prices by log-in status. But Members Only also allows you to hide prices by user role or password. Check this tutorial on how to hide price in WooCommerce for more information.
Step #1: Install and activate Members Only
Once you’ve purchased a copy of Members Only:
- Download the zip file by clicking on the link in the welcome email
- Go to Plugins > Add New in your WordPress dashboard
- Click on the ‘Upload Plugin’ button
- Drag and drop the downloaded zip file into the ‘Choose File’ area and click ‘Install Now’.

When the file has finished uploading, click the ‘Activate’ button.
Step #2: Set the restriction method
The first thing you need to do is to restrict access to prices to yuo
To hide prices until the user has logged in:
- Go to Members Only > Settings
- Update the ‘Restriction Method’ setting to ‘Log-in status’
- Ensure that ‘Hide in Archives’ is not enabled – this will mean that products are still visible
- Enable the ‘Hide Price’ field – this will hide the price on products
- Save the settings

These are the basic settings you need in order to hide prices from users until they log in. We’ll look at some of the other options later. But for now, we just need to define which products should have their prices hidden.
Step #3: Define which products to hide prices for
To set which products will have their prices hidden till login:
- Create a membership plan by going to Members Only > Plans and clicking ‘Add New Plan’
- Set ‘Restricted Content’ to ‘Specific content’
- In ‘Content Type’, choose ‘Post Types’
- Then select ‘Products’ in the ‘Restricted Post Types’ field

Now, all your product prices will be hidden until the user logs in.
Hide prices in specific product categories for logged-out users
If you’d like to hide the prices for products in specific categories until the user logs in:
- In ‘Content Type’ choose ‘Product categories’
- In ‘Restricted Product Categories’, select the categories that should have product prices hidden

Now, the prices for products in the ‘Hoodies’ category will be hidden. Other product prices will still be visible.
Also, check out our tutorial on how to hide a category in WooCommerce.
Step #4: Modifying the ‘add to cart’ button (optional)
By default, if the price is hidden for a product then so is the ‘add to cart’ button. However, you might like to replace it with some alternative text:
- Go to Members Only > Settings
- Enter some alternative text in the ‘Add to Cart Text’ field, e.g. ‘Log in to purchase’
- Enable the ‘Redirect from Add to Cart Button’ option if you’d like to direct the user to a dedicated landing page when they click the alternative ‘add to cart’ button

Users will see a custom button instead

Step #5: Approving new user registrations (optional)
If users need to log in to view prices, then it stands to reason that there must be a mechanism for them to register on your site. Once they’ve registered, then they can log in.
WooCommerce has a built-in registration and log-in process. To enable user registration on your site:
- Go to WooCommerce > Settings > Accounts & Privacy
- Disable ‘Enable guest checkout’ if you want to ensure that only users who are registered can purchase products
- Disable ‘During checkout’ if you don’t want new customers to create an account automatically when they make a purchase
- Enable ‘On “My Account” page’ to allow users to sign up through the registration form on the account page

If you would like to either approve or reject new user registrations – so that any new users will not be able to view prices until you have approved them:
- Go to Members Only > User Roles
- Check the ‘Enable User Approval’ setting
- Optionally, enable the ‘Prevent Pending Users’ and ‘Prevent Reject Users’ fields so that any users who have not been approved by you will not be able to log in
- Enable the ‘Prevent Auto Log-in’ option so that users do not get automatically logged in when they register

Now, when a new user registers, you’ll receive an email with a link to either approve or reject them.
There’s a fuller article on user approval in WooCommerce here.
Step #6: Add custom registration fields (optional)
If you are approving new user registrations, then you might want to collect some specific information from users when they sign up.
To add extra fields to the registration form:
- Go to Members Only > User Fields
- Enter a field name and type then click ‘Add Field’
- Toggle the ‘Enabled’ switch to display the field in the registration form
- Expand the row to update further settings – e.g. whether the field is required or not

There’s a detailed article on custom registration fields in WooCommerce here.
That’s how to hide prices until login using the WooCommerce Members Only plugin. Now let’s look at a slightly different way to do this.
Tutorial: Hiding prices till login using the WooCommerce Request a Quote plugin
As an alternative to the Members Only plugin, you could use a WooCommerce quote plugin. WooCommerce Request a Quote also allows you to hide prices until users have logged in – and any user who is not logged in can only see prices by sending in a quote request.
Let’s look at how to use Request a Quote to hide prices for non-logged-in users.
Step #1: Install and activate Request a Quote
Once you’ve purchased a copy of WooCommerce Request a Quote:
- Download the zip file by clicking on the link in the welcome email
- Go to Plugins > Add New in your WordPress dashboard
- Click on the ‘Upload Plugin’ button
- Drag and drop the downloaded zip file into the ‘Choose File’ area and click ‘Install Now’.

When the file has finished uploading, click the ‘Activate’ button.
Step #2: Hide prices for logged-out users
To hide prices from users who are logged out:
- Go to WooCommerce > Settings > Request a Quote
- Choose which products to hide prices for in ‘Enable Quotes on’
- Set ‘Enable Quotes for’ to ‘Logged-out Users’
- Enable ‘Hide prices on quotable items’

Now, prices will be hidden for the products that you’ve chosen for all users who are not logged in. Instead, they will have the option to add products to a request form.

Step #3: Receiving and handling quote requests
When a guest user has added their products to their quote request, they can send it to you.

You receive this quote as a special type of order. You can set prices as you wish and automatically send an email back to the customer with prices and a link to a direct checkout form for the order.

That’s how to hide prices from users until after they log in using the Request a Quote plugin.
Programmatically hide prices until after login
The final option for hiding prices until login is to use code. Here are a couple of code snippets to help. You can add these as snippets to your site.
Hide price till after login code snippet
This snippet will hide the product price for any user that is not logged in. It will also display a custom message.
<?php | |
/** | |
* Filter price for non-logged-in users | |
*/ | |
function pr_demo_get_price_html( $price, $product ) { | |
if( !is_user_logged_in() ) { | |
// Add a custom message here to display instead of the price | |
return __( 'Price on application', 'your_textdomain' ); | |
} | |
return $price; | |
} | |
add_filter( 'woocommerce_get_price_html', 'pr_demo_get_price_html', 10, 2 ); |
Hide add to cart button till after login code snippet
You’ll also need to hide the ‘add to cart’ button. This snippet makes the product unpurchasable.
<?php | |
/** | |
* Filter product if user not logged in | |
*/ | |
function pr_demo_is_purchasable( $purchasable, $product ) { | |
if( !is_user_logged_in() ) { | |
return false; | |
} | |
return $purchasable; | |
} | |
add_filter( 'woocommerce_is_purchasable', 'pr_demo_is_purchasable', 10, 2 ); |
Hide product prices till login – recap
In this article we looked at two different plugins to hide the product price until login. These were:
- The WooCommerce Members Only plugin which gives you great flexibility on hiding prices
- The WooCommerce Request a Quote plugin which hides prices and requires users to request a quote from you.
You can try either (or both) of these plugins risk-free. We have a 14 day money back guarantee so you can try any of our plugins out – if you don’t like them, we’ll issue a refund. We also have a world-class support team to help you out with any questions or guidance that you might need.