How to hide price in WooCommerce: 4 simple methods (and code)

WooCommerce hide price

Hiding prices from public view is necessary for wholesale stores, catalog sites, and many other situations. But, unfortunately, WooCommerce doesn't include any built-in way to hide product prices.

Don't worry, though! It's definitely doable, you'll be able to hide WooCommerce product prices by following the steps in this guide.

For example:

Keep reading to discover how to hide prices in WooCommerce for these use cases and more. By the end, you'll be able to completely hide prices for all visitors or conditionally hide prices by user role/logged-in status. Some visitors will see the price as usual, and others will see the WooCommerce products without price.

Recommended ways to hide prices in WooCommerce

Hiding prices in WooCommerce is achievable through four main methods. Each method serves different business requirements and technical capabilities.

WooCommerce hide price functionality is not built into the platform by default. You need either plugins or custom code to remove prices from product displays.

You can also hide prices using code. I'll share code snippets at the end, though this method is only recommended for developers.

Comparison of WooCommerce hide price methods

Method Best for Price visibility Plugin required Setup difficulty
Hide prices from logged out users Wholesale stores, members-only shops, B2B businesses Visible to logged in users only WooCommerce Wholesale Pro Easy (5 minutes)
Product tables without prices Product catalogs, directories, showcase sites Hidden from all users WooCommerce Product Table Easy (10 minutes)
Quick view lightboxes without prices Interactive catalogs, product previews Hidden in lightbox view WooCommerce Quick View Pro Easy (5 minutes)
Private store/categories Exclusive stores, restricted access shops Entire products hidden WooCommerce Private Store or Protected Categories Easy (10 minutes)
Custom code Developers, simple requirements Flexible based on code None Hard (requires coding)

How to choose the right price hiding method

Follow this decision tree to select your best option:

Start here: Why do you want to hide prices in WooCommerce?

→ "I run a wholesale or B2B store"

  • Do you need different prices for different customer groups?
    • Yes: Use WooCommerce Wholesale Pro (Option 1)
    • No: Continue below
  • Do you want guests to browse products?
    • Yes: Use WooCommerce Wholesale Pro with hide until login
    • No: Use WooCommerce Private Store (Option 4)

→ "I want to create a product catalog"

  • Do you need search and filter features?
    • Yes: Use WooCommerce Product Table (Option 2)
    • No: Use custom code for simple hiding
  • Do you want product details in popups?
    • Yes: Add WooCommerce Quick View Pro (Option 3)
    • No: Stick with Product Table alone

→ "I run a members-only store"

  • Should non-members see product names and descriptions?
    • Yes: Use WooCommerce Wholesale Pro (Option 1)
    • No: Use WooCommerce Private Store (Option 4)

→ "I need prices hidden temporarily"

  • Are you comfortable with code?
    • Yes: Use custom code snippets
    • No: Use WooCommerce Wholesale Pro for easy on/off switching

→ "I want to test the market"

  • Use WooCommerce Product Table to create a catalog page
  • Add WooCommerce Quick View Pro for product previews
  • Include an enquiry form for price requests

Option 1 - Hide prices from logged out users

First, let's look at the most dynamic option. This can conditionally hide WooCommerce product prices from logged in users. Prices appear as normal for logged in users. They simply login to WooCommerce to see prices, whereas guest users cannot see prices or purchase products.

To show prices when logged in, you need the WooCommerce Wholesale Pro plugin. This plugin provides:

  • Price visibility control for non-logged-in users
  • Different price displays based on user roles
  • Tax information variations by user role

For example, if you're running a wholesale store, this lets you make your product catalog public while restricting price visibility to registered wholesale seller accounts.

While the plugin is designed for wholesale stores, it works for any business model requiring login-based price visibility.

How to set it up

Setting up price hiding is a straightforward process in WooCommerce Wholesale Pro. Navigate to WooCommerce → Settings → Wholesale. Enable the 'Hide price until login' option and save your changes.

WooCommerce hide price until login

After activation, prices become invisible to non-logged-in users across your entire site. The plugin also disables buy buttons for logged out users. That's because people cannot make purchases without seeing prices.

