WooCommerce hide price: the complete guide
There are plenty of reasons why you might want to hide WooCommerce prices on your store. The only problem is that WooCommerce, by default, doesn’t offer much flexibility when it comes to hiding product prices from your eCommerce store.
In this article, we’ll go over everything you need to know about hiding the prices in WooCommerce. We’ll also show you different ways you can hide WooCommerce prices using the WooCommerce Members Only plugin.
Why hide prices in WooCommerce?
You would typically hide prices in WooCommerce if you want your customers to make an account on your site. This way, only logged-in users will be able to unlock product prices. There are many reasons why you would want to do this.
For example, if you sell expensive or exclusive products such as custom instruments, you may want to attract serious customers who are willing to create an account on your site to learn more about the pricing options.
You can also set up exclusive product offers for customers. This improves brand loyalty and helps you deliver more value to registered customers. You can show prices for your regular products, and hide the WooCommerce prices for exclusive products, to encourage customers to register and purchase.
If your eCommerce store is just an online catalog website for your brand, meaning you don’t sell products in WooCommerce but simply want to display them, you’ll need a way to hide WooCommerce prices. Since customers only visit your website to browse through products and learn more about them, displaying WooCommerce prices doesn’t make sense.
Hiding WooCommerce prices makes it easy to display out-of-stock products on your WooCommerce store. This way, customers can still see product images and product details of out-of-stock products. However, they won’t see the product price indicating that the product is currently out of stock. It’s also perfect for stores that might want to change the product’s price when it’s available for order again.
Additionally, hiding WooCommerce prices is a great way to generate hype before a product launch. Customers can view details of newly added products but they won’t see the price of the product until after the launch date.
Use cases for hiding prices in WooCommerce hide
Let’s take a look at some case scenarios of hiding prices in WooCommerce:
- Wholesale customers. Wholesale customers tend to buy lots of products per sale. Offering them special wholesale prices can help you attract more wholesale buyers to your WooCommerce store. For instance, you can offer wholesale buyers a discounted price and hide it from regular customers on your online wholesale store.
- B2B buyers. If you sell to B2B buyers, you may want to hide prices of B2B products on your WooCommerce store. For instance, if you sell shoe soles cut for a specific client, you don’t want every site visitor to buy this specific product. Instead, you can hide the WooCommerce price for all customers except your client.
- Pre-product launch. Before a product launch, you want to promote and create hype for the new products. A great way of doing this is by displaying the new product on your WooCommerce store and hiding the price for it until the launch date.
- Catalog-only stores. Ecommerce stores that do not let visitors add products to their cart and buy them don’t need to show WooCommerce prices on their site. Catalog websites are designed for showcasing your products.
- Membership sites. You may want to hide WooCommerce prices if your online store is part of your membership site. You can display the prices once visitors log into their accounts. This can encourage people to sign up for your membership program.
Different ways to hide prices in WooCommerce
Let’s go over different ways you can hide prices in WooCommerce without losing prospective customers:
#1: Hide price and/or hide the add to cart button
Hiding the price or the add to cart button can help store owners display their WooCommerce products offerings without displaying product prices. Customers can’t add products to their cart or checkout from your WooCommerce store.
#2: Hide prices for individual products, all products in specific categories, or all products
You can hide WooCommerce prices for individual products, all products in a specific category, or for all products on your WooCommerce store. This can help you offer exclusive products and cater to all types of customers on your eCommerce store.
#3: Hide the price and change the text on add to cart button
You might want to hide WooCommerce prices and change the text on the add-to-cart buttons. This way, you can still display out-of-stock products on your eCommerce store without displaying the price of the product. You can change the add to cart button text to something like “No stock left” or “Join the waitlist”.
#4: Replace add to cart button to redirect to a registration form
You can choose to display WooCommerce prices to only logged-in users on your eCommerce store. To do this, you can replace the add to cart button on your product pages to redirect customers to a registration form. Customers who are interested in the product will be redirected to your registration page so that they can also view prices and add products to their cart.
#5: Replace text on the add to cart button
Replacing the text on the add to cart button is a great way to inform your customers why they can’t add the product to their cart. For instance, you can change the add to cart button text to “register to view prices” as a way to motivate customers to register for an account.
#6: Choose how to hide prices
When hiding WooCommerce prices, you can choose who you want to hide it from on your online store. This means that you can hide WooCommerce prices from all logged out users, hide prices by user roles, or hide prices by passwords. This can be a great way to cater to all types of customers on your WooCommerce store and hide product prices from non-authorized shoppers.
How can you hide prices in your WooCommerce store?
There are two main ways of hiding prices in your WooCommerce store – using code or using a plugin.
Hiding prices in WooCommerce using code
There are a couple of reasons why you may want to use code to hide WooCommerce prices.
You may have WordPress development knowledge and so will be up to the technical task of adding code to your site. If it’s something you can do yourself, then getting it done is essentially free.
The main downside here, of course, is that coding is more complicated than using a plugin. If something goes wrong, you will need to spend time fixing your site. What’s more, if you want to hide prices in multiple ways on your site (for example, only hide prices for specific products), then the coding process is trickier. You’ll need to map out your requirements well, or you’ll have to use code every time you want to change the way you hide prices.
If you want to hide WooCommerce prices with code, you’ll have to access your functions.php, which you can do via FTP, cPanel File Manager, or through the WordPress theme editor (Appearance > Editor > functions.php).
Just so you can keep track of where your code is, we recommend you add it to the bottom of the functions.php file. This is code you’ll need to paste to hide prices on product pages for all users except admins:
add_filter( ‘woocommerce_get_price_html’, function( $price ) {
if ( is_admin() ) return $price;
return ”;
} );
If you want to hide prices and the cart subtotal in carts and checkout pages too, then you can use the following code:
add_filter( ‘woocommerce_get_price_html’, function( $price ) {
if ( is_admin() ) return $price;
return ”;
} );
add_filter( ‘woocommerce_cart_item_price’, ‘__return_false’ );
add_filter( ‘woocommerce_cart_item_subtotal’, ‘__return_false’ );
As we’ve said above, the exact code will of course depend on exactly how you want to hide your WooCommerce prices, so you may need to alter these code snippets for your own purposes.
Hiding prices with a WooCommerce plugin
While hiding prices using code is possible, most people will want to use a plugin. You’ll need to purchase a good WooCommerce plugin, but it offers much better value than having to hire a developer every time you want to customize your hide price functionality (assuming you can’t code yourself), and the time you’ll need to troubleshoot your site if anything goes wrong while coding.
Plus, a good plugin will offer much more flexibility right out of the box, and you’ll be able to hide your product prices in any way you like.
Introducing WooCommerce Members Only
WooCommerce Members Only is a robust plugin that lets you create a private WooCommerce store. This means that you can decide who can access your site and store content. This way, you can restrict product access by user role, password, or logged-in status.
In addition to this, using the WooCommerce Members Only plugin, you can create different levels of access for your WooCommerce products by assigning user roles. In simpler words, you can allow different user roles on your eCommerce store different levels of access for your products by showing or hiding product prices to site visitors.
What parts of your store can you hide with WooCommerce Members Only?
In this tutorial, we are going to show you exactly how you can hide your prices using WooCommerce Members Only. However, it has vast options for restricting content and you may want to consider some of these options if you want to create a more exclusive experience on your site.
Here’s a rundown of the content you can restrict to non-members:
- Selected products
- All products
- Selected posts
- Selected WooCommerce categories
- Selected post categories
- All WooCommerce pages
- Your entire site
The process for restricting content is similar no matter how you use the plugin, so check out our overview on hiding prices with the plugin to learn how this works.
Installing and activating the Members Only plugin in WooCommerce
Once you’re done installing and activating the Members Only plugin, you can start going over different settings.
Head on over to the Global settings by going to WooCommerce → Settings → Members Only. Using the Restriction Method option, you can choose how they want to restrict content on their site.
- Users can choose to hide WooCommerce price until login by selecting the Log In Status option. This way, only site visitors who are logged in will be able to access your restricted content.
- Selecting the Password option lets you create a password for restricted content on your ecommerce store.
- You can also select the User Role option to permit specific user roles on your WooCommerce store to access restricted content.
What can you do with WooCommerce Members Only
Additionally, you can also choose to hide prices for specific WooCommerce products on your ecommerce store. It also lets you hide prices for specific categories on your online store.
You can offer your staff members and admins products and hide those products from regular visitors. You may also want to hide prices on the shop page if your WooCommerce store is just a catalog site for your brand. This way, customers will be able to view all your product offerings without being able to add them to their cart.
If you want to encourage guests to register on your WooCommerce store, you’ll need to hide prices for guests. This creates an urgency for visitors to register on your WooCommerce store so that they can view prices and add products to their cart.
Using the WooCommerce Members Only plugin, you can also choose how to restrict content on your ecommerce store.
This means you can choose to restrict by category for products on your online store. This will let you completely hide WooCommerce categories (or just hide the prices) from unauthorized users browsing through your online store.
In addition to this, you can also restrict by password or username. This is a great way to offer staff members and admins personalized product offers. Only users who have the password and username will be able to access the restricted products or view their prices on your WooCommerce store.
You can take a look at our guide on how to create client-specific products in WooCommerce for more information.
Creating global rules to define whether to hide prices and/or replace add to cart button
The WooCommerce Members Only plugin lets you create global rules that define whether to hide prices from your product pages and/or replace the add to cart button.
You can check the Hide Price option to hide the price for restricted products on your WooCommerce store. This means that, instead of hiding the WooCommerce product, it will only hide the price for it.
In addition to this, you can also select the Access Product Pages option. This allows you to let customers view your product pages including images and descriptions but without seeing product prices.
You can also update the Add to Cart Text text field to replace the text on add to cart buttons on product pages. For instance, you can replace the add to cart button text with something like “Log-in to see price”. This will prompt the users to log in first before they can see the WooCommerce price and add the product to their shopping cart.
WooCommerce Members Only lets you enable the Redirect from Add to Cart Button checkbox to link add to cart buttons to a specific page. This means that you can redirect customers from the add to cart buttons to the account page or any other specific page on your ecommerce website.
Creating product level rules
The WooCommerce Members Only plugin also lets you set rules for individual products on your online store. For instance, if you’re a photographer, you can allow only your client to download and access the “Wedding photo gallery”. This helps create a more private product for your client.
Members Only lets you restrict individual products by user role, password, and even individual user IDs.
You can navigate to the product’s edit page to create rules that restrict unauthorized users from accessing that product.
From the Members Only tab, you can set different rules for restricting the product for customers on your online store. Set the Restriction Method to Password and set the password in the text field next to Passwords. You can set multiple passwords by creating a list. In addition to this, you can also Assign user roles. This will assign specific user roles to the customer after they purchase the product. Once you’re ready, click the Update button to save the changes.
Customers can click on the “Enter password to see price” button that will redirect them to a password form page. Once they’ve entered the correct password, customers will be redirected to the product page so they can view prices and add the product to their shopping cart.
Check out our guide on how to create user-specific products in WooCommerce for more information.
Some specific ways to hide prices
Depending on your WooCommerce store, some ways of hiding prices might work better for you than others. You may also want to use multiple ways for hiding WooCommerce prices so that you can cater to more types of customers.
Let’s take a look at various ways to hide prices in WooCommerce:
WooCommerce hide price until login
You can hide the WooCommerce price until log in using the WooCommerce Members Only plugin. Start by selecting the Log In Status option from the Restriction Method drop-down menu. This means that content will be restricted until the user logs in.
You can set the After Logging In option to Redirect. This will redirect customers to a specific page after they successfully log in. Next, select the page you want customers to be redirected to using the drop-down menu next to After Log In, Redirect To.
You can restrict content by setting the Restrict Content option to All Product Pages. This will let your customers browse through your shop pages and view products without having to log in first. However, they will have to log in first before they can view product prices and add products to their cart. You specify the page customers will be redirected to after clicking the add to cart button using the drop-down menu next to If Restricted, Redirect To.
Make sure to select the Redirect from Add to Cart Button checkbox so that customers are redirected to the product page. In addition to this, select the checkboxes next to Hide Price and Access Product Pages so customers who are not logged in can browse through products without being able to add them to their cart or see prices. Click the Save changes button to continue.
Here’s how logged-out customers will view restricted products on your WooCommerce store:
And when customers log in, they will be able to view product prices and add the product to their cart:
There’s a detailed tutorial on how to hide price in WooCommerce till login here.
WooCommerce hide price for specific product
Using Members Only, you can also hide the price for specific products on your WooCommerce store. All you need to do is select the product and go to the product’s edit page. Under the Product Data section, scroll down to the Members Only tab.
Here, you can select the Restriction method to User and add user IDs using the text field below. Once you’re done, click the Update button. Keep in mind that you need to keep the Hide Price option enabled from the plugin’s main settings page. This will only hide the WooCommerce price for a specific product instead of hiding the product completely.
Here’s what the customers who are not permitted to see the price for the specific product will see on the front-end of your store:
Here’s how customers with permitted user IDs will see the same product:
WooCommerce hide price for specific category
You may also choose to hide prices for specific WooCommerce categories on your online store. This way you can select specific user roles to display specific categories prices to and let them add products to their shopping carts.
Set the Restriction Method to User Role and set the Restricted Content option to Specific Categories. Using the text field next to Restricted Categories add the WooCommerce categories you want to hide prices from. Now, add user roles that you want to show prices to for the specific category by using the text field next to Permitted User Roles. Select the checkboxes next to Access Product Pages and Hide Price. Click the Save changes button to continue.
Here’s how non-permitted user roles will see the WooCommerce category:
Customers with permitted user roles will be able to view prices for the specific category and add products to the cart:
WooCommerce hide price on shop page
Using the WooCommerce Members Only plugin, you can also hide the price on the shop page.
Start by navigating to the plugin’s settings and select User Role as the Restriction Method. Next, select All WooCommerce Pages from the Restricted Content drop-down menu. This will help us restrict unauthorized users from viewing the price of products on the shop page. Add your permitted user roles in the text field next to Permitted User Roles. After selecting the checkboxes next to Access Product Pages and Hide Price, click the Save changes button to continue.
Here’s how customers without the permitted roles will see products on the shop page:
Here’s how permitted user roles on your eCommerce store will see products on the shop page:
WooCommerce hide price for guests
It’s also possible to hide WooCommerce prices for guests only using the WooCommerce Members Only plugin.
Start by selecting the Restriction Method to User Role. Select Entire Site from the drop-down menu next to Restricted Content. Allow user roles to view product prices using the text field next to Permitted User Roles. Select the checkboxes next to Access Product Pages and Hide Price. Click the Save Changes button to continue.
Here’s how customers that are not considered “guests” will see WooCommerce product prices on your online store:
Here’s how guests will see WooCommerce product prices on your ecommerce store:
Hide price until log-in (video)
Hiding prices with the WooCommerce Request a Quote plugin
There are a couple of other scenarios when you might want to hide prices from users in WooCommerce. For instance, if you want to allow certain users to request quotes for your products, you might want to conceal the price. You can do this using the WooCommerce Request a Quote plugin.
How to hide prices from users when requesting a quote
Using the Request a Quote plugin, you can choose which products can be quoted for – and which customers can request a quote.
So, you could specify a category (like ‘Wholesale’) where any user with the ‘Wholesale customer’ role could add products from the category to a quote list. If you wanted to hide the product prices from these users, you just select the ‘Hide prices on quotable items’ option.
With that setting active, the price will be hidden from the customer and they will not be able to purchase the product.
Hiding WooCommerce add-on prices
Another scenario where you might want to hide prices in WooCommerce involves the WooCommerce Product Add-Ons Ultimate plugin.
WooCommerce Product Add-Ons Ultimate
Personalize products with extra fields and custom options
Add-Ons Ultimate allows you to add extra fields to your WooCommerce products. These extra fields can have prices assigned to them. The prices are added to the main product price when the user selects the field.
However, you might want to hide the field prices. To do so, you can use the ‘Field Price Visibility’ and ‘Option Price Visibility’ settings. There’s a full write-up here in this support doc.
Hide prices in your store with WooCommerce Members
You can hide prices in WooCommerce so that it’s easier for you to sell to all types of customers in your store. It enhances the shopping experience by hiding WooCommerce prices for out-of-stock products or for stores that want to show a product catalog only.
We’ve shown you different ways to WooCommerce hide prices for your online store. Hopefully, now, you’re in a better position to take the next steps.
Ready to start hiding prices in your eCommerce store? Get WooCommerce Members Only today!