📄 Plugin Documentation

Storzen — Product Compare
for WooCommerce

Let shoppers compare products side by side on a dedicated compare page — image, price, rating, SKU, availability, description, and Add to Cart, all in one clean table. AJAX add/remove, toast notifications, and an Elementor widget included, zero SaaS dependencies.

GPL v2 Licensed WordPress 6.5+ PHP 8.1+ Elementor Ready WooCommerce Blocks Ready HPOS Compatible
01 — Introduction

What is Storzen Product Compare?

Storzen Product Compare for WooCommerce adds a proper "Compare" experience to your store: shoppers add products to a compare list from the shop loop, a single product page, or a WooCommerce Blocks grid, then view them side by side on a dedicated compare page — image, title, price, rating, SKU, availability, short description, and an Add to Cart action, row by row.

It is entirely self-hosted: the compare list is stored in the standard WooCommerce session (no custom database tables, no cookies of its own, no phone-home telemetry), so it plays nicely with page caching and object caching out of the box.

🧮
Dedicated Compare Page
Automatically created on activation, powered by the [storprco_compare_table] shortcode.
Free
🔘
Compare Button
Appears on the shop loop, single product page, and inside WooCommerce Blocks product grids.
Free
AJAX Add / Remove
No page reloads — add, remove, or clear the compare list instantly with toast feedback.
Free
🎨
Elementor Widget
Drop the compare table into any Elementor layout, with header, row, and button color controls.
Free
🧱
WooCommerce Blocks Ready
Works inside the Products block and All Products block, where legacy loop hooks don't fire.
Free
🧩
Configurable Fields
Choose exactly which rows show in the comparison table — hide what you don't need.
Free
yourstore.com → Compare Products
Feature Trail Runner Jacket Alpine Shell Jacket Summit Windbreaker
Price$89.00$129.00$64.00
Rating★★★★☆ (24)★★★★★ (51)★★★☆☆ (9)
SKUTRJ-100ASJ-220SWB-045
AvailabilityIn stockIn stockOut of stock
Add to CartAdd to CartAdd to CartRead More
02 — Requirements

System Requirements

WooCommerce is a hard requirement — the plugin checks for it on activation and deactivates itself with an admin notice if it isn't active. Elementor is entirely optional.

ComponentMinimumNotes
WordPress6.5Tested up to 7.0
PHP8.1Required for the plugin's typed codebase
WooCommerce7.0Required — the plugin deactivates itself without it. Tested up to 9.0
ElementorOptionalCompare Table widget only registers if Elementor is active
🛒
WooCommerce
7.0 – 9.0 — required
🗄️
HPOS
Custom order tables — declared compatible
🧱
Cart/Checkout Blocks
Declared compatible
🎨
Elementor
Optional — Free or Pro
🧩
Products Block
Button appended via render_block
🧩
All Products Block
Compare button supported
03 — Installation

Installation

Method A — WordPress Plugin Directory (Recommended)

1

Search in WordPress Admin

Go to Plugins → Add New and search for Storzen Product Compare for WooCommerce.

2

Install & Activate

Click Install Now, then Activate. WooCommerce must already be installed and active.

3

Compare Page Is Created Automatically

A page titled Compare Products is created on activation with the [storprco_compare_table] shortcode already in place — nothing else to set up.

Method B — Manual Upload

1

Download & Upload

Download storzen-product-compare-for-woocommerce.zip from wordpress.org/plugins. Go to Plugins → Add New → Upload Plugin and install the ZIP.

2

Activate

Click Activate Plugin. The Compare Products menu appears in your WordPress admin sidebar.

3

Configure Settings

Go to Compare Products in the admin menu to set the compare page, max products, button placement, and visible fields.

💡
No WooCommerce, no plugin If WooCommerce is deactivated after this plugin is installed, Storzen Product Compare deactivates itself automatically on the next admin page load and shows a notice explaining why.
04 — Quick Start

Quick Start

