=== CodeAtoZ Hide Prices for WooCommerce === Contributors: codeatoz Tags: woocommerce, hide price, wholesale, catalog mode, request a quote Requires at least: 6.0 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 1.5.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html == Short Description == Hide WooCommerce prices and add a Contact-for-Price / Request-a-Quote button — login replacement, hide SKU/stock/qty, block-theme & Store API ready. == Description == CodeAtoZ – Hide Price for Stores gives WooCommerce store owners complete control over price visibility — for B2B, wholesale, members-only, catalog-mode, and quote-based stores. Unlike CSS-based hiding, this plugin applies server-side logic across: • Shop pages, archives, search results • Single product pages • Variations (AJAX safe) • Related / cross-sell loops • WooCommerce REST API • WooCommerce Store API (used by Cart/Checkout & Product Collection blocks) Lightweight. Secure. Block-theme ready. HPOS ready. == Features == = Flexible Rule Engine = Multiple rules with priority. Backward compatible — old rules keep working. = Hide Prices by User Type = • Guests • Logged-in users • Specific WordPress roles (custom roles supported) = Product & Category Targeting = Apply rules to specific products, selected categories, or the entire store. = Hide Add to Cart Button = Removes purchase capability and blocks add-to-cart via URL/REST/Store API. = Inquiry / Quote Button (NEW in 1.4) = Add a "Contact for Price" button to product pages. Customers click it, fill in Name / Email / Message in a clean modal, and the inquiry is emailed to your admin address. Includes honeypot anti-spam and per-IP rate limiting. Configure recipient and success message under WooCommerce → Hide Price → Settings. No database persistence — Pro adds the full Inquiry Manager. = Login / Register Button Replacement = Replace the price with a clickable button that links to: • My Account / Login page • Register page • A custom URL of your choice With a fully customizable button label. = Plain Text Replacement = Show a custom message instead of the price (e.g. "Login to see price", "Request a quote"). = Hide SKU, Stock & Quantity (NEW) = Optionally hide the SKU, the in-stock badge, and the quantity selector together with the price — protects competitive inventory data on B2B catalogs. = Hide Product from Listings (NEW) = Remove matching products from shop, category, search and related-product loops based on user / role / category — making the catalog feel personalized. = Where to Apply (NEW Scope Toggles) = Choose per rule which areas it runs on: shop, single product, search, related products, sidebar widgets. Cart/checkout/REST are always enforced. = Block Theme & FSE Ready (NEW) = Works with WooCommerce Product Collection block, the Cart Block, the Checkout Block, and full-site-editing shop templates via Store API integration. = Secure Server-Side Enforcement = Prevents price exposure via inspection tools, REST, Store API, or AJAX variation lookups. = HPOS / Cart-Checkout Blocks Compatibility = Declares full compatibility with WooCommerce High-Performance Order Storage and Cart/Checkout blocks. --- == Installation == 1. Install via WordPress Plugin Directory or upload manually. 2. Activate the plugin. 3. Navigate to WooCommerce → Hide Price. 4. Click "Add Rule", configure conditions and actions. 5. Save and test on the frontend. --- == Frequently Asked Questions == = Does this work with variable products? = Yes. Variation prices are hidden via AJAX-safe filters too. = Does it work with the new WooCommerce blocks (Product Collection, Cart, Checkout)? = Yes. Store API responses are scrubbed during REST requests, so block-based templates also respect your rules. = Does it leak prices via the WooCommerce REST API? = No. Both the legacy REST API (`/wc/v3/products`) and the Store API (`/wc/store/v1/products`) are filtered. = Can I redirect the user when they click the login button? = Yes. Choose "Login / Register button" replacement, set the link target to "My Account", "Register", or a custom URL. = Does Hide-from-listings work for global rules? = By design, hide-from-listings only runs when you specify Product IDs and/or Categories — global rules are skipped to prevent accidentally hiding the entire catalog. = Where do inquiry emails go? = By default to your WordPress admin email. You can change the recipient under WooCommerce → Hide Price → Settings. Inquiries are sent via wp_mail(); for reliable delivery on shared hosts, install an SMTP plugin such as WP Mail SMTP. = Are inquiries stored in the database? = No. The free version is fire-and-forget email only. If you want a managed inbox with status tracking, customer auto-reply, multiple recipients, configurable form fields and CSV export, upgrade to Pro. = Does it use CSS to hide prices? = No. It uses secure server-side logic. CSS is only used as a *fallback* for grouped product child prices and the quantity selector. = Will it slow down my store? = No. Listings exclusions are cached in transients; rule evaluation is short-circuited as soon as a match (or rejection) is found. = Is it compatible with WPML / Polylang? = Strings are translation-ready. Use `__()` overrides or your translation plugin's normal flow. --- == Support == Please use the WordPress.org support forum. Before requesting support: • Ensure WordPress and WooCommerce are up to date • Verify there's no theme/plugin conflict (deactivate other plugins to test) • Confirm you're on the latest plugin version We actively maintain and improve this plugin. --- == Pro Version == Need more? Upgrade to **Hide Price Pro** for: • Date / time scheduling • Geo-targeting by country • Cart value & purchase-history rules • Custom HTML price replacement • Redirect action (301/302) • Inquiry / quote manager • Analytics dashboard • Priority support Learn more at https://codeatoz.com/hide-price-for-stores-pro-woocommerce-price-visibility-plugin-codeatoz/ --- == Screenshots == 1. Rule list – Manage multiple visibility rules with priority. 2. Rule editor – Conditions, Where-to-Apply scope, Actions, three Price Replacement modes (text / login button / inquiry popup) and modern in-context tooltips on every field. 3. Login-button replacement on a shop page. 4. Hide SKU, stock & quantity on a B2B product page. 5. Settings menu under WooCommerce → Hide Price. 6. Inquiry / Quote popup opens from any product card on shop, category and search pages — clean modal with Name, Email and Message; submission emailed to your admin. --- == Changelog == = 1.5.1 = * COMPAT: Verified and declared compatibility with WordPress 7.0 (Phase 3 / collaborative editing release). * COMPAT: Updated "WC tested up to" to WooCommerce 10.7. * COMPAT: Continues to support WordPress 6.0+ — no breaking changes for older sites. * IMPROVED: Plugin header now includes "Tested up to" for WP plugin scanners and IDEs. * No functional changes to rules, conditions, replacements or inquiry flow — existing rules keep working unchanged. = 1.5.0 = * NEW: Inquiry / Quote button — third "Contact for Price popup" option in Price Replacement. Click opens a clean modal (Name / Email / Message); submission emailed to your admin. Honeypot + per-IP rate-limit included. * NEW: Settings tab under WooCommerce → Hide Price → Settings — configure inquiry recipient and success message. * NEW: Modern in-context tooltips with arrow on every form field. Hover or keyboard-focus to read. * NEW: Three-box right-sidebar reference — How Rules Work, Action Reference, Replacement Types. * NEW: Login / Register button replacement (My Account / Register / Custom URL). * NEW: Where-to-Apply scope toggles per rule (shop, single, search, related, widgets). Cart / checkout / REST always protected. * NEW: Hide SKU, Hide Stock, Hide Quantity actions for B2B inventory privacy. * NEW: Hide Product from Listings — removes matching products from shop, category, search and related-product loops. * NEW: Block-theme & WooCommerce Store API integration — Cart Block, Checkout Block, Product Collection block all respect rules. * IMPROVED: Price replacement is now a clean three-way radio — Plain text / Login button / Contact for Price popup — eliminating earlier UI conflicts. * IMPROVED: Rule schema is backward-compatible; rules saved on older versions keep working unchanged. * FIX: Inquiry popup opens correctly when clicked from shop / category / tag / search-result pages (previously the JS only loaded on single product pages). = 1.4.2 = * FIX: Inquiry popup now opens correctly when the "Contact for Price" button is clicked from shop, category, tag and search-result pages (previously the JS only loaded on the single product page). * IMPROVED: New `RuleEngine::has_any_inquiry_rule()` short-circuits asset loading on sites without inquiry rules. = 1.4.1 = * UX: Inquiry button moved into the Price Replacement radio (mutually exclusive with Plain text and Login button) — eliminates the conflict where login button + inquiry button rendered together * NEW: Modern dark-glass tooltips with arrow on every form field — hover OR keyboard focus to read * IMPROVED: Right-sidebar reference rewritten as three info boxes — Quick Tips, Action Reference, Replacement Types * IMPROVED: Backward-compat handling for legacy `show_inquiry_button` flag — old rules keep working until re-saved = 1.4.0 = * NEW: Inquiry / Quote Button — per-rule action that adds a "Contact for Price" button on product pages, opens a modal (Name / Email / Message), emails the admin * NEW: Settings tab (WooCommerce → Hide Price → Settings) — configure inquiry recipient email and success message * NEW: Honeypot anti-spam + per-IP rate limit (60s) on the inquiry form * NEW: Reply-To header set to the customer's email so admin can reply directly from their inbox * IMPROVED: readme tags include "request a quote" = 1.3.0 = * NEW: Login / Register button as price replacement (label + target configurable) * NEW: "Where to Apply" scope toggles (shop, single, search, related, widgets) * NEW: Hide SKU, hide stock, hide quantity actions * NEW: Hide product from listings (shop / category / search / related) * NEW: WooCommerce Store API filtering (Cart/Checkout/Product Collection blocks) * NEW: Cart/Checkout Blocks compatibility declaration * IMPROVED: Backward-compatible rule schema — older rules keep working * IMPROVED: Variation price hiding now uses the same replacement HTML * FIX: Plugin version constant aligned with header = 1.2.1 = * Maintenance release. = 1.2.0 = * Grouped product child price/qty CSS fallback. = 1.1.0 = * WooCommerce REST API price hiding. = 1.0.0 = * Initial stable release * Flexible rule engine * Role-based visibility * Category & product targeting == Upgrade Notice == = 1.5.1 = WordPress 7.0 compatibility release. Verified against WP 7.0 (Phase 3) and WooCommerce 10.7. No breaking changes — existing rules continue to work on WordPress 6.0+ unchanged. = 1.5.0 = Major free upgrade: Inquiry / Quote button with popup, Login button replacement, Hide SKU/Stock/Quantity, Hide Product from Listings, Where-to-Apply scope toggles, full block-theme & Store API support, modern tooltips, settings page. Existing rules continue to work unchanged. = 1.4.2 = Fixes the inquiry popup not opening when clicking the Contact for Price button on shop / category / search pages. Existing rules continue to work unchanged. = 1.4.1 = UX fix: the inquiry button is now a third option inside Price Replacement (mutually exclusive with the login button), plus modern hover tooltips and rewritten sidebar docs. Existing rules continue to work unchanged. = 1.4.0 = Adds a free Inquiry / Quote button with modal popup and email — the most-requested companion to "hide price." Existing rules continue to work unchanged. = 1.3.0 = Major free upgrade: Login button replacement, hide SKU/stock/quantity, hide products from listings, and full block-theme / Store API compatibility. Existing rules continue to work unchanged.