=== AffiliateLauncher === Contributors: cnrcodetech Tags: affiliates, affiliate program, commissions, woocommerce, direct sales Requires at least: 6.0 Tested up to: 7.1 Requires PHP: 8.2 Stable tag: 0.2.10 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html WC requires at least: 8.0 WC tested up to: 11.2 Credit affiliate and consultant sales from your WooCommerce store, then manage commissions and PayPal payouts in AffiliateLauncher. == Description == AffiliateLauncher runs affiliate, consultant, and distributor programs for online stores and direct-sales companies. This plugin connects your WooCommerce store to the AffiliateLauncher cloud service, so every order from a partner link is credited to the right person. In AffiliateLauncher you manage your roster and enrollment, give each partner tracking links, set commission plans, review a sales and commission ledger, and export PayPal mass payment files when it's time to pay. On your store, the plugin captures tracking links, saves the affiliate (and party or event, if used) on each order, and can show a lookup so shoppers credit their consultant. Commissions are calculated in AffiliateLauncher, not inside WordPress. Create an AffiliateLauncher account at https://directsales.software/user/register (or log in at https://directsales.software/user/login), paste three values from your AffiliateLauncher admin into the plugin, then connect a WooCommerce REST API key so order webhooks can sync. * Tracking links in three formats: ?_f=site-id, short /al/r/site-id links, and #site-id * Party and event credit with ?_e=event-id * Optional storefront lookup so shoppers can pick their consultant * Works with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks * Shopify and WooCommerce orders can feed the same company = External services = This plugin connects to AffiliateLauncher, a hosted service run by CNR Consulting Services, Inc. Nothing is sent until you enter an API base URL and integration key on the WooCommerce > AffiliateLauncher settings screen. What is sent and when: * Storefront pages (only when the cart float is turned on): the visitor's browser loads the AffiliateLauncher lookup widget scripts from `/storefront-widget/` and sends affiliate and event lookups, your company site ID, the integration key, and an anonymous session ID to the AffiliateLauncher API. * Admin settings screen: the "Open AffiliateLauncher" button links to your company page on the API base URL. Nothing is sent until you click it. * Order sync: AffiliateLauncher reads order data through the WooCommerce REST API key and webhooks you authorize from AffiliateLauncher. Orders carry the affiliate, event, and session IDs this plugin saves at checkout. The plugin also sets a first-party cookie, `al_fsession`, to keep the affiliate session for attribution. AffiliateLauncher terms of service and privacy policy: https://directsales.software/pub/agreements The plugin itself is free and GPL-licensed and does not license-gate features. Paid AffiliateLauncher plans are billed by the service, not inside WordPress. Support: affiliatelauncher@directsales.software. == Installation == 1. Create an AffiliateLauncher company at https://directsales.software/pub/onboarding (or log in at https://directsales.software/user/login). 2. Make sure WooCommerce is installed and active. 3. In WordPress, go to Plugins > Add New, search for AffiliateLauncher, then click Install Now and Activate. 4. In AffiliateLauncher, open Settings > WooCommerce. Copy the Company site ID and the WooCommerce integration key. 5. In WordPress, open WooCommerce > AffiliateLauncher. The API base URL is prefilled with https://directsales.software. Keep the prefilled value. 6. Paste the WooCommerce integration key and the Company site ID. 7. Leave Cart float checked to show the affiliate lookup on your store, or uncheck it to hide it. Click Save settings. 8. In WordPress, go to WooCommerce > Settings > Advanced > REST API keys and click Add key. Set Permissions to Read/Write and click Generate API key. 9. Copy the Consumer key and Consumer secret. WooCommerce shows the secret once. 10. In AffiliateLauncher, open Settings > WooCommerce. Under Connect this company to the store, enter your Store URL, Consumer Key, and Consumer Secret, then click Connect. AffiliateLauncher adds order webhooks so orders sync. 11. In AffiliateLauncher, open Commission, click New Plan, enter a plan name and default rate, and click Save. 12. Enroll affiliates from your store or in AffiliateLauncher. See "How do people become affiliates?" below. 13. To pay affiliates, open Commission > Payout and create a PayPal CSV upload file. 14. Upload the file in PayPal, then mark the batch as paid in AffiliateLauncher. 15. Use a non-Plain permalink structure if you want pretty affiliate links (`/al/r/...`). Query and hash links still work with Plain permalinks. Stores should run a patched PHP build: PHP 8.2.35 or newer on the 8.2 line, or 8.3.36+, 8.4.27+, or 8.5.12+. A step by step guide with screenshots is at https://affiliatelauncherapp.com/woocommerce/setup/ == Frequently Asked Questions == = Does it need WooCommerce? = Yes. WooCommerce is a required plugin, and the settings live under WooCommerce > AffiliateLauncher. = Where do I find the WooCommerce integration key and Company site ID? = Both are in AffiliateLauncher > Settings > WooCommerce. The Company site ID is the same value as the Site ID on the Company Information settings page. = Why does the REST API key need Read/Write? = AffiliateLauncher reads orders through the key and adds order webhooks to your store when you click Connect. Adding webhooks needs write access. = Can I hide the affiliate lookup on my store? = Yes. Uncheck Cart float in WooCommerce > AffiliateLauncher and click Save settings. = How do people become affiliates? = From your store: turn on the affiliate lookup and add at least one active enrollment type in AffiliateLauncher. A shopper picks an affiliate in the lookup panel at the bottom right, expands the panel if needed, clicks Become an Affiliate, and picks a type. A free type opens the Join page at /pub/enroll/your-site-id. A paid type adds the enrollment kit to the WooCommerce cart. The kit products set on that type must exist in your store. In AffiliateLauncher: open Affiliates, click Create New Affiliate, and pick a commission plan. Add a Site Id if you want a readable shopping link such as ?_f=site-id. Without one, the affiliate ID is used. = Where are affiliates, commissions, and payouts managed? = In the AffiliateLauncher cloud admin, not inside WordPress. The plugin never moves money. = Does it work for party plan and direct-sales companies? = Yes. Consultants share tracking links, orders can credit a party or event with an event ID, and the optional storefront lookup lets shoppers find their consultant at checkout so the right person gets credit. = Can shoppers choose their consultant? = Yes. Turn on "Show affiliate lookup float on the storefront" in WooCommerce > AffiliateLauncher. Shoppers can search for a consultant, and the choice is saved on their order. = How do I pay affiliates? = Commissions build up in the AffiliateLauncher ledger as orders sync. When you pay, create a PayPal CSV upload file in Commission > Payout, upload it in PayPal, then mark the batch as paid in AffiliateLauncher. The plugin itself never moves money. = Does it support HPOS and the Cart and Checkout blocks? = Yes. The plugin declares compatibility with High-Performance Order Storage and the Cart and Checkout blocks. = Can I use it with a Shopify store too? = Yes. One AffiliateLauncher company can connect both. WooCommerce orders are stored as woo-{order number} so they never collide with Shopify order numbers. = What happens when I uninstall? = Deleting the plugin removes its settings. Affiliate and event details saved on past orders stay on those orders. = Where do I get help? = Post in the support forum for this plugin at https://wordpress.org/support/plugin/affiliatelauncher/, or email affiliatelauncher@directsales.software with your store or company name. You can also visit https://directsales.software/support or read the FAQ at https://affiliatelauncherapp.com/faq/. = Does this plugin bill me inside WordPress? = No. The connector is free. AffiliateLauncher cloud billing (if you use paid plans) is handled outside this plugin, for example Stripe for direct signup, or WooCommerce.com SaaS Billing if you purchase through the WooCommerce.com marketplace when that listing is available. See https://affiliatelauncherapp.com/pricing/ for plan details. = What data is sent to AffiliateLauncher? = Configured stores send the connector settings you enter and use AffiliateLauncher endpoints for affiliate lookup / attribution and related connector traffic. Order sync uses the Woo REST API connection you authorize from AffiliateLauncher. See AffiliateLauncher agreements in the cloud admin for processing details. = Do I need pretty permalinks? = Pretty affiliate paths (`/al/r/...`) need a non-Plain permalink structure. Settings > Permalinks. Query (`?_f=`) and hash (`#siteId`) links still work when permalinks are Plain. = I installed an older zip. How do I move to this version? = Version 0.2.7 and later use the plugin folder `affiliatelauncher`. Older zips used `affiliatelauncher-woocommerce` or `affiliatelauncher-for-woocommerce`, so WordPress may show more than one copy. Your settings carry over. 1. Go to Plugins and deactivate any older AffiliateLauncher / AffiliateLauncher for WooCommerce copy. 2. Upload the new zip under Plugins > Add New > Upload Plugin, and activate it. 3. Check WooCommerce > AffiliateLauncher. Your API base URL, company site ID and integration key should still be filled in. 4. Delete the old plugin(s) from the Plugins screen while the new one is active. The new plugin keeps your settings when the old ones are removed. Keep one copy active at a time. == Screenshots == 1. The AffiliateLauncher plugin active on the Plugins screen, with WooCommerce as its required plugin. 2. The Site ID on the AffiliateLauncher Company Information page. Settings > WooCommerce shows the same value as the Company site ID. 3. Plugin settings under WooCommerce > AffiliateLauncher, with the API base URL prefilled. Paste the WooCommerce integration key and Company site ID, and choose whether to show the affiliate lookup (Cart float). 4. Creating a Read/Write WooCommerce REST API key for AffiliateLauncher. 5. Creating a commission plan in AffiliateLauncher (name and default rate). 6. Saved commission plan with its plan ID. 7. Commission plans list with an active plan. 8. Storefront: the affiliate lookup panel after picking an affiliate, with Become an Affiliate. 9. Storefront: choosing an enrollment type. 10. Storefront: the Join page form, with the sponsor shown. 11. The Join page opened directly. 12. Storefront: a paid enrollment kit in the WooCommerce cart. 13. Adding an affiliate in AffiliateLauncher and picking a commission plan. 14. The affiliates roster after saving. 15. Recording a test sale for an affiliate. 16. Saved sale with its calculated commission. 17. Commission payout screen with the PayPal CSV upload option. == Changelog == = 0.2.10 = * Prefill API base URL with https://directsales.software on fresh installs. * Show Create your account and Log in links on the settings page when the store is not connected yet. = 0.2.9 = * Raise minimum PHP to 8.2. Stores should run a patched PHP (8.2.35+ on 8.2, or 8.3.36+, 8.4.27+, or 8.5.12+). = 0.2.8 = * Set Author to CNR Consulting Services, Inc. Plugin URI https://directsales.software; Author URI https://cnrcode.com (WordPress.org ownership clarity). = 0.2.7 = * Set Plugin Name to AffiliateLauncher for WordPress.org slug `affiliatelauncher`. * Align Text Domain and i18n calls with slug `affiliatelauncher`. * Tested up to WordPress 7.1 and WooCommerce 11.2. * Update the support contact to affiliatelauncher@directsales.software. * Sanitize and validate cart float AJAX input. = 0.2.6 = * Declare GPLv2 or later (plugin header + LICENSE). * Add WordPress.org `readme.txt` with external service disclosure and install docs. * Remove plugin settings on uninstall (order data is kept). = 0.2.5 = * Prior connector release (attribution, cart float, settings, HPOS / cart-checkout blocks compatibility). == Upgrade Notice == = 0.2.10 = Fresh installs prefill the API base URL. Settings page now links to create an account or log in at AffiliateLauncher when not connected. = 0.2.9 = Requires PHP 8.2 or newer. Use a patched PHP build (8.2.35+, 8.3.36+, 8.4.27+, or 8.5.12+). = 0.2.8 = Author and plugin URI updated for WordPress.org ownership clarity. No functional change. = 0.2.7 = Plugin folder / slug is now `affiliatelauncher`. On older zips: deactivate the old plugin, install and activate this one, then delete the old one. Settings carry over. See the FAQ. Adds WordPress 7.1 and WooCommerce 11.2 support. = 0.2.6 = Adds GPL license declaration and WordPress.org readme. No functional change required after upgrade.