=== Ready2Sync for WooCommerce ===
Contributors: slymtech
Tags: pos, inventory, ready2order, stock, sync
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.1
WC requires at least: 8.0
WC tested up to: 11.2
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your Ready2Order point of sale to WooCommerce and keep inventory, products and pricing in sync through the Ready2Sync service.

== Description ==

Ready2Sync keeps a WooCommerce store and a Ready2Order point of sale in agreement about what is in stock, what is for sale, and what it costs. Sell an item at the counter and the WooCommerce stock level follows; change a price online and the till follows.

**This plugin requires an account with the Ready2Sync service, which is a paid third-party service.** The plugin itself performs no synchronization. It provides the settings interface inside WP Admin and the OAuth handshake that authorizes the service; all matching, scheduling, and data transfer happen on Ready2Sync's servers. Without a Ready2Sync account the plugin has nothing to display and nothing to configure.

= What it does =

* Real-time inventory synchronization in both directions between Ready2Order and WooCommerce
* Product synchronization — create, update and delete products across both systems (Advanced plan)
* Product matching by SKU, barcode or manual assignment
* Category mapping between the two systems
* Per-field control over which product attributes are synchronized on update
* VAT configuration per Ready2Order store
* One-time manual sync runs for first setup or after bulk changes
* Sync health dashboard with activity history and data quality warnings
* German and English interface

= External service: Ready2Sync =

This plugin is a client for the Ready2Sync service, operated by Slym Tech UG. Using the plugin means transmitting store data to that service.

**Service:** Ready2Sync — https://slym.tech/apps/ready2sync-woocommerce/
**API endpoint (receives the data described below):** https://ready2sync.slym.tech
**Terms of Use:** https://ready2sync.slym.tech/woocommerce/terms.html
**Privacy Policy:** https://ready2sync.slym.tech/woocommerce/privacy.html

**When the plugin contacts the service.** Nothing is transmitted until a store administrator clicks "Connect" and completes the WooCommerce authorization screen. Installing and activating the plugin on its own sends no store data anywhere. Once connected, the plugin's admin screens talk to the service through your own WordPress server, which adds the access token to each request; the browser never receives the token.

<!-- BEGIN ready2sync-selfhost-updater -->
**Update checks (copies downloaded from slym.tech only).** This copy of the plugin checks https://slym.tech/downloads/ready2sync-for-woocommerce/manifest.json for new versions, the way WordPress checks WordPress.org for directory plugins. While the plugin is active, WordPress makes this request during its own update checks (about twice a day, and when you open the Plugins or Updates screen) and when you open the plugin's "View details" link. Slym Tech UG receives your server's IP address and a user agent naming the plugin and WordPress versions; no site URL, store data or credentials are sent. When an update is installed, WordPress downloads the package from slym.tech with its standard user agent, which includes your site URL.

<!-- END ready2sync-selfhost-updater -->
**What is transmitted, once connected:**

* Your site URL, to identify the store and to build the OAuth callback
* A WooCommerce REST API key with read/write scope, granted through WooCommerce's own `/wc-auth/v1/authorize` flow. Ready2Sync uses this key to read and write products, stock levels and categories, to permanently delete products when automatic deletion is on, and variations removed in Ready2Order, to manage its own webhooks, and to test the connection.
* Product data used for sync, including names, descriptions, SKUs, barcodes, prices, tax status, stock quantities, categories, product status and variation attributes. Your sync settings control most of what is written to the other system, mainly on updates, so new products can carry fields you turned off.
* Complete product records: WooCommerce's API and webhooks deliver the whole product record regardless of your sync settings, so fields Ready2Sync does not use, such as image URLs, also reach the service. Ready2Sync does not use them for sync and does not store them in its database.
* Product change notifications, delivered as WooCommerce webhooks when a product is created, updated or deleted. A deletion notification carries only the product id.
* WooCommerce's system status report, once when you connect, to test the connection. Ready2Sync checks only that the request succeeds and does not store the report in its database.
* Sync configuration and mapping choices you make in the plugin's settings screens

**What is transmitted when the plugin is uninstalled.** Deleting the plugin sends one final request to Ready2Sync (`/api/wc-api/uninstall`) carrying your stored access token, so the service can release the connection and clean up data associated with your store. This request is sent only if a token is present. Your local WordPress options are then deleted whether or not that request succeeds.

**What the plugin does not do.** No analytics, no telemetry, no usage tracking, no advertising, no data sharing with any party other than Slym Tech UG, which operates the Ready2Sync service described above.

= Pricing =

Ready2Sync is a paid service. The Starter plan includes a 14-day free trial:

* **Starter — €15/month:** real-time inventory synchronization between Ready2Order and WooCommerce
* **Advanced — €45/month:** everything in Starter, plus full product synchronization — product creation, updates and matching

Billing is handled by Stripe. Subscriptions are managed from inside the plugin, which links out to the Stripe customer portal. The plugin itself contains no payment handling.

