How to Hide Price In WooCommerce: A Detailed Guide

September 4, 2025,
How to Hide Price In WooCommerce: A Detailed Guide

Stuck between whether to hide the product price or display it to your customers on your product pages? 

Well, you are not alone in being confused about this matter. While it is assumed that displaying product prices to the customer is a key factor in the buying decision, it also comes with caveats. Many reasons make the store owners enable the visibility of the product price, while there are certain situations that make hiding the price mandatory.

So, here in this blog, we will explore when and why to hide the product price in WooCommerce and the possible methods to do so. 

Why Disable Price in WooCommerce?

Here are a few situations, reasons, and benefits that make hiding the product price in WooCommerce mandatory. 

  • Encourage Users to Register First:  If you want to improve the user registration rate and encourage every visitor to register, then hiding the price for unregistered users might encourage them to register first. 
  • More Customer Inquiries: If you want the customers to interact with you and place a product inquiry, then this is one of the ways to hide the product price and add to cart button, and replace it with custom text and a contact us form. 
  • Show Exclusivity: To create hype and engagement for exclusive products, some stores find hiding the product price useful. So, for your exclusive products, you can hide the price and build the well-deserved hype. 
  • Soon-to-Be-Launched Products: Do not want to disclose the price for your upcoming products? Fret not, because hiding the price is doable. You can either opt for a hide price plugin or a coming soon product plugin, which allows you to add the coming soon badge as well as hide the buying option.
  • Out-of-Stock Products: There are instances where store owners do not want to completely hide the out-of-stock products from your store, but hide the price only. In such a case, they opt for a hide price option. 

Best Methods To Hide Product Price In WooCommerce

There are two most effective methods to hide WooCommerce price for your products or specific categories.

These methods are

  • Hide price in WooCommerce via code.
  • Hide product price in WooCommerce using a plugin

Let’s explain each of these methods in detail. 

  • Hide price in WooCommerce via code.

Hiding the product price comes with conditions, and below is the code that you need for each of the conditions.

  • Code To Hide Price For all WooCommerce Products

If you want to turn your product page into a catalog mode and hide the price for all the products, then here is the code that you need to include in your functions.php file:

add_filter('woocommerce_get_price_html', 'hide_price_for_all_products', 80, 2);

function hide_price_for_all_products($price, $product)

 {

    return ' '; // Empty string hides the price

}

Code Notes: Add a filter to describe how you want the price to be displayed. Also, mention the function and set the priority. In this case, we have set the priority to 80 and are passing 2 parameters: price and product. 

  • Code For Hiding Price for Specific Products

To hide the price for specific products instead of all the products, add this code to your .php file:

add_filter('woocommerce_get_price_html', 'hide_price_for_specific_products', 80, 2);

function hide_price_for_specific_products($price, $product) 

{

    $product_ids = array(5, 15, 78);

    if (in_array($product->get_id(), $product_ids)) {

        return ''; 

    }

    return $price;

}

Code Notes: Mention the IDs of each of the products for which you want to return an empty string and hide the price. If the IDs are not found, the actual prices will be displayed. 

 

  • Code To Hide Price For a Specific Category

To hide the price for specific categories, these code lines can help:

add_filter('woocommerce_get_price_html', 'hide_price_for_category', 80, 2);

function hide_price_for_category($price, $product) 

{

    $hidden_categories = array('uncategorized', 'accessories'); // Mention the category slugs

    if ( has_term( $hidden_categories, 'product_cat', $product->get_id() ) ) {

        return '';

    }

    return $price;

}

Code Notes: Mention the category slugs, and if the categories are found mentioned in the array, the prices will be removed.

  • Code to Hide Price for Certain User Roles

You might want to display the product price for some users and hide the price for users with a different user role; if so, this is the code you need:

add_filter('woocommerce_get_price_html', 'hide_price_for_user_roles', 80, 2);

function hide_price_for_user_roles($price, $product) 

{

    $user = wp_get_current_user();

    $restricted_roles = array('guest', 'subscriber', ‘contributor’); // Roles to hide prices from

    foreach ($restricted_roles as $role) {

        if (in_array($role, (array) $user->roles)) {

            return '';

        }

    }

    return $price;

}

