=== Order Attribution Report ===
Contributors: isifacile
Tags: woocommerce, analytics, attribution, order source, reporting
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See exactly where your WooCommerce customers come from — Google, Instagram, email campaigns and more. Filter by date and export with Plus.

== Description ==

**Order Attribution Report** gives you a clear, filterable breakdown of how customers are finding your WooCommerce store — directly inside your WordPress dashboard, no Google Analytics setup required.

Built on WooCommerce's native **Order Attribution** feature (available since WooCommerce 8.5), the plugin reads the source data already stored on each order and presents it in a clean, actionable report.

= Free features =

* Full dashboard report with source breakdown table
* Date range filter (from / to)
* Color-coded source type badges: Organic, Referral, UTM, Typein, Direct, Admin
* Revenue and order count per source with percentage bars
* Summary stat boxes: total orders, total revenue, distinct sources
* Compatible with both **HPOS** and **classic WooCommerce tables**
* Translation ready — Italian translation included

= Plus version =

Export to Excel (.xlsx), PDF and CSV is available in the Plus version, distributed separately. [Learn more](https://isifacile.it/plugins/order-attribution-report)

= Requirements =

* WordPress 6.0 or higher
* WooCommerce 8.5 or higher
* PHP 7.4 or higher

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate the plugin through **Plugins → Installed Plugins**
3. Navigate to **WooCommerce → Attribution Report**

== Frequently Asked Questions ==

= Does this work with HPOS? =
Yes. The plugin automatically detects whether your store uses High-Performance Order Storage or classic post-based orders.

= Where does the attribution data come from? =
From WooCommerce's built-in Order Attribution system, introduced in WooCommerce 8.5.

= Will it work for orders placed before WooCommerce 8.5? =
No — older orders will appear as "Direct / Unknown".

= Is the export available in the free version? =
Export to Excel, PDF and CSV requires the Plus plan.

== Screenshots ==

1. Main dashboard with order source breakdown, stat boxes and date filter
2. Plus plan — export buttons unlocked and source type legend

== Changelog ==

= 1.2.0 =
* WordPress.org compliance: removed all export code (Excel/PDF/CSV) from free version
* Export is now available exclusively in the Plus version distributed separately
* Removed all locked-feature gates per WP.org Guideline 5

= 1.1.8 =
* Renamed internal constants and classes to use unique woar_/WOAR_ prefix (min 4 chars)
* Refactored SQL query to use whitelist validation for table/column names and wpdb->prepare() for date values
* All previous compliance fixes included

== Upgrade Notice ==

= 1.1.8 =
WordPress.org compliance release.