When a store's plan does not include product synchronization, the Product Sync screen explains the plan rather than offering settings — the service does not perform product sync for that plan, so no setting in the plugin could take effect.

= Source code =

The complete, unminified source of the plugin's JavaScript interface ships inside the plugin, in the `src/` directory. `assets/js/ready2sync.js` is built from it with:

`yarn install && yarn build`

The build is driven by Vite; `vite.config.ts`, `tsconfig.json` and `package.json` are included so the bundle can be reproduced.

The bundle includes its own copy of React and the WordPress components library rather than the copies WordPress ships. The plugin supports WordPress 6.0 and newer, and older WordPress releases ship versions of these libraries that the interface cannot run on. The bundle is loaded only on the plugin's own admin screens.

= Trademarks =

Ready2Sync is an independent product of Slym Tech UG. It is not affiliated with, endorsed by, or sponsored by ready2order GmbH or Automattic Inc. "ready2order", "WooCommerce" and "WordPress" are the trademarks of their respective owners and are used here only to describe what this plugin connects to.

== Installation ==

1. Install and activate WooCommerce 8.0 or newer.
2. Install and activate Ready2Sync for WooCommerce.
3. Open **Ready2Sync** in the WP Admin menu.
4. Click **Connect** and approve the WooCommerce API access request. You are returned to WP Admin with the store connected.
5. Choose a plan. Starter begins with a 14-day free trial.
6. Connect your Ready2Order account from the Ready2Sync dashboard. Ready2Sync imports your catalog and matches products; nothing syncs yet.
7. Review the matches, then configure and turn on inventory sync, and product sync if your plan includes it.

Step-by-step setup guide: https://slym.tech/apps/ready2sync-woocommerce/setup/ (German: https://slym.tech/de/apps/ready2sync-woocommerce/setup/)

Requires PHP 8.1 or newer with the OpenSSL extension, WordPress 6.2 or newer, and WooCommerce 8.0 or newer. Compatible with WooCommerce High-Performance Order Storage (HPOS).

== Frequently Asked Questions ==

= Do I need a Ready2Sync account? =

Yes. The plugin is a client for the Ready2Sync service; all synchronization runs there. The plugin contains no sync logic of its own and does nothing useful without an account.

= Is the service free? =

No. Ready2Sync is €15/month (Starter) or €45/month (Advanced). Starter includes a 14-day free trial. See the Pricing section above.

= What happens when my trial or subscription ends? =

The service stops synchronizing and the plugin says so. The plugin's own code is unchanged — nothing is disabled inside WordPress; the service simply stops performing work for a store without an active subscription.

= Where is my API token stored? =

Encrypted with AES-256-CBC in the `ready2sync_token` WordPress option, keyed from your site's `wp_salt('auth')`. It stays on your server: the admin screens reach Ready2Sync through the plugin's WordPress REST endpoints, which add the token server-side, so it is never sent to the browser. It is removed when the plugin is uninstalled.

= What is removed when I delete the plugin? =

The `ready2sync_token`, `ready2sync_connected` and `ready2sync_version` options. The plugin creates no database tables, post types or taxonomies. Ready2Sync is also notified so it can release the connection on its side.

= Does deactivating the plugin disconnect my store? =

No. Deactivation marks the store as disconnected but keeps the stored credential, so reactivating does not require repeating the OAuth flow. Deleting the plugin removes the credential.

= Does this work on WordPress Multisite? =

Yes, including a network-activated WooCommerce.

= Is it translated? =

English and German are included and ship inside the plugin. Other languages are not available yet. The interface switches to German when your WordPress admin language is any German locale, such as de_DE, de_AT or de_CH.

== Screenshots ==

1. Sync health dashboard with inventory status and recent activity
2. Inventory sync configuration
3. Product sync — field-level control over what is synchronized
4. Product matching between Ready2Order and WooCommerce
5. Category mapping
6. Plan selection and subscription management

== Changelog ==

= 2.0.0 =
* Connects to the production Ready2Sync service at https://ready2sync.slym.tech; 1.9.x pointed at a development host
* The Ready2Sync access token stays on the server. The admin pages reach the Ready2Sync service through the plugin's own WordPress REST endpoint, and the token is no longer printed into the page or kept in the browser
* Copies downloaded from slym.tech are offered new versions under Dashboard → Updates, with the changelog under "View details"
* Uninstalling now notifies the same Ready2Sync host the plugin talks to, so the service can release the connection. Before, the uninstall request went to a host that did not resolve
* Plugin and author links point to slym.tech
* Setup guide: link to the step-by-step guide on slym.tech (English or German, following the admin language)
* Setup guide: "Turn on sync" opens Inventory sync on every plan, the page that completes the step (Starter plans used to land on the Advanced plan notice)
* After the first catalog import, the store card says auto-sync is on only when it is; otherwise it shows "Ready to sync" and asks you to review matches and turn on sync
* Installation steps list the plan before the Ready2Order connection, matching the order the plugin asks for them
* After returning from Stripe Checkout, the plugin confirms the payment with the Ready2Sync service and shows "Activating your subscription" until the plan is active, instead of the plan picker
* The Connect screen says that the plugin needs the external Ready2Sync service and a subscription, and every screen links the Terms of Use and Privacy Policy in its footer
* Fixed: the plugin's script replaced the global `wp` and `wc` objects on its admin page, which could break scripts of other plugins there
* The admin menu and notices are German for every German admin language (de_AT, de_CH and others), not only de_DE, matching the rest of the interface
* Requires WordPress 6.2 or newer (was 6.0)
* If the Connect screen appears after updating, click Connect and approve the WooCommerce authorization again

