WooCommerce plugin docs / Product Search

Product Search

Overview

Catalog search is the core shopping feature. The assistant looks up published, visible WooCommerce products using keywords, SKU, categories, attributes, and price. Ranking uses live product data. AI may interpret complex sentences into filters; it never invents products.

How It Works

  1. Shopper message (or search tool args).
  2. Rule-based Intent_Extractor + Taxonomy_Mapper (category/attribute tokens). Long titles will not bind a leftover word like “new” to a “New Arrivals” category when too many tokens remain.
  3. Optional Ai_Intent_Parser (JSON, cached) when Search mode is not Native and complexity rules pass.
  4. Search_RouterCatalog_Search_ServiceCatalog_Query / wc_get_products.
  5. Query compatibility: simple products without a product_type term, and products missing _stock_status meta, can still match (treated as simple / in-stock).
  6. Candidate_Validator drops unpublished/invisible IDs. Result_Ranker scores. Optional match explanation from WooCommerce fields only.
  7. Cards returned to the widget.

If Fallback to WooCommerce search is on and exact filters are empty, similar catalog rows are shown.

Semantic / Hybrid: no embeddings run in this plugin. A developer may return candidate IDs via filters; those IDs are re-loaded from WooCommerce.

How to Enable It

WordPress Admin → WooCommerce → AI Assistant → Product Search → leave Enable product search on → Settings → General → Enable AI Agent.

Configuration

All fields: Product Search settings.

Frontend Usage

Type a product name, SKU, or need (“waterproof jacket under $80”). Browse cards. Out-of-stock cards can offer Notify me if alerts are used.

Example

Exact title “OEG Parts New 12V Starter Motor” matches the published product even if it has no product_type taxonomy term and empty stock meta — using native WooCommerce search, no AI required.

Behavior

SituationWhat happens
Product foundRanked cards (up to Maximum results)
Product not foundFallback similar products if enabled; else No Products Found message
Empty searchNo Products Found / validation
Out of stockHidden unless Include out-of-stock or shopper asks
AI error / no keyNative WooCommerce search still runs
Search tool disabledAssistant cannot browse the catalog
Native modeNo AI intent call

What is and is not implemented

CapabilityIn this release
Keyword / title / SKU searchYes
Category and attribute mappingYes (conservative; skips bad guesses)
Price filtersYes
Stock filterYes (default in-stock)
RankingYes
Match explanationsYes (catalog fields, not LLM)
AI intent for complex NLYes, optional
Hybrid vector searchHook only — not a built-in backend
Search as a WP query ?s= replacementNo — chat/tool search only

Limitations

  • Does not replace the theme’s search bar unless you send queries through the assistant.
  • Hidden/private products are not returned.
  • AI intent is skipped for short/simple queries when AI for complex queries only is on.

Troubleshooting

No results for a product you can see in admin: confirm publish, visibility, and that the search tool is on. Missing stock meta or untyped simple products are included by design. REST 404 on other routes does not stop search if the messages endpoint works.