=== DineSync for Clover: changelog ===

The full history of every release. The readme's own Changelog section keeps the latest three.

== Changelog ==

= 1.0.14 =

Stock on your Clover POS:

* Fixed: a website sale of an item tracked on both sides came off your Clover count twice. DineSync now sends nothing to Clover for a sale, because Clover takes each linked item off its own count when the order is paid there, online at checkout or at the counter for a cash order.
* New: canceling an order, or refunding it with "Restock refunded items", puts its stock back on Clover, once, and only the units Clover actually counted. An order Clover never took a payment for has nothing put back, because Clover never took it off.
* New: a Failed or trashed order has its stock put back the same way, and a canceled order you move back to Processing has those units taken off Clover again.
* New: moving a paid order to Pending payment to edit it changes nothing on Clover. Clover is settled only if the order is then canceled or fails.
* New: the order's DineSync panel has a Stock line saying what was put back, why nothing was, or what to correct by hand. If DineSync cannot tell whether Clover counted the order, or Clover's count changed while stock was being put back, it writes nothing and says so there.
* Fixed: a dish with portions left could be sent to your till as zero, and then stop syncing altogether. WooCommerce marks a product out of stock at any quantity at or below your **Out of stock threshold**, and DineSync read that as "none left"; your real count is sent now, right down to zero.
* Fixed: a product sold out at zero could leave its old count on your till. It now sends 0, while a dish on backorder keeps its count.
* Fixed: a product that tracks stock, whose Clover item did not, was never synced at all. The first save now starts the stock record on Clover at your quantity and names it in the sync log.
* Fixed: after **Map Clover Items** or **Choose**, the first stock change wrote WooCommerce's whole count over your till's, so with 3 on your till and 50 in WooCommerce, one website order sent 49. A product that was not tracking stock when it was linked also ignored every later change.
* Changed: after Map or Choose, each stock change you make is applied to the count your till already holds, until the two counts agree. If it cannot read your till it sends nothing and says so.
* Changed: the sync log says what a stock change moved and where your till ended, where it used to say "+0". A sale's line says it moved with the order and that nothing was sent.
* Fixed: saving a product that tracks stock sent a request to Clover every time, through a field Clover treats as out of date. Stock now has its own update, sent only when the Stock toggle is on and the count has changed.

Known limits for stock:

* A void or refund made on your Clover device is not seen by DineSync, and Clover does not restock for it either, so correct both counts by hand.
* Items that reached Clover without their link, items added with Send missing items, and order lines you edit after the order reached Clover are not counted or put back by DineSync. Correct those counts on Clover by hand.
* Changing a product's stock in WooCommerce sends your number to Clover over any in-store sales since your last import. That includes a cash order still waiting to be paid at the counter, which leaves Clover one short once it is paid.
* Product variations are not linked to Clover, so their stock is never changed there.
* If Clover cannot be read, or refuses a put-back, it is tried again only when that order's stock or status next changes. Otherwise the order's panel tells you to correct the count by hand.

Your orders:

