=== WCPOS - Point of Sale (POS) plugin for WooCommerce ===
Contributors: kilbot
Tags: ecommerce, point-of-sale, pos, inventory, woocommerce
Requires at least: 5.6
Tested up to: 7.0
Stable tag: 1.9.6
License: GPL-3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

WCPOS is a simple application for taking orders at the Point of Sale (POS) using your WooCommerce store.

== Description ==

WCPOS (formerly WooCommerce POS) is a simple application for taking orders at the Point of Sale using your [WooCommerce](https://www.woocommerce.com/) store. _It's great for phone orders too!_

> 🕒 Install and start taking orders in less than 2 minutes.

= 🎥 DEMO =
You can see a demo of the WCPOS plugin in action by going to [demo.wcpos.com/pos](https://demo.wcpos.com/pos) with 🔑`login/pass` : `demo/demo`

**Desktop Apps:**
⬇️ [Windows](https://updates.wcpos.com/electron/download/win32-x64)
⬇️ [Mac (Intel)](https://updates.wcpos.com/electron/download/darwin-x64)
⬇️ [Mac (Apple Silicon)](https://updates.wcpos.com/electron/download/darwin-arm64)

**Mobile Apps (Beta):**
📱 [iOS (TestFlight)](https://testflight.apple.com/join/JGBdVRrW)
📱 [Android (Google Play)](https://play.google.com/apps/testing/com.wcpos.main)

= ✨ FEATURES =
* **Cross-platform:** Accessible via browser, desktop, iOS & Android _(mobile apps in beta)_
* **Offline Storage:** Fast product search and order processing
* **Flexible Cart:** Add products not listed in WooCommerce
* **Barcode Support:** Scan products directly into the cart
* **Receipt Templates:** Pick from a built-in gallery — receipts, invoices, quotes, packing slips, gift receipts, kitchen tickets — or design your own
* **Thermal Printing:** Print directly to 58mm and 80mm thermal printers over network, Bluetooth, or USB
* **Customer Tax IDs:** Built-in field for VAT, ABN, GST, and other regional tax numbers
* **Multilingual:** Available in most major languages
* **Built-in Support:** Access live chat for instant help

= 🔓 PRO FEATURES =
* **Stock Management:** quickly adjust stock levels, pricing and more
* **Order Management:** re-open and print receipts for older orders
* **Customer Management:** create new customers and edit customer details
* **Payment Gateways:** use any gateway for checkout
* **Coupons:** apply coupons at the POS with search, coupon pills, and sequential discounts
* **Refunds:** refund POS orders directly from the till
* **End of Day Reports:** summarise daily sales, transactions, and cash flow for reconciliation
* **Stores:** Manage locations with unique tax settings, pricing and receipts
* **Priority [Discord support](https://wcpos.com/discord):** one-on-one support via private chat

*Discover all PRO features at [wcpos.com/pro](https://wcpos.com/pro)*

= 📋 REQUIREMENTS =
* WordPress >= 5.6
* WooCommerce >= 5.3
* PHP >= 7.4

== Installation ==

= Automatic installation =
1. Go to Plugins screen and select Add New.
2. Search for "WCPOS" in the WordPress Plugin Directory.
3. Install the plugin
4. Click Activate Plugin to activate it.

= Pro installation =
If you have purchased a license for [WCPOS Pro](http://wcpos.com/pro) please follow the steps below to install and activate the plugin:

1. Go to: http://wcpos.com/my-account/
2. Under My Downloads, click the download link and save the plugin to your desktop.
3. Then go to your site, login and go to the Add New Plugin page, eg: http://<yourstore.com>/wp-admin/plugin-install.php?tab=upload
4. Upload the plugin zip file from your desktop and activate.
5. Next, go to the POS Settings page and enter your License Key and License Email to complete the activation.

= Manual installation =
To install a WordPress Plugin manually:

1. Download the WCPOS plugin to your desktop.
2. If downloaded as a zip archive, extract the Plugin folder to your desktop.
3. With your FTP program, upload the Plugin folder to the wp-content/plugins folder in your WordPress directory online.
4. Go to Plugins screen and find the newly uploaded Plugin in the list.
5. Click Activate Plugin to activate it.

== Frequently Asked Questions ==

= Where can I find more information on WCPOS? =
There is more information on our website at [https://wcpos.com](https://wcpos.com).

* FAQ - https://wcpos.com/faq
* Documentation - https://wcpos.com/docs
* Blog - https://wcpos.com/blog

== Screenshots ==

1. WCPOS main screen

== Privacy ==

WooCommerce POS stores a random identifier (a UUID, option name `wcpos_anon_id`) on your site. It contains no information about your store and is not derived from your site address. It is used only on this plugin's own admin welcome screen to keep the page's self-hosted, first-party analytics consistent between visits (no data is sold or shared; analytics are processed on wcpos.com infrastructure). The identifier:

* is generated locally by WordPress (`wp_generate_uuid4()`),
* is deleted when you uninstall the plugin,
* can be rotated or removed at any time with WP-CLI: `wp wcpos anon-id rotate` / `wp wcpos anon-id delete`.

Detailed store information (product counts, order counts, WooCommerce version) is sent only if you explicitly opt in via the tracking-consent prompt, and you can withdraw consent at any time in POS settings.

== Changelog ==

= 1.9.6 - 2026/06/17 =
- **Cash drawer support** -- open a connected cash drawer automatically after payment or on demand with a new Open Drawer button. Choose a drawer connector per printer, with support for thermal/ESC-POS printers, Epson, PrintNode, and cloud/remote print jobs.
- **Fixed an analytics event firing too often** -- the upgrade prompt "viewed" event no longer fires on every admin page load.
- **Updated translations.**

= 1.9.5 - 2026/06/15 =
- **Fixed a payment gateways API crash** -- the POS payment-gateways endpoint no longer initialises every gateway's admin settings, which could cause a fatal error (HTTP 500) on stores using certain third-party payment gateways (e.g. ToyyibPay) that only register their settings in the WordPress admin.

= 1.9.4 - 2026/06/13 =
- **Redesigned Bluetooth printer setup** -- a managed Bluetooth chooser with connection timeouts, paired-device discovery on macOS and Linux, clearer scan feedback, and guidance to add a printer manually when none are found.
- **Added serial printing** -- OS-paired Bluetooth Classic printers can now print over a serial connection.
- **Improved Windows printing** -- raw printing routes through the Windows print spooler, with a dedicated installed-printers section for Windows.
- **Improved USB printer flow** -- the USB printer list loads automatically when you open the tab, and the Scan button becomes Refresh.
- **Clearer network printer scans** -- empty network scans now explain how to add a printer by manual IP entry, and a crash when closing network printer connections was fixed.
- **Improved PDF receipts for legacy templates** -- the legacy receipt template renders through the PDF preprocessor with inline layout styles so downloaded PDFs match previews, and the receipt logo uses the correct image type.
- **Fixed template syncing** -- stopped an infinite sync loop affecting receipt templates.
- **Added an anonymous analytics identifier** -- a random, consent-gated identifier (`wcpos_anon_id`) used only on the plugin's admin welcome screen to keep its first-party analytics consistent; it contains no store data, can be rotated or removed via WP-CLI, and is deleted on uninstall (see the Privacy section).
- **Updated translations** -- latest POT and translation metadata through 2026.6.4.

= 1.9.3 - 2026/06/12 =
- **Improved web printer setup** -- network printer scans now explain browser limitations, show structured connection diagnostics, and give protocol-aware error guidance for web printing.
- **Added Local Network Access support** -- web print requests and printer probes opt into Chrome's Local Network Access permission so printers on your LAN keep working in newer browsers.
- **Fixed Star WebPRNT connections** -- the print protocol is now derived from the printer port instead of the page origin, and scanned printer ports are preserved when switching vendors.
- **Improved product sorting settings** -- expanded sort options with a more compact sort settings row in POS product settings.
- **Fixed stale variation images** -- product variations no longer briefly show a previous variation's image.
- **Fixed receipt tax breakdown** -- client-rendered receipts keep the tax breakdown, and the tax summary stays hidden when taxes are hidden.
- **Fixed PDF receipt rendering** -- receipt markup rewritten for Dompdf so downloaded PDFs match previews, with fixed image and column rendering and aligned status-chip dots.
- **Fixed order date syncing** -- bare GMT order creation dates are accepted and legacy order date validation retries, fixing failed order syncs for some stores.
- **Added WooCommerce 10.9 compatibility** -- accepts the new variation gallery field in the WooCommerce 10.9 REST API.
- **Updated translations** -- includes the latest POT and translation metadata through 2026.6.2.

= 1.9.2 - 2026/06/09 =
- **Added Star Online cloud printing support** -- connect Star Online printers, fetch registered devices, validate printer settings, and submit cloud print jobs from WCPOS.
- **Redesigned printer settings** -- refreshed the printer setup screens with shared tabs, clearer printer profile fields, improved select styling, and better vendor/provider handling.
- **Improved responsive controls** -- tabs can collapse into a select control on smaller screens, and native comboboxes scroll and search more reliably on Android and other native layouts.
- **Improved printer discovery UI** -- network scans show progress, collapse candidate printer lists, and keep web network scanning focused on the Add Printer flow.
- **Added product sorting controls** -- POS product grid and list views now support Sort By controls and Meta Data Key selection for custom catalog ordering.
- **Improved cloud print setup** -- the Add Printer wizard no longer pre-selects a provider, shows clearer Star Online permission messages, and supports explicit encoding settings.
- **Added server-side PDF receipt downloads** -- receipt PDFs now use native WP Overnight PDF bytes where available and render flex/grid layouts and barcodes more reliably.
- **Fixed cloud printer access** -- POS clients can read configured cloud printers without requiring broader admin permissions.
- **Fixed blank template titles** -- POS templates now get fallback names when the saved title is empty.
- **Updated translations** -- includes the latest POT and translation metadata through 2026.6.0.

= 1.9.1 - 2026/05/19 =
- **Improved session recovery** -- expired POS sessions now refresh or ask for login correctly, while real permission errors no longer look like login problems.
- **Fixed theme display issues** -- web navigation backgrounds now update correctly after changing themes.
- **Fixed printer setup navigation** -- printer vendor tabs now respond correctly after the 1.9.0 printer flow changes.
- **Updated translations** -- includes the latest translation metadata for improved app language support.

= 1.9.0 - 2026/05/15 =
Almost three months of work — here are the highlights:

- **New receipt template gallery** — pick from ready-made receipt, invoice, quote, packing slip, gift receipt, kitchen ticket, and right-to-left templates, and switch between them in settings.
- **Multiple receipt templates** — install and enable several templates side by side instead of being stuck with one.
- **Thermal printer support** — print receipts directly to thermal printers (58mm and 80mm) over network, Bluetooth, or USB, with a guided setup wizard in the WCPOS apps.
- **Customer Tax IDs** — a new Tax ID field on the customer form, ready for VAT, ABN, GST, and other regional tax numbers.
- **Pro: Coupons at the POS** — search for and apply coupons at checkout, with coupon pills in the cart and support for sequential discounts.
- **Pro: Refunds at the POS** — refund POS orders directly from the till, with a full audit trail.
- **Pro: Per-store receipt templates** — assign different templates to different stores, and drag-and-drop to reorder them.
- Plus lots of smaller fixes — tax and coupon calculations, third-party plugin compatibility, faster syncs, and better translations.

= 1.8.14 - 2026/02/19 =
- **Hardened DB migration locking** — upgrade now uses the WordPress core upgrader lock (`WP_Upgrading`) with an atomic acquisition check and a shutdown fallback, preventing concurrent migrations on high-traffic sites ([#540](https://github.com/wcpos/woocommerce-pos/pull/540))
- **Fixed offline gateway ignoring POS checkout status** — orders placed with the Cash or Card gateway while offline now respect the configured POS checkout status instead of defaulting to "processing" ([#544](https://github.com/wcpos/woocommerce-pos/pull/544))
- **Fixed i18n locale fallback and caching** — translation lookups no longer retry locales that returned a definitive 404, reducing unnecessary network requests on every page load ([#543](https://github.com/wcpos/woocommerce-pos/pull/543))
- **Fixed settings page clipping on some WordPress themes** — the left side of the settings panel was being cut off on sites where `#wpcontent` has extra padding ([#545](https://github.com/wcpos/woocommerce-pos/pull/545))
- **Reduced extensions catalog cache TTL** — the extension directory now refreshes every hour instead of daily, so newly published extensions appear faster ([#546](https://github.com/wcpos/woocommerce-pos/pull/546))
- **Allowed php-jwt advisory on PHP 7.4** — resolved a PHP Scoper install failure caused by a security advisory that only affects newer PHP versions ([#541](https://github.com/wcpos/woocommerce-pos/pull/541))

= 1.8.13 - 2026/02/17 =
- **Fixed root cause of duplicate product metadata** — POS order processing no longer clones product objects in the stock/coupon path, preventing repeated meta rows from being re-saved on each stock update ([#537](https://github.com/wcpos/woocommerce-pos/pull/537))
- **Added a safer duplicate-meta repair migration** — a new one-time cleanup removes only exact duplicate `(post_id, meta_key, meta_value)` rows for POS-touched products/variations, reducing API payload size and memory pressure without deleting distinct meta values ([#537](https://github.com/wcpos/woocommerce-pos/pull/537))
- **Expanded regression coverage for discount and stock edge cases** — added tests for coupon recalculation behavior, variation pricing paths, and stock-reduction lifecycle to prevent regressions ([#537](https://github.com/wcpos/woocommerce-pos/pull/537))
- **Reduced diagnostic log noise** — high-volume top-meta-key context is now opt-in so normal logs stay readable while deep diagnostics remain available when needed ([#537](https://github.com/wcpos/woocommerce-pos/pull/537))

= 1.8.12 - 2026/02/13 =
- **One-time cleanup of duplicate metadata** — a migration automatically removes thousands of junk meta rows that accumulated on POS-touched products and orders, resolving memory exhaustion and slow API responses on affected stores ([#532](https://github.com/wcpos/woocommerce-pos/pull/532))
- **Reduced redundant order saves in payment gateways** — Card and Cash gateways no longer call `$order->save()` before `payment_complete()` / `update_status()`, which already save internally ([#532](https://github.com/wcpos/woocommerce-pos/pull/532))

= 1.8.11 - 2026/02/13 =
- **Fixed critical memory exhaustion on large stores** — API responses were re-reading all metadata from the database on every request, causing extreme memory usage on stores with large catalogs ([#519](https://github.com/wcpos/woocommerce-pos/pull/519))
- **Fixed O(n²) loop in order tax calculation** — variable shadowing caused quadratic iteration over line item meta ([#519](https://github.com/wcpos/woocommerce-pos/pull/519))
- **New meta data monitoring** — REST API responses now detect resources with excessive metadata and fall back to a safe response mode, preventing out-of-memory crashes ([#521](https://github.com/wcpos/woocommerce-pos/pull/521))
- **Security hardening** — masked auth tokens in test endpoint, added directory protection for temp receipt templates ([#519](https://github.com/wcpos/woocommerce-pos/pull/519))
- Updated all JS and PHP dependencies to latest stable versions ([#521](https://github.com/wcpos/woocommerce-pos/pull/521), [#526](https://github.com/wcpos/woocommerce-pos/pull/526))
- Pro: Redesigned Edit Store page with modern React/Tailwind UI
- Pro: Fixed SQL injection vulnerability in analytics and store authorization bypass

= 1.8.9 - 2026/02/11 =
- **Completely rebuilt settings page** — new modern architecture with Vite, TanStack Router, headless UI components, zustand state management, and responsive layout with grouped sidebar navigation ([#495](https://github.com/wcpos/woocommerce-pos/pull/495), [#498](https://github.com/wcpos/woocommerce-pos/pull/498), [#505](https://github.com/wcpos/woocommerce-pos/pull/505))
- **New Extensions directory** — browse, discover, and manage extensions directly from POS settings, with Pro integration hooks, GitHub links, and new-extension badges ([#497](https://github.com/wcpos/woocommerce-pos/pull/497), [#500](https://github.com/wcpos/woocommerce-pos/pull/500), [#510](https://github.com/wcpos/woocommerce-pos/pull/510))
- **New Logs page** — view, filter, and paginate log entries from file and database sources with expandable details and unread counts ([#504](https://github.com/wcpos/woocommerce-pos/pull/504), [#511](https://github.com/wcpos/woocommerce-pos/pull/511))
- **Redesigned email settings** — granular per-email toggles replace the old on/off switch, with new cashier notification options ([#502](https://github.com/wcpos/woocommerce-pos/pull/502), [#508](https://github.com/wcpos/woocommerce-pos/pull/508))
- **Fixed POS prices persisting to product database** — price modifications made at the POS no longer overwrite the stored product price ([#509](https://github.com/wcpos/woocommerce-pos/pull/509))
- **Fixed coupon calculations ignoring tax** — coupon subtotal filters are now tax-aware, preventing incorrect discount amounts ([#507](https://github.com/wcpos/woocommerce-pos/pull/507))
- **Fixed security plugin conflicts** — CSP headers are now stripped on POS pages so Content-Security-Policy rules from security plugins no longer break the interface ([#503](https://github.com/wcpos/woocommerce-pos/pull/503))
- **Fixed WordPress 6.7+ compatibility** — deferred translation calls in the Activator to avoid the "too early" notice ([#498](https://github.com/wcpos/woocommerce-pos/pull/498))

= 1.8.8 - 2026/02/06 =
- **Completely rebuilt translation system** — switched to i18next with proper plural handling and regional locale fallback, loaded on-demand from jsDelivr and decoupled from plugin version updates ([#37](https://github.com/wcpos/monorepo/pull/37), [#75](https://github.com/wcpos/monorepo/pull/75), [#76](https://github.com/wcpos/monorepo/pull/76), [#438](https://github.com/wcpos/woocommerce-pos/pull/438), [#439](https://github.com/wcpos/woocommerce-pos/pull/439), [#474](https://github.com/wcpos/woocommerce-pos/pull/474))
- **Fixed conflict with REST API caching plugins** — POS requests could break entirely when a REST API caching plugin was active, this is now resolved ([#421](https://github.com/wcpos/woocommerce-pos/pull/421))
- **Fixed expired JWT overriding valid authentication** — an expired token could silently override a valid cookie session, locking users out unnecessarily ([#472](https://github.com/wcpos/woocommerce-pos/pull/472))
- **POS discounts no longer wiped by coupons** — applying a coupon to an order with POS-discounted items no longer resets those discounts back to the original price ([#464](https://github.com/wcpos/woocommerce-pos/pull/464))
- **Fixed misc products showing $0 on receipts** — miscellaneous products now display the correct price on receipts and order emails ([#436](https://github.com/wcpos/woocommerce-pos/pull/436))
- **Fixed checkout-to-receipt navigation** — no more crashes or lost order links when completing a sale ([#77](https://github.com/wcpos/monorepo/pull/77))
- **Fixed token refresh on 403 errors** — sessions that appeared "stuck" requiring a re-login should now refresh automatically ([#74](https://github.com/wcpos/monorepo/pull/74))
- **Fixed store switching issues** — switching between stores no longer causes errors or blank screens ([da8c05d](https://github.com/wcpos/monorepo/commit/da8c05d))
- **Fixed missing data in received template** — the order received page was missing link data, now restored ([#476](https://github.com/wcpos/woocommerce-pos/pull/476))
- **Tightened permission checks** — capability checks now properly match what's configured on the Access settings page ([#467](https://github.com/wcpos/woocommerce-pos/pull/467))
- **Improved performance during large syncs** — the UI stays responsive while syncing large product catalogs ([8657e1f](https://github.com/wcpos/monorepo/commit/8657e1f))
- **Fixed web hydration in standalone mode** — the web app loads correctly when accessed directly without the desktop wrapper ([#19](https://github.com/wcpos/monorepo/pull/19))

== Upgrade Notice ==

= 1.9.0 =
This is a big update with breaking changes. If you're busy, please wait — there's nothing urgent in 1.9.0, and it's safer to give any early bugs a few days to be worked out. Update during quiet time, and always make a backup first.
