=== AddSynapse – Live Product Search & Filters for WooCommerce ===
Contributors: sakkoulas
Tags: woocommerce, product search, live search, ajax search, product filter
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.1
Stable tag: 0.8.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Instant, typo-tolerant WooCommerce product search and AJAX product filters. Hosted, nothing to configure, free plan with no time limit.

== Description ==

**AddSynapse** replaces the default WooCommerce product search with a fast,
**hosted** live search and AJAX product filters. Indexing and search run on our servers, so
your shop's database and hosting carry no extra load.

= Search =

* **Live search as you type** — image, price and in-stock options, in a compact list or a
  large panel with product cards and category/brand links.
* **Typo tolerant** — "headphnes" still finds "headphones"; partial words match too.
* **Synonyms** per store, and search by **attributes** (color, size…), SKU and barcode.
* **No-results report** — see what shoppers didn't find; add a synonym in one click.
* **No product disappears** — if your catalog exceeds your plan, the most important products
  are indexed and the rest are still found by the standard WordPress search.
* **Works with your theme** — attaches to its search field and icon automatically, page
  builders included, with CSS selectors as a fallback; or keep your theme's search look.
* **Voice search** (optional) and **Semantic search (beta)** (optional, Pro and Business
  plans: "Related results" only when a search finds nothing).
* **Privacy** — search history stays in the visitor's browser; search stats are opt-in.

= How the filters work =

1. **Place the filters** — add one *AddSynapse Search — Product filter* block or widget per
   filter to your shop sidebar, or use a shortcode (see the FAQ). Filters: any product attribute (color,
   size…), category (list or tree), brand, and price (min–max).
2. **Shoppers pick values** — checkboxes, radio buttons, dropdown or buttons, with counts that
   follow the other choices. Different filters narrow together; on a category page they stay
   within that category.
3. **The product grid updates** — the plugin finds your theme's product grid (div-based grids
   like Woodmart or Flatsome too) and shows the filtered products in its place, with no page
   reload; "Clear" brings your theme's grid back. Prefer a page reload? Switch it in
   **Settings → Product filters**. The address bar always holds the filters (share, back button).

Limits: filtered results use the plugin's own product cards (image, title, price, in-stock
options), not your theme's. If your plan covers only part of your catalog, filters pause and
your theme shows all products.

= Language support =

Typo tolerance, partial words, synonyms and attributes work in any language. Filler words and
phrases ("I'm looking for…") are handled in English, Greek and 15 other European languages.

**Built-in Greek support:** greeklish ↔ Greek ("kreatini" finds "κρεατίνη") and word forms
("πρωτεΐνη" also finds "πρωτεΐνης", "πρωτεΐνες"). Word forms and transliteration are
currently Greek only.

= How it works =

After you connect, the plugin sends catalog data (title, categories, price, SKU, images —
**never customer or order data**) to our service through a background queue (Action
Scheduler). Visitor searches go directly to our service with a short-lived token scoped to
your catalog. Details in **"External services"** below.

= Requires a free AddSynapse account =

This plugin is a **client for a hosted search service**; there is no local search engine and
nothing is held back. Click **Connect to AddSynapse** on the settings page, sign in (or create a
free account) and approve your site — no card, no key to copy. **Until you connect, the plugin
sends nothing out, schedules nothing and shows nothing in your store.**

