== Changelog ==

= 6.2.1 - 2026-05-20 =
* Fixed: Leanpay checkout **successUrl** could be sent without the shop domain (e.g. `http://order-received/123/`) on some stores; success redirect now uses the checkout page URL and correct success/failure setting checkboxes.
* Changed: API **debug log** Details column always includes redacted **request** and **response** bodies (including non-HTTP-200 responses).
* Tested with WordPress 7.0.

= 6.2.0 - 2026-05-19 =
* Added: **Visual settings** — choose a storefront **color scheme** (orange, pink, light, dark) and **widget fonts** (theme fonts or Roboto) under WooCommerce → Payments → Leanpay → Visual settings.
* Added: **Live widget previews** in admin — catalog, product, and checkout Leanpay blocks update in real time as you change color scheme, fonts, and display options.
* Added: Color schemes applied across catalog, product, checkout, and Gutenberg vertical/horizontal block widgets (scheme-colored SVG logos, CSS variables, overlay styling).
* Added: New **Advanced settings** admin tab for Leanpay price display (promotion) configuration, moved out of Payment configuration.
* Added: Confirmation dialog before saving when promotion type has changed.
* Added: Slovenian plural forms for the installment label on promotional banners (obrok / obroka / obroki / obrokov).
* Changed: **Installment plan slider** in the calculate overlay redesigned to match the new visual design (scheme-aware track, bullets, and active states).
* Changed: Redesigned vertical and horizontal Gutenberg block widgets; horizontal bar is 40px tall (desktop: logo, copy, CTA; mobile: logo and CTA).
* Changed: Promotional installment display uses the highest available plan within the configured installment threshold.
* Changed: **Catalog Leanpay banner** redesigned — two-part layout (price text + scheme-colored SVG logo), color-scheme styling, no hover highlight.
* Fixed: Settings save sends the active admin panel in POST so the correct settings group loads on all tabs.
* Updated translations.

= 6.1.1 - 2026-05-13 =
* Fixed: Leanpay payment confirmation could fail nonce validation on the first attempt in some setups; added WooCommerce order key fallback for a more reliable checkout continuation.
* Tested with WooCommerce 10.7.0.

= 6.1.0 - 2026-04-02 =
* Major redesign of front-end Leanpay widgets (catalog, product, and checkout).
* Added configurable placement for the Leanpay block on single product pages (Settings tab), including hooks around the price, add to cart area, summary, meta, and an optional product tab.
* Added configurable placement for the Leanpay block in catalog/shop loops (before or after title; before or after the add to cart link).
* Removed unused legacy gateway options (legacy color and installment font-size keys) that were no longer exposed in settings.
* Fixed a bug where saving payment settings could clear other gateway options when the custom settings-tab nonce was not present on POST (panel detection now works on save).
* Admin: show/hide position fields when catalog or product display toggles are off; clearer labels for placement options.
* Admin: clearer display of automatic price update schedule (last successful update, next cron run, queued manual update).
* Tested with WooCommerce 10.6.2.
* Updated translations.

= 6.0.4 - 2026-03-30 =
* Removed Croatia and Hungary market options; only Slovenia (SI) and Romania (RO) are supported.
* Removed the "Double price" setting and all related front-end logic.
* Added market-specific 0% interest price threshold (Romania does not support 0% interest rate); exposed to leanpay.js via localized params.
* Enqueued JS for reliable cache busting.
* Variable products: fixed AJAX HTML for Leanpay block (banner + modal), nonce security, and locale switching so translated strings load on variation change.

= 6.0.3 - 2026-03-27 =
* WordPress.org release version.
* Updated readme/changelog packaging and release metadata for WordPress.org distribution.

= 6.0.2 - 2026-02-03 =
* Removed plugin-managed Custom CSS injection option and related setting.
* Removed deprecated `load_plugin_textdomain()` call for WordPress.org-hosted translations.
* Updated naming/prefixing to improve WordPress coding standards compliance.
* Improved database query annotations and safety notes for custom table usage.
* Updated plugin documentation for external services disclosure.

= 6.0.1 - 2025-01-21 =
* Fixed checkout display issue where Leanpay HTML output was escaped incorrectly.

= 6.0.0 - 2025-12-18 =
* Major hardening for WordPress.org release readiness.
* Added comprehensive input sanitization and output escaping.
* Improved prepared SQL query usage and validation around data handling.
* Improved API request/response handling and general plugin robustness.
