=== Kapish Email Marketing for WooCommerce ===
Contributors: gogol
Donate link: https://kapishai.com
Tags: woocommerce, email, marketing, abandoned-cart, automation
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.2.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to Kapish for welcome, abandoned cart, browse, post-purchase, and back-in-stock email.

== Description ==

Kapish Email Marketing for WooCommerce connects your store to [Kapish](https://kapishai.com) so you can send lifecycle email from one place: welcome, abandoned cart, browse abandonment, post-purchase, and back in stock.

This plugin is a **connector**. You need a Kapish account. It does not send mail by itself. It is not affiliated with Automattic or WooCommerce.com.

= What it does =

* Registers WooCommerce webhooks for new customers, orders, and product stock changes.
* Adds a storefront tracker that captures checkout email for abandoned cart and browse flows, including the real product photo, price, and link. No theme or functions.php paste.
* Abandoned-cart and browse emails auto-fill that product. “Others also bought” / recently viewed grids fill at send time.
* Uses the same webhook secret you save in Kapish (HMAC) so deliveries can be verified.
* Declares compatibility with WooCommerce High-Performance Order Storage (HPOS).

= What you still do in Kapish =

Create automations, design emails, and manage contacts in Kapish: Marketing → Email. This plugin only forwards store events.

= Requirements =

* WordPress 6.2 or later
* WooCommerce 8.0 or later
* A Kapish business (copy the business ID from Marketing → Email → Stores)
* HTTPS on your shop if you want WooCommerce to deliver webhooks reliably

== Installation ==

1. Upload the `kapish-email-for-woocommerce` folder to `/wp-content/plugins/`, or install the zip from Plugins → Add New → Upload Plugin.
2. Activate the plugin. WooCommerce must already be active. Activation creates a Kapish REST API key in WooCommerce.
3. Open WooCommerce → Kapish Email.
4. In Kapish, open Marketing → Email → Stores. Copy your WordPress business ID (starts with `biz_`) and webhook secret. Save the same secret on the Kapish Stores card.
5. Paste the Kapish site URL (`https://kapishai.com` unless you host Kapish yourself), business ID, and secret. Confirm Kapish Terms and Privacy, then save. The plugin sends the REST key to Kapish — do not paste ck_/cs_ keys.
6. Turn off overlapping WooCommerce marketing emails so customers are not mailed twice.

== Frequently Asked Questions ==

= Can I list this on WordPress.org without a Kapish account? =

People can install the plugin from WordPress.org, but sending mail requires a Kapish account. The plugin only connects WooCommerce events to Kapish.

= Do I still paste a snippet in my theme? =

No. Never paste into the theme, functions.php, or a page. The plugin enqueues the tracker, posts cart/browse events from WooCommerce hooks, and creates webhooks when you save settings.

= What data is sent to Kapish? =

Customer email and name, order totals and line items WooCommerce already puts on those webhooks, and (from the tracker) the shopper email plus the product name, photo, price, and URL. See the [privacy policy](https://kapishai.com/privacy) and [terms of service](https://kapishai.com/terms).

= Do I agree to Kapish terms when I install the plugin? =

The plugin itself is GPLv2 or later. Sending mail through Kapish is a Kapish service. WooCommerce → Kapish Email asks you to confirm the Kapish [Terms](https://kapishai.com/terms) and [Privacy Policy](https://kapishai.com/privacy) before the store is connected.

= Do I need WooCommerce REST API keys? =

No. From 1.2.0 the plugin creates a Kapish REST key when you install it, then sends that key to Kapish when you save WooCommerce → Kapish Email. You do not paste consumer keys. REST is used to backfill existing customers/orders and to issue unique coupons.

= Which webhooks are created? =

`customer.created`, `order.created`, `order.updated`, and `product.updated`. They all post to your Kapish WordPress hook URL.

= Is this an official WooCommerce.com product? =

No. It is a third-party connector published independently of Automattic / Woo.

== Privacy ==

The plugin sends store events (customer email, order and product data WooCommerce already exposes on those hooks) to the Kapish site URL you configure. See [https://kapishai.com/privacy](https://kapishai.com/privacy) and [https://kapishai.com/terms](https://kapishai.com/terms).

== External services ==

This plugin connects to Kapish (https://kapishai.com) to forward WooCommerce customers, orders, products, cart, and browse events so Kapish can send the emails you set up. A Kapish account is required to send. Data is posted over HTTPS to the site URL you save (default https://kapishai.com).

* Terms of Service: https://kapishai.com/terms
* Privacy Policy: https://kapishai.com/privacy
* Plugin listing: https://kapishai.com/plugins/woocommerce

You confirm those terms in WooCommerce → Kapish Email before webhooks and REST keys are sent.

== Changelog ==

= 1.2.2 =
* Settings screen links Kapish Terms and Privacy and requires confirmation before connect.

= 1.2.1 =
* Send REST keys on the existing webhook URL so Kapish no longer 404s /connect.

= 1.2.0 =
* Creates a WooCommerce REST API key on install and sends it to Kapish on save. No ck_/cs_ paste.

= 1.1.0 =
* Cart and browse events include the live product photo, price, and URL.
* Server-side WooCommerce hooks so emails still fill if a browser blocks JavaScript.
* No theme, snippet, or functions.php changes required.

= 1.0.0 =
* Initial release: settings screen, WooCommerce webhooks, and storefront tracker.

== Upgrade Notice ==

= 1.2.2 =
Re-save WooCommerce → Kapish Email and confirm Kapish Terms and Privacy.

= 1.2.0 =
The plugin now creates WooCommerce REST keys and sends them to Kapish. Re-save WooCommerce → Kapish Email after updating.

= 1.1.0 =
Abandoned-cart emails now use the real product photo and price. Update the plugin — do not add theme code.

