HDWebmobile Product Comparison

HDWebmobile Product Comparison

Compare products side by side — only real, published, publicly visible products are ever shown, re-checked fresh every time.

Overview

HDWebmobile Product Comparison lets shoppers add products to a comparison list from the shop or a product page, then view them side by side with the [hdcmp_compare] shortcode.

Several competing product-comparison plugins accepted a product id from a request or a stored list and rendered whatever post existed at that id, without re-checking it was still a real, published, publicly visible WooCommerce product (CWE-862 / CWE-200, broken access control leading to information disclosure). That let a comparison request surface a draft, a trashed post, or a product deliberately hidden from the catalog — and in the worst cases, a completely unrelated post type. This plugin re-validates every stored product id, every single time the list is read, rather than trusting whatever is already sitting in the cookie or account: a product only ever appears if it is currently a real, published, WooCommerce product that isn’t hidden from the catalog — checked fresh on every read, never assumed from what was true when it was added. If a product is removed, unpublished, or hidden after being added, it silently disappears from the comparison the next time the list is loaded, and the stored list is corrected to match — it never lingers as a stale, invisible entry.

Key Features

  • A simple “Add to comparison” / “Remove” link on shop and product pages
  • A [hdcmp_compare] shortcode for a side-by-side comparison table
  • Works for guests (a cookie) and logged-in customers (their own account) alike
  • A configurable maximum number of products to compare at once

Limitations

Please read before installing:

  • Compares name, image, and price only in this version — no custom attribute rows
  • No AJAX “compare” widget/popup — the toggle link and shortcode table are plain page content

Quick Setup

  1. Upload the plugin files to the /wp-content/plugins/hdwebmobile-product-comparison directory, or install through the Plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress. WooCommerce must already be installed and active.
  3. Add [hdcmp_compare] to any page, then go to WooCommerce > HDWebmobile > Product Comparison to set the maximum number of products.

Latest Version

Current stable version in readme: 1.0.0 (Initial release: guest- and account-based product comparison, with every listed product re-validated on every read.)

See our other WordPress plugins for more WooCommerce and site-utility tools.


Ready to start your project?

Share your brief and we’ll propose the right approach — a full site, a landing page, or a custom plugin.