Documentation Hide Price & Show Custom Button for WooCommerce

Hide Price & Show Custom Button for WooCommerce

Version 1.0.0 · Updated April 2026

Requirements

Before installing, confirm your environment meets the following minimum requirements:

Hide Price & Show Custom Button is tested against the latest stable WooCommerce and WordPress releases and is HPOS (High Performance Order Storage) compatible.

Installation

Method 1 — Upload via WordPress Admin (Recommended)

  1. Download hide-price.zip from your My Account downloads page.
  2. In WordPress admin, navigate to Plugins → Add New Plugin.
  3. Click Upload Plugin → Choose File, select the zip, and click Install Now.
  4. Click Activate Plugin when installation completes.

Method 2 — FTP Upload

  1. Unzip hide-price.zip on your local computer.
  2. Connect to your server via FTP and navigate to /wp-content/plugins/.
  3. Upload the extracted hide-price folder.
  4. In WordPress admin, go to Plugins → Installed Plugins and activate Hide Price & Show Custom Button for WooCommerce.

Licence Activation

  1. Go to WooCommerce → Hide Price → Licence.
  2. Enter your CA- licence key from your purchase confirmation email.
  3. Click Activate Licence.

Your licence key is also available from My Account → Orders on coreaddons.com.

Hiding Prices

Prices can be hidden at three levels: sitewide, per category, or per individual product. More specific settings override broader ones.

Sitewide

  1. Go to WooCommerce → Hide Price → Settings → General.
  2. Enable Hide prices for all products.
  3. Choose which user roles still see prices (see Role-Based Visibility section).
  4. Click Save Settings.

Per Category

  1. Go to Products → Categories and edit the desired category.
  2. In the Hide Price Settings section, enable Hide prices for products in this category.
  3. Save the category.

All products assigned to this category will have their prices hidden. If a product belongs to multiple categories and at least one has hiding enabled, the price is hidden unless overridden at product level.

Per Product

See the Per-Product Override section for individual product control.

⚠️ Hiding prices also hides the Add to Cart button by default. If you want customers to be able to purchase (e.g., for logged-in users only), configure Role-Based Visibility so that the correct roles still see prices and the cart button.

Custom Button Setup

When prices are hidden, the Add to Cart button is replaced with a custom button that you configure. This button can link customers to a contact form, a login page, an enquiry page, or any URL.

  1. Go to WooCommerce → Hide Price → Settings → Button.
  2. Enter the Button Text — the label shown to customers (e.g., "Contact Us for Pricing", "Request a Quote", "Call for Price").
  3. Set the Button URL — either a full URL (e.g., https://yoursite.com/contact) or a relative path (e.g., /contact). You can also select a WordPress page from the dropdown.
  4. Choose Open in new tab if you want the link to open in a new browser window.
  5. Optionally enter Custom CSS classes to apply your theme's button styles to the custom button.
  6. Click Save Settings.

The custom button appears in place of the Add to Cart button on the product page and in the shop/category loop.

The custom button is a plain HTML link (<a> tag) styled as a button. It does not add anything to the cart — it simply navigates the customer to the configured URL.

Role-Based Visibility

You can control which WordPress user roles see prices and the Add to Cart button, and which roles see the hidden price state (custom button, "Login to see price" message).

  1. Go to WooCommerce → Hide Price → Settings → Roles.
  2. The Show price to these roles section lists all WordPress roles. Check each role that should see prices normally.
  3. Roles that are not checked will see the hidden price state and the custom button instead.
  4. Click Save Settings.

Common configurations:

Guest Behaviour

Guests (not logged in) can be handled separately from logged-in users. Go to WooCommerce → Hide Price → Settings → Guests.

The Guest Behaviour setting applies only to users who are not logged in. Logged-in user behaviour is controlled entirely by the Role-Based Visibility settings.

Shop Page Settings

Price hiding applies to product pages by default. You can control whether it also applies in the shop loop (archive/category pages) and other contexts.

Go to WooCommerce → Hide Price → Settings → Pages:

All four are enabled by default when price hiding is active. Uncheck any you want to exclude — for example, you might show prices on the shop grid for browsing but hide them on the product page for enquiry purposes.

Shortcodes

Use these shortcodes to display prices conditionally or override hiding in specific page content:

[ca_show_price id="123"]
  — Show the price for product ID 123 regardless of hide settings.
  Useful on custom landing pages where you want to reveal a price.

[ca_hide_price id="123"]
  — Force-hide the price for product ID 123 on this page,
  even if the global setting shows it.

[ca_price_if_role role="wholesale_customer" id="123"]
  — Show the price only if the current user has the specified role.
  Outputs nothing for all other roles.

Replace 123 with the actual product ID. You can find the product ID in the URL when editing a product in the admin (post=123).

Per-Product Override

Every product can override the global and category-level settings. This gives you granular control without changing global rules.

  1. Edit the product in Products → Edit Product.
  2. In Product Data, click the Hide Price tab.
  3. Choose one of the override options:
    • Use global / category setting (default) — inherits from above
    • Always hide price for this product — hides regardless of global setting
    • Always show price for this product — shows regardless of global setting
  4. Optionally set a Custom button text and Custom button URL specific to this product, overriding the global button settings.
  5. Update the product.

Per-product overrides take the highest priority. A product set to "Always show price" will show its price even if the sitewide setting hides all prices.

Compatibility

Troubleshooting

Price is still showing after enabling hide

Check if the current logged-in user's role is listed under Show price to these roles in the Roles settings. Administrators are shown prices by default — test while logged out or as a customer account. Also clear all caching (WooCommerce transients, page cache, object cache).

Custom button is not appearing

Confirm a Button Text has been entered in the Button settings. If the field is blank, no button is rendered. Also check that the price is actually being hidden for the current user — if the user role sees prices normally, the Add to Cart button is shown instead of the custom button.

Price is hidden on the product page but still showing in the shop grid

Go to WooCommerce → Hide Price → Settings → Pages and confirm Hide on Shop page and Hide on Category pages are enabled. Some themes use custom loops that bypass WooCommerce's price filter hooks — contact support if the issue persists after enabling these settings.

Variable product prices are partially visible

WooCommerce outputs price ranges for variable products (e.g., "$10 – $50") using a separate filter. The plugin suppresses this, but some themes cache this output. Clear your theme's template cache and any full-page cache plugin.

Shortcode is outputting nothing

Check that the product ID is correct. Also ensure the product is Published and not set to private or draft status. Confirm the shortcode spelling matches exactly — shortcodes are case-sensitive.

Changelog

Version 1.0.0 — April 2026

Still need help?

Our support team responds within 24 hours on business days. Email us at support@coreaddons.com and include your site URL, licence key, and a description of the issue for the fastest response.

Contact Support