=== Webkoding Stock Sync for Square ===
Contributors: webkoding
Plugin URI: https://webkodingtheme.com/plugins/synclane
Tags: square, woocommerce, inventory, stock, pos
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Applies Square stock to WooCommerce, matched by permanent Square id rather than by product name — so a second sync updates instead of duplicating.

== Description ==

You sell over the counter with Square and online with WooCommerce, and the website goes on
offering something that walked out of the shop an hour ago. This plugin fixes that one
thing: it reads stock from Square and applies it to WooCommerce.

= Matched by id, not by name =

Most Square connectors match products by title. Rename something, run the sync from a
second machine, or let two runs overlap, and you get a second copy of your catalogue. If
you have watched that happen, you already know why this plugin keeps its own mapping
table: one row per product and variation, holding the WooCommerce id, the permanent Square
id, the object version and the SKU. Every write goes through the stored id, so running the
sync twice updates the same items rather than creating new ones.

= What it does =

* Reads your Square catalogue and matches it to WooCommerce products, adopting ones that
  already exist on both sides by SKU rather than creating duplicates of them
* Applies Square stock levels to WooCommerce, including variations
* Turns on WooCommerce stock management for a product when Square has a count for it,
  because a quantity written to a product that ignores quantities is a quantity nobody
  ever sees
* Reconciles on a schedule, so a run that failed halfway heals on the next one instead of
  drifting further
* An activity log of what changed and when, so a stock number that looks wrong can be
  traced to the run that set it
* HPOS-compatible

= What it does not do =

It does not write to Square. Nothing here is stubbed, time-limited or waiting for a key —
reading Square and applying it to WooCommerce is the whole job this plugin does, and it
does all of it. Writing the other way is a genuinely different problem: it has to decide
what happens when both sides changed since the last run, and a mistake puts a wrong price
on a real till.

If you need that direction as well, a separate paid add-on handles it. It is not required
here and nothing in this plugin advertises it:
https://webkodingtheme.com/plugins/synclane

= No account with us, no third party =

The plugin talks to Square and to your own site. It does not call any server of ours, and
it collects nothing.

== Installation ==

1. Install and activate the plugin.
2. Go to **Stock Sync** in the admin menu and connect your Square account.
3. Choose your Square location, then run the first sync.

The first run adopts products that already exist on both sides by SKU. Nothing is deleted.

== Frequently Asked Questions ==

= Will this create duplicates of my products? =

That is the specific thing it is built not to do. Matching is by the permanent Square
object id held in a mapping table, never by the product name, so renaming a product or
running the sync twice updates the same record.

= Does it work with variations? =

Yes. Variations are mapped individually, because on the Square side the variation is the
record that carries the stock.

= Do I need a WooCommerce Square payment gateway? =

No, and this plugin does not provide one. It is only concerned with stock.

= Can I sync from WooCommerce to Square instead? =

Not with this plugin — see "What it does not do" above.

== Screenshots ==

1. The dashboard: how many products and variations are mapped, and when the last sync ran.
2. Settings: the connected Square account and location, and the one option this plugin has — whether Square stock is applied to WooCommerce.
3. The activity log — every run, with what it changed.

== Changelog ==

= 1.0.1 =
* The plugin's own screens now say what the paid add-on does, once, instead of leaving it only in this readme.

= 1.0.0 =
* First release on WordPress.org.
