Afileasy for WooCommerce connects your store to your Afileasy affiliate program without writing a single line of code:
- Automatic tracking — embeds the Afileasy script on your storefront and stores the referral (
?ref=...) in a cookie. - Lead capture — when a referred visitor creates an account, the sign-up is registered as a lead for the affiliate, before any purchase.
- Automatic attribution — when the customer checks out, the referral is saved on the order, and the coupon codes used are reported so an affiliate coupon also credits the sale.
- Affiliate coupons — coupons created in Afileasy are published in your store as real WooCommerce coupons, and expired there when they are deactivated.
- Coupon autofill — a visitor who arrives through an affiliate link gets that affiliate’s coupon applied to the cart automatically, without typing it.
- Synchronization — when an order is paid or refunded, the event is sent to Afileasy, which creates or reverses the commission.
Events are delivered through Action Scheduler (already bundled with WooCommerce), so checkout is never blocked and failed deliveries are retried automatically.
External services
This plugin connects your store to Afileasy (https://afileasy.com), an affiliate program management service. The plugin does not work without that connection, and no data leaves your store until you paste your connection key under WooCommerce Afileasy.
Once connected, the integration communicates with Afileasy at four moments:
1. Tracking script (every storefront page)
The plugin adds a <script> loaded from the Afileasy servers to every public page of your store. That script reads the referral parameter from the URL (?ref=...) and stores it in the afileasy_ref cookie in the visitor’s browser, so the sale can be credited to the right affiliate. When the affiliate has a coupon, Afileasy also returns it and the script stores it in the afileasy_coupon cookie, which is what lets this plugin apply the coupon to the cart. Loading the script tells Afileasy the address of the page being visited and the visitor’s IP address, as with any HTTP request.
2. Leads (when a referred visitor creates an account)
When a visitor who arrived through an affiliate link creates a customer account — from My Account or from checkout — the plugin sends their email address and name to Afileasy, along with the referral identifier stored in the cookie, so the affiliate is credited with the lead. Accounts created without a referral send nothing.
Developers can disable this with the afileasy_capture_leads filter:
add_filter( 'afileasy_capture_leads', '__return_false' );
3. Order events (when an order is paid or refunded)
On those two events, and only on those, the plugin sends the following to Afileasy:
- From the order: identifier, status, currency, total, refunded amount, the coupon codes applied, and the creation, payment and modification dates.
- From the customer: identifier, email address and name provided at billing.
- The referral identifier stored on the order, used to credit the commission.
This data is required to calculate, create and reverse affiliate commissions. By using this plugin you share your customers’ personal data with Afileasy — make sure your store’s privacy policy covers it.
4. Coupons (when you connect the store)
So that the coupons you create in Afileasy become real coupons in your store, the plugin creates a WooCommerce REST API key (visible under WooCommerce Settings Advanced REST API) and sends it to Afileasy together with your store address. Afileasy then uses the WooCommerce REST API to create, update and expire only those coupons. The key is deleted when you uninstall the plugin, and you can revoke it at any time in WooCommerce — coupon synchronization stops, everything else keeps working.
- Terms of service: https://afileasy.com/termos
- Privacy policy: https://afileasy.com/privacidade