WooCommerce Wholesale Pro integrates with WooCommerce Product Table. (You can save money by buying both plugins as a bundle.) The table's 'Buy' column displays the correct price to logged in users, and the alternate content to guests.

WooCommerce hide price by user role

User role-based price hiding is an advanced feature that extends beyond simple login status checks. The WooCommerce Wholesale Pro plugin displays different pricing structures to different user roles.

For stores offering both retail and wholesale options, it works as follows:

  • Logged out users experience catalog mode without prices or buy buttons.
  • Logged in customers with the default 'customer' role view standard product pages.
  • Wholesale roles see role-specific pricing.

This creates a tiered pricing system with complete visibility control.

Exploring real-world applications of WooCommerce Wholesale Pro

B2B wholesale websites are - unsurprisingly - the primary use case for WooCommerce Wholesale Pro. However, numerous other business models can also benefit from role-based price hiding.

Real-world applications include:

  • Exclusive members-only purchasing clubs display products publicly for SEO benefits while restricting price visibility to logged in members. This strategy attracts new members while maintaining exclusivity. Only authenticated users can complete purchases.
  • Branded product sellers serving specific customer segments like schools, sportswear companies, or workwear suppliers display products publicly to encourage enquiries. Prices remain hidden until authorized user login.

Option 2 - Hide prices in product tables

In option 2, we'll learn how to completely eliminate price from the equation for all visitors. For example, you could use this to create a catalog page with a searchable directory of all your products.

Product tables without prices are ideal for catalog-style displays where purchasing is not the primary goal. This approach removes both prices and add to cart buttons.

For this use case, you'd likely want to:

  • Hide all mention of prices
  • Hide the add to cart button

To set this up, you can use WooCommerce Product Table to create a table view catalog of products. This also has the benefit of adding user-friendly filters and search options to help shoppers browse your catalog.

The table view either replaces or supplements the default WooCommerce shop page. You can choose where to use it in your store.

WooCommerce WooCommerce hide price example
A product table with no price or buy buttons

If you're just looking to create a catalog or table listing and you want to hide the price from all users, WooCommerce Product Table is all you need. Or if you want to remove the price for logged out users only, then you also need the WooCommerce Wholesale Pro plugin from Option 1.

How to create a catalog page with no price or add to cart button

  1. Install WooCommerce Product Table on your WordPress site.
  2. Create a new product table via Products → Product Tables.
  3. Choose between creating a standalone catalog page or enabling catalog view on shop page templates.
    Create page of table builder
  4. Select products for the manual catalog page or choose which shop templates use catalog view.
  5. Configure columns on the 'Columns' page. Exclude the price column. Customize column names using the pencil icon.
    Customize columns in WordPress table plugin
  6. Disable product page links to prevent price visibility on single product pages. Access advanced column options for each column. Disable the 'Link to the product page' toggle.
  7. Use the provided shortcode or 'Product Table' Gutenberg block to display the table. Shop page templates automatically display tables if configured.

The final result displays products without prices or purchase options:

WooCommerce hide price plugin

Option 3 - Hide prices in quick view lightboxes

WooCommerce hide price plugin with quick view

Another user-friendly option is to stack WooCommerce Product Table with the WooCommerce Quick View Pro plugin. When a user clicks on a product name, it opens the product quick view box instead of taking them to the single product page.

Quick view functionality provides detailed product information without exposing prices. Customers access comprehensive product details while prices remain hidden.

Quick View Pro includes built-in controls for add to cart button and price display management. That way, it lets shoppers view more details about your products without exposing the price.

How to add product quick view without prices

  1. Install WooCommerce Quick View Pro on your WordPress site.
  2. Access plugin settings at WooCommerce → Settings → Products → Quick view, or use the automatic setup wizard.
  3. Activate your license key. Disable 'Show price' and 'Show add to cart button' options.
    Hide price in WooCommerce quick view
  4. Edit your product table at Products → Product Tables. Add a 'Quick view' column.

WooCommerce Quick View Pro compatibility with WooCommerce Wholesale Pro enables conditional price display. This combination shows prices in lightboxes for logged in users only.

