October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Hide Prices in WooCommerce: 3 Methods, Including Code

Hide WooCommerce prices with a PHP filter, catalog visibility controls, or audience-based rules—and check separately whether purchasing remains enabled.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To hide a WooCommerce price, choose whether you want to remove only the displayed price, hide the Add to Cart control as well, or stop a particular audience from buying. Those are separate outcomes: filtering price HTML does not automatically disable purchasing or remove price data from every site surface.

Choose what “hide the price” should mean

Hiding a displayed price can suit a quote-based catalog, a store that shows prices only to logged-in customers, or a temporary catalog-only setup. Decide which behavior you need before choosing a method:

As an Amazon Associate I earn from qualifying purchases.

  • Hide the displayed amount: visitors do not see the price in the product page’s rendered price area.
  • Hide the purchase control too: visitors should not see Add to Cart, or should not be able to proceed through cart and checkout.
  • Apply a rule to an audience or products: for example, show prices only to selected user roles or on selected categories.

These controls may be separate in extensions. Removing visible price markup alone does not necessarily prevent purchase, and it does not establish that price information is absent from feeds, structured data, endpoints, or custom templates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Three ways to hide WooCommerce prices

Method Best suited to Trade-off
PHP filter in a child theme or site-specific code plugin A global or narrowly coded display change when someone can maintain PHP. Requires code and compatibility checks; changing displayed price HTML alone may leave purchase paths available.
Catalog visibility or settings extension Switching a store or user group to catalog mode, potentially controlling prices and purchasing together. May affect more than price display, including cart or checkout behavior.
Rule-based hide-price extension Conditions based on guest status, roles, products, or categories, with replacement text or a quote action. Adds an extension dependency; confirm current compatibility and the exact behavior of its rules.

Official WooCommerce and extension documentation describes these capability categories, but does not establish comparative performance or guarantee that a particular option is right for every store. Extension availability and behavior can change.

#1 Best Overall
Sale
Lifewit Chilled Condiment Caddy with Stainless Steel Spoons & Tongs, 2 Pcs
  • Ultimate Freshness & Flavor: The condiment caddy’s lower compartment ingeniously holds ice cubes or crushed ice, actively keeping vegetables, sauces, or fruits succulent and fresh for hours. Each top compartment features a removable lid for easy access
  • Safe, Stylish & Complete with Accessories: Crafted from sturdy, BPA-free PET plastic, our condiment organizer offers food safety and elegant aesthetics. The set includes 2 metal clips and 5 metal spoons for grabbing and scooping fruits, vegetables, and sauces. The crystal-clear design provides a seamless view of contents, perfect for beautifully presenting fruits, salads, or any treats. (Note: Avoid direct contact with hot food.)
  • Modular Capacity for Every Need: Each individual lidded compartment 5.7"(14.4cm) × 3.8"(9.7cm) × 2.4"(6.2cm) holds 2.5 cups, ideal for single servings. The complete set includes 5 removable compartments fitting perfectly into the main tray 15.7"(40.6cm) × 6.2"(15.8cm) × 5.1"(13cm), offering ample total capacity
  • Effortless Cleaning & Clear View: Constructed from transparent plastic, this garnish tray offers a clear view of stored food and ice. After use, it conveniently rinses clean with water. For thorough hygiene and longevity, HAND WASHING is highly recommended. (Important: Not dishwasher safe.)
  • Versatility for Every Celebration: This fruit tray transforms into your go-to server for family gatherings, picnics, BBQs, and indoor/outdoor parties! Use it as a convenient hot dog/pizza toppings station, stylish bar garnish caddy, vegetable/fruit tray, or a complete taco bar serving set

Method 1: Hide price HTML with a PHP filter

WooCommerce provides hooks and filters for changing output without editing core files. Its hooks guide explains that filters can manipulate and return a value, such as a product price: WooCommerce Hooks: Actions and filters. The product code reference documents the woocommerce_get_price_html filter used by WC_Product::get_price_html() to return rendered price HTML: WC_Product::get_price_html().

For example, this illustrative snippet returns an empty string for visitors who are not logged in and leaves the rendered price unchanged for logged-in users:

add_filter( 'woocommerce_get_price_html', 'my_hide_product_price', 10, 2 );
function my_hide_product_price( $price, $product ) {
    if ( ! is_user_logged_in() ) {
        return '';
    }
    return $price;
}

This is an example, not tested code or a complete access-control solution. It filters rendered price HTML; it does not by itself hide Add to Cart, disable cart or checkout, or prove that prices are absent from other data surfaces. If your policy is “only logged-in customers may buy,” implement the purchase restrictions separately using mechanisms suited to your store.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install and verify the snippet carefully

  1. Add the code through a child theme or a site-specific code plugin, rather than editing WooCommerce core files.
  2. Test as both a logged-out visitor and a logged-in customer. Check product pages, shop and category listings, and any other templates where prices appear.
  3. For variable products, test variation selection and the displayed price in your theme. Variable product rendering has a variable-specific price filter as well as the shared price HTML filter; the result may appear as a range or a single amount. See the variable product code reference.
  4. Check whether installed extensions, theme customizations, and caches change what visitors see. Clear relevant caches after changing the code.

WooCommerce describes hook customization as developer-level work and advises seeking help if you are unfamiliar with hooks, snippets, or resolving conflicts. The same guidance recommends assistance from a WooExpert or developer when needed: WooCommerce Hooks: Actions and filters.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Method 2: Use catalog visibility controls

A catalog-mode extension is worth considering when the goal is broader than removing price text—for example, presenting a catalog to a defined audience or changing whether customers can purchase. Check the extension’s documentation for the exact controls it provides, including whether price visibility, Add to Cart, cart, and checkout behavior are independent. The official Catalog Visibility Options documentation describes these types of settings.

Before enabling catalog mode, confirm its scope: a setting intended for a user group or the whole catalog may affect purchasing behavior beyond the product price display.

Method 3: Use rules to hide prices selectively

A dedicated hide-price extension can be a better fit when different products or audiences need different behavior. Official extension documentation describes rules that can target guests, user roles, products, and categories, and replace the price with text or a custom action such as requesting a quote: Hide Price for WooCommerce documentation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the extension’s current compatibility and test each rule against the intended audience and products. Also verify whether the rule affects only the visible price or separately changes Add to Cart and purchasing. A quote message or button is not, by itself, proof that cart and checkout are disabled.

Test the result from the customer’s point of view

  • View the store as a guest and as each relevant customer role.
  • Check simple and variable products, including after selecting a variation.
  • Inspect shop, category, and product pages, plus any custom templates where prices might be rendered.
  • Attempt the intended purchase path if purchasing should be restricted; hiding the displayed price is not a substitute for testing cart and checkout behavior.
  • If an extension rule does not appear to work, check that the rule is published and targets the intended role, then clear caches if needed. WooCommerce’s extension troubleshooting guidance calls out rule publication, role targeting, and cache clearing: Hide Price for WooCommerce troubleshooting.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.