
Effective Methods to Conceal Product Pricing in WooCommerce Stores
Many online retailers find that WooCommerce's default visibility of product prices works well for their business model. However, certain types of enterprises require more discretion regarding who can view their pricing information.
Through working with various e-commerce store owners, several scenarios have emerged where concealing prices becomes necessary rather than optional.
Wholesale distributors often need to display special pricing exclusively to verified business clients. Similarly, business-to-business companies frequently prefer discussing client requirements before presenting pricing to ensure appropriate solutions are matched with correct costs.
After evaluating multiple approaches, three reliable techniques have been identified for hiding prices within WooCommerce. These methods accommodate diverse business types, from wholesale operations to luxury goods retailers.
Important Considerations Before Concealing Product Prices
Several business situations justify operating a WooCommerce store without visible pricing.
Wholesale suppliers frequently hide prices to prevent retail customers from accessing bulk discount information. Custom manufacturers, such as furniture makers, often remove pricing because each item involves unique material and design expenses.
Some premium brands create exclusive shopping experiences by revealing prices only to serious, qualified buyers.
While WooCommerce lacks built-in functionality for hiding prices, three effective methods have been identified through testing.
Use the following quick links to navigate directly to your preferred approach:
- Method 1: Conceal All or Specific Product Prices and Cart Buttons Using Code
- Method 2: Conceal Product Prices from Non-Wholesale Customers
- Method 3: Establish a Professional Online Catalog Without Visible Pricing
Let's explore these methods in detail.
Method 1: Conceal All or Specific Product Prices and Cart Buttons Using Code
This approach demonstrates how to hide product prices and cart buttons either for your entire store or specific items. This method proves useful when you prefer customers to contact you directly for pricing or log into their accounts to view costs.
During evaluation of various options, many plugins designed for hiding prices were found to be either costly or overly complex. A straightforward code solution has been developed that accomplishes the task efficiently.
This technique works well for those comfortable with a simple, one-time setup who don't require the extensive management features offered by dedicated wholesale or catalog plugins.
While the term "code solution" might seem daunting, the process remains beginner-friendly.
We'll utilize a code management plugin that simplifies adding code to your site through simple copy-and-paste operations. This plugin has been tested extensively and proven reliable.
The free version functions perfectly for hiding prices. The premium version offers additional features like AI code generation for custom solutions.
First, install and activate the free code management plugin. If assistance is needed, consult documentation on installing WordPress plugins.
Next, follow one of the tutorials below.
Option 1: Hide Price and Cart Buttons for Specific Products (Non-Logged-In Users)
The simplest approach involves using a pre-made code snippet from the plugin's library. This code conceals prices and cart buttons from specific products when users aren't logged in.
If you're already familiar with the plugin, locate the appropriate snippet in the library.
Otherwise, if this represents your first experience with the plugin, access the relevant snippet.
Then, click the 'Add to Site' button to begin.

At this stage, you'll need to either create a free account or log in if you already have one.
During registration, you'll be prompted to connect your WordPress website with the code library.

After logging in, select which website should receive the snippet.
Then, click 'Deploy.'

The system will return you to your WordPress admin area to complete setup.
Here, click 'Confirm and Install Snippet.'

This brings you to the code snippet editor, where you'll make two simple customizations.
First, modify the product IDs. Locate this line of code:
$not_purchasable_products = array( 23, 22 );
Replace those numbers with your specific product IDs.
If you're uncertain about product IDs, consult documentation on locating product identifiers in WooCommerce.
For example, to hide prices for products 63, 64, and 65, you would write:
$not_purchasable_products = array( 63, 64, 65 );
Next, customize the message displayed instead of the price.
Locate this code section:
function wws_hide_price_not_logged_in( $price_html, $product ) { if ( is_non_purchasable_products_for_visitors( $product ) ) { $price_html = '<div><a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">' . __( 'Login with wholesale account to see prices', 'wws' ) . '</a></div>'; } return $price_html;You can modify the text 'Login with wholesale account to see prices' to alternatives like 'Login to see prices' or 'Contact us for pricing.'
Here's an example:
function wws_hide_price_not_logged_in( $price_html, $product ) { if ( is_non_purchasable_products_for_visitors( $product ) ) { $price_html = '<div><a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">' . __( 'Login to see prices', 'wws' ) . '</a></div>'; } return $price_html;When users click this link, they'll be directed to the WooCommerce login page.
Finally, switch the toggle from 'Inactive' to 'Active.' Then, click 'Update.'

Now, visit your product pages to observe the changes.
You'll notice prices and cart buttons are hidden and replaced by your custom message.

Your customized message will now appear on the selected product pages.