The Free plan has **no time limit** and search is never switched off. It covers a limited number
of products (variations don't count). Fair-use limits on monthly searches are informational
only — search is never interrupted. Payment problems on a paid plan fall back to the Free plan
limits. The Pro plan can be tried free for 5 days (card required); afterwards the plugin keeps
working on the Free plan. Plans and prices: https://addsynapse.com/product-search.

Requires WooCommerce 8.0 or newer and the PHP mbstring extension.

== External Services ==

This plugin is a client for the hosted AddSynapse search service. AddSynapse is operated by
WebOrange (weborange.gr). The service runs on addsynapse.com hosts; stores
activated before the move may still use the previous weborange.gr hosts (same service, same
operator) until their next token renewal switches them over automatically. Indexing and search run on our servers, so the plugin cannot work without connecting
to the services below. **Until you connect to AddSynapse (or enter a license key from an earlier
version), the plugin sends nothing anywhere.** Your store's customer and order data is never
sent. After an administrator clicks "Connect to AddSynapse", the following is sent (details in
sections 0-2 below):

* to AddSynapse, once, in the address of the page that opens: your site's address and name and
  the email address of the administrator who clicked (only to pre-fill sign-in or sign-up — your
  account is created by you, on the AddSynapse website);
* to AddSynapse, about every hour: your site's address, version numbers and product count;
* to the search service: your published product catalog (no customer or order data) and your
  synonyms;
* from your visitors' browsers to the search service: the search terms and filters they use, and —
  only if you turn on search statistics — anonymous search and click counts (no cookies, no
  visitor identifiers).

* AddSynapse account (section 0): terms https://addsynapse.com/terms, privacy https://addsynapse.com/privacy
* Search service (sections 1 and 2): terms https://search-api.addsynapse.com/terms, privacy
  https://search-api.addsynapse.com/privacy

= 0. AddSynapse account — app.addsynapse.com and api.addsynapse.com =

Your AddSynapse account holds your plan, limits and billing.

* **Connect** (only when an administrator clicks "Connect to AddSynapse"): app.addsynapse.com
  opens in a new tab with your site's address and name, the platform (WooCommerce), the plugin
  version and the email address of the administrator who clicked (only to pre-fill sign-in or
  sign-up). Your site first asks api.addsynapse.com for the address of that page. While the tab
  is open, the settings page asks api.addsynapse.com every few seconds whether you approved
  (server to server, with the one-time random request code; only while the request is pending, at most 24 hours). After you
  sign in and approve, your site exchanges a one-time code with api.addsynapse.com (server to
  server) for its site key and a signing secret, which is stored encrypted in your WordPress
  database.
* **Plan status** (about every hour in the background, when you open the plugin's settings page,
  and when you click "Refresh status"): a signed request with your site's address, the plugin,
  WordPress and WooCommerce versions and the number of published products. The response
  (signed, verified by the plugin) contains your plan, its limits, the billing state, links to
  your account, and the addresses of the search service assigned to your site (sections 1-2).
* **Disconnect** (only when you click it): a signed request so that AddSynapse revokes the keys.

= 1. AddSynapse Search API — search-api.addsynapse.com =

Used by your WordPress site (server to server), authenticated with your license key. Stores
activated before the move may still use the previous address, search-api.weborange.gr (legacy,
same service and operator), until the next token renewal returns the new one.

* **Connecting the search service** (once, right after you connect to AddSynapse, and again
  only if it has to be repaired): your store's domain, its AddSynapse site key and a signed
  proof, which the Search API forwards to AddSynapse (api.addsynapse.com) to confirm your site.
  The response contains the license key for the search service. Every later request to this
  API also carries the site key (`X-AddSynapse-Site` header).
* **License activation and token renewal** (on activation, then about once every 24 hours):
  your license key and your store's domain. Every request to this API also carries the
  plugin's version number (`X-AddSynapse-Plugin` header). The response contains a short-lived, read-only
  search token and the addresses of the search hosts assigned to your store.
* **Catalog indexing** (when a product is created, updated, trashed or deleted, during a full
  rebuild you start, and in a nightly background sync): a list of your published, visible
  products — title, categories, brand, description excerpt, price, SKU/barcodes, attributes
  (e.g. color/size), stock status, number of sales and creation date (used only to keep your
  most important products when the catalog is larger than your plan), image URLs and product URL. Deleted or hidden products are
  sent as a list of product IDs to remove.
* **Settings and synonyms** (when you save settings or edit synonyms): your synonym groups
  and your site's language code (e.g. "el"), also sent on license activation.
* **Statistics** (when you open the Stats or Status tab): a request for your store's search
  statistics and plan usage.
* **Suggestions** (when you ask for synonym suggestions on the Stats tab): the search term
  you picked.
* **Billing portal link** (sites with a license key from earlier versions, only when you click
  "Manage subscription & invoices"): a request for a one-time link to your Stripe customer
  portal (see Stripe below).
* **Search statistics beacon** — **optional, off by default**; only if you tick it under **Settings → Behavior → Search statistics**. From the
  visitor's browser, after each search and result click, sent to the `/v1/track` endpoint:
  your store ID, the search term, the number of results, and the ID of the product that was
  clicked. When the plugin removed a filler phrase from the search (see "Filler phrases"
  below), the phrase as the visitor typed or spoke it is sent too (at most 200 characters),
  so that searches like "do you have …" that still find nothing can improve the lists. In the
  "Theme's search look" mode your site's server sends it, once per search results page. The plugin adds no cookie or visitor identifier to it. As with any web request,
  the visitor's browser connects from an IP address; the statistics service does not store IP
  addresses or user agents with these events. Switching it off stops collection for pages
  loaded after you save: tabs that were already open, or pages served from a page cache, may
  keep sending until they are reloaded or the cache expires. Your choice is also sent to the
  service when you save the settings (and on activation), and from then on the service
  ignores and does not store events from stores that have it switched off. Statistics
  collected earlier stay in the Stats tab until they expire under the retention period in
  the privacy policy.

* **Semantic search (beta)** — **optional, off by default, Pro and Business plans**; only if you
  tick it under **Settings → Behavior → Semantic search (beta)**. No new third party is involved: the setting
  (on/off) is sent with your settings, and while it is on the search service passes the product
  texts it already receives for indexing (title, categories, brand, start of the description) to
  AddSynapse's own embedding service, run by the same operator on our servers in the EU, to
  compute a "meaning" vector per product. When a visitor's search finds no
  products, the same search term is also turned into such a vector by that service to look for
  related products (see section 2). Nothing is sent to other companies. Switching it off removes
  these vectors from your search index. Same terms and privacy policy as the search service.

The activation response may assign your store to a different node; any API, search or
statistics address the server returns there is a host on addsynapse.com (or, legacy, weborange.gr),
operated by us under the same terms and privacy policy.

= 2. AddSynapse search engine — q.addsynapse.com =

Used directly by your visitors' browsers while they search. The address is the one the Search
API assigns to your store on activation and token renewal: **q.addsynapse.com**, or, for stores
activated before the move, the previous address **q.weborange.gr** (same service, same
operator) until the next token renewal switches them over automatically. When a visitor types in the
search field or uses a product filter, the search term and the selected filters are sent to
this host together with the short-lived, read-only token, which only allows searching your
own catalog. Nothing else is sent; search history stays in the visitor's browser
(localStorage) and is never uploaded.

In the **"Theme's search look"** mode your site's server sends this request (same term and
token) instead of the visitor's browser, and caches results for about a minute.

