📄 Plugin Documentation

Storzen — AI Recommends
for WooCommerce

AI-powered product recommendations that run entirely on your server — no API key, no subscription, no third-party calls. Co-purchase intelligence, cart cross-sells, post-purchase upsells, and social proof, all in one plugin.

GPL v2 Licensed WordPress 6.6+ PHP 8.1+ Elementor Ready Gutenberg Block HPOS Compatible GDPR Safe
01 — Introduction

What is Storzen AI Recommends?

Storzen AI Recommends for WooCommerce brings intelligent, conversion-boosting product recommendations to your store without any external API calls or subscriptions. The AI engine runs entirely on your server using your own order history — no account, no API key, no third-party dependency.

It is built as a fully modular system: each recommendation surface (Frequently Bought Together, Related Products, Cart, Post-Purchase, Recently Viewed) can be enabled or disabled independently. Social proof badges and low stock urgency badges layer on top of every surface automatically.

🧠
On-Server AI Engine
Co-purchase frequency matrix built from your own order history — updates automatically with every new order. No external service required.
Free
🛒
Frequently Bought Together
Amazon-style widget on single product pages with optional bundle discounts (percentage or fixed) to push multi-product purchases.
Free
Related Products AI
Replace WooCommerce's default related products with AI-ranked suggestions. Co-purchase, taxonomy, or hybrid scoring — your choice.
Free
🛍️
Cart Recommendations
Contextual cross-sells on the cart page and mini-cart, scored in real time from current cart contents. Already-in-cart items excluded automatically.
Free
🎉
Post-Purchase Recommendations
Show "Complete your purchase" on the thank-you page — seeded from the highest-value item in the completed order.
Free
👁️
Recently Viewed
sessionStorage-powered recently viewed widget — zero DB queries, GDPR-safe, data clears when the browser tab closes.
Free
🏅
Social Proof Badges
Sales velocity, rating summary, and total purchase count badges on every recommendation card — all from WooCommerce data, no external lookups.
Free
📊
Analytics Dashboard
Track impressions, clicks, and add-to-cart events for every recommendation surface, filterable by 7, 30, or 90-day windows.
Free
yourstore.com → Product Page — Frequently Bought Together
Frequently Bought Together
👟
Trail Runner Pro
$89.00
+
🧦
Merino Socks
$14.00
+
🎒
Hydro Pack
$49.00
Bundle total: $140.30
Save 10% Add All to Cart
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; the widget only registers if Elementor is detected.

ComponentMinimumNotes
WordPress6.6Tested up to 7.0
PHP8.1Required for the plugin's typed codebase
WooCommerce8.0Required — the plugin deactivates itself without it. Tested up to 9.9
ElementorOptionalSmart Recommendations widget only registers if Elementor is active
🛒
WooCommerce
8.0 – 9.9 — required
🗄️
HPOS
Custom order tables — declared compatible
🧱
Cart/Checkout Blocks
Declared compatible
🎨
Elementor
Optional — Free or Pro
🧩
Gutenberg
Native block with server-side rendering
📦
Variable Products
Fully supported across all modules
03 — Installation

Installation

Method A — WordPress Plugin Directory (Recommended)

1

Search in WordPress Admin

Go to Plugins → Add New and search for Storzen AI Recommends for WooCommerce.

2

Install & Activate

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

3

Go to Storzen Reco

A Storzen Reco menu appears in your WordPress admin sidebar. Click it to open the analytics dashboard and configure each module.

4

Rebuild the co-purchase matrix

For best results on existing stores, open Storzen Reco → Dashboard and click Rebuild co-purchase matrix to index your order history immediately.

Method B — Manual Upload

1

Download & Upload

Download storzen-ai-recommends.zip from wordpress.org/plugins. Go to Plugins → Add New → Upload Plugin and install the ZIP.

2

Activate

Click Activate Plugin. The Storzen Reco menu appears in your WordPress admin sidebar.

3

Configure Settings

Go to Storzen Reco → Settings and use the module tabs (FBT, Related, Cart, Recently Viewed, Post-Purchase, Social Proof, Low Stock, Analytics) to enable and tune each feature.

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

Quick Start

