=== Gainhint Connector ===
Contributors: gainhint, oxemo
Tags: woocommerce, analytics, ai, api, integration
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Official WooCommerce integration with the Gainhint analytical system. Securely share product and order data for AI analysis.

== Description ==

Gainhint Connector is the official plugin integrating your WooCommerce store with the advanced artificial intelligence analytical system, Gainhint.

The plugin creates dedicated, token-secured API endpoints that allow the Gainhint platform to securely read the data necessary to analyze your sales and optimize your offer.

= Key Features =
* **Product Catalog Export:** Securely share product information, including variations, attributes, stock levels, and images.
* **Order Analysis:** Send data on orders, returns, and native attribution (UTM) for precise conversion tracking.
* **Meta Data Selection:** Ability to select custom product meta keys directly from the WP admin panel to be sent for AI analysis (e.g., size charts, manufacturer codes, technical specifications).
* **Security:** Communication works in a read-only (pull) mode and is strictly secured by a Bearer Token generated in the app.

= Important 3rd Party Service (SaaS) Notice =
This plugin relies on a third-party cloud service, **Gainhint**, to function correctly.
The plugin sends your store data (products, categories, orders) to Gainhint servers via a dedicated API. Authorization management and API key generation take place in a dedicated web application.

* App Panel (SaaS): [https://panel.gainhint.com](https://panel.gainhint.com)
* Project Homepage: [https://gainhint.com](https://gainhint.com)
* Terms of Service: https://gainhint.com/pl/terms
* Privacy Policy: https://gainhint.com/pl/privacy-policy

By using this plugin, you consent to securely transmitting the above-mentioned data to the Gainhint system for analytical purposes.

== Installation ==

1. Go to `Plugins > Add New` in your WordPress admin panel.
2. Search for `Gainhint Connector` or upload the downloaded .zip file.
3. Click `Install Now`, then `Activate`.
4. Navigate to `WooCommerce > Gainhint` (or `Settings > Gainhint`).
5. Paste the API key generated in your Gainhint app dashboard.
6. (Optional) Check the custom product meta keys you want to share for AI analysis.
7. Save changes.

== Frequently Asked Questions ==

= Does this plugin modify my WooCommerce data? =
No. The plugin operates in a strict read-only (GET) mode. It provides data to the Gainhint platform but does not overwrite, delete, or modify your store's products, orders, or settings in any way.

= Where can I get the API key? =
The API key is generated within your user account in the Gainhint web application. You need to copy it and paste it into the plugin's settings within your WordPress dashboard.

= Who has access to my data? =
Data is securely shared exclusively with Gainhint servers to perform authorized analysis within your account. The plugin secures access by validating the authorization header on every single request.

== Screenshots ==

1. Plugin settings in the admin panel, showing the API key field and the meta data selection list.

== Changelog ==

= 1.4.0 =
* Stable release of the plugin integrating WooCommerce with the Gainhint service.
* Added support for order attribution (UTM).
* Added support for custom product meta fields selection from the wp-admin panel.
* Created optimized endpoints: `/products`, `/categories`, and `/orders`.