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
What you get
| Feature | What it does |
|---|---|
| Meaning similarity | The 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 together | Counted 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. |
| Blending | Two weights for related products, two for bundles and the cart page, a minimum similarity and a minimum number of orders. |
| Display | Automatic 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 cart | Each 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. |
| Preview | For 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. |
| Rules | Exclude 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. |
| Fallback | Related products by category and tag when there is no AI or order data, or when the AI is down. |
| Explanation line | Optional, off by default: one short line per bundle, written once, reviewed by a person. |
| Privacy | No tracking of visitors, no cookie of the plugin, no customer data stored or sent. |
| Arabic | The plugin and this guide are in English and Arabic; the admin works right to left. |
Requirements
| Item | Details |
|---|---|
| WordPress | 6.0 or newer |
| PHP | 7.4 or newer |
| WooCommerce | 8.0 or newer (HPOS and block checkout compatible) |
| Also | An 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 provider | An 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. |
| License | GPL-2.0-or-later |
Install
- Unzip the package you downloaded. Inside is
ai-product-recommender-and-bundles-for-woocommerce.zip(do not unzip this one). - In WordPress open Plugins → Add New Plugin → Upload Plugin, choose
ai-product-recommender-and-bundles-for-woocommerce.zipand press Install Now. - Press Activate Plugin. WooCommerce must be active.
- Open Settings → AI Recommender → AI connection, choose your provider, paste your API key and press Test the connection.
Connect your AI
| Field | Meaning |
|---|---|
| Provider | OpenAI-compatible (OpenAI, OpenRouter, Azure, Groq, Ollama, LM Studio...) or Anthropic. |
| API address | Leave empty for the official address. For another service enter it, for example http://localhost:11434/v1. |
| API key | Stored in your database (never shown again). You can define it in wp-config.php instead and the field disappears. |
| Model | The model name at your provider. A small, cheap model is enough for most tasks. |
| Maximum answer length | Caps the tokens of one answer, so a request cannot cost more than you expect. |
| Daily limit | The number of requests the plugin may make per day (0 = no limit). When it is reached the plugin stops asking until tomorrow. |
| Privacy | Hides e-mail addresses, phone numbers and card-like numbers before the text is sent. |
Index your products
Bought together
| Stored | Not stored |
|---|---|
| Product A, product B, number of orders with both | Customers, addresses, e-mails, prices, dates or numbers of the orders |
| Number of orders of each product | Anything about visitors |
How products are ranked
(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.| List | Default weights | Why |
|---|---|---|
| Related products | meaning 70, bought together 30 | Alternatives and close products |
| Bundle and cart | meaning 30, bought together 70 | Products that complete each other |
Preview: what would be recommended, and why
On the shop
| Place | What is shown |
|---|---|
| Product page: related products | Replace (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 page | Optional: suggestions for the products of the order. |
| Block and shortcode | The block “AI product recommendations” and [tqpr_recommendations type="related|bundle|cart" product="ID" limit="4" title="..."]. |
Pins and exclusions
| Rule | Pins |
|---|---|
| Hidden, private, draft, password-protected products | Never 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)
Settings
| Option | Meaning |
|---|---|
| Recommendations | The main switch. |
| Where to show | Related products, bundle and its place, cart page, order received page, numbers of products. |
| Ranking | The weights, the minimum similarity, the minimum times bought together, complements in bundles, the fallback. |
| Exclusions | Out-of-stock products and the lists of categories, tags and products. |
| Bought together | Order statuses, period, largest order counted, automatic count. |
| Index | Index on save, products per batch, text per product, similar products kept, cache hours, price for the estimate. |
| Explanation | On/off, review, lines per day. |
Cache and performance
| Catalogue | Measured |
|---|---|
| 1,000 products, vector size 256 | about 20 seconds of background work for all lists (0.017 s per product) |
| 1,000 products, vector size 1536 | about 1.6 minutes (0.095 s per product) |
| 10,000 products, vector size 256 | about 29 minutes (0.17 s per product) |
| 10,000 products, vector size 512 | about 1 hour (0.36 s per product) |
| 10,000 products, vector size 1536 | about 4.5 hours (1.6 s per product) |
| One batch | 2.5 to 3.3 seconds, peak memory 42 MB or less |
| A page view | reading the stored list of a product: about 0.06 ms; the ranked lists are then cached |
| Counting 1,000 orders | 1.3 seconds in 11 batches of 100 |
Limits
| Limit | Detail |
|---|---|
| Not personalised | The suggestions depend on the products, not on the visitor: there is no tracking, no history and no cookie. |
| New shops | Without orders the bought-together part is empty and the meaning and the fallback work alone. |
| Bundle discount | Not included (see On the shop). |
| Providers | Embeddings need an OpenAI-compatible endpoint; Anthropic can write the explanation lines only. |
| Accuracy | Embeddings and order counts can suggest odd products. Check important products in the Preview and use pins and exclusions. |
| Block themes | The Related products block keeps its own sort order; the Cart block section is updated on the next page load. |
| Product types | Bundles take simple and variable products; grouped and external products are not added by Add all to cart. |
| Page caching | The 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. |
| Screenshots | The 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
Who can do what
| Who | Can |
|---|---|
| Administrators | Change the settings and the AI connection. |
| Shop managers (manage_woocommerce) | Index, count the orders, preview, review the lines, clear the cache. |
| Product editors | Pins and Never recommend of the products they can edit. |
| Visitors | See the suggestions and use Add all to cart (security token, checks of every product). |
Arabic and right to left
For developers
{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
| Problem | What to do |
|---|---|
| Only “Same category or tag” suggestions | No embeddings yet and no counts: index the products and count the orders. |
| The AI service answered 401 | The key is wrong or has no access to the model. |
| The AI service answered 400 or 404 | The embedding model name or the vector size is not accepted: set the vector size to 0. |
| Products stay waiting | Background jobs run on visits (WP-Cron) or through Action Scheduler: see WooCommerce → Status → Scheduled Actions, or press the button. |
| A product should never appear | Mark it Never recommend, or exclude its category or tag. |
| A variable product is skipped by Add all to cart | The 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.