=== Wren Connect ===
Contributors: wren
Tags: woocommerce, analytics, cross-sells, customer segments, insights
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.5
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

What your customers buy together, who is due back and what is selling faster than usual, worked out inside your store.

== Description ==

Wren Connect reads your WooCommerce store each night and tells you, in plain sentences, what your own data says. It runs entirely inside your store. No account, no AI, and nothing is sent anywhere unless you choose to connect it to Wren.

= What it shows you =

* **Your store's story.** "1 in 6 orders with X also include Y." "312 customers have bought once and are in the window when people usually come back. This is the moment to write."
* **Customers.** Eight segments timed from your own store's return pattern, what moved this week, and a CSV of each.
* **Products.** What's bought together, what people come back for, which first purchases bring people back, what's selling faster than usual, and what people search for and don't find.
* **About this customer.** A box on each order: their segment, what they buy, and what similar customers bought next.
* **Customers also bought.** An optional block for product pages, off until you turn it on. Your own cross-sells come first, and it never shows out-of-stock, free or gift-card items. Or place it anywhere with [wren_also_bought].

= Privacy =

Counts, not people. Page views and searches are kept as totals per item per day. The plugin sets no cookie and records no visitor, session, IP address or device. Search terms that look like an email, phone number, postcode or order number are dropped before they are counted. You can turn the counting off in Settings.

= Optional: connect to Wren =

Wren (https://wreninsights.com) is a paid service. If you connect, Wren writes you a short brief each morning using AI and reads Google Analytics and Search Console alongside your orders.

**Nothing below is sent unless you click Connect.** After you do, the plugin and WooCommerce send Wren:

* A read-only WooCommerce REST key, created by WooCommerce's own approval screen. Wren never changes your store.
* Live order and product updates, through standard WooCommerce webhooks. Orders include customer details such as the billing email.
* The anonymous daily counts above. A search term is only sent once it has been searched at least twice in a day.
* Your posts' titles, links, categories and tags, and which products they link to (no post text).

Disconnecting stops everything and removes the webhooks. Wren's terms: https://wreninsights.com/terms. Privacy: https://wreninsights.com/privacy.

== Installation ==

1. Install and activate. WooCommerce must be active.
2. Open **Wren** in the admin menu. The first read of your store starts within a couple of minutes and runs in the background.
3. Turn on "Customers also bought" under **Wren > Settings** if you want it on product pages.

== Frequently Asked Questions ==

= Does it slow my store down? =

The work happens in a nightly background job. Product pages read a small results table, and the anonymous count is one small request after the page has loaded. It works with page caches, because nothing on the page varies by visitor.

= Why are my screens empty? =

Most findings need a minimum amount of data: a pair needs at least 4 orders together, for example. The plugin also reads WooCommerce's analytics tables, so WooCommerce Analytics must be on. If your store has orders but the plugin finds none, run "Import historical data" under Analytics > Settings.

= A paperback and its ebook are separate products. Can they count as one? =

Yes. On the product editor's Linked Products tab, set "Another format of" to the main product's ID.

= Do I need a Wren account? =

No. Everything except the Wren brief and its Google Analytics and Search Console reading works without one.

== Changelog ==

= 0.2.0 =
* Free tier: bought together, came back for, customer segments, gateways, momentum and plain-sentence findings, all computed inside the store.
* "Customers also bought" product block (off by default) and [wren_also_bought] shortcode.
* "About this customer" box on orders.
* Anonymous counts now work without connecting, and stay on the store.

= 0.1.0 =
* First release for test stores: one-click connect, live webhooks, anonymous counts, content index, findings in wp-admin.