After activation, all core modules are enabled by default. The plugin starts learning from orders immediately — no manual setup required for basic usage.

  • The Frequently Bought Together widget appears on single product pages automatically. Go to Settings → FBT to configure position, max products, and bundle discount.
  • Related Products AI replaces WooCommerce's default related products on single product pages. Go to Settings → Related Products AI to pick the scoring mode (co-purchase, taxonomy, or hybrid).
  • Cart Recommendations appear on the cart page and mini-cart automatically. Go to Settings → Cart to toggle each placement independently.
  • The Recently Viewed widget appears on product pages by default. Place it anywhere else using the [sprwoo_recently_viewed] shortcode or Gutenberg block.
  • Post-Purchase Recommendations show on the order thank-you page automatically — no shortcode needed.
  • Go to Settings → Social Proof and Low Stock to fine-tune badge thresholds so new stores never show misleading data.
  • Click Rebuild co-purchase matrix on the Dashboard after activation if your store has existing order history to seed recommendations immediately.
05 — Module

Frequently Bought Together

An Amazon-style "customers also bought" widget displayed on single product pages. It's powered by the co-purchase frequency matrix — the products that most frequently appear alongside the current product in completed orders are ranked to the top. On stores with sparse order history, the taxonomy-based fallback provides relevant companion suggestions immediately.

Bundle discount

When enabled, the FBT widget shows a single Add All to Cart button and a discount line showing the savings. The discount can be configured as a percentage (e.g. 10% off) or a fixed currency amount. Both the button label and the section title are fully customizable.

Display position

Choose where the FBT widget appears relative to the product summary:

PositionHook used
After add to cart buttonwoocommerce_after_add_to_cart_form
After product summarywoocommerce_after_single_product_summary, priority 5
After related productswoocommerce_after_single_product_summary, priority 25
💡
Variable products supported FBT companion products that are variable link to their product page so shoppers can choose a variation before adding to cart. The main product's "Add All to Cart" action always works regardless of whether companions are simple or variable.
07 — Module

Cart Recommendations

Displays contextual product suggestions at two points in the cart experience: the full cart page and the mini-cart sidebar. Products are scored in real time from the current cart contents and items already in the cart are automatically excluded from suggestions.

Placements

  • Cart page — rendered below the cart table using the woocommerce_after_cart_table hook
  • Mini-cart — rendered inside the mini-cart widget using the woocommerce_before_mini_cart_contents hook

Each placement can be toggled independently under Settings → Cart. The section title and maximum number of recommended products are also configurable.

08 — Module

Recently Viewed Products

Tracks which products a shopper has browsed using the browser's built-in sessionStorage — no cookies, no server-side queries for tracking, and no data stored in your database. The list clears automatically when the browser tab closes.

Automatic placements

  • Product pages — the Recently Viewed widget appears below the product content automatically (toggle via Settings → Recently Viewed → Show on product pages)
  • Cart page — optionally display recently viewed products on the cart page (toggle via Settings → Recently Viewed → Show on cart page)

Shortcode

[sprwoo_recently_viewed]
Renders the Recently Viewed products widget anywhere on your site — pages, posts, or widget areas.
maxMaximum products to show. Default: 6
columnsGrid column count. Default: 4
titleSection heading text. Default: Recently viewed
Example — 4 products in 2 columns with a custom heading
[sprwoo_recently_viewed max="4" columns="2" title="Your browsing history"]
🔒
GDPR compliant by design sessionStorage is a temporary, client-side browser mechanism. It is never sent to the server for tracking purposes and is outside the scope of GDPR's "personal data" definition when used this way. No consent banner is needed for this feature.
09 — Module

Post-Purchase Recommendations

Shows a "Complete your purchase" recommendation widget on the WooCommerce order-received (thank-you) page — catching customers at their highest-intent moment, immediately after they've just bought something.

How product seeding works

The module identifies the highest-value item in the completed order and uses it as the anchor product for the recommendation query. Products that were just purchased are excluded from the results so shoppers only see genuinely new suggestions. The widget renders using the same AI scoring engine as the rest of the plugin (hybrid mode by default).

Display controls

Under Settings → Post-Purchase you can configure the section title, maximum number of recommendations, column count, and whether to show price, star rating, and Add to Cart button on each card.

10 — Module

Social Proof Badges

Social proof badges appear automatically on recommendation cards across all surfaces — FBT, related products, cart, post-purchase, recently viewed, Gutenberg block, and Elementor widget. All data comes from WooCommerce; no third-party lookups or external services are involved.

Badge types

TypeExample outputData source
Sales velocity 12 sold this month WooCommerce order line items within the configured velocity window (days)
Rating summary ★ 4.8 · 240 reviews WooCommerce product review average and count
Total purchase count 1,240 people bought this Cumulative WooCommerce order line item count per product

