=== Refersion for WooCommerce ===
Contributors: refersion
Tags: referral, affiliate, ecommerce, influencer, woocommerce
Requires at least: 6.3
Tested up to: 6.9
Stable tag: 5.4.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Seamlessly connect your WooCommerce shop with Refersion and start tracking sales driven by promoters, influencers, and affiliates!

== Description ==

[youtube https://www.youtube.com/watch?v=DgHUrZsfhJU]

Refersion’s goal is to make managing your affiliate program as simple as possible. The average setup time is 6 minutes or less (!) and absolutely no coding or technical knowledge is required. Leave the complicated stuff to us.

Here's how Refersion can streamline your affiliate program:

* Add, modify, and approve affiliates with just a few clicks.

* Complete tracking of affiliate sales. Find out who drove which sale, their total commission, and more!

* Manage affiliate payments with ease (we support PayPal!).

* Turn your customers into affiliates with our Post-Purchase channel.

* Receive support from a USA based team that genuinely cares about your success. We’re always eager to help you with any questions you may have or create a custom feature you may need.

* Still a little unsure? No worries. That’s why we have a 14-day free trial during which we’ll help you get everything completely integrated.

We already have hundreds of 5 star reviews on other platforms and now we're on WooCommerce. Get ready to join a community of over 60k merchants today!

== Installation ==
1. Upload the `refersion-for-woocommerce` directory into the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to the WooCommerce > Refersion section in your admin panel to add your Refersion API keys and to enable the plugin.

== Screenshots ==
1. Track affiliate sales with your customized dashboard.
2. Connect your online shop with just a few clicks.
3. Simplify your affiliate payments.
4. Commissions owed are automatically calculated for you.

== Changelog ==

= 5.4.0 =
* Fixed checkout tracking failure on sites with Cloudflare Rocket Loader enabled
* Added data-cfasync="false" to prevent Rocket Loader from deferring tracking scripts
* Replaced window.onload with async-safe polling for Refersion SDK availability
* Output checkout tracking inline to ensure scripts render after wp_head()
* Added fallback cart tracking creation when woocommerce_new_order hook is missed
* Script version URLs now use plugin version for automatic cache busting

= 5.3.0 =
* Added WooCommerce Blocks checkout support (WooCommerce 8.3+)
* Checkout tracking now works on both classic shortcode and Blocks-based order confirmation pages
* Fixed issue where sendCheckoutEvent never fired on stores using the default Blocks checkout, preventing link conversions from being recorded

= 5.2.0 =
* Fixed database table creation bug where table name was undefined
* Simplified order status settings - replaced dropdown with checkbox-based hook control
* Improved performance by moving database update checks to admin page only (no longer runs on every page load)
* Added automatic table recreation with admin notice when cart tracking table is missing

= 5.1.2 =
* Improved code quality and WordPress coding standards compliance
* Refactored database queries for better maintainability
* Enhanced error handling and logging
* Verified support for WordPress 6.9

= 5.1.1 =
* Verified support for WordPres 6.8
* Verified support for WooCommerce 10.3

= 5.1.0 =
* Added granular control for disabling frontend tracking scripts on specific pages (checkout, cart, product pages, or all except thank you page)
* Enhanced compatibility with AJAX checkout systems by allowing selective script loading

= 5.0.0 =
* Fixed subscription array structure in webhook payload - now properly sends subscription data in expected array format
* Fixed merchant_subscription_id field not being sent to conversion_queue table
* Enhanced subscription detection to work with multiple meta key sources
* Simplified tracking to use v4 only (removed v3/v4 version selection)
* Improved stability and consistency in affiliate tracking
* Enhanced subscription tracking with dedicated settings
* Better error handling and validation for product data
* Streamlined configuration with fewer options to maintain

Benefits of v4 tracking:
- Enhanced accuracy in conversion attribution with improved click-to-conversion matching
- Better support for complex e-commerce scenarios including multi-domain setups
- More robust handling of customer journey tracking across different devices and sessions
- Improved analytics and reporting capabilities for affiliate performance
- Enhanced fraud detection and prevention mechanisms
- Better integration with modern web technologies and privacy standards

= 4.14.1 =
* Fixed subscription renewal tracking errors

= 4.14.0 =
Enhancement:
* Added WordPress, WooCommerce, and Refersion version data to webhook payloads for better debugging and analytics
* Enhanced version tracking in JavaScript variables for improved frontend analytics

= 4.13.0 =
Database Change:
* Improved tracking table.
* Existing installations will have the new improvement automatically on plugin activation.

= 4.12.0 =
* Internal updates to the plugin (no visible changes)

= 4.11.1 =
* Tags update

= 4.11.0 =
* Improved conversion tracking
* Updating assets
* Adding support for WordPres 6.7
* Improved support for WooCommerce 9.4.3

= 4.10.0 =
* Fixing product validation
* Updating assets
* Updating Youtube link
* Improved support for WooCommerce 6.3.2

= 4.9.2 =
* Fixing tag version

= 4.9.1 =
* Release to update version 4.9.0

= 4.9.0 =
* Added support for Refersion's post purchase widget on the WooCommerce thank you page
* Added support for order cancellation tracking in Refersion
* Added support for order prefixes in Refersion
* Removed output buffering from the plugin

= 4.8.0 =
* Add support for tracking version 4.0

= 4.7.0 =
* Add products dynamically to the order data sent to Refersion.

= 4.6.0
* Added ability to support multiple coupon codes

= 4.5.1 =
* Fixed bug for CTI

= 4.5.0 =
* Added ability to change where the IP address for a customer is found that is sent to Refersion
* Fixed bug related to two slashes when including click tracking Javascript

= 4.4.0 =
* Added ability to change which order status is sent to Refersion

= 4.3.1 =
* Using item prices of orders will now read from subtotal

= 4.3.0 =
* Added new advanced option in admin to control how line item prices are sent to Refersion

= 4.2.1 =
* Improved use of order item data from WooCommerce

= 4.2.0 =
* Updated to use item price from order instead of product
* Item name is now sent too

= 4.1.0 =
* Updated to use the new WooCommerce tracking endpoint

= 4.0.1 =
* Better organized plugin assets as well as fixed bug having to do with reporting

= 4.0.0 =
* Improved support for WooCommerce 3.0.8

= 3.0.8 =
* Updated Copyrights and latest stable version

= 3.0.7 =
* Fixed issue where the confirmation pixel did not display for some versions of WooCommerce, optimized conversion trigger reporting, and corrected issue with the pric

= 3.0.6 =
* Corrected an issue with database storage. If you are having trouble getting Refersion working, please re-install the app or get in touch with us. For most shops, this update should not have any impact on tracking.

= 3.0.1 =
* Fixed issue with duplicated installations

= 3.0 =
* HIGHLY recommended for users using the newer versions of WooCommerce and/or Wordpress

= 2.1 =
* Improved compatibility for WooCommerce

= 2.0 =
* Updated for latest versions of WooCommerce and Refersion tracking options (e.g., tracking under a custom domain)

= 1.0 =
* Initial implementation
