Skip to content

Release v2.0.6

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 18:46
d4495ab

Adds tender correction of captured manual payments, a manual reset of POS account identities for copied stores, a server-side sale-day correction for managers, and closes several order, payment and sign-in access gaps; card holds are now released when an order is deleted or trashed, and POS Only products are hidden from more storefront routes. Action may be needed: see Upgrade and compatibility.

Upgrade and compatibility

  • Stores that removed edit_shop_orders or edit_others_shop_orders from a cashier role in WCPOS Access: that cashier now gets a 403 paying a web order, another cashier's parked order or a legacy order with no POS cashier, on the pay page, the v1/v2 checkout routes and the v2 payment routes. Default roles are unchanged. (#2705, #2783)
  • Login redirects to exp:// (Expo Go) are no longer accepted; only wcpos://, wcpos-dev://, wcpos-adhoc:// and the allowed web destinations are. Use a development build to test against a 2.0.6 site. (#2772)
  • Running the new identity reset changes every user's POS UUID on that site: connected tills must sync, remove the store and connect again. Nothing runs it automatically. (#2787)
  • A V2 order push that would move the tax location of an order with a refund, open or paid, is now refused with 422 wcpos_tax_location_locked while WooCommerce taxes are on; before, an open order was re-taxed and a paid order stored the new address without re-taxing. An app without handling for the code dead-letters that push, and every later push of the order, until the address is reverted on the till; stored order data stays correct. (#2829)
  • Cloud Print: the relay verification callback (GET wcpos/v1/print-jobs/relay-verification) now needs the challenge query parameter matching the verify_challenge that register_site() sends the relay; without a match it answers 404 wcpos_relay_no_pending_verification and keeps the token. The WCPOS relay sends it from its matching update, which is deployed before this release. Route, response shape and error code are unchanged, and the POS app never calls the route. (#2850)

Added

  • POST wcpos/v2/orders/{id}/payments/{uuid}/correct (method_id, optional reference) corrects the tender of a captured manual payment after the sale: it appends a reversal row on the old method and a replacement on the target, never edits the original, and leaves paid, balance and status unchanged. The target may be any POS-enabled method except stored value; a replacement on a provider-backed method is marked unverified. The order's payment method, the session figures and the receipt reprint follow the effective rows. A correction after its session closed writes a late_sale fiscal record; when that write cannot run it is parked and the payments sweep writes it later. (#2686, #2688)
  • Closure documents (Z-reports, the gallery closure templates, the legacy template and the CSV export) print a signed Corrections line under each tender that had a correction, and the stored tender rows of a corrected session take the server's figures. (#2689)
  • POS → Settings → Extensions: with WCPOS Pro, an active payment extension's card shows what is left before cashiers can use it ("2 steps left" … "Ready") and an "On in the POS" switch; Checkout → Gateways flags an enabled method whose settings are unfinished. (#2790)
  • WP-CLI wp wcpos user-identity reset and a WooCommerce → Status → Tools entry, "Reset WCPOS account identities", delete _woocommerce_pos_uuid for every user so a store copied from another store's database stops sharing identities with it (the app refuses the second store with AUTH342). UUIDs are minted again on next use. Not offered on multisite. (#2787)
  • A v2 order push may carry a _wcpos_sale_day_request meta row ({"at_gmt", "reason", "from"}). For a user with reassign_woocommerce_pos_sales, on a completed paid sale, the server appends a sale_day_correction fiscal record, then stores _wcpos_sale_day and _wcpos_sale_day_at and adds an order note; date_paid, payments and closures are never changed, and a reopen drops the correction. from must match the stored correction ("" when none), so a re-sent or outdated request changes nothing. The request row is never stored, and a client-sent _wcpos_sale_day is ignored. Refused or invalid requests are ignored with 200. The app control ships later. (#2810, #2812)
  • The WP Admin landing page is assigned the plan or jobs variant 50/50 by site hash; free-plus and indie stay listed at 0%. (#2792, #2799, #2804)

Fixed

  • Security: the pay page checks the cashier token before it renders or switches user; an expired or missing token gets a 403 page that posts wcpos-session-expired to the app, a mismatch a plain 403. (#2709)
  • Security: paying on the pay page needs a cashier who can still open the POS and may edit that order; the coupon form runs the same checks and ignores paid orders. (#2705, #2707, #2778)
  • Security: v2 payment routes and v1/v2 checkout refuse a user who may not edit the order, and the order-email routes write the billing email only for such a user. (#2783)
  • Security: the session approval and closure recount routes share the POS login's account-and-peer lockout (five failures, 15 minutes) instead of allowing unlimited manager-password guesses. (#2758)
  • Security: login and approval attempts are counted atomically before the password check, so parallel wrong passwords no longer get more checks than the limit (CWE-307); the per-peer login limit uses the same counter, and a give-back cancels only its own increment and lifts a lock it caused. Counters fail closed. (#2769, #2781, #2786, #2797)
  • Security: attempt rows no longer pile up in wp_options. Each write of an attempt row first deletes up to 100 expired ones, reading at most 500, and live rows for unknown usernames are capped at 5000. At the cap, a new unknown name is refused as locked, while real accounts and new peers are unaffected. Unknown names no longer get a wcpos_auth_lock_ transient, because their full row refuses for the same 15 minutes. (#2818)
  • Security: session write routes (status, approve, carry, movements and the opening replay) apply the cashier's store reach, as the read routes already did. (#2764)
  • Security: the WP Admin order screen's cashier select follows the push rule (self, or reassign_woocommerce_pos_sales and a target with access_woocommerce_pos); a refused change writes an order note naming who tried. (#2774, #2802)
  • Security: the settings page and the order-received page encode their embedded JSON with JSON_HEX_TAG | JSON_HEX_AMP (and quotes on the settings page), so store or order data cannot close the inline script. (#2780, #2779)
  • Security: the Cloud Print relay verification callback releases its one-time token only to a caller that presents the challenge sent to the relay at registration; any other read gets the nothing-pending 404 and leaves the token in place. Reported by Achmad Sonif through WPScan. (#2850)
  • WooCommerce refund routes (wc/v1, wc/v2, wc/v3 orders/{id}/refunds and wc/v4/refunds) refuse a gateway refund (api_refund true, or omitted where WooCommerce defaults it to true) when the order's gateway payment is an unverified tender-correction row, so the gateway is never asked to refund money it never took; refunds to another method and verified rows are unchanged. (#2838)
  • A refunded order is no longer re-taxed at a new location by a V2 push, which left its refunded tax out of line with the new rates (refunds keep the rate ids they were taxed at). (#2829)
  • Permanently deleting an order voids its pending or authorized payment rows through the capture handler (order_deleted); the sweeper also covers trashed orders, closing unanswered rows and voiding expired authorizations. (#2789, #2785)
  • Moving a return line (negative _reduced_stock) to another product on a reopened paid sale moves its stock; before, both products kept the wrong level. (#2738)
  • An unpaid POS order whose gateway declares verb.kind: send, run through the Legacy pay window, gets its awaiting-customer stamp on the order-received page and posts wcpos-payment-sent, so the app shows the invoice as sent. (#2692)
  • Ledger::fresh() drops this request's cached order before reading the status under the lock, and the completion stamp and nine forced reads in payments, gateway submission and fiscal writers clear WooCommerce's HPOS data-store cache first, so a change committed by another request is not missed (with hpos_datastore_caching on, a sale could be stamped complete twice). (#2734, #2737, #2739)
  • On SQLite the sync integrity digest is switched off: digest observers, rebuild cron and reads stop, so product saves no longer log errors; Site Health shows a recommended notice. (#2753)
  • Meta_Normalizer::normalize() writes a child array back only when it changed, so sync pages no longer hold a second copy of every nested array (one store ran out of memory at 256M). (#2729)
  • With POS Only products on, the Store API single-product routes (wc/store/v1/products/{id} and /{slug}, and the unversioned forms) answer a storefront request for a POS Only product or variation with WooCommerce's own 404 (woocommerce_rest_product_invalid_id or woocommerce_rest_product_invalid_slug); POS requests and users who can edit the product still read it. Matched by route handler, so slash variants of the slug path are covered. (#2839)
  • With POS Only products on, a storefront request also meets a POS Only product as a missing item on the wp/v2 single product and single comment routes, wp/v2 collection and search results, oEmbed and embed pages, the ?p= canonical redirect, and review and comment lists (Store API reviews and their counts, wp/v2/comments, the comments feed and the recent-reviews widget). Shop managers and POS requests still see it. (#2846)
  • With POS Only products on, Store API add-to-cart (cart/add-item, cart/items, batch and the unversioned forms) answers a POS Only product or variation with WooCommerce's missing-product error woocommerce_rest_cart_invalid_product instead of not-purchasable, so it no longer confirms the product exists; users who can edit the product keep the not-purchasable answer. (#2848)
  • Saving one payment gateway in Checkout → Gateways no longer erases the stored POS settings of gateways whose extension is inactive at that moment. (#2790)
  • POS → Settings screens, the Extensions page included, show a loading skeleton instead of a blank area; tables show a scroll shadow on a phone and their controls keep their width; the checkbox tick fits its 16 px box at phone width. (#2793, #2794, #2757, #2790)
  • English strings: the Access heading reads "What the {role} role can do", and the "Ask a manager" help names a WordPress username and password. (#2759, #2795)
  • A failed receipt PDF render logs its cause at error level; the legacy PHP renderer removes its temp file when a template throws. (#2742, #2771)

Developer and contract changes

  • Payment (v2), checkout (v1, v2) and order-email (v1, v2) routes answer 403 wcpos_rest_cannot_edit_order for a user who may not edit the order; the email argument is format: email (400 rest_invalid_param). New error code on those routes. (#2783)
  • The gateway bootstrap route answers 400 wcpos_payment_gateway_not_available for a gateway not enabled for POS, as checkout does. New error code on gateway bootstrap. (#2773)
  • POST wcpos/v2/sessions/{id}/approve and POST wcpos/v2/closures/{id}/recount answer 429 wcpos_approval_locked while the lockout holds. New error code on those routes. (#2758)
  • Session write routes answer an out-of-reach session as unknown (404 wcpos_session_not_found; movements 409 wcpos_session_not_open or 400); wcpos_session_row now also fires on a movement write. Additive. (#2764)
  • Attempt counts are stored as wcpos_auth_attempts_<md5> options (autoload off, count|expires-at|generation; unknown usernames as wcpos_auth_attempts_n<md5>) instead of the wcpos_auth_fail_* and wcpos_auth_ip_* transients; counts in progress restart once on upgrade. Additive. (#2769, #2781, #2786, #2818)
  • On SQLite, GET wcpos/v2/integrity returns meta.supported: false, the bucket route 503 woocommerce_pos_sync_integrity_unavailable (so clients never prune on an empty answer) and rebuild 501; new Site Health test wcpos_sync_digest_sqlite. MySQL is unchanged. (#2753)
  • GET wcpos/v2/orders accepts pos_sale_day_after and pos_sale_day_before (unix seconds, inclusive) and returns the orders whose corrected sale day (_wcpos_sale_day_at) lies in that range, combined with every other filter, on HPOS and legacy storage. A non-numeric or negative value is ignored; wcpos/v1 is unchanged. Additive. (#2815)
  • GET wcpos/v2/status lists order_sale_day_correction. New request meta key _wcpos_sale_day_request (in SERVER_META_KEYS, never stored or forwarded). New order meta _wcpos_sale_day and _wcpos_sale_day_at, fiscal record type sale_day_correction (readable from wcpos/v2/records) with its sequence option wcpos_fiscal_sequence_sale_day_correction. _wcpos_sale_day joins the order revision's hashed keys; no order carries it before a correction, so existing hashes are unchanged. Additive. (#2810, #2812)
  • New public method Pos_Uuid::reset_user_uuids(). Additive. (#2787)
  • The order-received page posts wcpos-payment-sent; the pay page posts wcpos-session-expired (handled by apps since 2.0.0-beta.1). Additive. (#2692, #2709)
  • Tender correction: GET wcpos/v2/status lists tender_correction unless the new filter wcpos_fiscal_module_active returns true, in which case /correct answers 403 wcpos_tender_correction_unavailable. Refusals are 422 wcpos_payment_not_correctable with reason (not_captured, voidable, is_reversal, already_corrected, refunded, provider_row, method_invalid, same_method, off_rounding_increment). Ledger rows gain entry: "tender_correction", reverses, corrects, unverified and reference; _wcpos_payment_method indexes only effective rows. Session figures add terms.cash_corrections and signed payment_methods[*].corrections. New action wcpos_payment_corrected, cron hook wcpos_fiscal_correction_retry, receipt schema label corrections; _wcpos_fiscal_pending may hold tender_correction:<id> entries, and wcpos_fiscal_record_failed also fires for late_sale with {source_id}. New error codes on /correct; the rest is Additive. (#2686, #2688)
  • Closure receipt data adds per-method has_corrections and corrections_display and closure-level has_corrections_line; the closure CSV adds a corrections column per payment method; a client-sent corrections on a closure row is dropped. Additive. (#2689)
  • WooCommerce refund routes answer 409 wcpos_refund_unverified_payment (data.reason: "unverified", data.payment_id) before any refund or gateway call. New error code on wc/v1–v3 order refunds and wc/v4/refunds. (#2838)
  • V2 order push answers 422 wcpos_tax_location_locked (see Upgrade and compatibility). New error code on V2 order push. (#2829)
  • New settings slots extensions.setup_action, extensions.menu_items and extensions.setup_notice on the Extensions card (registered by Pro); the Extensions service reports gateway_id for an active payment extension, and the payment-gateways settings response carries needs_setup (true, false or null). Additive. (#2790)

Maintenance

  • Admin bundles: @atlaskit/pragmatic-drag-and-drop 4.0.0 and @atlaskit/pragmatic-drag-and-drop-hitbox 3.0.0; i18next 27.1.5 and react-i18next 18.0.2. (#2695, #2693)
  • Translation version pinned to 2026.11.29. (#2730, #2755, #2756, #2776, #2800, #2813, #2831, #2852)
  • Tested up to is 7.2 in the readme and the plugin header: the full PHPUnit suite passes on WordPress 7.2-RC3 with PHP 8.2 (8871 tests, 0 failed). (#2849)

Full diff: v2.0.5...v2.0.6