FAQ
Does it require WooCommerce?
Section titled “Does it require WooCommerce?”Yes. Versus is a WooCommerce extension and requires WooCommerce 8.0 or later. It shows an admin notice and stays inactive if WooCommerce is missing.
Does it use jQuery?
Section titled “Does it use jQuery?”No. The plugin’s own front-end script is vanilla JavaScript, loaded defer in the footer, with no jQuery dependency.
Can guests compare products?
Section titled “Can guests compare products?”Yes, when Allow guests is on. A guest’s list is stored in a versus_compare_session cookie for six months and is transferred into their account when they log in, so nothing is lost at sign-in. When the setting is off, clicking Compare sends visitors to log in first.
The cookie holds only a random UUID (from wp_generate_uuid4()), never a product list or personal data. It is set HttpOnly, SameSite=Lax, and Secure on HTTPS sites, and it is only created when a guest first adds a product (or clears the list), so browsing the shop sets no cookie. On the wp_login hook, the rows owned by that UUID are reassigned to the user id.
Where does the compare button appear?
Section titled “Where does the compare button appear?”On shop and archive loops and on the single product page, depending on your settings, each placement is toggled independently.
Where does the comparison open?
Section titled “Where does the comparison open?”On the Compare tab in My Account for logged-in customers (when the Account menu setting is on). Guests open it at the versus-compare endpoint URL, above the login form, unless you pick a Comparison page for guests: then the View comparison link sends them to that page, which must contain the [versus] shortcode. Versus sends no-cache headers and defines DONOTCACHEPAGE on that page and on any page holding the shortcode, because each visitor sees their own list.
The My Account Compare tab returns a 404. Why?
Section titled “The My Account Compare tab returns a 404. Why?”The comparison lives on the versus-compare rewrite endpoint. Versus registers it on every request, whether or not the Account menu tab is shown, and flushes rewrite rules once after install, update or activation. A 404 therefore means the stored rules were rebuilt without it, for example by another plugin; go to Settings > Permalinks and click Save Changes once.
How many products can be compared?
Section titled “How many products can be compared?”Between 2 and 6, set by the Maximum products setting (default 4); a saved value outside that range is clamped to it. When a shopper exceeds the cap, the oldest product (by the row’s created_at) is removed automatically to make room, and the shopper sees the notice You can compare up to {limit} products. The oldest item was removed., which you can reword in Labels & text.
What fields can the table show?
Section titled “What fields can the table show?”Each product is a column with its image, name and (optionally) add-to-cart and remove controls in the header. The rows are the standard fields you enable, price, SKU, availability and short description, plus an optional row for each product attribute the compared products define.
What is difference highlighting?
Section titled “What is difference highlighting?”Rows whose values differ between the compared products are tinted. A “show only differences” toggle hides the identical rows so shoppers see just what separates the products, and you can make that the default.
Can I change the button and link wording?
Section titled “Can I change the button and link wording?”Yes. The Labels & text section overrides the compare button, remove button, compare link, differences toggle, clear-all button and empty-list message. Leave a field blank to use its translated default.
Is there a shortcode?
Section titled “Is there a shortcode?”Yes, one: [versus] takes no attributes and prints the current visitor’s own comparison table, the same one My Account shows, on any page (guests included when Allow guests is on). The compare buttons themselves render automatically on the WooCommerce loop and single-product hooks, so they need no shortcode. The [versus_compare] shortcode belongs to Versus Pro.
Is it translatable?
Section titled “Is it translatable?”Yes. All strings use the plogins-versus text domain and a plogins-versus.pot template ships in /languages, so WordPress loads translations automatically for the plugin slug.
Is it accessible, and does it cause layout shift?
Section titled “Is it accessible, and does it cause layout shift?”The compare buttons are real buttons with an aria-pressed state and a polite live region for screen-reader announcements, with visible focus and full keyboard support. The table scrolls horizontally inside its own wrapper and reserves space for product images, so adding columns never reflows the page, no Cumulative Layout Shift.
Where are comparisons stored?
Section titled “Where are comparisons stored?”In a single {prefix}versus_compare_items table in your own database, one row per product-and-owner pair. The columns are id, product_id, user_id (set for customers), session_id (the guest cookie UUID, set for guests) and created_at, indexed on user_id, session_id and product_id. Nothing is sent to any third party.
How does the Compare button talk to the server?
Section titled “How does the Compare button talk to the server?”Each click posts to admin-ajax.php with the action versus_compare_toggle, the product id and a versus_compare nonce, for logged-in and guest visitors alike. The server adds the product if it is not in the list and removes it if it is, then returns the new state (in_compare), the list count, the new button text and the comparison URL, so the button and count badge update without a reload. Clearing the list uses the versus_compare_clear action the same way. A request from a guest while Allow guests is off returns HTTP 403, and a product that does not exist or is not published returns HTTP 404.
What happens when I delete the plugin?
Section titled “What happens when I delete the plugin?”The uninstall routine removes the versus_settings, versus_db_version and versus_flush_rewrite options and drops the {prefix}versus_compare_items table, leaving your database as it was. On multisite it repeats this on every site in the network. Guest cookies already set in visitors’ browsers simply expire.
Does it work with Shortlist?
Section titled “Does it work with Shortlist?”Yes, with no setting. With Shortlist active and two or more products on the wishlist, a Compare these button under the wishlist opens them in the comparison table.