If **Semantic search (beta)** is on and a search finds no products, one more request with the
same search term and token is sent to this host to look for related products; the search
engine has the term turned into a meaning vector by AddSynapse's own embedding service (see
section 1). Nothing else is sent.

If a page comes from a page cache with an expired token, the visitor's browser asks **your own
site** for a fresh one (`admin-ajax.php`, action `addsynapse_search_token`). That request stays on your
WordPress; your site then renews the token with the Search API as described in section 1.

When your plan covers only part of your catalog, the visitor's browser also asks **your own
site** (`admin-ajax.php`, action `addsynapse_search_native`) for products of the standard
WordPress search that are not in the smart results. That request stays on your WordPress;
nothing is sent to AddSynapse.

= 3. Browser speech recognition — voice search (optional, off by default) =

Only if you enable **Settings → Behavior → Voice search**. The plugin itself sends nothing for
this feature, and nothing reaches our servers: it only asks the visitor's browser to recognize
speech (the browser's built-in Web Speech API). Audio is captured only after a visitor presses
the microphone button and allows microphone access; the recognized text is then placed in the
search field and searched like typed text (see section 2).

Depending on the browser, the recording may be sent to the browser vendor's speech service
for recognition: Chrome sends it to Google, Edge to Microsoft, and Safari may use Apple's
servers or recognize speech on the device. That processing is done by the browser vendor
under its own terms, not by this plugin:

* Google privacy policy: https://policies.google.com/privacy
* Microsoft privacy statement: https://privacy.microsoft.com/privacystatement
* Apple privacy policy: https://www.apple.com/legal/privacy/

= 4. Stripe — billing (only for paid plans) =

Payments are handled by Stripe, Inc. The plugin itself never sends any data to Stripe:

* Sites connected to AddSynapse: "Manage / Upgrade on AddSynapse" opens your AddSynapse
  account (app.addsynapse.com), where paid plans are bought and managed through Stripe.
* Sites with a license key from earlier versions: the "Upgrade" / pricing links open our pricing page (https://search-api.addsynapse.com/pricing)
  with your store's domain; choosing a paid plan there sends you to Stripe Checkout, where
  you enter your email and payment details directly with Stripe.
* "Manage subscription & invoices" redirects you to the Stripe customer portal
  (billing.stripe.com) for your store, to change or cancel your plan and download invoices.

Stripe terms: https://stripe.com/legal/consumer
Stripe privacy policy: https://stripe.com/privacy

== Installation ==

1. Upload the `addsynapse-search-filter` folder to `/wp-content/plugins/`, or install it directly from
   "Plugins → Add New" inside WordPress.
2. Activate the plugin from the "Plugins" menu. It requires an active WooCommerce (8.0 or newer)
   and the PHP "mbstring" extension — if either is missing, the plugin shows a notice explaining
   what to do and stays inactive until it is fixed. Nothing is sent anywhere until you connect.
3. Go to **AddSynapse → Search & Filter → Settings** and click **"Connect to AddSynapse"**.
   Sign in to AddSynapse (or create a free account) and approve your site — you come back to
   the settings page with the Free plan active, nothing to copy. It's free forever for small
   catalogs, no card required. Sites with a license key from an earlier version can keep it
   ("I already have a license key") or connect — connecting keeps the existing index.
4. Click "Rebuild index" to build the search index from your existing catalog. It runs in
   small batches from your browser, while your live site keeps working normally.
5. Your store's search field is taken over automatically. In **Settings → Search mode** you can
   instead keep your theme's own search look (results from our engine) or place the search box
   manually; for a custom theme you can set CSS selectors for the search field and search icon.

== Frequently Asked Questions ==

= Can I filter products by attribute, not just search? =

Yes. Add one *AddSynapse Search — Product filter* widget or block per filter: any product
attribute (colour, size, material…), category, brand, or price as a min–max range. Each one has
its own title, display style (checkboxes, radio buttons, dropdown or buttons), number of values
shown (default in **Settings → Product filters → Values per filter**, most common first), optional
counts and an optional search box for long lists. When several values of one filter are
ticked, products can match any of them (red or blue) or all of them (waterproof and windproof);
different filters always narrow together. Widgets and blocks hide themselves on product, cart, checkout
and account pages, where there is no list to filter.

On shop and category pages the filtered results replace the product list your theme renders,
so there is nothing to edit in your template. On a category page the filters automatically
stay within that category (and its subcategories).

= Which shortcodes and options are there? =

* `[addsynapse_search_filter attribute="Colour"]` — one filter. Options: `title`,
  `style="checkbox|radio|select|buttons"`, `limit`, `counts="yes|no"`, `search="yes|no"`,
  `match="any|all"`, `category`, `ajax="yes|no"`, `active_filters="yes|no"` (removable tags of
  the active filters), and for categories `category_display="list|tree"`,
  `category_depth="all|top|children_of_current"`. Use `attribute="categories"`, `"brand"` or
  `"price"` for those filters.
* `[addsynapse_search_products]` — a product grid of its own, for a page without a theme
  product list. Options: `per_page`, `layout="grid|list"`, `sort="price_asc|price_desc"`,
  `category`, `ajax`.
* `[addsynapse_search_filters]` — category, brand, price and all indexed attributes plus the
  grid, in one line. Options: `attributes="Colour,Size"` (order = display order), `style`,
  `show="filters|products|both"`, and the grid options above.

= My theme's product list doesn't change when I filter. What do I do? =

The plugin looks for your theme's product list automatically: first the selector in
**Settings → Product filters → Product list selector** (default
`ul.wc-block-product-template, ul.products`), then the main product loop of themes that use
`div` grids (such as Woodmart or Flatsome). If your theme uses something unusual, enter the CSS
selector of its product list there. Related products, upsells and carousels are never touched.

= How do the filters look on mobile? =

The filter widgets appear wherever your theme puts its sidebar on small screens (usually
below or above the products). The plugin's own grid shows two products per row on phones, and
the `[addsynapse_search_filters]` layout stacks filters above products. There is no separate
off-canvas filter drawer.

= Can the category filter show subcategories under their parent? =

Yes. In the Category filter pick **Categories shown as → Tree**: subcategories sit under their
parent, which opens and closes with a small arrow, and a parent's count includes its
subcategories. Ticking a parent shows the products of all its subcategories; ticking a
subcategory under a ticked parent narrows to that subcategory. **Category levels** can limit the
list to the top level, or to the subcategories of the category being viewed. Shortcode:
`[addsynapse_search_filter attribute="categories" category_display="tree" category_depth="top"]`.

= Do the filters reload the page? =

No, by default they update in place (AJAX), and the address bar is kept in sync so the back
button, bookmarks and shared links work. If your theme or another plugin needs a full page
load, choose **Normal (page reload with URL parameters)** under **Settings → Product filters →
How filters apply**; a shortcode's `ajax="yes"` or `ajax="no"` overrides this on one page.
While filters are active, the theme's result count, sorting dropdown and pagination are hidden,
since they would describe the unfiltered list; "Load more" pages through the filtered results.

= Do I need to change anything in my theme? =

No, in most cases. The search field is detected and taken over automatically in JavaScript,
regardless of your theme or page builder, and the search icons of popular themes open our panel
instead of the theme's. If needed, you can manually set CSS selectors in the settings.

= What are the three search modes? =

Choose in **Settings → Search mode**:

* **Our search panel** (default): our panel opens from your theme's search field **and** its
  search icon — the theme's own search panel never opens, so visitors never see two. The search
  icons of popular themes are recognised automatically (Woodmart, Astra and others); for any
  other theme you can enter the icon's CSS selector. Keeps the Simple/Advanced layout, voice
  search, recent and popular searches and the category/brand links.
* **Theme's search look**: your theme's search box, live search and results page stay exactly
  as they are, but the results come from our engine (typo tolerance, synonyms, relevance
  order, and Greek word forms and greeklish). Works on the product search results page and in supported theme live searches
  (e.g. Woodmart). Our panel, the Advanced layout and voice search are not used in this mode.
* **Manual**: nothing is added automatically — place the search box yourself with the block or
  the `[addsynapse_search]` shortcode.

= My theme has its own search design. Can I keep it? =

Yes — choose **Theme's search look** (see above). Only the results come from our engine.

= Does it work without an AddSynapse account? =

No — the plugin is a client for a hosted service, so your site has to be connected (or use a
license key from an earlier version). Connecting takes one click on the settings page and the
Free plan is free forever for small catalogs, no card required, and nothing ever switches
itself off. If your catalog grows past the free plan's product limit, smart search covers your
most important products and the rest are found by the standard WordPress search; a paid plan
indexes the whole catalog. Current limits: https://addsynapse.com/product-search.

= Is there a free trial of the paid plan? =

Yes, optionally: a 5-day free trial of the Pro plan, started from your AddSynapse account (a card
is required; you can cancel anytime there, and we email you 2 days before the trial ends). During
the trial your whole catalog is indexed and Semantic search is available. If you cancel or don't
continue, nothing is charged and the plugin keeps working on the Free plan — it is never
switched off. The Free plan itself is not a trial and never expires.

= Can I test on a local or development site? =

Yes. You can test on a local install (localhost, *.local, *.test, *.ddev.site, a private IP
address — any port, http or https): "Connect to AddSynapse" creates a free development site,
for testing. For your live shop, connect from its public https address (public addresses must
use https without a port number).

= Where do I upgrade or see my invoices? =

In your AddSynapse account: click "Manage / Upgrade on AddSynapse" on the settings page. The
plugin picks up a plan change automatically (within about an hour, or immediately with
"Refresh status"). If a payment fails, search keeps working with the Free plan limits.

= What do the product and record limits mean? =

Each plan has two limits, both shown on the "Status" tab: a **product** limit (how many of
your products get indexed) and a **record** limit (how many entries the search index holds).
Neither limit ever expires and neither limit is a search quota. Variations never count toward
the product limit. Search volume is covered by fair-use limits (see the pricing page): they
never interrupt or slow down search — if a store goes well beyond them, we get in touch.

We count products because that's what a shop owner understands. We also count records
because "exact variation search" — an optional setting that indexes every color/size
combination as its own entry, so an out-of-stock combination never shows up as available —
would otherwise let a catalogue with unusually many variations use the resources of many
regular stores for the same price. The record limit is generous (several times your product limit), and
with exact variation search off, records are always equal to your product count.

If either limit is reached, **search keeps working normally**: the index keeps your most
important products (best sellers first, in-stock before out-of-stock, then the newest), and
your other products are still found by the standard WordPress search, listed after the smart
results. Product filters pause meanwhile, so category pages keep showing every product with
your theme's own product grid. You'll see a clear notice
about this on the "Status" tab, with **two ways forward**: upgrade your plan, or turn off
exact variation search to keep everything indexed within your current plan.

= What data does the plugin send outside my store? =

Catalog data (title, category, price, SKU, images, etc.), your visitors' search terms (to
return results), your site's address, versions and product count for the plan check with
AddSynapse, and — only if you turn them on — anonymous search stats and Semantic search (beta), which is
processed by AddSynapse's own embedding service (no third party). If you enable voice search, the visitor's own
browser may send the spoken audio to its vendor's speech service (Google, Microsoft or Apple);
the plugin itself does not. Never customer or order data. See the "External
services" section above for details.

= What happens to my visitors' search history? =

It stays exclusively in each visitor's browser (localStorage). It's never uploaded to our
servers and never linked to any person.

= Are out-of-stock and hidden products shown? =

Search and autocomplete follow the plugin's "Out of stock" setting: "Hide" removes them,
"Show last" keeps them at the end. Filtered product grids (and their counts) hide them if
either the plugin is set to "Hide" or WooCommerce's own "Hide out of stock items from the
catalog" is enabled. WooCommerce catalog visibility is respected: "Shop only" products
appear in filtered grids but not in search, "Search results only" products the other way
round, and hidden products nowhere.

= Which price is shown in search results and filters? =

The index holds one public price per product: the price an anonymous visitor sees in your
shop, using your "Display prices in the shop" tax setting and your store's base location.
Products without a price show no price (a price of 0 is shown as free). Variable products
show their lowest price. Prices that depend on the customer's own country, on a
multi-currency plugin, on the user's role or on dynamic-pricing rules are not reflected in
search results — the product page always shows the exact price.

= What happens if my paid subscription ends or a payment fails? =

Search keeps working: your site moves to the Free plan limits. After a grace period the index
keeps your most important products up to the free limit (best sellers first), and your other
products are still found by the standard WordPress search. Renewing the subscription restores
the paid limits, and the plugin re-sends the rest of your catalog automatically. Search is switched off only if you disconnect the site, or if the site is
suspended in your AddSynapse account.

= Does it support languages other than Greek? =

Yes. Typo tolerance, partial-word matching, synonyms and attribute search work with any
language in your catalog, and filler words and request phrases are handled in English, Greek
and 15 other European languages. Word-form matching (stemming) and greeklish ↔ Greek
transliteration are currently available for Greek only; other languages are matched by whole
and partial words, without word-form rules.

= Filler phrases: what happens to "I'm looking for …"? =

Shoppers often type (or say) a whole sentence: "I'm looking for red shoes please",
"μήπως έχετε παζλ;". The plugin removes such request and politeness phrases from the
**start** and the **end** of the search before sending it — "red shoes", "παζλ" — and never
touches words in the middle ("case for iphone" stays as it is). The search field keeps what
the shopper wrote; only the search uses the shorter text. If nothing would be left ("I need"),
the original text is searched.

The phrase lists are small JSON files in `assets/data/fillers/` (Greek with accent-less and
greeklish variants, English, and 15 other EU languages). Only the list for the page's
language (WPML, Polylang or the site language) is loaded; for voice search, the list for the
speech-recognition language. They are our own lists, released under the plugin's GPL
licence. Developers can change them with the `addsynapse_search_query_fillers` filter.

The search service also ignores a short, curated list of words such as "the", "for", "και",
"για" in the store's language (never negations like "without" / "χωρίς"). For that it
receives your site's language code on activation and when you save settings.

= Can developers add their own data to the index? =

Yes: the `addsynapse_search_product_document` filter lets you add keys under `$doc['custom']`,
which your result templates can show. Anything under `custom` is **public** — visitors'
browsers read it straight from the search service — so never put data there that is not meant
for the shop front (cost prices, supplier codes, customer data). Only display fields and
`custom` are returned to browsers; everything else in the index is used for searching and
filtering only.

== Screenshots ==

1. Advanced search panel: product cards with images, prices and sale badges, plus the matching categories and brands with counts, updating as you type.
2. Typo tolerance: "hoddie" still finds every hoodie.
3. AJAX product filters on the shop page: category, color, size, brand and price, each with live counts.
4. Filters applied: the product grid updates instantly without a page reload, with removable filter chips and a new product count.
5. Before typing: the visitor's recent searches, your popular searches, and the optional voice search microphone.
6. Synonyms in action: "sweater" finds the hoodies after one synonym group.
7. Synonyms tab: add, edit or delete synonym groups with one click.
8. Statistics: searches that found nothing, searches whose results nobody clicked (with CTR), and what shoppers clicked for each term, with one-click synonym creation.
9. Settings: choose how search works on your theme (our search panel, your theme's search look, or manual placement).
10. Settings: AJAX or page-reload filters, Simple or Advanced search layout, filters sidebar side and what to show in results.
11. On mobile: a full-screen search with product thumbnails, prices, categories and brands.

== Changelog ==

= 0.8.3 =
* Change: new plugin name, "AddSynapse – Live Product Search & Filters for WooCommerce". Same
  plugin, slug, settings and menu ("AddSynapse → Search & Filter").
* Fix: Disconnect now also cancels the plugin's scheduled background tasks.
* Fix: the Plugins screen never contacts the service (the "Settings" link uses local state only).
* Fix: uninstalling while WooCommerce is inactive now also removes the plugin's scheduled tasks.
* Fix: with exact variation search, simple products were missing from the filter options and counts.
* Fix: click-through rates on the Stats tab were shown 100 times too small (e.g. "0.5%" instead of "53%").

= 0.8.2 =
* Fix: when the plugin loaded before WooCommerce (the default alphabetical order), the WooCommerce
  check could run too early and leave the plugin inactive. The check now runs only after all
  plugins have loaded and is never cached.

= 0.8.1 =
* Fix: activation no longer depends on the order in which plugins are activated. WooCommerce
  (and the PHP mbstring extension) are checked every time the plugin loads; if something is
  missing, a notice explains it and the plugin stays inactive instead of blocking activation.
* Change: nothing is scheduled in the background until you connect your store.
* Change: a new installation shows a clear "Connect to AddSynapse to start" message on every tab
  instead of a technical error; removed unused sign-up code from earlier versions.

= 0.8.0 =
* New: no product disappears from search when your catalog is bigger than your plan. Smart search
  keeps your most important products (best sellers first, then in stock, then newest) and the rest
  are found by the standard WordPress search, listed after the smart results — in the search panel
  and on your theme's search results page. Product filters pause in that case, so category pages
  keep showing every product.
* New: the Status and Settings tabs show how many of your products smart search covers, with a
  link to the Pro plan (and to its optional 5-day free trial when your AddSynapse account offers it).
* Change: Semantic search (beta) is now part of the Pro and Business plans (and the Pro trial).
  On the Free plan the setting is shown switched off.

= 0.7.1 =
* Improved: Semantic search (beta) now finds related products when shoppers type in Greek on a
  store whose catalog is in another language (for example English). Fewer, more relevant related
  results are shown in that case.

= 0.7.0 =
* New: Semantic search (beta), optional and off by default, free on all plans. When a search finds
  nothing, the plugin looks once for products with a similar meaning and shows them under
  "Related results" — in the Simple and Advanced layouts, on phones, and on your theme's search
  results page in the "Theme's search look" mode. Normal searches are unchanged and make no extra
  request. The Status tab shows when your catalog is ready for it.

= 0.6.7 =
* Readme: contributors list corrected.

= 0.6.6 =
* The Status and Settings tabs show the new Business plan by name. Plan limits keep coming from
  the search service, so they always match your current plan.

= 0.6.5 =
* New: the Category filter can show categories as a tree (subcategories under their parent,
  with an open/close arrow and counts that include subcategories), only the top level, or only
  the subcategories of the category being viewed. Available in the widget, the block and the
  shortcode (`category_display`, `category_depth`). Existing filters look exactly as before.

= 0.6.4 =
* Friendlier messages for development-site limits: a clear message (with a link to the Sites page
  of the AddSynapse portal) when your account already has 5 development sites, and an explanation
  before you connect when the site address contains a username/password or the WordPress Address
  and Site Address use a different host or port.

= 0.6.3 =
* Code quality and security hardening for the WordPress.org review.
* New: local and development installs (localhost, *.local, *.test, *.ddev.site, private IP
  addresses) can be connected as a free development site for testing; the settings page says
  so before you connect, and shows a "Development site" badge once connected.
* New: if the search service had to recreate your search index (for example after a long period
  of inactivity), the plugin re-sends your settings and rebuilds the index by itself in the
  background; the Status tab says so while it runs.
* Removed the compatibility layer for the pre-release "WebOrange Search" plugin.

= 0.6.2 =
* New: a small "✕ Clear filters" link above the filters whenever a filter is active, and a "✕ Clear"
  link on each filter that has a selection. Both bring back the theme's product list exactly as it was.
* New (optional, off by default): show the active filters above the products as small tags, each
  with ✕ to remove it — "Show the active filters…" in the filter widget/block, or
  `active_filters="yes"` in the shortcodes.

= 0.6.1 =
* Fix: filters now update the product list in themes whose shop grid is not a `ul.products` list
  (Woodmart, Flatsome, Porto and others) — the theme's product grid is detected automatically.
  The "Product list selector" setting still overrides the detection.
* Clearing the filters brings back the theme's own product list exactly as it was (quick view,
  wishlist and lazy-loaded images keep working).
* Woodmart AJAX shop: filters keep working after the theme loads a new page, sorting or
  category without reloading; its pagination, products-per-page and view switcher are hidden
  while filtering.
* Fix: after clearing the filters, the theme's pagination and sorting no longer bring back
  the previous filter.
* Filtered products show in two columns on phones.

= 0.6.0 =
* New: **Search mode** setting — *Our search panel*, *Theme's search look* or *Manual*.
* Our search panel: clicking the theme's search icon (Woodmart full-screen search, Astra and
  other popular themes, or your own CSS selector) now opens only our panel — never the theme's
  panel underneath it.