= 1.9.6 =
* Setup guide: removed the "Choose sync" step, which only applies to the Shopify app

= 1.9.5 =
* Redesigned the FAQ as "Help & FAQ" to match the Ready2Sync Shopify app: search card, "Browse by topic" sidebar with counts, and questions grouped by topic
* "Didn't answer your question?" under each answer and an "Email support" card open the contact form, prefilled with the question
* Links from FAQ answers to the Product sync and Inventory sync settings
* Corrected the decimal stock answer: the fraction is dropped (2.7 becomes 2), not rounded
* German: formal "Sie" throughout, clearer Inventory sync title, shorter "Zuordnung nötig" status, and corrected FAQ wording
* Numbers and dates follow the WordPress admin language instead of the browser's (e.g. 4.100 in German)

= 1.9.4 =
* Redesigned Product Matching to match the Ready2Sync Shopify app: a stats strip with the match rate, a match-method bar and a "need attention" shortcut, plus All / Synced / Needs match tabs with counts
* Each row shows the WooCommerce product and its Ready2Order item side by side, joined by the match method; variable products show a "N variants" toggle
* Removed the "Create in Ready2Order" / "Create in WooCommerce" buttons
* The POS-only tab is gone; POS-only items still appear under All matches

= 1.9.3 =
* Redesigned Product categories to match the Ready2Sync Shopify app: mapping table with WooCommerce ⇌ Ready2Order rows, searchable pickers, and an "Overrides" badge when a parent group is also mapped
* Sync scope: "Sync everything" or "Limit to selected categories", with searchable category pickers and Select all / Clear
* Category changes are saved with the Save bar instead of instantly
* Mapping pickers hide categories and product groups that are already mapped

= 1.9.2 =
* Redesigned Product sync to match the Ready2Sync Shopify app: sync direction tiles, an "Automatic product sync on…" card that explains each trigger for the chosen direction, and field toggles with example values
* VAT details: set a VAT rate per Ready2Order product group on top of the default VAT (applies when products sync from WooCommerce to Ready2Order)
* Link to the Ready2Order VAT rate settings
* Removed the "Last auto-sync job was finished at" line

= 1.9.1 =
* Redesigned Inventory sync to match the Ready2Sync Shopify app: automatic sync and sync direction in one card, with an On/Off switch and Active badge
* Sync direction tiles show the WooCommerce ⇌ Ready2Order flow (also on Product sync)
* Sum variants card with a live preview of how parent stock is calculated
* New note that decimal Ready2Order stock loses its fraction in WooCommerce (2.7 becomes 2), linking to the FAQ
* Removed the "Last auto-sync job was finished at" line

= 1.9.0 =
* Redesigned Home to match the Ready2Sync Shopify app: one card per store with Manage and Add new store, sync health hero, KPI tiles, recent activity beside data quality
* Live initial-sync progress card while a newly connected Ready2Order account imports its catalog
* New setup guide strip and Connect Ready2Order screen with a "what happens next" stepper
* Open data quality report button now opens Product Mappings
* New page footer on every screen: collapsible Contact support form, support email and plugin version

= 1.8.1 =
* Product Mappings reads the per-connection ready2order ledger entries (shows the first connected bridge)
* Updated admin UI dependencies (WordPress components 42, React 19.3, Vite 8.3)

= 1.8.0 =
* Subscription management: plan selection, trial banner, Stripe customer portal
* Product Sync screen now explains the plan when the subscription does not include product sync, instead of showing inert settings
* Ready2Sync's own webhooks deliver synchronously; other plugins' webhooks keep WooCommerce's default asynchronous delivery
* WooCommerce detection now recognises network-activated installs on Multisite
* Deactivation keeps the stored credential so reactivation does not require reconnecting
* Added `Requires Plugins: woocommerce` so WordPress manages the dependency

== Upgrade Notice ==

= 2.0.0 =
Moves the plugin to the production Ready2Sync service at ready2sync.slym.tech and keeps the access token on the server. If the Connect screen appears after the update, click Connect and approve the WooCommerce authorization again.

= 1.8.0 =
Adds subscription management and fixes webhook delivery so that only Ready2Sync's own webhooks are sent synchronously.
