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
- Shopper message (or search tool args).
- 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. - Optional
Ai_Intent_Parser(JSON, cached) when Search mode is not Native and complexity rules pass. Search_Router→Catalog_Search_Service→Catalog_Query/wc_get_products.- Query compatibility: simple products without a
product_typeterm, and products missing_stock_statusmeta, can still match (treated as simple / in-stock). Candidate_Validatordrops unpublished/invisible IDs.Result_Rankerscores. Optional match explanation from WooCommerce fields only.- 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
| Situation | What happens |
|---|---|
| Product found | Ranked cards (up to Maximum results) |
| Product not found | Fallback similar products if enabled; else No Products Found message |
| Empty search | No Products Found / validation |
| Out of stock | Hidden unless Include out-of-stock or shopper asks |
| AI error / no key | Native WooCommerce search still runs |
| Search tool disabled | Assistant cannot browse the catalog |
| Native mode | No AI intent call |
What is and is not implemented
| Capability | In this release |
|---|---|
| Keyword / title / SKU search | Yes |
| Category and attribute mapping | Yes (conservative; skips bad guesses) |
| Price filters | Yes |
| Stock filter | Yes (default in-stock) |
| Ranking | Yes |
| Match explanations | Yes (catalog fields, not LLM) |
| AI intent for complex NL | Yes, optional |
| Hybrid vector search | Hook only — not a built-in backend |
Search as a WP query ?s= replacement | No — 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.