=== LIKYLY – AI Product Recommendations for WooCommerce ===
Contributors: likyly
Tags: recommendations, related products, cross-sell, personalization, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI recommendation engine for WooCommerce: smarter related products, cart suggestions and "Customers also liked", learned from your shoppers.

== Description ==

WooCommerce's "Related products" are picked at random among products of the same category. LIKYLY replaces that guess with a **recommendation engine**: it learns from what happens on your shop (the products your visitors look at, add to their cart and buy together) and chooses, for each page and each visitor, the products they are most likely to want.

It is the kind of system large online shops build in-house ("customers who bought this also bought..."), ready for WooCommerce in two minutes, free to start.

**What changes on your shop**

* **You may also like**, in place of WooCommerce's random "Related products": the products closest to this one, compared by AI on their name, description and attributes (semantic embeddings).
* **Customers also liked**, under it, for signed-in customers: what shoppers with the same tastes looked at and bought (collaborative filtering, a matrix factorization model trained on your shop's orders, views and carts). Personal for each customer.
* **Cart suggestions.** The cart's "You may be interested in" section is filled from what is in the cart, not only from the cross-sells you set by hand (yours still come first).
* **Trending now.** On the shop page: what sells and gets looked at right now.
* **Read next.** At the end of blog posts (also without WooCommerce).

Every section is drawn by your theme, like the rest of your products: same cards, same buttons, same fonts. Choose how many products each one shows, rename them, switch them off.

**Light on your server and on LIKYLY**

* "You may also like" is the same for every visitor of a product: it is asked once an hour per product and drawn into the page, so page caches keep working.
* "Customers also liked" is personal: it is asked from the visitor's browser, then kept 10 minutes in that browser tab.
* The number of products shown is sent with each request: changing it costs nothing.

**Ready in two minutes**

1. Create a free account on [likyly.com](https://www.likyly.com) and copy your two API keys.
2. Paste them in the LIKYLY menu of your WordPress admin and click Connect.

The plugin sends your products to LIKYLY (best sellers first), creates the sections and keeps everything in sync by itself. No code, no template to edit.

**Made for real shops**

* Works behind page caches (WP Rocket, LiteSpeed Cache, Varnish...).
* Never slows a page down: without an answer from LIKYLY within 2 seconds, the section is simply not shown.
* Out-of-stock and hidden products are never recommended.
* Every product you add, change or delete is sent right away.
* Compatible with block themes and classic themes, WooCommerce's cart and checkout blocks and its order tables (HPOS).
* **Performance, in WordPress**: recommendations shown, clicks, click rate and the sales that came from a recommendation, per block, in your shop's currency (LIKYLY › Performance). With Pro: 90 days and the products your recommendations sell most.
* Strategies and business rules in your LIKYLY console, one click away from the settings page.
* For developers: WP-CLI (`wp likyly connect | sync | status`), filters on everything sent, a shortcode and an editor block, and a [LIKYLY MCP server](https://www.npmjs.com/package/@likyly/mcp-server) to set up custom placements from a coding assistant.

== External services ==

This plugin connects to the LIKYLY API (https://api.likyly.com), run by LIKYLY, to compute recommendations. It is needed: without it the plugin does nothing.

What is sent, and when:

* **Your catalog**, from your server, when you connect the plugin and each time a product or post is saved or deleted: title, short description, link, picture, price, categories, stock status, SKU, rating.
* **Recommendation requests**: from your server, the product on a product page and the products of a cart; from the visitor's browser, the product or post on screen and the visitor's random id.
* **Visitor activity**: from the visitor's browser, the product or post they look at and the recommended items shown to them or clicked; from your server, the products added to the cart and the products of each order (with its amount). A visitor is identified by a random id kept in their browser (localStorage and a first-party cookie `likyly_sid`), and by their WordPress user id when they are logged in. No name, email or address is ever sent.
* **Attribution**: when a visitor clicks a recommended product, a first-party cookie `likyly_rec` (30 days, the last 20 products) remembers which recommendation it came from, so that its sale is credited to that block in the order and in your statistics.

The cookies and the local id are used to recommend items to that visitor and to measure the blocks; mention them in your privacy policy and, where your law requires it, ask for consent first (the `likyly_js_config` filter lets you hold the script back until then).

LIKYLY [terms of service](https://www.likyly.com/terms) and [privacy policy](https://www.likyly.com/privacy).

== Installation ==

1. Install and activate the plugin (Plugins › Add New, search "LIKYLY").
2. Open LIKYLY in the menu of your WordPress admin. Follow the link to create your free account, then open API keys in the LIKYLY console.
3. Paste your public key (`pk_...`) and secret key (`sk_...`), and click Connect.

From the command line: `wp likyly connect --public-key=pk_... --secret-key=sk_...`

== Frequently Asked Questions ==

= What is the difference with WooCommerce's related products? =

WooCommerce picks related products at random among those sharing a category or a tag. LIKYLY compares the products themselves with AI (what they are, not just their category) for "You may also like", and learns from your shoppers which products are looked at and bought together for "Customers also liked". It replaces WooCommerce's section, drawn the same way by your theme, and improves as your shop is visited.

= Is it free? =

Yes, for up to 50 products, with every section. Your best sellers are sent first.

LIKYLY Pro is for larger shops: 5 catalogs (several shops or languages), 500 products, every recommendation block, 5 model trainings a day, 90 days of detailed statistics and 5 workspaces. Free: 1 catalog, 50 products, every recommendation block, 1 model training a day, 7 days of statistics, 1 workspace, community support. Pro also brings priority support: an answer within 1 business day. Ask for it from your LIKYLY console; nothing changes in the plugin, the new limits apply at once.

= Where do I get help? =

A bug, an odd result, a question: ask on the [LIKYLY Discord](https://discord.com/channels/1568543773292625960/1568977728672243732), where the LIKYLY team and other merchants answer, or write to support@likyly.com. With Pro, support is priority: an answer within 1 business day. The link is also at the bottom of every LIKYLY page of your admin.

= Does changing the number of products shown cost anything? =

No. The number is sent with each request; changing it does not add any call.

= Does it work without WooCommerce? =

Yes: it then recommends your blog posts ("Read next").

= Can I choose where each section shows? =

Yes. In LIKYLY › Recommendation blocks, each section is either placed automatically at its usual place, or only where you place it yourself:

* **Block editor**: add the "LIKYLY recommendations" block to a page, a post or a template of the Site Editor, and choose which recommendations it shows, its title, its number of products and, if needed, the product it relates to.
* **Shortcode**, anywhere shortcodes work (classic editor, page builders, widgets): `[likyly placement="shop" title="Our best sellers" limit="8"]`.

Shortcode attributes: `placement` (`product`, `also_liked`, `cart`, `shop`, `post`, or the name of any placement made in your LIKYLY console), `title`, `limit` (1 to 12), `item` (the product or post the recommendations relate to; default: the one of the page). Example: `[likyly placement="product" item="123"]` shows products close to product 123 in a buying guide.

= My theme does not show the shop section =

If your shop page template has no product list block, add the "LIKYLY recommendations" block to it in the Site Editor.

= What happens when I delete the plugin? =

Its settings are removed from WordPress, and WooCommerce shows its own related products again. Your LIKYLY account is not touched.

== Screenshots ==

1. Product page (block theme Twenty Twenty-Five): "You may also like" in place of WooCommerce's related products, and "Customers also liked" under it, drawn by the theme.
2. Shop page: "Trending now" above the products.
3. Cart: suggestions chosen from what is in the cart.
4. The same blocks on a classic theme (Storefront).
5. Blog post: "Read next", also without WooCommerce.
6. LIKYLY › Recommendation blocks: switch each block on or off, choose where it shows and how many products, copy its shortcode.
7. LIKYLY › Performance: recommendations shown, clicks, click rate and sales per block.
8. LIKYLY › Connection: two keys, and where to find them.

== Changelog ==

= 1.0.0 =
* New plugin: "You may also like" (in place of WooCommerce's related products) and "Customers also liked" on product pages, cart suggestions in WooCommerce's own section, "Trending now" and "Read next", all drawn with the theme's templates; number of products per section; catalog sync; add to cart and purchase events; editor block, shortcode and WP-CLI.
