=== Crossdeck for WooCommerce ===
Contributors: crossdeck
Tags: woocommerce, analytics, revenue, identity, attribution
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
WC requires at least: 6.0
WC tested up to: 9.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to Crossdeck with one key: storefront analytics, automatic identity, and every paid order as revenue — on one identity graph.

== Description ==

Crossdeck joins your revenue, errors, analytics, and identity by identity, so you can answer questions no single-layer tool can — like "which paying customers hit checkout errors last week" or "which campaign brought the shoppers who actually bought".

This plugin connects a WooCommerce store to Crossdeck with a single key:

* **Storefront analytics** — loads the Crossdeck web SDK on every page (pageviews, sessions, journeys, front-end error impact) with no per-page work.
* **Automatic identity** — logged-in customers are identified server-side from their WordPress session. No snippets, no attributes.
* **Automatic order revenue** — every paid order is booked as revenue (normalized to USD from the order's own currency); refunds reverse it. Order events are read server-side from WooCommerce and sent to Crossdeck signed (HMAC, fail-closed), so money is only ever booked behind a verified signature.

Only your **publishable** key is ever loaded in the browser. You paste your **secret** key once in the plugin settings; it stays on your server and is used to link the store to your Crossdeck project.

= Where does my data go? =

Order events and heartbeats are sent to the Crossdeck backend (`https://api.cross-deck.com` / Crossdeck Functions) over HTTPS, keyed to the Crossdeck project you connect. See the Crossdeck privacy policy at https://cross-deck.com/legal/ and the setup guide at https://cross-deck.com/docs/woocommerce/.

== Installation ==

1. Upload the plugin zip in **Plugins → Add New → Upload Plugin**, then **Activate**.
2. In the Crossdeck dashboard (https://app.cross-deck.com), create a project + app and copy your **Secret key** (starts `cd_sk_`).
3. Go to **WooCommerce → Crossdeck**, paste the Secret key, and click **Connect**.
4. Visit your store — you'll see a live visitor in the Crossdeck dashboard within moments, and paid orders will start booking as revenue.

== Frequently Asked Questions ==

= Do I need a paid Crossdeck plan? =
No. The connector is free. Crossdeck bills only when your connected portfolio crosses its revenue threshold — see cross-deck.com/pricing.

= Is my secret key safe? =
Yes. It's entered server-side in the plugin settings and never stored after connect — the plugin keeps only your publishable key (safe for browsers) and a per-store signing secret. The storefront never sees the secret key.

= Does this work with High-Performance Order Storage (HPOS)? =
Yes. The plugin reads orders through the WooCommerce CRUD API and declares HPOS compatibility.

== Changelog ==

= 1.0.0 =
* First release: storefront SDK, automatic identity, and signed WooCommerce order revenue (paid + refunded) on the Crossdeck commerce backbone.