* Fixed: when Clover's reply to a new order was lost, a retry could put a second copy of the order on your till. Every Clover order now carries a reference, and a retry looks for it and uses the order Clover already has.
* Fixed: two requests arriving at once could both send the same order, and a crash part-way through a send left the order stuck with no Retry button. Only one send can run now, and an order stuck for five minutes is marked Failed with a note to check Clover before sending it again.
* Fixed: an order Clover already holds could be sent again by a status change or a retry. It never is now, and Sync to Clover on such an order says so, pointing a partly synced order at Send missing items.
* Fixed: an order Clover could not fire to the kitchen was still marked Synced. It is now marked Failed, with a note to fire it in Clover, and no payment is recorded.
* Fixed: an order where no food reached Clover was still fired and paid. It is now marked Failed, and the order says nothing reached the kitchen.
* Fixed: a canceled, refunded, failed or trashed order could still be sent by a retry. It never is now, and the order says why.
* Fixed: the Clover ticket said "Paid via" even for an order that was not paid yet. It now says "To pay" until the payment is taken online, and "Refunded" after a full refund.
* New: an order with no payment method, such as one you enter yourself, is sent once it is On hold, Processing or Completed, with no payment recorded on Clover.
* Changed: editing the lines of an order that already reached Clover does not change the Clover ticket, and the order's panel now tells you to update it there by hand. An order canceled on Clover and then reopened in WooCommerce is not reopened on Clover, and says so.
* Fixed: a paid modifier canceled a product's sale price, so a dish on sale at 8.00 with a 2.00 extra charged 12.00 instead of 10.00. The extra is now added to the price the customer is actually charged, on your storefront and on the Clover line.
* Fixed: a discount entered on the order rather than by coupon reached Clover at full price, so the ticket came to more than the sale. A discount now reaches Clover as a discount on the order, named after the coupon where there is one, so the receipt and Clover's reports match what the customer paid.
* Fixed: on a discounted order where part of it had not reached Clover, **Send missing items** sent the food without its discount and the order was marked Synced anyway. The repair now sends the discount with the food, and an order is not marked Synced while any line is still missing.
* Fixed: a paid order's Clover receipt showed no order reference. The payment now carries the same reference as its Clover order.
* Fixed: emoji and other characters Clover cannot print came out as "?" on the ticket, and line breaks in a note ran words together. Accented letters are converted rather than dropped, so "Café Latte" stays readable, and a name in a script Clover cannot print is kept rather than sent blank.
* Fixed: the note sent to Clover did not say whether an order was a Pickup or a Delivery on an ordinary WooCommerce shop. It now works that out from the shipping method, including the block checkout's pickup, and shows the customer's address only on a delivery.
* Changed: each line's price is checked against what Clover recorded. A line Clover will not price as sent is sent again in a form Clover always accepts, and where Clover accepts a different price the log names both prices.
* Fixed: an order waiting for payment was logged as though it had failed, sometimes several times for one checkout. Only a refusal that will not clear on its own is logged now, with statuses named the way WooCommerce names them.
* Changed: the sync log no longer keeps Clover's copy of an order, with the customer's name, phone and address, each time the order's status changes.

Your Clover links:

* Fixed: importing or mapping could move a product's Clover link to a different item, and a name matching more than one item was settled by guessing. A link is never moved automatically now, and a clash is left alone and named in the sync log.
* Fixed: a push whose reply did not name the Clover item erased the product's link, and Clear item mappings left behind the record of what Clover last held. A link is now written only when Clover names the item, and clearing links clears that record with it.
* Fixed: a Clover item could be linked to a product variation, which was then renamed and repriced while nothing could show or remove the link. Only products are matched now.
* Fixed: an import renamed and repriced a product before checking whether that Clover item already belonged to a different product. It checks first now and leaves the product alone.
* Fixed: editing a product that was not linked to Clover created a new item there, and one save could push a product more than once. Saving now updates only an item the product is already linked to, once; new items are created only by Push to Clover or Full Sync.
* Fixed: a product in the Trash was not always recognized, so importing could bring it back as a new published product. Matching now compares titles exactly, and works after Clean & Re-Sync has cleared every link.
* New: a Clover link column on the Products list shows each product's Clover item or "Not linked". **Choose** picks the right item when a name matches more than one, and **Unlink** clears a link without touching Clover.

Your categories:

* Fixed: every import renamed your product categories to Clover's names and changed their web addresses, so a category you had renamed went back and links to it broke. Names change only when they genuinely differ, web addresses are left alone, and a rename is logged with both names.
* Fixed: a category name containing "&" or an apostrophe was renamed on every import and could be created a second time on Clover. Both sides now compare the name as you typed it.
* Fixed: if DineSync could not read your Clover categories it created a second category with a name you already had. It now leaves categories alone for that run and says why.
* Fixed: a push could remove category assignments on your Clover POS that DineSync never made, such as a kitchen-printer group. Only assignments DineSync added are ever removed.
* Fixed: saving a product could send its categories to Clover when only its stock had changed. Categories are sent only when you change them, including on the first save after Map or Choose, and the log names each one added or removed.

Your settings:

* Changed: Fields to Sync is now called Fields pushed to Clover, because that is what it governs. An import writes what Clover holds whichever boxes are ticked, except Stock and Modifiers, and the screen now says so.
* Fixed: Enable Sync and Sync Direction did not hold, so with direction set to WooCommerce to Clover only, automatic syncing still pulled your Clover menu over your shop. Both settings now govern everything that runs on its own, while the buttons under Inventory Actions say first when a setting points the other way.

On your screens:

