=== TechLabIndia Hybrid Recommender for WooCommerce ===
Contributors: aditkuma
Tags: woocommerce, recommendations, ai, upsell, cross-sell
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered hybrid product recommendations — collaborative filtering, content matching, and smart bestseller fallback to boost your store's sales.

== Description ==

SmartRec AI automatically shows the most relevant products to each shopper by combining three complementary signals:

* **Collaborative Filtering (80%)** – Identifies products frequently viewed or purchased together by real users.
* **Content-Based Filtering (20%)** – Matches products sharing the same categories, tags, and attributes.
* **Bestseller Fallback** – Falls back to your top-selling products when no behavioural data exists yet.

Carousels are rendered via lightweight AJAX so they never slow down your page load.

=== Free Features ===

* Hybrid recommendation engine (collaborative 80% + content-based 20%)
* Product page carousel widget (configurable hook & priority)
* Cart page carousel widget
* View tracking (logged-in + guest users)
* Purchase tracking via WooCommerce order hooks
* Anonymous guest cookie session (30-day, httpOnly, SameSite)
* Recommendation cache with configurable TTL and scheduled cleanup
* `[smartrec_recommendations]` shortcode
* Admin dashboard with live stats (views, purchases, cache entries)
* One-click cache flush
* Settings: title, limit, columns, hook, cache TTL

=== Pro Features ===

Upgrade at https://techlabindia.com/smartrec-ai/ for:

* **AI Re-ranking** – GPT-4o-mini + Claude Haiku re-rank results for each user.
* **A/B Testing** – 50/50 split between hybrid and content-based algorithms with statistical reporting.
* **Advanced Analytics** – Impressions, clicks, CTR, and revenue attribution per recommendation widget.
* **Email Blocks** – Inject personalised recommendation rows into WooCommerce order emails.
* **REST API** – `GET /wp-json/smartrec/v1/recommendations/{product_id}`
* **Checkout Widget** – Show relevant recommendations on the checkout page.
* **Annual Licence System** – Activate your licence key inside WordPress.

== Installation ==

1. Upload the `smartrec-ai` folder to `/wp-content/plugins/`.
2. Activate the plugin through **Plugins → Installed Plugins**.
3. Go to **SmartRec AI → Settings** to configure your widget title, limit, and grid columns.
4. The product-page and cart-page carousels are enabled automatically.
5. Optionally place `[smartrec_recommendations]` anywhere in your content.

== Frequently Asked Questions ==

= Does it work with no purchase/view history? =

Yes. When there is insufficient behavioural data the plugin automatically falls back to your top-selling products so the widget is never empty.

= Is it GDPR-compliant? =

Guest tracking uses an anonymous, httpOnly session cookie. No personal data (name, email, IP) is stored in the tracking tables.

= Can I place the carousel anywhere? =

Yes — use the shortcode `[smartrec_recommendations product_id="42" limit="8" title="Customers Also Bought"]`. The `product_id` attribute is optional; it defaults to the current post.

= Which WordPress hooks are supported for the product widget? =

`woocommerce_after_single_product_summary` (default), `woocommerce_after_single_product`, and `woocommerce_before_single_product`. Selectable in Settings.

= How do I increase recommendation freshness? =

Lower the Cache TTL in Settings (minimum 60 seconds). The scheduled cleanup cron runs hourly.

== Changelog ==

= 1.0.1 – 2026-06-25 =
* Fix: Removed invalid Contributors username.

= 1.0.0 – 2025-06-21 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial public release.