Implementation requires enabling 'Hide Price Until Login' in WooCommerce Wholesale Pro and price display in Quick View. Guest users see price-free lightboxes. Authenticated users view standard pricing.

Option 4 - Hide prices from public view

The above solutions assume that you want to hide the prices for otherwise public products. That is, you want everyone to be able to see the product details – you just don't want people to be able to see the prices.

However, if you don't want unauthenticated shoppers to be able to see any part of your products, you might want to:

Or, if you're specifically looking to hide WooCommerce prices to create a wholesale store where wholesale customers can see prices, but retail customers cannot, then you might want to check out our complete guide to creating a WooCommerce wholesale store. This guide will teach you how to offer different prices for retail customers and wholesale customers, rather than completely hiding prices. You can also learn how to set up a price per unit or WooCommerce paywall.

How to hide prices in WooCommerce using code

As you can see, the plugins featured above make it easy to hide prices in WooCommerce without needing any technical know-how. Before we finish, I'll share some simple PHP code snippets for hiding prices either storewide, per category, or per product. These don't have advanced features such as showing prices to certain user roles. If you need those then I recommend using one of the plugins featured above, instead of custom code.

Experienced developers can use the following code snippets to add to their theme or child theme's functions.php file or via a separate utility plugin.

Code snippet: Hide prices storewide

Storewide price hiding removes all product prices and displays custom messages. This code affects every WooCommerce product.

<?php
/**
* Custom Code to Hide All Product Prices Storewide
*
* Place this code in your theme's functions.php file or a custom plugin.
*/

