Zum Inhalt springen

Configuration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Catalog is configured on one screen, WooCommerce → Catalog. Everything is stored in a single option, catalog_settings (an array), and the screen is available to anyone with the manage_woocommerce capability, not just administrators. Every option has inline help; this page explains each one, its stored key, and how they interact.

Stored as enabled, on by default. This is the top-level toggle. When it’s off, nothing is hidden, the storefront stylesheet is not enqueued, and your store sells exactly as normal, no other setting on the screen has any effect. When it’s on, the visitor rule and the two “what to hide” toggles take over.

These two toggles are independent, you can hide either one, both, or (with the master switch on but both off) nothing.

Stored as hide_price, on by default. Removes the price wherever WooCommerce would print it, it filters woocommerce_get_price_html, so the price disappears on single product pages, in shop and category loops, related products and anywhere else a theme renders the price. If you set a Price notice, that text replaces the price; otherwise the price slot is left empty.

Stored as hide_add_to_cart, on by default. Removes the add-to-cart form on the single product page and the add-to-cart link in loops. It also marks the product non-purchasable (via woocommerce_is_purchasable), so a hidden product cannot be added to the cart through a guessed ?add-to-cart= URL or a Store API request. Hiding add-to-cart is therefore an enforcement, not just a visual change.

Stored as price_notice, blank by default. Optional text shown in place of the hidden price, for example “Contact us for pricing” or “Login for trade prices”. It only renders when Hide the price is on; leave it blank to show nothing in the price slot. On the storefront it is styled as a small brass “price on request” placard (see Storefront output). The value is run through sanitize_text_field on save, so it is plain text, not HTML.

Stored as role_mode, default everyone. Decides which visitors catalog mode hides prices and buying from. The four options:

  • Everyone (everyone), applies to all visitors.
  • Only logged-out visitors (guests), guests see the catalog; any logged-in customer sees prices and add-to-cart.
  • Only selected roles (roles), applies only to the roles ticked in the Roles list below.
  • Everyone except selected roles (except_roles), applies to everyone except the ticked roles. This is the wholesale setup: tick your wholesale role and those customers keep prices and checkout while everyone else gets the catalog.

Stored as role_list (an array of role slugs). The checklist is populated from your site’s editable roles. It is only consulted by the Only selected roles and Everyone except selected roles rules, under the other two rules it’s ignored, and the screen dims it with a note saying so. On save, only valid, existing role slugs are kept.

Edge case worth knowing: with Only selected roles and no roles ticked, catalog mode matches nobody (the store sells as normal). With Everyone except selected roles and no roles ticked, it matches everybody.

For each product on each page view, with the master switch on, Catalog resolves in this order:

  1. The visitor rule decides whether the current visitor is in scope (this is the catalog/applies decision).
  2. If they are, Hide the price and Hide add-to-cart are applied independently to the product.
  3. The price notice fills the price slot when the price is hidden; add-to-cart, when hidden, is also blocked server-side.

There is no per-product or per-category scoping in the free edition, when the master switch is on and the visitor is in scope, the rules apply to the whole catalog. Per-product and per-visitor exceptions are possible in code through the filters.

The only shopper-facing markup Catalog adds is the price notice, output as <span class="catalog-price-notice">…</span>. Its stylesheet (assets/css/catalog.css, enqueued only when catalog mode is enabled) renders it as a stamped brass placard, with a warm brass/ochre accent rather than a generic blue. The accent, radius and padding are exposed as --catalog-notice-* CSS custom properties so you can re-tint it from your theme in one place. A dark-mode variant lifts the brass on dark themes, and the one micro-interaction (a keyline that wipes in once on first paint) is gated behind prefers-reduced-motion and produces no layout shift.

Catalog declares HPOS (custom_order_tables) and Cart/Checkout Blocks (cart_checkout_blocks) compatibility. The settings screen uses standard WordPress admin styling and inherits its dark-mode support. The plugin ships a POT file for translation; on WordPress.org-hosted installs, translations load automatically from the slug.

All settings live in the single catalog_settings option in your own database, Catalog contacts no external service. A second option, catalog_db_version, tracks the schema version. Deleting the plugin runs the uninstall routine, which removes both options. There are no custom tables.