=== LystoSync for Etsy ===
Contributors: lystosync
Tags: etsy, woocommerce, etsy integration, etsy listing, inventory sync
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: woocommerce
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce Etsy integration. List products on Etsy, keep stock and prices in sync, and manage listings from your WordPress admin.

== Description ==

LystoSync is a WooCommerce Etsy integration that runs inside your WordPress admin. Publish products as Etsy listings, keep prices and stock in sync, and deactivate listings when items sell out. Your listing data stays in your own WordPress database.

**Core features (free):**

* Publish WooCommerce products as Etsy listings: physical, digital, or both
* Variations: map WooCommerce attributes to up to three Etsy variation properties
* Listing images, variation images, digital files, and up to two videos per listing
* Personalization questions and per-language translations
* Listing profiles: reusable settings with Etsy category (taxonomy), shipping profile, processing profile, and return policy
* Shop page: manage sections, shipping profiles, processing profiles, and return policies without leaving WordPress
* Per-product shipping weight and dimensions sent to Etsy
* Deactivate, reactivate, and renew listings at any time, with Etsy's listing fee confirmed first
* Bulk "Sync on Etsy" from the WooCommerce Products list, with progress and per-product results
* Auto-sync on product save: changes push to Etsy when you update a WooCommerce product
* Stock control: deactivate the listing when WooCommerce stock runs out
* Sales sync: automatically reduce WooCommerce stock when an item sells on Etsy, and restore it if the sale is canceled
* Background sync: queued listing updates pushed on a schedule
* Archive listings that ended more than 90 days ago, checked daily
* OAuth shop connection