/**
* Remove price and add-to-cart button for all products.
*/
function custom_hide_prices_storewide() {
// Hide price by filtering the price HTML output.
add_filter( 'woocommerce_get_price_html', 'custom_replace_price_with_message', 10, 2 );

// Remove add-to-cart button on single product and shop pages.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action( 'wp', 'custom_hide_prices_storewide' );

/**
* Replace product price with a custom message.
*
* @param string $price Existing price HTML.
* @param object $product Product object.
* @return string Modified price HTML.
*/
function custom_replace_price_with_message( $price, $product ) {
return '<span style="color: red; font-size: 14px;">Call our office at <strong>516.695.3110</strong> for pricing information.</span>';
}

Customize the replacement text with your preferred message for hidden prices.

Code snippet: Hide prices from products in specific categories

Category-based price hiding lets you remove the price for designated product categories only.

<?php
/**
* Custom Code to Hide Product Prices Based on Specific Categories
*
* Place this code in your theme's functions.php file or a custom plugin.
*/

/**
* Remove price and add-to-cart button for products in specific categories.
*/
function custom_hide_prices_for_categories() {
if ( is_product() ) {
custom_handle_price_visibility( get_the_ID() );
}
}
add_action( 'wp', 'custom_hide_prices_for_categories' );

/**
* Modify product display based on category association.
*
* @param int $product_id Product ID.
*/
function custom_handle_price_visibility( $product_id ) {
$hidden_price_category_ids = array( 12345, 67890 ); // Replace with your category IDs.

// Retrieve the categories associated with the product.
$product_categories = get_the_terms( $product_id, 'product_cat' );
if ( ! $product_categories || is_wp_error( $product_categories ) ) {
return;
}

// Extract category IDs from the terms.
$product_category_ids = wp_list_pluck( $product_categories, 'term_id' );

// Check if any of the product's categories match the hidden price categories.
if ( array_intersect( $hidden_price_category_ids, $product_category_ids ) ) {
// Hide price and add-to-cart button.
add_filter( 'woocommerce_get_price_html', 'custom_replace_price_with_message', 10, 2 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
} else {
// Ensure filters and actions are restored for other products.
remove_filter( 'woocommerce_get_price_html', 'custom_replace_price_with_message', 10, 2 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
}
add_action( 'woocommerce_before_shop_loop_item', 'custom_handle_price_visibility', 5 );

/**
* Replace product price with a custom message.
*
* @param string $price Existing price HTML.
* @param object $product Product object.
* @return string Modified price HTML.
*/
function custom_replace_price_with_message( $price, $product ) {
return '<span style="color: red; font-size: 14px;">Call our office at <strong>123.456.7890</strong> for pricing information.</span>';
}

Add target category IDs and customize the replacement message for your requirements.

Code snippet: Hide prices from specific products

This code snippet lets you hide prices for specific individual products. Again, replace the ID's with the correct product ID's, and modify the text to appear in place of the hidden prices.

<?php
/**
* Custom Code to Hide Product Prices for Specified Products
*
* Place this code in your theme's functions.php file or a custom plugin.
*/

/**
* Remove price and add-to-cart button for specific products.
*/
function custom_hide_prices_for_products() {
if ( is_product() ) {
custom_handle_price_visibility_for_product( get_the_ID() );
}
}
add_action( 'wp', 'custom_hide_prices_for_products' );

/**
* Modify product display based on product ID.
*
* @param int $product_id Product ID.
*/
function custom_handle_price_visibility_for_product( $product_id ) {
$hidden_price_product_ids = array( 123, 456, 789 ); // Replace with your product IDs.

// Check if the current product ID is in the hidden price list.
if ( in_array( $product_id, $hidden_price_product_ids, true ) ) {
// Hide price and add-to-cart button.
add_filter( 'woocommerce_get_price_html', 'custom_replace_price_with_message', 10, 2 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
} else {
// Ensure filters and actions are restored for other products.
remove_filter( 'woocommerce_get_price_html', 'custom_replace_price_with_message', 10, 2 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
}
add_action( 'woocommerce_before_shop_loop_item', 'custom_handle_price_visibility_for_product', 5 );

/**
* Replace product price with a custom message.
*
* @param string $price Existing price HTML.
* @param object $product Product object.
* @return string Modified price HTML.
*/
function custom_replace_price_with_message( $price, $product ) {
return '<span style="color: red; font-size: 14px;">Call our office at <strong>123.456.7890</strong> for pricing information.</span>';
}

Frequently asked questions about hiding WooCommerce prices

Can I hide prices for specific products only?

Yes, you can hide prices for specific products. The custom code method lets you target individual product IDs. WooCommerce Wholesale Pro also allows product-level control through its settings.

Will hiding prices affect my SEO?

Hiding prices doesn't hurt SEO directly. Search engines can still crawl and index your product titles, descriptions, and images. Some SEO experts suggest that displaying products without prices can actually improve rankings because it keeps visitors on your site longer as they explore products.

Can customers still add products to cart without seeing prices?

No, the hide price methods also remove add to cart buttons. This prevents confusion and ensures customers know the price before purchasing. If you need quote requests instead, combine price hiding with an enquiry form plugin.

How do I show different prices to wholesale and retail customers?

WooCommerce Wholesale Pro handles this automatically. Set up wholesale user roles and assign different prices to each role. Retail customers see regular prices, wholesale customers see wholesale prices, and logged out users see no prices at all.

Can I display "Contact for price" instead of hiding prices completely?

Yes, WooCommerce Wholesale Pro supports custom text replacement. Instead of blank spaces, display messages like "Contact for price" or "Login to see price". The custom code examples also include this feature.

Will hiding prices work with my theme?

The plugins work with all properly coded WooCommerce themes. They use standard WooCommerce hooks and filters. Custom code might need adjustments based on your theme's structure. As always, test on a staging site first.

Can I hide prices on some pages but show them on others?

Use WooCommerce Product Table to create price-free catalog pages while keeping prices on regular shop pages. Alternatively, use custom code with conditional checks for specific pages.

Can I schedule price hiding for specific times?

Not directly with the standard plugins. You'd need custom development or a scheduling plugin. Consider using maintenance mode during price updates or special events when you want prices temporarily hidden.

Do hidden prices affect the checkout process?

When prices are hidden, the add to cart and checkout functions are also disabled. Customers cannot proceed to checkout without seeing prices. This protects both you and your customers from confusion about costs.

Can I hide prices from WooCommerce but still show if items are in stock?

Yes, stock status displays independently from prices. All the plugin options let you show stock levels while hiding prices. This helps customers know product availability without revealing pricing.

Will price hiding slow down my site?

The plugins add minimal overhead to your site. They use efficient code and WordPress best practices. Custom code typically runs faster than plugins but requires maintenance. For most sites, the performance impact is negligible.

Can I export products with hidden prices?

Yes, hiding prices only affects the frontend display. Your WooCommerce backend, exports, and API still contain price data. This means you can manage inventory and pricing normally while hiding your WooCommerce product prices from customers.

Can I combine multiple price hiding methods?

Yes, the plugins work together. Common combinations include WooCommerce Wholesale Pro with Product Table for wholesale catalogs, or Quick View Pro with Product Table for interactive catalogs. Each plugin handles its specific function without conflicts.

Where to get the plugins

Hiding prices in WooCommerce serves multiple business purposes. It's useful for many use cases including wholesale stores, catalog sites, members-only stores, and other specialized business models.

Plugin solutions for hiding WooCommerce prices include:

  1. Hide prices from logged out usersWooCommerce Wholesale Pro hides prices from logged out visitors.
  2. List products in a table without pricesWooCommerce Product Table lists products without prices.
  3. Create quick view lightboxes without pricesWooCommerce Quick View Pro creates product lightboxes without prices.
  4. Make your whole store or specific categories privateWooCommerce Private Store or WooCommerce Protected Categories hide products completely.

To get started, select your preferred plugin(s) and start hiding prices in WooCommerce!

15 Comments

  1. Hi! Thanks for all the info.
    I was wondering if in any of this cases, if you just hide the product price the user can still add to cart the product and complete the purchase? That is what I need to achieve: do not show product price, but let the user to make a purchase, and then the shop admin will contact the user an share the final price.
    Is this possible with one of this plug ins?

    • Hi, Daniela. Thanks for asking. While you can use either Option 2 or 3 to allow customers to add products to the cart without showing the product prices, please note that the prices will still be displayed by default in the WooCommerce cart page.

      To allow customers to make a purchase without showing the product prices even in the cart and checkout pages, I suggest that you contact official WooCommerce Support for the best advice.

  2. I want to mention Hidden price price with article number in picture (jpg format) in such way that i can Inform my wholesale client to find the hidden price and cater my retail client with the same picture without disclosing price. Ps i want to Make my retail customer think that its product code.
    For eg:
    13ADS/18-LCW-00

    Where 13ADS is the product code while 1800 is the price.

    Any updated advice would be highly appreciated.

    • Hi, Arsalan.

      You can mention or add what you like to the product image (such as your example product code text) by using an image editing program or app, such as Photoshop or similar software.

      Then each wholesale user will need their own account on your site to be able to access the wholesale area/page and unlock the wholesale pricing for their user role.

      Let me know if you have any other questions. You can also contact us via our dedicated Support Center.

  3. Hi Colin,
    plugin is not compatible with paid woocommerce memberships plugin, unfortunately.
    Could you check up this, please.

    If you could find a workaround to hide price for the login-status only, would be great (add-to-cart button can be blocked by memberships plugin itself).
    Thanks a lot.

    Kind regards from Germany
    Frank

    • Hi, Frank. Thanks for your comment and sorry to hear the Hide Price Until Login plugin by CedCommerce doesn't work with your WooCommerce memberships plugin. Please may I know the latter's exact name and author/developer?

      As a workaround, you can use a combination of our WooCommerce Product Table and WooCommerce Protected Categories plugins to hide your product prices until a user logs in. Put your products in protected categories and then display a copy of your products in a public category or categories via the product table without displaying/including the price and add to cart columns. You will need to disable the links to the single product pages as well. This will display a product table without the prices and ability to add them to the cart for logged out users. Logged in users can navigate to the protected categories or be redirected to a special page that displays a product table that includes the price and add to cart columns.

      I hope this makes sense. Should you have any other questions, you can also get in touch with us via our dedicated Support Center. Many thanks.

Please share your thoughts...

Your email address will not be published. Required fields are marked *