* Fixed: names coming from your Clover POS could run web code in your browser on Sync Logs and Settings. Everything from Clover is now shown as plain text.
* Changed: the hosted "connect with one click" option has been removed, with the middleware behind it; it needed a Clover app that was never published, so no store used it. Connections made with a Merchant ID and API token are untouched, and DineSync now contacts nothing but Clover itself.
* Changed: every inventory action now asks before it runs, and says what it adds and where. Clean & Re-Sync is marked as the one that destroys something, and its confirmation names the product fields its re-import will overwrite.
* Fixed: Clean & Re-Sync cleared every link before reading Clover, so a busy or unreachable Clover left your shop with no links at all. It now reads Clover first and changes nothing if it cannot.
* Fixed: Full Sync reported success even when its push step had failed. It now says which step stopped and what did finish.
* Fixed: the Products list's Send action said a product had been sent to Clover when nothing was sent. It now says what actually happened and points at Push to Clover.
* Changed: the push summary and the list of products Map could not link now appear on screen as well as in the sync log. The push summary also counts the whole run, not only the last batch of thirty.
* Changed: the stock repair notice also counts damaged products that are not linked to Clover, and points you at Map Clover Items. Those are reported rather than repaired, because without a link there is no way to ask Clover what they should hold.
* Changed: notices about your product links appear only on DineSync's screens, the Products list and the product editor.
* Fixed: after an update, your admin screens could keep the previous version's stylesheet and script until you emptied your browser cache. They now change when the files do.
* Changed: Synced Products on the Dashboard no longer counts products in the Trash, and every screen and log line now says Clover, or your Clover POS.
* New: a description of DineSync Pro on the Dashboard, under Inventory Actions. It can be dismissed, appears on DineSync's own screens only, and is absent when Pro is installed.

= 1.0.13 =
* Fixed: importing your Clover menu could create a second copy of a product you had put in the Trash. The import only ever looked at products that were on your shop, so anything in the Trash was invisible to it — the till item looked new, a fresh product was made, and you ended up with two products claiming the same till item. The import now recognises a trashed product and leaves the item alone, saying so in the sync log and naming the product. Nothing is taken out of the Trash: if you want one back on your menu, restore it yourself and import again.
* Fixed: the Clean & Re-Sync confirmation only told you what it was about to remove. It now says how many products' Clover links will be cleared, and that your products, orders and customers are not affected and nothing is sent to Clover — which is the half you actually need before pressing it.
* For developers: the automatic push that runs when a product is saved now asks the `dinesync_should_push_product` filter first, as the bulk push already did. It is also told whether it is answering a save or a bulk push. This is what lets DineSync for Clover Pro stop a product that is still waiting for review in Menu Staging from reaching your till when you open it in the product editor and save it.

= 1.0.12 =
* Sync log entries that count something now say how many were attempted as well as how many succeeded — “cleared 2 of 2” rather than “cleared 2”. A bare count gives you nothing to check it against.
* Tested with WooCommerce 11.1.
* For developers: a new `dinesync_should_import_item` filter lets other code keep a Clover item out of an import. DineSync for Clover Pro uses it in Menu Staging so that a till item linked to a product you have put in your bin is left alone instead of being brought in again as a second copy. On the free plugin by itself, importing such an item still creates a new product — the filter is the hook that makes leaving it alone possible, not a change to what the free import does on its own.

= 1.0.11 =
* Fixed: **1.0.10 could fail partway through an import if any item on your till is priced at zero.** The import stopped at the first free item with an error, so some of your menu was brought in and the rest was not. Items priced at zero are common — a till function, a gift card, a delivery charge, a “price on the day” dish.
* **If you imported while on 1.0.10, check your menu.** You may have a partly imported catalogue: some products present, others missing, and no message to say so. Running Import from Clover again on this version will bring in whatever did not arrive the first time.
* Added an extension point so the paid add-on can import new products as drafts for review instead of publishing them straight to your shop. On its own this release changes nothing: with the add-on inactive, importing behaves exactly as it did before.

= 1.0.10 =
* Fixed: **Clean & Re-Sync could break the link between your orders and Clover.** On stores that keep orders in the older WordPress posts storage rather than WooCommerce's high-performance order tables, resetting your product mappings also erased every order's record of which Clover order it became. With that record gone, a retry could send the same sale to Clover a second time, and Clover does not allow either copy to be deleted once a payment is attached. Clean & Re-Sync now clears product records only, and cannot reach an order.
* Clean & Re-Sync now also clears each product's stored copy of its last known Clover values, which it previously left behind. A leftover copy described a link that had just been removed, which could make a later save believe it knew what Clover held when it did not.
* Fixed: **an import did not link the products it matched.** Importing recorded a Clover link for products it created, but not for products it found and updated — so Clean & Re-Sync, which clears the links and imports again, finished with no links at all. Every product an import matches is now linked, and the Clover account it was matched against is recorded with it.
* Fixed: **after an import, saving a product sent every field to Clover instead of only what changed.** An import did not record what it had just read from Clover, so the next save had nothing to compare against and sent the lot — including category assignments. Imports now record what they read.
* Clean & Re-Sync reports how many product records it cleared, and says that orders were not touched.