After activation you'll find Compare Products in your WordPress admin menu.

  • The Compare Products page is already live at /compare-products/ with the shortcode in place
  • The Compare button appears automatically on your shop loop and single product pages — no setup required
  • Go to Compare Products → General to change the compare page or the maximum number of products (2–5)
  • Go to Compare Products → Display to move the button position or change its label
  • Go to Compare Products → Advanced to choose which fields appear in the table, or place the compare table anywhere with the [storprco_compare_table] shortcode or the Elementor widget
05 — Feature

Compare Button

The Compare button is rendered wherever a product can be shown — the shop loop, the single product page, and modern WooCommerce Blocks grids — and reflects the current state of the compare list.

Placement

Choose After Add to Cart (hooked to woocommerce_after_shop_loop_item) or Before Add to Cart (hooked to woocommerce_before_shop_loop_item_title) under Display settings. The single product page placement (woocommerce_single_product_summary, priority 35) can be toggled on or off independently.

Label & state

The button label is fully customizable. Once a product is added, the button switches to a "✓ Added to Compare" state so shoppers always know what's already queued up — this state is restored on page load without an extra AJAX call, by reading the compare list that's already localized into the page.

💡
No artificial button-count limit Every button placement described here is included free, with no Pro upsell blocking any of them.
06 — Feature

Compare Table & Fields

The compare page renders a responsive table with one column per product and one row per enabled field. Up to 5 products can be compared at once (configurable, 2–5, under General settings).

Available fields

Image
Title
Price
Rating
SKU
Availability
Description
Add to Cart

Toggle any of these on or off under Advanced → Visible Fields. The Add to Cart row automatically adapts per product type: Select Options for variable products, View Products for grouped products, Read More for products that aren't purchasable or in stock, and a live AJAX Add to Cart button otherwise.

Removing products

Each product column has a small remove control in its header, and a Clear All button sits above the table to empty the whole list in one click — both reload the page after the AJAX call completes so the table reflects the current list.

💡
Developers: add your own field Hook into the storprco_fields filter to register a new field key/label, then return its markup via the storprco_field_value filter — see Hooks & Filters.
07 — Feature

AJAX Add/Remove & Toast Notifications

Every compare interaction — add, remove, and clear — runs over WordPress AJAX with a nonce-verified request, so nothing ever triggers a full page reload from the shop loop or single product page.

AJAX ActionTriggerResult
storprco_add_to_compareClicking an unadded Compare buttonAdds the product, or returns max_reached / already_added
storprco_remove_from_compareClicking an added Compare button, or a column's remove controlRemoves the product from the list
storprco_clear_compareClicking Clear All on the compare pageEmpties the compare list

Toast notifications

A small toast appears in the corner of the screen for three seconds on every add, remove, or error. When a product is successfully added, the toast includes a View Comparison link straight to the compare page (only shown if a compare page is configured).

⚠️
Maximum products reached If a shopper tries to add more than the configured maximum, the button click is rejected server-side and a warning toast explains the limit — the list itself never silently drops or swaps entries.
08 — Feature

Elementor Widget

When Elementor is active, a Compare Table widget appears under the WooCommerce Elements category (search keywords: compare, product, woocommerce, storzen, table). It wraps the same [storprco_compare_table] shortcode with Elementor-native styling controls, and only loads at all if Elementor is detected.

Content controls

  • Show Clear All Button — toggle the Clear All control on or off for this widget instance
  • Show Remove Column Button — toggle the per-column remove control

Style controls

  • Table tab — header background, header text color, even-row background, and border color
  • Add to Cart Button tab — button background and text color
💡
Works without Elementor too The Compare Page and Compare button work identically with or without Elementor. The widget is purely an optional, stylable way to place the table inside an Elementor layout.
09 — Feature

WooCommerce Compatibility

Storzen Product Compare declares compatibility with WooCommerce's High-Performance Order Storage (HPOS / custom order tables) and Cart & Checkout Blocks features via FeaturesUtil::declare_compatibility(), so it never triggers a WooCommerce compatibility warning.

Blocks-based product grids

The classic woocommerce_after_shop_loop_item / woocommerce_before_shop_loop_item_title hooks never fire inside the block-based Products block or All Products block. To keep the Compare button working there too, the plugin filters render_block for the woocommerce/product-template and woocommerce/all-products block names and appends the button directly into the rendered block markup, right before the closing wrapper tag.