Code Notes: Hide the price for all the mentioned user roles, and if the user roles are not found, the prices will be displayed. 

Well, this all seems so frustrating, a lot to do, and risky, which is actually true. When you opt for the coding method, you have to stay prepared. 

Despite propelling your efforts, the chances of messing up things are higher, which is why we personally recommend dodging this method and opting for a dedicated WooCommerce plugin

 

Also Read: Hiding the add to cart button in WooCommerce: A Step-by-step guide

  • Hide Price In WooCommerce Using a Plugin

All the conditions for which you had to code can be done easily with just a single plugin. By choosing our Hide Add to Cart and Price for WooCommerce plugin, you not only successfully hide the price but also the 'Add to Cart' option. 

So, let's explore how it works:

  •  Hide Price for All Products

To hide the price in the WooCommerce store and on all products, follow these steps:

  1. Install and activate the plugin.
  2. Go to WooCommerce > Hide Price & Add to Cart settings.
  3. Create a new rule.
  4. Choose “All Products” as the condition.
  5. Set the action to “Hide Price.”
  6. Save changes, and the price will be hidden for every product.

  • Hide Price for Specific Products or Categories

These steps will help you disable price in WooCommerce for specific products and categories.

  1. From the plugin settings, add a new hide-price rule.
  2. Select “Products” or “Categories” as the target condition.
  • For Products: pick the specific product(s) from the list.
  • For Categories: choose the desired product categories.
  1. Enable Hide Price for the chosen items.
  2. Save changes, and the selected products or categories will have no price displayed.
  • Hide Price for Specific User Roles

Follow these steps and hide the product price in WooCommerce for certain user roles:

  1. Add a new rule in the plugin settings.
  2. Under User Type/Role, choose who should be restricted.
  • Example: Guests 
  • Example: Specific roles like Subscriber, Customer, Contributor.
  1. Apply Hide Price to the chosen role(s).
  2. Save changes, and the selected user roles won’t see the price.
  • Hide Price for Specific Countries

To hide the price for specific countries, follow these steps:

  1. In plugin settings, add a new hide-price rule.
  2. Choose Country Condition.
  3. Select the countries where you want the price to be hidden.
  4. Apply Hide Price for those regions.
  5. Save changes, and users from those countries will no longer see prices.

Note: For further guidance on how the plugin works, here is the plugin guide

Comparing the plugin method with the coding method, we can clearly see the winner. 

However, the choice is completely yours depending on your specific business needs and the amount of complexity you are capable of handling. 

So, make your decision after you have analyzed every nitty-gritty of this matter. 

 

Further Reading: Best Plugins to Hide Price In WooCommerce

Frequently Asked Questions

  • Why should I hide product prices in WooCommerce?

Store owners hide prices for reasons like encouraging customer inquiries, boosting registrations, showing exclusivity, hiding prices for out-of-stock or upcoming products, and managing B2B or wholesale pricing strategies.

  • Is hiding the product price good for SEO?

 Yes, as long as the product pages remain indexable. Instead of showing the price, you can replace it with custom text like “Contact for Price”, which still gives search engines valuable content without harming SEO.

  • Can I hide the price only for unregistered users?

Yes. By using custom code or a plugin, you can hide prices from guests and show them only to logged-in or specific user roles.

  • Can I hide prices for specific countries?

Yes, with a plugin, you can restrict price visibility based on the customer’s country. This is useful for region-specific pricing or when you don’t sell in certain areas.

  • What happens if I hide the price using code?

The price will not be visible on the frontend, but WooCommerce still keeps it in the backend (for cart and checkout). However, using custom code requires caution, as errors can break your site.

Key Takeaway!

We have learned the reasons why hiding the product price in WooCommerce becomes a need, and we have also discussed the methods to do so. No matter how professional a coder you are, opting for the coding method to hide the price in WooCommerce is not an ideal solution.

So, get your hands on the best hide price WooCommerce plugin and be at peace, and dodge the complexities that might have come your way through coding. 

Buy Now