Zum Inhalt springen

Configuration

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

Versus is configured on one screen: the Versus menu in wp-admin (capability manage_woocommerce). Everything is stored as one array under the versus_settings option. Each option below carries a ”?” help tooltip on the settings page, wired to its description via aria-describedby.

The master switch (enabled, on by default). When off, no compare buttons, account tab or table render anywhere on the storefront, and the front-end CSS/JS are not enqueued, but your other settings here are kept for when you turn it back on.

max_items, the cap on how many products fit in one comparison, clamped to 2-6 on save (default 4). When a shopper adds one more than this, the oldest item drops off automatically so the table never grows unreadably wide.

  • Shop & archive loops (show_on_loop), a Compare button beneath every product in the shop, category, tag and search loops.
  • Single product page (show_on_single), a Compare button on each individual product page.
  • Allow guests (allow_guests), when on, logged-out visitors can build a comparison, stored in a versus_compare_session cookie for six months. When off, clicking Compare sends them to log in first.
  • Account menu (show_in_account), adds a Compare tab to My Account so signed-in customers can return to their saved comparison. This tab registers the versus-compare endpoint; after you change this setting, save Settings → Permalinks once so the rewrite rule flushes (see Getting started).

Choose which standard fields appear as rows. These are stored under fields[...]:

  • Price (fields[price]), each product’s current price, including any sale price.
  • SKU (fields[sku]), useful where customers reference part or model numbers.
  • Short description (fields[description]), each product’s short description, for an at-a-glance summary.
  • Availability (fields[availability]), the stock-status row (In stock, Out of stock, On backorder).

Then the table-wide toggles:

  • Product attributes (show_attributes), adds one row per product attribute (colour, size, material). Only attributes that at least one compared product defines are shown.
  • Highlight differences (highlight_differences), tints any row where the products’ values are not identical.
  • Default to differences only (show_only_differences), pre-ticks the “show only differences” toggle on the comparison page, hiding identical rows. Shoppers can untick it to see everything. Off by default.

Each product is a column; these toggle what its header shows:

  • Product image (show_product_image), the product thumbnail, with space reserved so the table never jumps as images load.
  • Add to cart (show_add_to_cart), an add-to-cart button under each product, shown only when the product is purchasable and in stock.
  • Remove button (show_remove_button), lets shoppers drop a single product without clearing the whole list.

The Labels & text section overrides the front-end strings without editing translation files. Leave any field blank to use its translated default:

  • button_add_text, the “Compare” button (default Compare).
  • button_remove_text, the “Remove” button (default Remove).
  • compare_link_text, the link that opens the table (default View comparison).
  • differences_toggle_text, the differences toggle (default Show only differences).
  • clear_text, the clear-all button (default Clear all).
  • empty_text, the message shown before any products are added (default No products added to compare yet.).

For full localisation, translate the versus text domain instead, a versus.pot template ships in /languages, and WordPress loads translations automatically.

  • The product name is always the column header and is not a toggleable row.
  • The product attribute rows show only attributes a compared product actually defines.
  • There is no shortcode in the free edition and no theme template override, the button and table markup are rendered from the plugin’s bundled templates/ and are not looked up in your theme.

Comparison items live in a single {prefix}versus_compare_items table, keyed by product id plus exactly one owner (a user id or a guest session id). Settings live in versus_settings; the schema marker in versus_db_version. Deleting the plugin runs the uninstall routine, which removes both options and drops the table. Everything stays in your own database, Versus contacts no external service.