= 1.0.9 =
* Fixed: orders could reach your kitchen with a total and no food on them. If your product links were made while connected to one Clover account and you later connected to another - switching from Sandbox to Production is the usual way - every line referred to an item that account does not have, and Clover refused each one while keeping the order.
* A line whose Clover item link is no longer valid is now sent by name instead, so the food still reaches the kitchen, and the dead link is removed.
* DineSync now records which Clover account each product link was made against, and tells you when the account you are connected to no longer matches, with a button to clear the affected links.
* On first run, DineSync records which Clover account your existing product links belong to, assuming the account you are connected to now, and tells you once. "Check my links" tests a few of them against Clover and reports whether they resolve, so you can find out rather than guess.
* An order where some items did not reach Clover is now marked "Partly synced" rather than synced. The order screen shows how many items arrived, which ones did not and why, and offers to send the missing ones to the Clover order that already exists - never a second order.

= 1.0.8 =
* Fixed: an order that was not paid could still be sent to Clover and printed in the kitchen, and Clover could be told a payment had been taken. A card that the gateway declined was treated as paid, because the plugin asked whether the payment method was Cash on delivery rather than whether the order was paid. It now asks whether the order is paid, which covers every gateway.
* Orders paid by card are sent when the payment completes, not when the checkout form is submitted. An order that pays a minute later - 3-D Secure, a redirect, a bank confirmation - is sent at that moment instead.
* Cash on delivery, Direct bank transfer and Cheque orders still reach the kitchen as soon as you accept them, and no payment is recorded in Clover for them, because none has been taken. Direct bank transfer and Cheque were previously recorded as paid.
* An order that is held back now says so in the sync log, with the reason.

= 1.0.7 =
* Fixed: stock. If an item tracks stock in Clover, importing it could set that product to zero in WooCommerce and take it off sale, and saving the product afterwards could then write that zero back into Clover. Clover reports the real count in a different field from the one the plugin read; it now reads the right one. (This entry also promised DineSync would “never send Clover a stock number it has not first confirmed”. That was not true of every case until 1.0.14 — see the stock fixes in that release.)
* Fixed: Fields to Sync could not be saved. Unticking a field had no effect, and every save switched all eight back on. Present since 1.0.1.1.
* The Stock setting now governs imports as well, which it did not before.
* Added a one-time check for products an earlier version may have set out of stock. If any are found, DineSync says how many and offers to compare each one with Clover and put back the count Clover holds. Nothing changes unless you press the button, and every change is written to the sync log with the old and new value.

= 1.0.6 =
* Fixed a crash when saving a product. With WooCommerce to Clover sync turned on, saving a product could end on "There has been a critical error on this website". The change had already reached Clover, but the page failed. The Sync to Clover link on the Products list failed the same way. Earlier versions are affected, and updating is recommended.
* The sync direction setting no longer offers "Two-way Sync", which read as a promise that both directions happen live. They do not: WooCommerce to Clover happens on its own when you save a product, and Clover to WooCommerce happens when you run Import from Clover. The setting now says so.
* Fixed: admin buttons could be left disabled for ever if a request never came back. Every action in the admin now has a time limit and gives the button back whether it succeeds, fails or times out.
* Added Upgrade to Pro in three places: an item in the DineSync menu, a link in DineSync's own row on the Plugins screen, and a card on the DineSync dashboard. The card can be dismissed permanently. All three disappear if you have the Pro add-on.
* When an admin action fails, the message now says why: no response in time (and that the work may still have finished, so check Sync Logs before retrying), the HTTP error the server returned, no response at all, or a reply that could not be read. Most used to say only that the request failed, and Disconnect said nothing at all.
* Clicking Disconnect a second time, before the page had reloaded, no longer logs a second disconnection.

