PluginGauge

How to hide prices until login in WooCommerce

By Raz Technologies · published · data updated

Short answer: use a catalog-mode plugin that hides prices and the Add to cart button for logged-out visitors, or add two WooCommerce filters (below) if you are comfortable with code. See our catalog mode / hide prices plugin ranking for the full comparison.

The problem

B2B and wholesale stores often don't want the public to see prices — they negotiate per account, or show trade prices only to approved customers. WooCommerce shows prices to everyone by default.

Option 1: a plugin (no code)

These are the highest-ranked catalog-mode plugins we track. All of them can hide prices for guests; check each profile for the exact rules (per role, per category) and compatibility.

Top catalog-mode plugins — from our catalog mode / hide prices ranking, 23 Sept 2026
PluginRankCheckout BlocksInstalls
Hide Price and Add to Cart#1Yes600+
Catalog Booster & Product Catalog Mode#2Not declared1,000+
Price Guard#3Not declared200+
Product Enquiry#4Not declared10,000+
Private Store for WooCommerce B2B & Wholesale by B2BKing#5Not declared600+
YITH WooCommerce Catalog Mode#6Not declared60,000+

Option 2: two filters (for developers)

Add this to a small custom plugin or your child theme's functions.php. The first filter replaces the price with a login link; the second stops guests from adding products to the cart.

add_filter( 'woocommerce_get_price_html', function ( $price, $product ) {
    if ( is_user_logged_in() ) {
        return $price;
    }
    $url = wc_get_page_permalink( 'myaccount' );
    return '<a href="' . esc_url( $url ) . '">' . esc_html__( 'Log in to see prices', 'my-store' ) . '</a>';
}, 10, 2 );

add_filter( 'woocommerce_is_purchasable', function ( $purchasable ) {
    return is_user_logged_in() ? $purchasable : false;
} );

After adding it, check a product page, the shop page and the block cart while logged out, then logged in.

FAQ

Does hiding the price also stop guests from buying?

Not by itself. Hiding the price HTML only changes what is shown; to stop purchases you also need to make products non-purchasable for guests (the woocommerce_is_purchasable filter, or a plugin option that hides Add to cart).

Will this work with the block-based cart and checkout?

Test it. Of the 20 catalog-mode plugins we track, 3 declare Cart & Checkout Blocks compatibility (as of 2026-09-23).

Can I show prices only to wholesale customers?

Yes — role-based rules do that. Look for plugins that restrict prices by user role, or combine a wholesale pricing plugin with a hide-price rule for guests.