Choose which badge type to display under Settings → Social Proof → Badge type. Minimum thresholds for purchases, reviews, and sales can all be set independently — so stores with sparse data never show badges with misleading low numbers.

💡
Sales velocity data is cached The sales velocity query (order count within N days) is cached for 6 hours as a WordPress transient, so it never runs on every page load.
11 — Module

Low Stock Urgency Badges

Shows urgency badges on recommendation cards when a product's WooCommerce stock level falls at or below your configured threshold. The badge renders before social proof badges on all recommendation surfaces.

Badge styles

StyleOutput example
QuantityOnly 3 left!
SimpleLow stock

Variable product handling

For variable products, the badge checks all available variations and uses the lowest remaining stock count across them. Products that don't have WooCommerce stock management enabled are never shown a low stock badge, regardless of the threshold setting.

⚠️
Stock management must be enabled per product The low stock badge only appears on products where WooCommerce stock management is active. If a product uses "In stock / Out of stock" status without a quantity, no badge will display.
12 — Module

Analytics Dashboard

A built-in analytics dashboard inside WP Admin tracks the performance of every recommendation widget — without sending any data outside your server.

Tracked events

  • Impressions — a recommendation widget was rendered and visible on the page
  • Clicks — a shopper clicked a recommended product card
  • Add-to-cart — a shopper clicked Add to Cart on a recommendation card

Events are stored in the {prefix}sprwoo_analytics database table and can be filtered by 7, 30, or 90-day windows. The table auto-purges rows older than your configured data retention window to keep your database lean.

WP Admin → Storzen Reco → Dashboard
Dashboard
Settings
Analytics Overview
Last 30 days
8,421
Impressions
↑ 14%
1,204
Clicks
↑ 9%
387
Add-to-cart
↑ 22%
13 — Feature

Gutenberg Block

A native WordPress block with server-side rendering lets you place the Smart Recommendations widget on any page or post without code. Find it in the block inserter by searching for "Smart Recommendations" or "Storzen".

Block controls (in the editor sidebar)

  • Recommendation type — choose from related, cart-based, or recently viewed
  • Max products — how many recommendation cards to render
  • Columns — grid column count (1–4)
  • Section title — heading text displayed above the widget
  • Show price — toggle product price visibility on cards
  • Show rating — toggle star rating visibility
  • Show add to cart — toggle the Add to Cart button on cards
💡
Source code available The block's compiled JavaScript is at blocks/build/index.js. The human-readable source is in blocks/src/index.js and is also published on GitHub at github.com/webtend/storzen-ai-recommends.
14 — Feature

Elementor Widget

When Elementor is active, a Smart Recommendations widget appears in the Elementor panel (search keywords: recommendations, products, woocommerce, storzen, AI). It renders the full recommendations widget with a live canvas preview and additional style controls that go beyond what the shortcode offers. The widget only loads at all if Elementor is detected as active — it adds zero file weight to sites that don't use Elementor.

Style controls

  • Title color — customize the section heading color independently of the theme
  • Title spacing — control the gap between the heading and the product grid
💡
Works without Elementor too All recommendation surfaces (FBT, related products, cart, post-purchase, recently viewed) work identically with or without Elementor. The widget is purely an optional, stylable way to place recommendations inside an Elementor layout.
15 — Reference

Shortcode

[sprwoo_recently_viewed]
The only public shortcode included in this plugin. Renders the Recently Viewed products widget anywhere on your site. All other recommendation surfaces (FBT, related products, cart, post-purchase) are rendered automatically via WooCommerce hooks.
maxMaximum products to display. Default: 6
columnsNumber of grid columns. Default: 4
titleSection heading text. Default: "Recently viewed"

For placing other recommendation types anywhere on your site without code, use the Gutenberg block or the Elementor widget, both of which support any recommendation type.

16 — Reference

All Settings

Every option, grouped by the settings tab it lives under (Storzen Reco → Settings in the admin menu). All settings are stored as a single serialized option under the key sprwoo_settings.

Frequently Bought Together

KeyDefaultNotes
fbt_enabled1Enable or disable the FBT module entirely
fbt_positionafter_add_to_cartafter_add_to_cart, after_summary, or after_related
fbt_max_products3Maximum companion products to show (1–6)
fbt_titleFrequently Bought TogetherSection heading text
fbt_discount_enabled0Enable the bundle discount and Add All to Cart button
fbt_discount_typepercentpercent or fixed
fbt_discount_value10Discount amount — percentage or fixed currency depending on type