**Pro features ([LystoSync Pro](https://lystosync.com/etsy)):**

* Import existing Etsy listings into WooCommerce
* Orders admin page: view, search, and manage imported Etsy orders
* Automated order import on a schedule
* Mark orders as shipped on Etsy with carrier and tracking number when a WooCommerce order completes
* LystoSense: suggested titles, tags, materials, and category attributes, reviewed before anything is saved
* Faster sync intervals (5 and 15 minutes; free offers 30 minutes, hourly, or manual)
* In-dashboard Pro updates with license key activation

**How it works:**

LystoSync handles Etsy OAuth tokens server-side, so you never touch API credentials. All you need is an Etsy shop: the free plugin needs no API keys and no LystoSync account.

== Installation ==

1. Upload the plugin to your `/wp-content/plugins/` directory or install via the WordPress plugin screen.
2. Activate the plugin through the **Plugins** screen. The setup wizard opens.
3. Connect your Etsy shop: you sign in on Etsy and approve access.
4. Save your listing defaults. The wizard reads your shop's shipping profiles, processing profiles and return policies, creates any that are missing, and saves them as the "Default" listing profile.
5. Go to **Products**, tick the products you want on Etsy, and choose **Bulk actions → Sync on Etsy**. Results show under **LystoSync → Listings**.

You can run setup again any time from the Etsy card on the LystoSync dashboard.

Requires WooCommerce 8.0 or later.

== Frequently Asked Questions ==

= Do I need an Etsy developer account or API keys? =

No. LystoSync handles all Etsy API authentication through its service at etsy-api.lystosync.com. You connect your Etsy shop via the standard Etsy consent screen. No API keys to manage.

= Is a LystoSync account required? =

No account is required for the free plugin. It authenticates with etsy-api.lystosync.com on its own. Pro requires the license key from your lystosync.com/etsy purchase.

= Can I connect more than one Etsy shop? =

Yes. Each shop can have its own profiles and listings.

= Does this work with variable products? =

Yes. WooCommerce attributes map to Etsy variation properties (up to three), and each variation becomes an Etsy product with its own price, quantity, and SKU.

= Can I publish many products at once? =

Yes. Select the products on the WooCommerce Products list, choose "Sync on Etsy" from the bulk actions, and pick a listing profile. Products sync one at a time, with progress and a result for each.

= Can I sell digital downloads? =

Yes. A profile with the digital listing type uploads the product's WooCommerce downloadable files to Etsy. Etsy allows only a single product on a digital listing, so variable products need a physical profile.

= Does activating a listing cost anything? =

Etsy charges its listing fee when a listing is activated or renewed. The plugin never activates or renews a listing without your profile setting or an explicit confirmation.

= Does the free version import my Etsy orders into WooCommerce? =

No. The free version watches for paid Etsy sales and reduces the matching WooCommerce stock, then restores it if the sale is later canceled — no WooCommerce order is created. [LystoSync Pro](https://lystosync.com/etsy) imports full orders, including buyer and shipping details, and can mark them shipped on Etsy with tracking.

= What happens to my Etsy listings if I deactivate the plugin? =

Deactivating stops all syncing. Your live Etsy listings stay active on Etsy — none are deactivated.

= Where can I get support? =

Open a support thread in the [WordPress.org support forum](https://wordpress.org/support/plugin/lystosync-for-etsy/) or visit [lystosync.com](https://lystosync.com) for Pro support.

== External Services ==

This plugin transmits data to two external services:

**LystoSync (etsy-api.lystosync.com)**

All Etsy API requests go through etsy-api.lystosync.com. When you connect an Etsy shop, your site URL (and, with Pro, your license key) is sent to authenticate. Subsequent requests include product data, pricing, inventory levels, order details, and shipment information, depending on which features you use. No data is sent until you connect an Etsy shop.

Separately, the plugin can check for service notices (Etsy API outages, critical fixes, and Etsy changes that need action on your shop). This is **optional and off by default**, and you can turn it on or off at any time under LystoSync, Settings, General, Notifications. While it is off, or before you connect an Etsy shop, no request is made. While it is on, the check sends your plugin, WordPress, WooCommerce and PHP versions, and your site language, using the same authentication as the plugin's Etsy requests (your site URL and, with Pro, your license key). It sends no email, Etsy shop, or customer or order data.

* Service: [lystosync.com](https://lystosync.com)
* Privacy policy: https://lystosync.com/privacy
* Terms of service: https://lystosync.com/terms

**Etsy**

Product listings, pricing, inventory, and shipment data are submitted to Etsy via the LystoSync middleware. Etsy's own privacy policy and terms of use govern how Etsy handles that data.

* Service: [etsy.com](https://www.etsy.com)
* Privacy policy: https://www.etsy.com/legal/privacy
* Terms of use: https://www.etsy.com/legal/terms-of-use

== Screenshots ==

1. Listings table with synced products and Etsy status.
2. Listing profile editor: listing type, Etsy listing details, shop section, and publishing options.
3. Shop page: sections, shipping profiles, processing profiles, and return policies.
4. Dashboard with sync status and recent activity.

== Source Code ==

The human-readable source files for all compiled assets ship with the plugin, in
`resources/js/` and `resources/css/`, alongside the build script (`build.js`) and
the build dependencies (`package.json`). Every generated file in `dist/` also
carries a header comment naming the source file it was built from.

**Build tools required:** Node.js, npm

**To regenerate the compiled files in `dist/`:**

1. Run `npm install` to install dependencies (esbuild, PostCSS, Autoprefixer).
2. Run `npm run build` (or `node build.js`) to compile and minify all assets.

The build uses esbuild for JavaScript bundling and minification, and PostCSS with Autoprefixer for CSS.

**Compiled file => source file:**

* `dist/admin.js` => `resources/js/app.js`
* `dist/product-metabox.js` => `resources/js/product-metabox.js`
* `dist/connect.js` => `resources/js/connect.js`
* `dist/products-bulk-list.js` => `resources/js/products-bulk-list.js`
* `dist/setup.js` => `resources/js/setup.js`
* `dist/admin.css` => `resources/css/design-system.css` + `resources/css/admin.css`
* `dist/product-metabox.css` => `resources/css/product-metabox.css`

Each JavaScript entry point also pulls in the shared module `resources/js/lib/api.js`,
which is bundled into the output rather than shipped as a separate file.

**Bundled fonts.** The admin interface uses two self-hosted webfonts, copied from
`resources/fonts/` to `dist/fonts/` by the build. Nothing is loaded from a font
CDN or any other third-party host.

* DM Sans, Copyright 2014 The DM Sans Project Authors, https://github.com/googlefonts/dm-fonts
* Syne, Copyright 2017 The Syne Project Authors, https://gitlab.com/bonjour-monde/fonderie/syne-typeface

Both are licensed under the SIL Open Font License 1.1. The full license texts
ship as `resources/fonts/OFL-DM-Sans.txt` and `resources/fonts/OFL-Syne.txt`.

== Changelog ==

= 1.0.2 =

Added:
* Setup wizard: connect your shop, save listing defaults read from it, and choose whether to receive service notices.
* Publish WooCommerce products as Etsy listings: physical, digital, or both, with variations, images, videos, and digital files.
* Listing profiles with Etsy category, shipping, processing, and return policy settings.
* Shop page for managing sections, shipping profiles, processing profiles, and return policies.
* Price and stock sync on product save and on a background schedule.
* Sales sync: WooCommerce stock is reduced when an item sells on Etsy and restored if the sale is canceled.

== Upgrade Notice ==

= 1.0.2 =
First public release of LystoSync for Etsy.
