=== Luumtech Inventory Sync for Evermind ===
Contributors: luumtech
Tags: woocommerce, stock, inventory, ean, barcode
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keeps WooCommerce stock in step with the Evermind wholesale catalogue, matched on EAN. Published by Luumtech, not by Evermind.

== Description ==

For authorised dealers of Evermind. Connects your WooCommerce shop to the
Evermind Partner API so that when an article sells out at Evermind, your
listing goes out of stock too, without anyone touching a spreadsheet.

**How it works**

* Matches your products to Evermind's catalogue on EAN (barcode).
* Pulls only what changed since the last run, so a sync costs one request when
  nothing has moved.
* Optionally receives push updates over a signed webhook, for changes within
  seconds rather than minutes.
* Writes quantity and stock status; optionally applies a safety buffer so a
  burst of orders on Evermind's side cannot make you oversell.

**What is transferred**

Only EAN, SKU, quantity and a timestamp. No prices, no customer data, no orders.

**Requirements**

* An active Evermind dealer account and an API key from partners.evermind.eco
* WooCommerce 8.0 or newer
* Your products' EANs in the SKU field, or in a GTIN plugin's custom field

== External services ==

This plugin connects to the Evermind Partner API, a service operated by Roots
Organics GmbH, to read the stock levels it writes into your shop. It is the
only external service the plugin contacts, and the plugin does nothing without
it.

**When it connects**

* When you save your API key, to verify it.
* On each scheduled sync (every 15 minutes by default), and whenever you press
  Sync in the settings screen.
* If you enable the optional webhook, once to register your site's callback URL
  and once to remove it again when you disable it. After that the Evermind API
  contacts your site rather than the other way round.

**What is sent**

* Your API key, as an HTTP Authorization header, so the service knows which
  dealer is asking.
* A numeric sync cursor, which is the version number of the last change your
  shop received. It carries no information about your shop beyond how recently
  it synced.
* When registering the webhook only: your site's callback URL, and your site's
  hostname as a label so you can recognise the endpoint in the partner portal.

No product data, customer data, order data or prices are ever sent.

**What is received**

For each changed article: EAN (barcode), SKU, quantity, an in-stock flag, a
timestamp and a version number. Nothing else.

Service: https://partners.evermind.eco
Terms: https://partners.evermind.eco/imprint
Privacy policy: https://partners.evermind.eco/data-policy
Data we share: https://partners.evermind.eco/data-policy

== Installation ==

1. In your WordPress admin go to Plugins → Add New, search for
   "Luumtech Inventory Sync for Evermind", then Install Now and Activate.
2. Go to WooCommerce → Inventory Sync.
3. Paste the API key from partners.evermind.eco and save. The
   connection is tested on save.
4. Choose your match field and sync interval.
5. Press "Run full sync" for the first import.

== Screenshots ==

1. The settings screen: connection, EAN matching, stock handling and sync interval.

== Frequently Asked Questions ==

= Where do I get an API key? =

Sign in at partners.evermind.eco with the same account you use to place
wholesale orders, then open API keys.

= Nothing is syncing. =

Almost always an EAN mismatch. The Diagnostics section on the settings screen
lists products whose SKU does not look like a barcode.

= My scheduled syncs are irregular. =

WordPress cron only fires when someone visits your site. On a quiet shop this
drifts. Enable the webhook, or run WP-Cron from a real system cron.

= Does this create products? =

No. It only updates the stock of products that already exist in your shop.

= Does this plugin send anything about my shop to Evermind? =

Only your API key and a numeric sync cursor. Not your products, your customers,
your orders or your prices. See the External services section above for the
exact list in both directions.

= Is my API key safe here? =

WordPress stores plugin options in plain text, so anyone with admin access to
your WordPress can read it. Give the key an IP allowlist in the partner portal
so it cannot be used from anywhere but your server, and rotate it when staff
with admin access leave.

== Changelog ==

= 1.0.0 =
* First release.
