Skip to content
TAQNIX
Odoo ModulesWordPress PluginsWordPress ThemesShopify ThemesApp TemplatesScripts & UtilitiesBlogSell on TAQNIX

AI Product Recommender and Bundles for WooCommerce documentation

A guide to AI Product Recommender and Bundles for WooCommerce: connecting your AI account, indexing the products, counting the orders, the ranking, the preview, the shop sections, pins and exclusions, the explanation lines, the settings and the measured performance.

Documents version 1.0.0Updated Oct 29, 2026

Start here

In plain words: WooCommerce's own related products are random products of the same category or tag. AI Product Recommender and Bundles ranks them with two signals: the meaning of your product texts (AI embeddings) and what your customers bought together (counted on your site from your orders). It shows related products, a “Complete the look” bundle with an Add all to cart button and suggestions on the cart page, and an admin preview shows why each product is suggested.
A product page: the bundle with the total and Add all to cart, then the related products.
A product page: the bundle with the total and Add all to cart, then the related products.
Tip: The AI is used only to embed your product texts (once per product, and again when a text changes) and, if you turn it on, to write one short explanation line per bundle. Showing recommendations never calls the AI.

What you get

FeatureWhat it does
Meaning similarityThe title, categories, tags, visible attributes and descriptions of each published product are embedded in batches; the most similar products of each product are computed on your server and stored.
Bought togetherCounted locally from your completed orders (HPOS or the legacy order storage, through WooCommerce's own order API). Only pairs of products and counts are stored.
BlendingTwo weights for related products, two for bundles and the cart page, a minimum similarity and a minimum number of orders.
DisplayAutomatic placement on the product page (replace the WooCommerce related products or add a section), the cart page and optionally the order received page, plus a block and a shortcode.
Add all to cartEach product is checked again on the server: part of the bundle, visible, purchasable, in stock; variable products need a chosen option; quantities capped. Prices come from WooCommerce.
PreviewFor any product: the related products and the bundle with the score, the similarity in %, the times bought together and the products left out with the reason.
RulesExclude categories, tags and products, out-of-stock products; hidden, private, draft and password-protected products are never shown; pins per product override the exclusion rules.
FallbackRelated products by category and tag when there is no AI or order data, or when the AI is down.
Explanation lineOptional, off by default: one short line per bundle, written once, reviewed by a person.
PrivacyNo tracking of visitors, no cookie of the plugin, no customer data stored or sent.
ArabicThe plugin and this guide are in English and Arabic; the admin works right to left.

Requirements

ItemDetails
WordPress6.0 or newer
PHP7.4 or newer
WooCommerce8.0 or newer (HPOS and block checkout compatible)
AlsoAn embedding model (for example text-embedding-3-small at OpenAI) for the meaning similarity. Anthropic has no embedding endpoint: use an OpenAI-compatible provider for the embeddings. Without any AI the bought-together counts and the fallback still work.
An AI providerAn account and an API key with an OpenAI-compatible service (OpenAI, OpenRouter, Azure, a local server such as Ollama...) or with Anthropic. You pay your provider for what you use; the plugin has no usage fees.
LicenseGPL-2.0-or-later

Install

  1. Unzip the package you downloaded. Inside is ai-product-recommender-and-bundles-for-woocommerce.zip (do not unzip this one).
  2. In WordPress open Plugins → Add New Plugin → Upload Plugin, choose ai-product-recommender-and-bundles-for-woocommerce.zip and press Install Now.
  3. Press Activate Plugin. WooCommerce must be active.
  4. Open Settings → AI Recommender → AI connection, choose your provider, paste your API key and press Test the connection.

Connect your AI

In plain words: The plugin works with your own AI account. In Settings → (this plugin) → AI connection choose the provider, paste the key and press Test the connection: a green message tells you that the model answered.
FieldMeaning
ProviderOpenAI-compatible (OpenAI, OpenRouter, Azure, Groq, Ollama, LM Studio...) or Anthropic.
API addressLeave empty for the official address. For another service enter it, for example http://localhost:11434/v1.
API keyStored in your database (never shown again). You can define it in wp-config.php instead and the field disappears.
ModelThe model name at your provider. A small, cheap model is enough for most tasks.
Maximum answer lengthCaps the tokens of one answer, so a request cannot cost more than you expect.
Daily limitThe number of requests the plugin may make per day (0 = no limit). When it is reached the plugin stops asking until tomorrow.
PrivacyHides e-mail addresses, phone numbers and card-like numbers before the text is sent.
Tip: The table Recent use at the bottom of the tab shows the requests, the errors and the tokens of the last days.
The AI connection tab after a successful test, with the embedding model and the vector size.
The AI connection tab after a successful test, with the embedding model and the vector size.
Tip: Vector size: 0 keeps the size of the model. Models such as text-embedding-3-small accept a smaller size (512 or 256): the similar products are then computed several times faster (see the chapter Performance). The daily limit is 1,000 requests by default.

Index your products

In plain words: Open Products → AI Recommendations. The Status tab shows the products embedded, the lists of similar products, the products waiting and failed, and an estimate of the tokens and the price before you start. Press Index the waiting products now: the products are sent in small batches, then the similar products are computed on your server. You can Stop at any time; the rest runs in the background (Action Scheduler, or WP-Cron).
The Status tab: counters, the index and the bought-together count.
The Status tab: counters, the index and the bought-together count.
A run in progress.
A run in progress.
In plain words: When a product is saved its text is compared with the indexed one: only a real change is sent again, a few seconds later. A product that is trashed, set to draft or protected by a password leaves the index and every list.

Bought together

In plain words: Press Count the orders now once; then the count runs again every day (or every week, or never: setting). Orders of the chosen statuses (Completed by default) created in the period (365 days by default) are read in batches of 100. Of each order only the list of products is used; orders with more different products than Largest order counted (30) are skipped. The new counts replace the old ones in one step at the end.
StoredNot stored
Product A, product B, number of orders with bothCustomers, addresses, e-mails, prices, dates or numbers of the orders
Number of orders of each productAnything about visitors

How products are ranked

In plain words: For a product, the candidates are its most similar products (similarity from 0 to 1) and the products bought together with it. The share of its orders that also had the other product (bought together ÷ orders of the product) gives the second signal. The score is (weight of the meaning × similarity + weight of bought together × share) ÷ (sum of the weights). A product never bought together is kept only when its similarity reaches the minimum similarity (35% by default), and pairs seen in fewer than 2 orders are ignored.
ListDefault weightsWhy
Related productsmeaning 70, bought together 30Alternatives and close products
Bundle and cartmeaning 30, bought together 70Products that complete each other
In plain words: In a bundle, products of the same category as the main product are skipped by default (another sofa is an alternative to a sofa, not a complement). Then come the pins of the product, the rules and the fallback.

Preview: what would be recommended, and why

In plain words: The tab Preview takes any product and shows the related products and the bundle exactly as visitors would get them, computed without the cache, with the score, the similarity in %, bought together N times (of M orders) and a badge: Pinned, Similar meaning, Bought together, Similar + bought together, or Same category or tag (fallback). Below, the products left out and the reason (out of stock, hidden, excluded category, same category...).
The preview of a sofa.
The preview of a sofa.

On the shop

PlaceWhat is shown
Product page: related productsReplace (default): the WooCommerce Related products section shows the plugin's products, with your theme's look; in block themes the block keeps its own sort order. Add: a section of the plugin. Do not change.
Product page: bundle“Complete the look”: the product and 2 suggested products (1-4), with checkboxes, the total of the selected products and Add all to cart; below the summary or below the add to cart button.
Cart page“You may also need”, for all the products in the cart (classic cart and Cart block).
Order received pageOptional: suggestions for the products of the order.
Block and shortcodeThe block “AI product recommendations” and [tqpr_recommendations type="related|bundle|cart" product="ID" limit="4" title="..."].
After Add all to cart: what was added, and a link to the cart.
After Add all to cart: what was added, and a link to the cart.
The cart page.
The cart page.
The block in the editor.
The block in the editor.
In plain words: Add all to cart checks each product again on the server: it must belong to the bundle of the page, be visible, purchasable and in stock; a variable product needs an option chosen in its list (otherwise it is skipped and the shopper is told); at most 10 products and a capped quantity. The prices are those of WooCommerce (taxes and sale prices as your shop shows them).
Important: There is no bundle discount in this plugin. If you want one, use your pricing or discount plugin (for example a rule for products bought together).

Pins and exclusions

In plain words: In the product edit screen the box AI recommendations holds the pinned products (shown first, in your order, in the related products and the bundle of this product) and Never recommend this product.
The box in the product edit screen.
The box in the product edit screen.
RulePins
Hidden, private, draft, password-protected productsNever shown, pinned or not
Out of stock (setting, on by default)Never shown, pinned or not
Excluded categories, tags, products, “Never recommend”A pin overrides them

Explanation lines (optional)

In plain words: Off by default. When it is on, each bundle shown on the shop is queued once; a background job asks your chat model for one short line (at most 20 words, from the names and short descriptions of the products, delimited as data) and keeps it. With Review on (default) a line appears only after a person approved it in the tab Explanation lines, where each line can be edited, approved, rejected or written again. At most 30 lines per day by default.
Lines to review and approved lines.
Lines to review and approved lines.
Important: The AI can be wrong or vague. Read each line before you approve it.

Settings

In plain words: Settings → AI Recommender.
The settings tab.
The settings tab.
OptionMeaning
RecommendationsThe main switch.
Where to showRelated products, bundle and its place, cart page, order received page, numbers of products.
RankingThe weights, the minimum similarity, the minimum times bought together, complements in bundles, the fallback.
ExclusionsOut-of-stock products and the lists of categories, tags and products.
Bought togetherOrder statuses, period, largest order counted, automatic count.
IndexIndex on save, products per batch, text per product, similar products kept, cache hours, price for the estimate.
ExplanationOn/off, review, lines per day.

Cache and performance

In plain words: A page view reads two short lists from the plugin's tables and ranks them; the result is cached (12 hours by default) and cleared when the counts or the lists change, when the settings change, or when the pins of a product change. Stock and visibility are checked on every view, so an out-of-stock product disappears at once. Clear the cache is on the Status tab.
In plain words: The similar products are computed in PHP on your server, in batches of a few seconds. Measured on a test machine (Apple Silicon Mac, PHP 8.3, MySQL 8.0) with synthetic vectors:
CatalogueMeasured
1,000 products, vector size 256about 20 seconds of background work for all lists (0.017 s per product)
1,000 products, vector size 1536about 1.6 minutes (0.095 s per product)
10,000 products, vector size 256about 29 minutes (0.17 s per product)
10,000 products, vector size 512about 1 hour (0.36 s per product)
10,000 products, vector size 1536about 4.5 hours (1.6 s per product)
One batch2.5 to 3.3 seconds, peak memory 42 MB or less
A page viewreading the stored list of a product: about 0.06 ms; the ranked lists are then cached
Counting 1,000 orders1.3 seconds in 11 batches of 100
In plain words: Your server may be slower or faster. Above about 10,000 products use a smaller vector size; for catalogues of tens of thousands of products a dedicated vector database is the better tool, and this plugin does not include one.

Limits

LimitDetail
Not personalisedThe suggestions depend on the products, not on the visitor: there is no tracking, no history and no cookie.
New shopsWithout orders the bought-together part is empty and the meaning and the fallback work alone.
Bundle discountNot included (see On the shop).
ProvidersEmbeddings need an OpenAI-compatible endpoint; Anthropic can write the explanation lines only.
AccuracyEmbeddings and order counts can suggest odd products. Check important products in the Preview and use pins and exclusions.
Block themesThe Related products block keeps its own sort order; the Cart block section is updated on the next page load.
Product typesBundles take simple and variable products; grouped and external products are not added by Add all to cart.
Page cachingThe product page sections are the same for every visitor and can be cached. The cart section (and the block or shortcode of type cart) depends on the cart of the visitor: show it only on pages your caching plugin does not cache (the WooCommerce cart and checkout pages are excluded by caching plugins by default). The Add all to cart button carries a WordPress security token that is valid for 12 to 24 hours: keep the page cache lifetime of product pages under 12 hours, or the button asks the visitor to reload the page.
ScreenshotsThe pictures were taken on a demo furniture shop with demo orders and a deterministic test embedding service (not a real AI model). The scores shown are illustrations; real results depend on your model, products and orders.

Privacy

In plain words: Using an AI model means sending text to your provider. When a product is indexed its title, descriptions, attributes, categories and tags are sent; with the explanation lines on, the names and short descriptions of the products of a bundle. No customer or order data is ever sent: the bought-together counts are computed on your site. E-mail addresses, phone numbers and card-like numbers are masked first (an option, on by default). Nothing is sent to Taqnix. Mention your AI provider in your privacy policy: the plugin adds a suggested paragraph in Settings → Privacy.
Important: AI can be wrong. Treat what it writes as a draft and read it before you publish it.

Who can do what

WhoCan
AdministratorsChange the settings and the AI connection.
Shop managers (manage_woocommerce)Index, count the orders, preview, review the lines, clear the cache.
Product editorsPins and Never recommend of the products they can edit.
VisitorsSee the suggestions and use Add all to cart (security token, checks of every product).

Arabic and right to left

The Status tab in an Arabic WordPress.
The Status tab in an Arabic WordPress.
The preview, in Arabic.
The preview, in Arabic.
The explanation lines, in Arabic.
The explanation lines, in Arabic.

For developers

In plain words: Skip this chapter if you only use the plugin. Tables: {prefix}tqpr_index (vectors), {prefix}tqpr_similar (lists), {prefix}tqpr_pairs (counts), {prefix}tqpr_pairs_build (count in progress), {prefix}tqpr_explain (lines).
// The recommendations from your own code (ids, scores, reasons)
$res = TQPR_Engine::recommend( $product_id, 'bundle', 3 );

// Add a brand or any meta to the text that is embedded
add_filter( 'tqpr_product_text', function ( $text, $product ) {
	return $text . "\nBrand: " . $product->get_meta( 'brand' );
}, 10, 2 );

// Never recommend some products (return a short reason)
add_filter( 'tqpr_visible', function ( $ok, $product ) {
	return $product->get_meta( 'b2b_only' ) ? 'b2b' : $ok;
}, 10, 2 );

// Highest quantity of one product added by the bundle button (default 10)
add_filter( 'tqpr_bundle_max_qty', function () { return 3; } );

// The key can live in wp-config.php
define( 'TQPR_AI_KEY', 'sk-...' );

Troubleshooting

ProblemWhat to do
Only “Same category or tag” suggestionsNo embeddings yet and no counts: index the products and count the orders.
The AI service answered 401The key is wrong or has no access to the model.
The AI service answered 400 or 404The embedding model name or the vector size is not accepted: set the vector size to 0.
Products stay waitingBackground jobs run on visits (WP-Cron) or through Action Scheduler: see WooCommerce → Status → Scheduled Actions, or press the button.
A product should never appearMark it Never recommend, or exclude its category or tag.
A variable product is skipped by Add all to cartThe shopper must choose an option in its list first.

Updating and removing

Install the new zip over the old one in Plugins → Add New Plugin → Upload Plugin (WordPress offers to replace the current version), or replace the folder ai-product-recommender-and-bundles-for-woocommerce by FTP. Your settings, the index, the counts and the lines are kept. To remove the plugin, deactivate and delete it: its settings are removed with it.

Deleting the plugin also drops its five tables and removes the pins, the cached lists and its scheduled jobs. Products and orders are never changed.

Support

Installation help and bug fixes are included for 6 months, with lifetime updates. Contact us through the marketplace page where you bought the plugin or write to support@taqnix.com with your WordPress version, the plugin version and a screenshot.