=== FalcoSearch – Live Search & Product Filter for WooCommerce ===
Contributors: wpxero
Tags: woocommerce search, ajax search, live search, product search, product filter
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce live product search and instant filters. Falcon-fast AJAX search, slash commands, analytics, and dark mode for WordPress.

== Description ==

**FalcoSearch was formerly known as Xero Finder.** Your settings, shortcodes, and developer hooks continue to work unchanged after the rename.

FalcoSearch is a falcon-fast live search and product-filter plugin built around WooCommerce. Shoppers type once and see matching products — with images, price, stock, and rating — before they finish the word. Refine results in place with instant filters for category, price, rating, on-sale, bestseller, and stock status. No page reloads. No plugin bloat. No jQuery.

= Why WooCommerce stores choose FalcoSearch =

* **Instant product results as you type** — title, SKU, price, rating, stock, on-sale, bestseller, newest.
* **In-place product filters** — category, price range, rating, stock, sale; combine freely.
* **Lower bounce on product searches** — debounced AJAX, server-side caching, conditional asset loading.
* **No theme rewrite required** — drop in the `[xerosf_icon]` or `[xerosf_input]` shortcode anywhere, or use the floating modal.
* **Works alongside your existing theme search** — FalcoSearch enhances the native WordPress search input on focus.

= Core search & filter features =

* Real-time live search as you type
* Multiple search triggers — triple-click, Ctrl+/ (Cmd+/ on macOS), Escape, or search-input focus
* Slash command system (`/recent`, `/category`, `/price`, `/fav`, and more — see below)
* Voice search where the browser supports it
* Multiple built-in theme styles
* Responsive on every device
* Shortcodes for the search icon and the search input
* WPML & Polylang compatible
* WooCommerce product search (title, SKU, price, rating, stock)
* User favourites
* Synonym expansion
* SEO metadata search support

= Advanced features =

* Analytics dashboard with CSV export
* Visual search via image upload or webcam
* Dark mode toggle (`/dark` and `/light`)
* AI-powered search suggestions
* Search bookmarking and command history
* Device-aware UI optimisation
* WooCommerce rating, newest, and bestseller filters
* Author filtering and year filtering

= Slash commands =

General:

* `/recent`
* `/category {slug}`
* `/tag {slug}`
* `/date {Y/m/d}`
* `/related`
* `/fav`
* `/random`
* `/dark`
* `/light`
* `/author {name}`
* `/year {year}`
* `/bookmark`
* `/bookmarks`
* `/history`
* `/export_history`

WooCommerce:

* `/product`
* `/on-sale`
* `/stock`
* `/price {min} {max}`
* `/rated {1-5}`
* `/newest`
* `/bestseller`

= Developer hooks =

Tune the relevance weights, post-process the result set, or change how long analytics rows are kept:

    add_filter( 'xerosf_weights', function ( $weights, $mode ) {
        return $weights;
    }, 10, 2 );

    add_filter( 'xerosf_results', function ( $results, $post_ids, $term, $args ) {
        return $results;
    }, 10, 4 );

    add_filter( 'xerosf_analytics_retention_days', function ( $days ) {
        return 180;
    } );

= Theme override =

Add custom CSS at:

`/wp-content/themes/your-theme/wpxero-search-filter/style.css`

== Installation ==

1. Upload the `wpxero-search-filter` folder to `/wp-content/plugins/`, or install from the WordPress plugin directory.
2. Activate the plugin from **Plugins → Installed Plugins**.
3. Configure the search at **FalcoSearch** in the admin sidebar.
4. View search analytics at **FalcoSearch → Analytics**.
5. Optionally, drop `[xerosf_icon text="Search"]` or `[xerosf_input placeholder="Search…"]` into a page, post, or widget.

== Frequently Asked Questions ==

= Does FalcoSearch work with WooCommerce? =
Yes. FalcoSearch is built around WooCommerce. It searches product title and SKU, exposes filters for category, price range, rating, stock status, on-sale, bestseller, and newest, and renders product results with the featured image, price, and rating in the live modal.

= I was using "Xero Finder". Is this the same plugin? =
Yes. FalcoSearch is the new name for Xero Finder (also previously branded as WPXERO Search Filter). The plugin slug, text domain, settings, shortcodes, and developer hooks are all unchanged — updating to v1.1.0 will not break your site.

= Will my existing settings and shortcodes keep working after the rename? =
Yes. The option key (`wpxero_search_settings`), shortcodes (`[xerosf_icon]`, `[xerosf_input]`), and filter hooks (`xerosf_weights`, `xerosf_results`, `xerosf_analytics_retention_days`) are unchanged in v1.1.0 and beyond.

= Is FalcoSearch multilingual? =
Yes. The plugin is fully translatable (text domain: `wpxero-search-filter`) and ships a `.pot` file. It is compatible with WPML and Polylang.

= Does the plugin require jQuery? =
No. The frontend is built in vanilla JavaScript and does not enqueue jQuery.

= Does FalcoSearch include a dark mode? =
Yes. Type `/dark` in the search modal to switch to dark mode, or `/light` to switch back. The theme is also configurable from the admin settings page.

