=== AdvocateLoop for WooCommerce ===
Contributors: advocateloop
Tags: referral, woocommerce, rewards, advocacy, affiliate
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: advocateloop, woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Reward customer referrals at WooCommerce checkout — discounts apply automatically and advocates earn when orders are paid. Requires AdvocateLoop.

== Description ==

**Turn store customers into your next sale.**

Your best customers already tell their friends about you. AdvocateLoop for WooCommerce rewards them for it — automatically, right at checkout, with no codes to hand out and nothing to wire up by hand.

This add-on connects WooCommerce to the [AdvocateLoop](https://wordpress.org/plugins/advocateloop/) base plugin so referrals don't just get tracked on your site — they pay off in your store. When a referred shopper checks out, their reward is applied for them. When the order is actually paid, the customer who referred them earns their reward. If an order is refunded, everything stays in sync on its own.

= Why store owners use it =

* **Rewards at checkout, automatically** — referred shoppers see their reward applied during checkout. No coupon codes to create, share, or chase down.
* **You only reward real sales** — advocates earn when a referred order is paid, not just placed, so rewards always line up with actual revenue.
* **Refunds handled for you** — if an order is refunded or cancelled, the referral updates to match. Your reward data stays clean without manual cleanup.
* **One place to set the rules** — reward amounts and who qualifies are configured in your AdvocateLoop dashboard. Nothing to hard-code in your store.
* **On by default, off in one click** — when active, it adds a WooCommerce tab under the AdvocateLoop menu. Turn it off and your store falls back to standard referral tracking.

= How it fits with the base plugin =

AdvocateLoop for WooCommerce is an add-on. The free [AdvocateLoop](https://wordpress.org/plugins/advocateloop/) base plugin handles referral capture and the share & claim widgets on any WordPress site; this add-on layers store-aware rewards on top for WooCommerce. The base plugin keeps working on its own — installing this simply upgrades referral tracking to the checkout level.

All of the referral rules, reward values, and eligibility live in your AdvocateLoop account, so there's nothing to configure on your server beyond connecting the two.

Full setup walkthrough: https://docs.advocateloop.com/quickstart-woocommerce/

= Requirements =

* The [AdvocateLoop](https://wordpress.org/plugins/advocateloop/) base plugin, installed and active.
* WooCommerce 5.0 or higher.
* WordPress 5.8 or higher and PHP 7.4 or higher.
* An [AdvocateLoop](https://advocateloop.com) account (a free tier is available).

WordPress will not let you activate this add-on until both the AdvocateLoop plugin and WooCommerce are active (handled automatically via the Requires Plugins header).

== Installation ==

1. Install and activate the AdvocateLoop base plugin, and make sure WooCommerce is active.
2. Install this add-on through the Plugins screen, or upload the `advocateloop-for-woocommerce` folder to `/wp-content/plugins/`.
3. Activate it. (Activation stays blocked until AdvocateLoop and WooCommerce are both active.)
4. Open the AdvocateLoop menu — a new WooCommerce tab appears where you can enable store tracking.

That's it. With the base plugin already connected to your AdvocateLoop account, rewards begin applying at checkout automatically.

== Frequently Asked Questions ==

= Do I need the AdvocateLoop base plugin? =

Yes. This is an add-on to the free AdvocateLoop plugin, which holds your account connection and all referral logic. WordPress will prompt you to install anything that's missing.

= Do I have to create coupons or share discount codes? =

No. When a referred shopper checks out, their reward is applied for them automatically — there are no codes for you to generate or for customers to type in.

= When does the referring customer get their reward? =

When the order they referred is actually paid. Rewards follow real sales, not just placed orders.

= What happens if an order is refunded or cancelled? =

The referral is updated to match automatically, so your reward records stay accurate without any manual work.

= Where do I set reward amounts and rules? =

In your AdvocateLoop dashboard. The plugin reads those settings from your account — there's nothing to configure in code on your store.

= Why can't I activate the plugin? =

It requires both the AdvocateLoop base plugin and WooCommerce to be installed and active. WordPress shows an install prompt for whichever one is missing.

= Where are the add-on's settings? =

Under the AdvocateLoop menu, in the WooCommerce tab this add-on adds when active.

== External Services ==

This add-on works with AdvocateLoop, the same third-party referral service used by the base plugin, and cannot function without it. It builds on the base plugin's connection and adds store-level events from WooCommerce. The base plugin's privacy disclosure also applies.

Data is sent to the AdvocateLoop service (api.advocateloop.com) at these points:

* **When a referred customer checks out:** their name, email, and phone, along with cart and order details (such as totals and any coupons applied) and the referral from their visit, are sent so the referral can be recognized and any earned reward applied to their order.
* **When an order is paid:** the order details (such as the order total and items, plus the customer's name and email) and the referral are sent so the purchase can be confirmed and the referring customer's reward issued.
* **When an order is refunded or cancelled:** the order and refund details are sent so the referral record can be updated to match.

All referral rules, reward values, and eligibility are determined by the AdvocateLoop service, not on your site.

By using this add-on you agree to AdvocateLoop's Terms of Service (https://advocateloop.com/terms) and Privacy Policy (https://advocateloop.com/privacy).

== Screenshots ==

1. Referred shoppers see their reward applied automatically at WooCommerce checkout — no codes to enter.
2. The WooCommerce tab under the AdvocateLoop menu, where you switch store tracking on.
3. One customer refers the next, and rewards trigger when referred orders are actually paid.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Adds WooCommerce checkout rewards to AdvocateLoop: referrals recognized at checkout, rewards issued when referred orders are paid, and referral records kept in sync on refunds and cancellations.
* Adds a WooCommerce settings tab under the AdvocateLoop menu when active.
* Requires the AdvocateLoop base plugin.

== Upgrade Notice ==

= 1.0.0 =
Initial release. Requires the AdvocateLoop base plugin and WooCommerce.
