=== Price Guard - Hide Price & Add to Cart for WooCommerce ===
Contributors: camerce
Tags: hide price, catalog mode, request a quote, wholesale, b2b
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.2
WC requires at least: 3.0
WC tested up to: 11.0.1
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Hide WooCommerce prices and the Add to Cart button, and replace them with a Request a Quote button. Catalog mode for B2B and wholesale stores.

== Description ==

**Price Guard turns your WooCommerce shop into a catalog.** Hide product prices, remove the Add to Cart button, and replace them with your own button so visitors get in touch instead of checking out.

Not every store should sell online at a fixed price. Wholesale suppliers negotiate. Trade counters price by account. Custom manufacturers quote per project. Distributors are contractually barred from showing retail prices in public. Price Guard covers all of these without touching your product data: your prices stay exactly where they are, they just stop being shown.

= What Price Guard does =

* **Hide product prices** across the shop, category pages, and single product pages.
* **Show your own wording instead** - "Call for pricing", "Login to see price", "Request a quote", or anything you like.
* **Hide the Add to Cart button** and make products unpurchasable, so nothing can be ordered at the wrong price.
* **Add your own button** in its place, with your own label and link - a contact page, a quote form, a phone number, or a Calendly booking.
* **Choose who sees what.** Hide prices from logged-out visitors only, from specific user roles, or from everyone.
* **Apply everywhere or by category**, so part of your catalog can stay a normal shop.

= Hide prices from guests, show them to customers =

The most common setup for a wholesale store: pick **Guest** under Hide for User Roles, and prices disappear for logged-out visitors while approved customers who sign in see them normally. No separate wholesale plugin, no duplicate catalog.

You can target any role the same way - hide from `subscriber` but show to `wholesale_customer`, or hide from everyone by leaving the selection empty.

= Full catalog mode =

Enable both Hide Price and Hide Add to Cart and your store becomes a browsable product catalog. Customers still see products, images, descriptions and specifications - they just contact you instead of buying. Useful for:

* Wholesale and B2B suppliers who price per account
* Trade-only and distributor catalogs
* Made-to-order and custom manufacturing
* High-value equipment sold after a conversation
* Stores that must hide RRP under supplier agreements

= Built to stay out of the way =

Price Guard uses WooCommerce's own filters rather than overriding templates, so it works with virtually any theme and does not need template edits. It is compatible with WooCommerce High-Performance Order Storage (HPOS), adds no front-end scripts, and stores nothing beyond a handful of options.

= Requirements =

WooCommerce must be installed and active.

== Installation ==

1. Install through **Plugins > Add New**, or upload the `price-guard-for-woocommerce` folder to `/wp-content/plugins/`.
2. Activate the plugin on the **Plugins** screen.
3. Go to **WooCommerce > Settings > Price Guard**.
4. Enable Hide Price and/or Hide Add to Cart, set your replacement text and button, and save.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active for Price Guard to do anything.

= Can I hide prices from visitors but show them to logged-in customers? =

Yes. Under **Hide for User Roles**, select **Guest**. Prices are then hidden from logged-out visitors and shown normally to anyone signed in. This is the usual wholesale setup.

= Can I hide prices from specific user roles? =

Yes. Select any combination of roles under Hide for User Roles. Leave the selection empty to hide prices from everyone, including administrators.

= Can I hide prices for only some categories? =

Yes. Set **Apply Globally** to "No" and choose the categories you want covered. Everything else behaves like a normal shop.

= Can I hide the price for one individual product? =

Not in this version. Targeting is global, by category, or by user role. Per-product control is planned for a future release.

= What is shown in place of the price? =

Whatever you enter in **Hide Price Text** - for example "Call for pricing" or "Login to see price". Leave the field empty and the price area is simply left blank.

= Does hiding the Add to Cart button stop people ordering? =

Yes. Affected products are marked unpurchasable in WooCommerce, so they cannot be added to the cart or bought directly, even by URL.

= Where can the replacement button link to? =

Any URL. A contact page, a quote request form built with your form plugin of choice, a mailto: link, or a phone number.

= Does this work with variable products? =

Yes. Price Guard hooks into the same WooCommerce filters that display prices and cart buttons, so it covers simple and variable products alike.

= Will it work with my theme? =

It should. Price Guard filters WooCommerce's own price and button output rather than replacing templates, so no theme files need editing. Themes that build entirely custom product templates and bypass those filters are the exception.

= Does it change my product prices? =

No. Your prices remain stored on the products exactly as they are - they are only hidden from display. Turn the plugin off and everything reappears.

= Does it remove prices from structured data? =

Not currently. Price Guard changes what shoppers see on the page; it does not alter the product schema WooCommerce outputs. If you need prices removed from structured data as well, use an SEO plugin's schema controls alongside it.

= Is it compatible with HPOS? =

Yes. Price Guard declares compatibility with WooCommerce High-Performance Order Storage.

== Screenshots ==

1. Price Guard settings under WooCommerce > Settings, including category and user role targeting
2. A product with its price replaced and a Request a Quote button in place of Add to Cart

== Changelog ==

= 1.1.0 =
* New: "Hide Price Text" now works - show your own wording in place of the price instead of a blank space.
* New: "Hide for User Roles" now works - target guests, customers, or any role. Leave it empty to hide from everyone.
* Removed settings that were displayed but had no effect (country targeting, popup button mode, per-product toggle).
* Updated compatibility with WordPress 7.1 and WooCommerce 11.0.1.
* Maintenance: plugin ownership moved to Camerce.

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.1.0 =
Hide Price Text and user role targeting now work. Options that had no effect have been removed. Existing setups are unchanged.