= 1.0.4 =
* WooCommerce is now declared as a required plugin, so WordPress will not let DineSync activate without it instead of activating into a state where nothing works.
* Fixed: an order that failed once and then synced successfully kept its old error details, so it still looked broken to anything reading it.
* Fixed: importing from Clover could trigger a push straight back to Clover for each imported item.
* Add-ons can now show what they are in the DineSync header, and be told when a push is starting, instead of reaching into the page to do it.

= 1.0.3 =
* Fixed: modifiers now arrive on your Clover ticket attached to the item they belong to, instead of as a confusing extra line. The line items on a Clover order now add up to the order total exactly, including on orders with a quantity of more than one.
* Fixed: pushing products to Clover no longer creates a second copy of an item that is already there. DineSync now matches on SKU, then on an exact name, before creating anything new.
* Fixed: **Map Clover Items** now works on a real menu. It runs in batches with progress, and if something does go wrong it tells you what happened instead of failing silently.
* Fixed: disconnecting now clears the order and import counters, so a new connection starts from zero instead of showing the previous store's numbers. Your product links to Clover are kept — if you connect to a different Clover merchant, DineSync tells you how many products are affected and lets you decide.
* Fixed: modifier groups that allow any number of choices no longer show up as a single-choice list with the first option already ticked.
* Changed: sync is now switched ON by default when you connect, and auto-print is OFF by default. Existing settings are untouched — this only affects new installs.
* Added: a setup checklist on the DineSync dashboard that walks a new store from installing WooCommerce to a first test order, with the connection form built in.
* Added: a connection health strip showing which merchant you are connected to, which environment, whether sync is on, and when the last order went across.
* Fixed: reconnecting to Clover now switches order sync back on. Previously, disconnecting left sync off and reconnecting did not turn it back on, so orders were quietly skipped. If sync is ever off while you are connected, the dashboard now says so plainly and offers a single button to turn it back on, and every skipped order is written to the sync log.
* Added: a **Sync to Clover** link on each row of the Products list, for pushing one product without opening it.
* Added: extension points so future add-ons can plug in without modifying the plugin.

= 1.0.2 =
* Fixed: DineSync now reports its correct version number on the dashboard and in WordPress.
* Improved: connecting to Clover is one clear step. Enter your Merchant ID and API token — the second, confusing connection option has been removed from the setup screen.
* Improved: when a connection attempt is refused, DineSync now tells you what to check — whether the token was copied in full, whether it belongs to that Merchant ID, and whether Sandbox or Production is selected — instead of showing a bare error code.
* Improved: the Merchant ID and API token fields no longer trigger browser autofill, which could quietly drop an email address into the Merchant ID box.
* Improved: setup help now points to the Clover Dashboard, where your Merchant ID and API tokens actually live.
* Changed: this page now sets out the sync directions precisely. Orders and product changes travel from WooCommerce to Clover as they happen, and your Clover menu comes into WooCommerce whenever you run **Import from Clover**. Syncing behaves exactly as it did in 1.0.1 — this is a documentation update, not a change to how DineSync works.

= 1.0.1 =
* Fixed: order item quantities greater than 1 now sync to Clover correctly. Previously, multi-quantity items were recorded as a single unit, causing incorrect kitchen tickets and understated Clover order totals.

= 1.0.0 =
* Initial release
* Order sync from WooCommerce to Clover POS with payment recording
* Auto-print to a Clover kitchen printer
* Order status sync from WooCommerce to Clover (completed / cancelled / refunded)
* Duplicate order prevention — each order is claimed in the database before it is sent, and the claim is released only once the send has finished
* Product push to Clover with diff-based updates — only changed fields sent
* Auto-create Clover items for new WooCommerce products
* Category creation on Clover when pushing products
* Description sync (WooCommerce short description to Clover alternateName)
* Availability sync (a product that is out of stock and does not track stock quantity is marked unavailable on Clover)
* Menu import from Clover — items, categories, prices, stock and modifier groups
* Modifier groups with a built-in storefront renderer
* Adapter support for WooFood and WC Product Add-Ons
* Map existing products to Clover items by SKU or exact name. A name shared by more than one Clover item, or more than one product, links neither and is reported so you can fix it
* Per-field sync toggles and configurable sync direction
* Bulk import and push with batched processing
* Clean & Re-Sync clears every Clover link and imports your menu again. To clear one product's link without importing, use **Unlink** on the Products list
* Activity log with detailed sync history
* HPOS compatible (WooCommerce High-Performance Order Storage)
* Works with both classic and block-based WooCommerce checkout