Related Products AI

KeyDefaultNotes
related_enabled1Enable or disable the AI related products override
related_modehybridhybrid, copurchase, or taxonomy
related_max_products4Number of related product cards to show
related_columns4Grid column count
related_titleYou may also likeSection heading text

Cart Recommendations

KeyDefaultNotes
cart_enabled1Enable or disable the cart recommendations module
cart_on_cart_page1Show recommendations on the full cart page
cart_on_mini_cart1Show recommendations inside the mini-cart widget
cart_max_products3Maximum recommendation cards to show in the cart
cart_titleYou might also likeSection heading text

Recently Viewed

KeyDefaultNotes
rv_enabled1Enable or disable the recently viewed module
rv_on_product1Auto-display on single product pages
rv_on_cart0Auto-display on the cart page
rv_max_products6Maximum products shown in the widget
rv_columns4Grid column count
rv_titleRecently viewedSection heading text
rv_show_price1Show product price on cards
rv_show_atc1Show Add to Cart button on cards

Post-Purchase

KeyDefaultNotes
pp_enabled1Enable or disable the post-purchase module
pp_titleComplete your purchaseSection heading text
pp_max_products4Maximum recommendation cards
pp_columns4Grid column count
pp_show_price1Show product price on cards
pp_show_rating1Show star rating on cards
pp_show_atc1Show Add to Cart button on cards

Social Proof

KeyDefaultNotes
social_proof_enabled1Enable or disable social proof badges globally
social_proof_typevelocityvelocity, rating, or purchases
social_proof_velocity_days30Lookback window in days for sales velocity calculation
social_proof_min_sales5Minimum sales count before velocity badge shows
social_proof_min_reviews3Minimum review count before rating badge shows
social_proof_min_purchases10Minimum total purchases before purchase count badge shows

Low Stock

KeyDefaultNotes
ls_enabled1Enable or disable low stock urgency badges globally
ls_threshold5Stock quantity at or below which the badge appears
ls_badge_stylequantityquantity ("Only X left!") or simple ("Low stock")

Analytics

KeyDefaultNotes
analytics_enabled1Enable or disable analytics event tracking
analytics_retention90Days to keep analytics rows before auto-purge
17 — Reference

How the AI Works

The engine builds a co-purchase frequency matrix from your completed WooCommerce orders. Every time two products appear together in a single completed order, their co-occurrence count is incremented in the {prefix}sprwoo_copurchase table. Products bought together frequently accumulate a higher score and rank higher in recommendations.

Matrix updates

The matrix updates incrementally with every new completed order via the woocommerce_order_status_completed hook — there's no batch job to schedule. On first install, click Rebuild co-purchase matrix from the Dashboard to process your historical order archive.

Taxonomy fallback

On new stores with no order history, a taxonomy-based scoring fallback calculates relevance from category and tag overlap between products. This ensures recommendations are meaningful from day one, even before any sales data exists.

Scoring modes summary

ModeCo-purchase weightTaxonomy weight
Hybrid (default)70%30%
Co-purchase100%0%
Taxonomy0%100%

Performance

Scoring results per product are cached as WordPress transients with a 1-hour TTL. After the initial warm-up, the AI query never runs on a live page load. The flush_scoring_cache() method is called automatically after a matrix rebuild to force fresh scores.

Zero external dependencies The entire recommendation engine runs inside your WordPress database using wpdb queries. There are no machine learning APIs, no cloud inference, and no third-party services — ever.
18 — Reference

Privacy & Data

Storzen AI Recommends does not collect, transmit, or share any data with external servers. All scoring, storage, and analytics run entirely within your WordPress database. No account or API key is required at any point.

What the plugin stores

TablePurposeCleared on uninstall?
{prefix}sprwoo_copurchaseCo-purchase frequency matrix — product pairs and their co-occurrence counts. Contains only product IDs and integers; no customer data.Yes
{prefix}sprwoo_analyticsImpression, click, and add-to-cart event counts per product and recommendation surface. No user identifiers stored.Yes

Recently viewed — no server storage

The recently viewed tracking uses the browser's built-in sessionStorage exclusively. No data is written to the server for this feature. The data is temporary, client-side only, and is automatically cleared when the browser tab closes.

🗑️
Clean uninstall When you delete the plugin from the WordPress admin, the uninstall.php routine removes both custom database tables, all plugin options, and all transient cache entries. No manual cleanup required.
19 — FAQ

Frequently Asked Questions