* Theme's search look: the theme's own search box, live search (Woodmart) and product search
  results page keep their design, with results and relevance order from our engine.
* The previous "Display mode" setting is carried over automatically (Automatic → Our search
  panel, Manual CSS selector → Our search panel with that selector, Off → Manual).
* Fix: tapping the search field inside the full-screen mobile panel no longer closes it.

= 0.5.4 =
* Fix: the search field works in themes that keep focus inside their own search panel
  (e.g. Woodmart full-screen search): you can click and type again, the theme's own AJAX search
  no longer opens a second dropdown, and Enter / "View all" keep the theme's product search.

= 0.5.3 =
* Fix: the "plan limit reached" message is now shown entirely in your admin language (it could mix
  English and your site's language), and states clearly that only new products are held back while
  existing products keep updating and stay searchable. It includes a link to manage or upgrade your plan.

= 0.5.2 =
* Fix: editing a variable product now updates all its variations in search. A change saved
  while the product was still being sent to the index (for example right after saving its
  variations) could be dropped, so search kept showing the old title.
* Fix: products with more than 100 variations are sent in batches and update correctly.
* Fix: title, slug, category and brand changes made by other plugins (importers, translation
  or bulk-edit tools) without going through WooCommerce are now picked up as well.
* Fix: turning a simple product into a variable one no longer leaves its old entry in search.
* Note: results that are already out of date are corrected by saving the product again, or by
  a full re-index (Status tab, "Run now").

= 0.5.1 =
* Change: "Connect to AddSynapse" opens AddSynapse in a new tab. The settings page shows a
  waiting panel and notices the approval by itself (also if you approve on another device or
  come back later), with "Open again" and "Cancel".
* New: clear messages before leaving WordPress when the site cannot be connected (local
  address, IP address, port number or no https), and friendly messages for every reason
  AddSynapse can refuse a connection.
* Fix: a second click while a connection is pending reopens the same request instead of
  appearing to do nothing; the button shows "Opening AddSynapse…" and cannot be double-clicked.
* Fix: connection requests stay valid for 24 hours (signing up and confirming your email could
  take longer than 15 minutes), and an unreachable AddSynapse is reported after 8 seconds instead of 20.

= 0.5.0 =
* New: **Connect to AddSynapse** — one click on the settings page connects your site to your
  AddSynapse account (sign in or create a free account, approve the site). The Free plan starts
  right away; no email form, no key to copy.
* New: the settings page shows your plan, product limit, fair-use volume and billing state from
  your AddSynapse account, with "Manage / Upgrade on AddSynapse", "Refresh status" and
  "Disconnect". The status is checked about every hour.
* New: the search service addresses are assigned by your AddSynapse account (no fixed hosts in
  the plugin).
* Change: payment problems never switch search off — the Free plan limits apply until they are
  resolved.
* Transition: sites with a license key from an earlier version keep working unchanged;
  connecting them to AddSynapse is recommended and keeps the existing search index.
* Security: every answer from AddSynapse is signature-checked; the signing secret is stored
  encrypted.

= 0.4.2 and earlier =
* Pre-release versions, never published on WordPress.org.

== Upgrade Notice ==

= 0.8.3 =
New plugin name; fixes filter counts for simple products and click-through rates in Stats. Settings are kept.

= 0.8.2 =
Fixes the plugin staying inactive when it loads before WooCommerce.

= 0.8.1 =
More robust activation: WooCommerce is checked when the plugin loads, not only at activation.

= 0.8.0 =
Products beyond your plan's limit are now still found through the standard WordPress search. Semantic search moves to the Pro and Business plans.

= 0.7.1 =
Semantic search (beta): better related results for Greek searches on non-Greek catalogs.

= 0.7.0 =
New optional Semantic search (beta): related results when a search finds nothing. Off by default.

= 0.6.4 =
Friendlier messages for development-site limits when connecting to AddSynapse.

= 0.6.3 =
Security and code-quality hardening; local/development installs can be connected as free development sites.

= 0.6.2 =
Adds a discreet "Clear filters" link, a per-filter "Clear", and optional active-filter tags.

= 0.6.1 =
Filters now work with the product grid of Woodmart, Flatsome and other themes that don't use a standard product list.

= 0.6.0 =
New Search mode setting: keep your theme's search look with our results, and no more double search panels on themes like Woodmart.

= 0.5.4 =
Fixes the search field in themes like Woodmart (full-screen search).

= 0.5.3 =
Clearer "plan limit reached" message, fully in your admin language.

= 0.5.2 =
Editing a variable product (title, categories, images and more) now updates all its variations in search.

= 0.5.1 =
"Connect to AddSynapse" opens in a new tab and completes by itself once you approve; clearer messages when a site cannot be connected.

= 0.5.0 =
New "Connect to AddSynapse": manage your plan and billing in your AddSynapse account. Existing license keys keep working; connecting is recommended and keeps your index.
