*** FlexiLay Layby & Payments Changelog ***

2026-08-25 - version 1.4.4
* Added - Per-product "FlexiLay: must be paid by" date field (product edit, General tab). At checkout the earliest date across the order's items is sent to FlexiLay as the plan's complete-by deadline: instalment options compress to fit before the date, or fall back to a single pay-in-full payment. Blank = no deadline; past dates are ignored.

2026-08-21 - version 1.4.3
* Added - Checkout Branding setting on the FlexiLay Settings tab: choose LayBy or Lay-A-Way wording for your customers. The choice is saved to your FlexiLay account, so checkout, plan setup and plan pages all use it.

2026-08-04 - version 1.4.2
* Added - Checkout now shows the "LayBy powered by FlexiLay" or "Lay-A-Way powered by FlexiLay" lockup beside the payment method, on both the classic and block-based checkouts. It follows the branding mode set in the FlexiLay dashboard.
* Changed - Default payment method description is now "Pay over instalments with LayBy" (or Lay-A-Way) instead of naming a fixed number of payments. Customised titles and descriptions are untouched.
* Changed - Wording cleanup: "lay-buy" replaced with LayBy / Lay-A-Way in the plugin header, readme, admin method description and the Blocks fallback title.
* Dev - Branding mode is mirrored locally from /api/merchant/status so checkout never makes an HTTP call while rendering.

2026-07-28 - version 1.4.1
* Added - The FlexiLay payment method switches on automatically the first time onboarding completes (approval, pairing and Stripe connected). Enabling/disabling it manually in WooCommerce settings is always respected afterwards.
* Added - The plugin reports whether the FlexiLay payment method is enabled at checkout back to FlexiLay, so support can help stores that finished setup but aren't offering FlexiLay yet.

2026-07-17 - version 1.4.0
* Added - Customers now return to your store's order-received (thank-you) page after completing plan setup, and their cart is emptied.
* Added - "Cancel & return to store" link on the FlexiLay setup page brings customers back to your checkout with their cart intact.
* Added - If WooCommerce auto-cancels an unpaid order (per your Hold Stock setting) or you cancel it in wp-admin, the unpaid FlexiLay plan is cancelled too - the setup link stops working and reminder emails stop.
* Fixed - A FlexiLay status update can no longer put a cancelled or refunded order back on hold; mismatches now get a "review needed" order note instead.
* Fixed - The "Cancel plan" button no longer appears on completed or cancelled plans.
* Dev - Removed obsolete internal order-status endpoint and calls.

2026-07-01 - version 1.3.9
* Update - Legal documents (Merchant Terms, Service Agreement, Privacy Policy) now open in a modal on the Onboarding screen with an Accept button, instead of navigating to a separate page.

2026-07-01 - version 1.3.8
* Added - Automatic registration: your store registers with FlexiLay when you open the Onboarding screen, with no manual Register button.
* Added - Automatic approval detection with a manual "Check Approval" fallback, plus a banner while approval is pending.
* Fixed - Onboarding deadlock on fresh installs that could show a "couldn't load status" error and never register.
* Fixed - "Please wait before trying again" message when re-checking approval; the Refresh button now re-checks approval.

2026-06-30 - version 1.3.4
* Fixed - Fresh installs now onboard out of the box, defaulting to the FlexiLay production server when no API base URL is configured.
* Added - Always-visible support contact on every FlexiLay admin screen.

2026-06-30 - version 1.3.3
* Update - Renamed the plugin to "FlexiLay Layby & Payments".

2026-06-22 - version 1.3.2
* Fixed - Reinstalling the plugin no longer gets stuck on "Onboarding incomplete" with an "Invalid install token" error.

2026-06-22 - version 1.3.1
* Update - Verified compatibility with WordPress 7.0.

2026-06-15 - version 1.3.0
* Added - HMAC-SHA256 webhook signature verification for incoming plan status updates.
* Update - Order lifecycle now mirrors the Shopify flow (on-hold to processing to completed/cancelled), with order notes for a full audit trail.
* Fixed - Refund endpoint now calls the correct backend path.