Does this plugin require an API key or external service?
No. The plugin works entirely within your WordPress installation using your own order data. No external API calls, no subscriptions, no account required — ever.
How does the AI scoring work?
The engine builds a co-purchase frequency matrix from your WooCommerce order history. Products frequently purchased together receive higher scores and appear first. On new stores with little order history, a taxonomy-based fallback uses category and tag overlap. The default hybrid mode blends both signals weighted 70% co-purchase and 30% taxonomy.
Does it work with variable products?
Yes. The recommendations engine works with all WooCommerce product types. Variable products in recommendation widgets link to the product page so shoppers can select their variation. The low stock urgency badge checks all available variations and shows the lowest remaining stock count across them.
Will it slow down my store?
No. Recommendation scores are cached as WordPress transients with a 1-hour TTL, so the AI scoring query runs at most once per hour per product. Social proof sales velocity data is cached for 6 hours. Frontend assets are loaded only on the relevant pages. The recently viewed feature uses browser sessionStorage and triggers zero server-side queries for tracking.
Does it conflict with my theme or other plugins?
No. The plugin uses standard WooCommerce hooks and template filters. It overrides woocommerce_related_products via the official WooCommerce filter — not by modifying template files — so it works with any properly coded WooCommerce theme. All CSS classes are namespaced under .sprwoo- to avoid conflicts.
How do I use the recently viewed shortcode?
Place [sprwoo_recently_viewed] anywhere on your site. Optional attributes: max (default 6), columns (default 4), title (default "Recently viewed"). Example: [sprwoo_recently_viewed max="4" columns="2" title="Your browsing history"].
How do I place recommendations on a custom page?
Use the Gutenberg block or Elementor widget to place any recommendation type anywhere without code. The Gutenberg block is the easiest route: search for "Smart Recommendations" in the block inserter and configure it directly from the editor sidebar. You can also use the [sprwoo_recently_viewed] shortcode specifically for recently viewed products.
Can I customize the widget appearance?
Yes. The plugin includes a public stylesheet at public/css/sprwoo-public.css which you can override via your theme's CSS. All elements use prefixed .sprwoo- class names to avoid conflicts with your theme. The Elementor widget also exposes style controls for title color and spacing directly in the Elementor panel.
What data does the plugin store in the database?
The plugin uses two custom database tables: {prefix}sprwoo_copurchase for the co-purchase frequency matrix (product IDs and integer counts — no customer data), and {prefix}sprwoo_analytics for impression and click tracking (no user identifiers). Both tables are created on activation and removed on uninstall. The analytics table auto-purges rows older than your configured retention window.
Is the recently viewed feature GDPR compliant?
Yes. Recently viewed products are stored in the browser's sessionStorage — a temporary, client-side mechanism that is never sent to the server for tracking purposes and is automatically cleared when the browser tab closes. No personal data is stored in the database for this feature.
How does the low stock badge decide what to show?
The badge appears when WooCommerce stock management is enabled for a product and the stock quantity is at or below your configured threshold (default: 5). For variable products it checks all available variations and shows the lowest stock count. Products without stock management enabled are never shown a badge, regardless of the threshold.
What happens to my data if I uninstall the plugin?
When you delete the plugin from the WordPress admin, the uninstall routine removes both custom database tables and all plugin options. Transient cache entries are also cleared. This is automatic — no manual cleanup required.
Is the plugin translation ready?
Yes. All user-facing strings use the storzen-ai-recommends text domain and the languages folder is properly set up for WP.org language pack distribution.
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 when posting.
20 — Changelog

Changelog

1.0.0 2026
Initial Release
Frequently Bought Together module with bundle discount support (percentage and fixed).
Related Products AI with co-purchase, taxonomy, and hybrid scoring modes.
Cart Recommendations on cart page and mini-cart sidebar.
Recently Viewed Products — sessionStorage-based, GDPR-safe, zero DB queries for tracking.
Post-Purchase Recommendations on the WooCommerce order-received page.
Social Proof Badges — sales velocity, rating summary, and total purchase count.
Low Stock Urgency Badges with configurable threshold and two badge styles.
Analytics dashboard tracking impressions, clicks, and add-to-cart events per surface.
Native Gutenberg block with server-side rendering and full editor sidebar controls.
Elementor widget with live canvas preview and style controls.
HPOS (custom order tables) and Cart/Checkout Blocks compatibility declared.
Modern admin UI with sidebar navigation, metric cards, and toggle settings.
Full translation support with text domain storzen-ai-recommends.