= How do I add the search bar to my theme? =
Use one of the bundled shortcodes — `[xerosf_icon]` for a magnifying-glass icon that opens the modal, or `[xerosf_input]` for an inline input. Both also work in blocks, widgets, and PHP via `do_shortcode()`. Alternatively, leave the floating modal triggers (Ctrl+/, triple-click, or input focus) enabled and FalcoSearch will hook into your existing theme search input on focus.

= How do I view search analytics? =
Open **FalcoSearch → Analytics** in the admin sidebar. You can see total searches, zero-result queries, top keywords, search volume over time, and export the raw data as CSV.

= Can I customise how results are ranked? =
Yes. Hook the `xerosf_weights` filter to change the relevance weights per search mode, and `xerosf_results` to post-process the result set after the engine has built it.

= Does FalcoSearch send my visitors' data to an external service? =
No. FalcoSearch does not make external HTTP calls and does not track visitors. The analytics dashboard is stored locally in your own WordPress database.

= How do I uninstall and delete all data? =
Deactivating leaves your settings in place so a re-install picks them up where you left off. To wipe everything, enable **Remove all data on uninstall** in the settings page first, then delete the plugin from the Plugins screen — this removes the options and analytics tables on uninstall. (Setting introduced in v1.1.0; default off.)

== Screenshots ==

1. WooCommerce product live search — product cards with image, price, rating, and stock badge appear as the shopper types.
2. Instant product filters — category, price range, rating, on-sale, and stock controls refine results in place without a page reload.
3. Slash command palette — `/product`, `/price`, `/rated`, `/on-sale`, `/bestseller` and more, grouped and discoverable.
4. Dark mode — full-screen search modal with quick-search chips on a dark surface, activated by `/dark`.
5. Voice search — microphone state and live transcription overlay on a supported browser.
6. Analytics dashboard — total searches, zero-result queries, top keywords, and a CSV export button.
7. Admin settings — FalcoSearch dashboard with the Frontend Search module toggle and quick stats.
8. Mobile layout — full-screen search overlay optimised for touch on a phone-sized viewport.

== Changelog ==

= 1.1.0 - 2026-06-11 =
**Rebrand & quality release**
* Rebranded: Xero Finder is now FalcoSearch.
* Security hardening — nonces, capability checks, sanitisation of all request input, full output escaping, prepared queries everywhere.
* Performance — conditional asset loading (search assets no longer load on pages without the search UI), expensive queries cached with transients, paginated analytics queries.
* Added: uninstall cleanup with an opt-in **Remove all data on uninstall** setting (default off).
* Improved: full internationalisation pass and a fresh `.pot` file.
* Overhauled readme and documentation.
* Backward compatibility: slug `wpxero-search-filter`, text domain `wpxero-search-filter`, option key `wpxero_search_settings`, shortcodes `[xerosf_icon]` / `[xerosf_input]`, and filter hooks `xerosf_weights` / `xerosf_results` / `xerosf_analytics_retention_days` are all unchanged.

= 1.0.4 - 2026-05-06 =
**Compatibility**
* Declared support for WordPress 7.0 (`Tested up to: 7.0`).

= 1.0.3 - 2026-01-17 =
**Bug Fixes**
* Fixed: Resolved CSS styling issues affecting fullscreen search modal display.

**Improvements**
* Enhanced: Search functionality with improved accuracy and response time.
* Refined: Settings panel reorganised by priority for better user workflow.
* Optimised: Admin interface performance for faster page loads.

= 1.0.1 - 2026-01-10 =
**Bug Fixes**
* Fixed: Frontend search results not displaying correctly under certain conditions.
* Resolved: AJAX response handling for search queries.

= 1.0.0 - 2026-01-01 =
**Initial Release**
* Introduced real-time live search functionality.
* Added slash command system with 20+ commands.
* Implemented WooCommerce product search integration.
* Added voice search capability (browser-dependent).
* Included advanced analytics dashboard.
* Added visual search via image upload and webcam.
* Implemented dark/light mode toggle.
* Added AI-powered search suggestions.
* Included favourites and bookmarking system.
* Added WPML and Polylang compatibility.
* Implemented synonym expansion and SEO metadata search.

== Upgrade Notice ==

= 1.1.0 =
Rebrand to FalcoSearch (formerly Xero Finder) plus security and performance hardening. Safe upgrade: slug, settings, shortcodes, and hooks are unchanged.

= 1.0.4 =
**Recommended update** — Version 1.0.4 is tested with WordPress 7.0. Update when you upgrade core.

= 1.0.2 =
**Recommended Update** — Enhanced dashboard UI with improved layout, better visual hierarchy, redesigned settings page for superior user experience, and optimised admin interface performance.

= 1.0.1 =
**Important Bug Fix Release** — Resolves critical frontend search display issues and improves AJAX response handling. Update immediately to ensure optimal search functionality.

= 1.0.0 =
**Initial Stable Release** — Welcome to FalcoSearch (formerly Xero Finder). Transform your WordPress search with instant results, AI-powered suggestions, WooCommerce integration, and 20+ slash commands.

== Credits ==

Developed by the FalcoSearch team (formerly WPXERO).

== Support ==

For help, please open a thread on the WordPress.org support forum:
https://wordpress.org/support/plugin/wpxero-search-filter/