Frontend assets are also conditionally enqueued on any page containing a woocommerce/product-collection or woocommerce/all-products block, even if no classic shop loop template part is rendered on that page.

10 — Reference

Shortcode

[storprco_compare_table]
Renders the full comparison table for the products currently in the shopper's compare list. Takes no attributes — visible fields, button labels, and the maximum product count are all controlled from the plugin's settings screen instead.

Paste this shortcode into any page, post, or widget area to place the compare table anywhere on your site — the auto-created Compare Products page already contains it. For an Elementor layout, use the Compare Table widget instead, which wraps the same shortcode with extra styling controls.

11 — Reference

All Settings

Every option, grouped by the settings tab it lives under (Compare Products in the admin menu).

General

OptionDefaultNotes
storprco_page_idauto-created pageThe page containing the [storprco_compare_table] shortcode
storprco_max_products32–5, also filterable via storprco_max_products

Display

OptionDefaultNotes
storprco_button_positionafter_add_to_cartafter_add_to_cart or before_add_to_cart
storprco_button_textCompareLabel shown before a product is added
storprco_show_on_singleonShow the Compare button on single product pages

Advanced

OptionDefaultNotes
storprco_fieldsall 8 fieldsWhich rows appear in the compare table
storprco_clear_on_orderonAutomatically clear the compare list once a customer completes an order
12 — Reference

Hooks & Filters

For developers and agencies who need to customise behaviour without editing core plugin files.

HookTypePurpose
storprco_max_productsfilterChange the maximum number of products a shopper can compare
storprco_fieldsfilterAdd, remove, or relabel rows in the compare table
storprco_field_valuefilterReturn the markup for a custom field key added via storprco_fields
storprco_admin_tabsfilterAdd a custom tab to the Compare Products settings screen
storprco_admin_tab_{slug}actionFires so a custom settings tab can render its own content
Example — raise the compare limit to 4 products
add_filter( 'storprco_max_products', function() {
    return 4;
} );
Example — add a "Brand" row to the compare table
add_filter( 'storprco_fields', function( $fields ) {
    $fields['brand'] = __( 'Brand', 'my-theme' );
    return $fields;
} );

add_filter( 'storprco_field_value', function( $value, $field, $product ) {
    if ( 'brand' === $field ) {
        return get_the_term_list( $product->get_id(), 'product_brand' );
    }
    return $value;
}, 10, 3 );
13 — FAQ

Frequently Asked Questions

Does this work without Elementor?
Yes. The Compare button and the Compare page work with any theme or page builder using the [storprco_compare_table] shortcode. The Elementor widget is only registered — and only adds extra file weight — if Elementor is detected as active.
Where is the Compare page?
It's created automatically on activation with the [storprco_compare_table] shortcode already placed. You can point the plugin at a different existing page any time from Compare Products → General.
How many products can be compared?
Up to 5 at once. The exact limit (2–5) is configurable under Compare Products → General, or programmatically via the storprco_max_products filter.
Is it compatible with my theme?
Yes. The plugin uses standard WooCommerce hooks and outputs clean, unstyled-by-default HTML that inherits your theme's typography and colors, with its own CSS classes (prefixed storprco-) layered on top for layout.
Does the compare list survive between visits?
The list is stored in the WooCommerce session, which typically persists for the length of the customer's session/cart cookie — the same mechanism WooCommerce itself uses for the cart. You can also have it clear automatically after checkout via the Clear Compare List After Order setting.
Does this work without WooCommerce?
No — WooCommerce is a hard requirement, since the compare list, product data, and pricing all come directly from WooCommerce's product and session APIs. The plugin checks for WooCommerce on activation and every admin load, and deactivates itself with a notice if it's missing.
Is the plugin translation ready?
Yes. All user-facing strings use the storzen-product-compare-for-woocommerce text domain.
How do I get support?
Free support is available on the WordPress.org support forum. Please include your WordPress version, WooCommerce version, PHP version, active theme, and a clear description of the issue.