=== Partli for WooCommerce ===
Contributors: partli
Tags: affiliate, referral, affiliates, woocommerce, influencer
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Run an affiliate program for your WooCommerce store with Partli: referral tracking, commissions, coupon credit, payouts, and AI-agent control.

== Description ==

Partli is affiliate and referral software built for the AI-agent era. This plugin connects your WooCommerce store to your Partli workspace in one step.

**What the plugin does**

* Loads Partli's tracking script on your storefront so referral clicks are recorded.
* Adds the referral click to each order, so paid orders are credited to the right partner.
* Creates the WooCommerce webhooks that send orders to Partli, signed with a secret issued by Partli.
* Reverses commissions automatically when an order is refunded or cancelled.
* Credits orders that use a partner's coupon code to that partner, and auto-applies the partner's coupon when a shopper arrives through a coupon link.

**What Partli does**

* Partner applications, approvals, groups, and commission rules.
* Payouts through Stripe, PayPal, Wise, or bank transfer, on a schedule or on demand.
* W-9 / W-8BEN / W-8BEN-E tax forms.
* Fraud flags, bounties, and email campaigns to partners.
* Run everything from Claude, ChatGPT, Cursor, or Codex through Partli's MCP server, or through the CLI and API.

= External service =

This plugin connects to Partli (https://partli.app), a hosted service, and requires a Partli account.

* When you click Connect, your API key and your site's URL are sent to https://partli.app to set up the integration. The API key is not stored on your site.
* Your storefront loads https://partli.app/partli.js, which records referral clicks (the referral click id, landing page, and referrer) when a visitor arrives through a partner link.
* WooCommerce sends order data (order id, status, totals, currency, coupon codes, customer id and billing email, and the referral click id) to Partli through the webhooks the plugin creates, so orders can be attributed and commissions calculated.

Partli terms of service: https://partli.app/legal/terms
Partli privacy policy: https://partli.app/legal/privacy

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. In Partli, open **API keys** and create a key.
3. In WordPress, go to **WooCommerce → Partli**, paste the key, and click **Connect to Partli**.
4. Place a test order through a partner's referral link to confirm the sale appears in Partli.

== Frequently Asked Questions ==

= Do I need to add any code to my theme? =

No. The plugin loads the tracking script and creates the webhooks for you.

= Does it work with the block checkout and High-Performance Order Storage? =

Yes. Both the classic and block checkouts are supported, and the plugin is compatible with HPOS.

= How do partner coupon codes work? =

Create a coupon in WooCommerce (Marketing → Coupons) with exactly the same code as the partner's Partli code. Orders that use it are credited to that partner, even without a referral click.

= What happens if I disconnect or deactivate the plugin? =

The Partli webhooks are removed from your store and tracking stops. Reconnect at any time with an API key.

== Changelog ==

= 1.0.0 =
* First release: one-step connect, storefront tracking, order click stamping, automatic webhooks, refund clawbacks, partner coupon credit.
