=== Margly ===
Contributors: margly
Tags: analytics, profit, margin, reporting, statistics
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to Margly — profit analytics and an AI advisor built for e-shop owners.

== Description ==

Margly turns your store data into answers a shop owner actually needs: how much profit you make after product costs, logistics and advertising, which products are stars and which lose money, whether your ad spend pays back, and which customers come back.

This plugin connects your WooCommerce store to your Margly account:

* Creates a **read-only** WooCommerce API key so Margly can sync orders, products and customers.
* Registers signed webhooks so new orders appear in Margly within minutes.
* Nothing is ever written to your store — Margly only reads.

A Margly account is required. See [margly.io](https://www.margly.io) for plans and a free trial.

= External services =

This plugin talks to the Margly platform (margly.io):

* During connection it sends your store URL, the generated API credentials, store currency/country and an admin e-mail to `app.margly.io` so your store can be paired with your Margly account.
* WooCommerce webhooks deliver order/product/customer updates to `app.margly.io`.
* Margly's [terms of service](https://www.margly.io/terms) and [privacy policy](https://www.margly.io/privacy) apply.

== Installation ==

1. Install and activate the plugin.
2. Go to WooCommerce → Margly and click **Connect to Margly**.
3. Sign in (or create an account) at Margly to finish pairing.

== Frequently Asked Questions ==

= Does the plugin slow down my store? =

No. Data is pulled by Margly through the standard WooCommerce REST API and webhooks; the plugin itself adds no frontend code.

= Can Margly change anything in my store? =

No. The API key is created with read-only permissions.

= What happens when I uninstall the plugin? =

The API key and all webhooks are removed and Margly is notified so the connection is closed.

== Screenshots ==

1. Connect your store in one click from WooCommerce → Margly. A read-only API key and webhooks are set up automatically — you never paste anything.
2. Your Margly dashboard: profit after product costs, logistics and ads, product performance, ad payback and returning customers.

== Changelog ==

= 1.0.1 =
* Added a "Restart connection" button to the connected view so you can re-pair with Margly in one step — for example after the plugin was deactivated — without disconnecting first.

= 1.0.0 =
* Initial public release: one-click pairing with Margly, read-only API key provisioning, signed webhooks, webhook health endpoint.

== Upgrade Notice ==

= 1.0.1 =
Adds a one-step reconnect button. Recommended if you ever deactivate and reactivate the plugin.

= 1.0.0 =
First public release of the Margly connector for WooCommerce.
