*** Simple Connection for Chronofresh Changelog ***

2026-09-02 - version 1.4.2
* **Privacy / security fix**: the Ask feature called `wp_ai_client_prompt()` directly, without reading WordPress's Connector Approval matrix or pinning a provider — a prompt (order data, pickup point, tracking) could reach any active AI connector, not just the one checked for ChronoFresh under Settings → Connectors → Approvals. The plugin now reads the approval matrix (via the Approvals_Store class or the `wpai_connector_approvals` option) and calls `using_provider()` with a connector actually approved for ChronoFresh. If none is checked, Ask now returns a clear "No connector is checked for ChronoFresh" error instead of silently using whatever connector the client defaults to. No change when the approval matrix is not in use at all.
* **Bug fix**: the `relay_5Q` and `relay_6S` health-check ids were compared against `sanitize_key()` output, which lowercases them, so both the "Run checks" panel and the Ask ability's targeted checks never matched and silently fell through to "Unknown diagnostic." / ran every check instead of the one requested. Check ids are now lowercase end to end (`relay_5q`, `relay_6s`).

2026-08-28 - version 1.4.0
* **Ask (read only)**: optional field under Connection health check and at the bottom of the order ChronoFresh Labels box. A sentence reads health diagnostics, the saved pickup point, or tracking. It never creates or cancels a label.
* **Abilities**: `chronofresh/get-connection-health`, `chronofresh/get-pickup-point`, `chronofresh/get-tracking` (`manage_woocommerce`). WordPress 7 AI plugin + a connector; Settings → Connectors installs the AI plugin from that screen.
* **Docs**: Ask vs Run checks / Generate labels / Track in the bilingual guides and readme FAQ.

2026-08-26 - version 1.3.3
* **Mix and Match**: child items in a Mix and Match Products container are packed with the container (one label for the assortment, not one per child). Parcel weight includes the children. The "ships as Ambient" notice lists the container, not each child.
* **Chained Products**: StoreApps Chained Products still cannot be auto-grouped (linked products are independent order lines) — set a weight on each chained product so parcel splitting stays accurate.
* **Architecture**: generic `sccfcw_order_item_parent_id` filter in core; Mix and Match detection lives in a compat module loaded only when that plugin is active.

2026-08-26 - version 1.3.2
* **Display fix**: the pickup point block was missing on the order confirmation page when the theme overrides `order-details-customer.php` without the `woocommerce_order_details_after_customer_details` hook. Now also hooked on `woocommerce_order_details_after_order_table` with a per-order guard so unmodified themes never print it twice. Emails and admin display unchanged.
* **Persistence fix**: a point selected on the cart page looked deselected at checkout (and after each `updated_checkout` refresh) because the widget never restored the session selection visually. The widget now re-selects the saved point (list highlight, red map marker, opening hours) when it is still available for the current address; the hidden field and server-side session were already correct, so this is visual/UX only.
* **Label button fix**: the ChronoFresh Labels box (and the "Generate label" row action) only appeared when a product carried a non-empty `_temperature_type` meta — products never saved from the Shipping tab hid the box, while "No temperature" showed it, and both generate identical Ambient labels. The box now appears on any order with a ChronoFresh shipping method OR a product with a temperature type, and lists products that will default to Ambient.
* **Docs**: FAQ entries on the Labels box visibility and the Ambient default; troubleshooting rows in both guides.

2026-08-26 - version 1.3.1
* **Critical fix**: the pickup point chosen at checkout was never saved on the order (meta written before the order had an ID). Now written on the order object (pre-save safe, HPOS-safe), with Blocks/Store API checkout support and validation.
* **Safety fix**: removed the silent "nearest relay" fallback at label generation — a missing point now blocks the label with a clear error instead of shipping to a relay the customer did not choose.
* **Visibility**: chosen pickup point (name, address, relay ID) shown on the admin order screen, customer order pages, and emails. Pre-1.3.1 relay orders without a saved point show an explicit warning.
* **Fix**: relay postcode/city saved and used on the label; internal `chronofresh_code` meta hidden from customer-facing output.

2026-08-25 - version 1.3.0
* **Test / Production mode**: explicit setting. Test mode uses the public Chronopost sandbox account and shows a persistent wp-admin banner — sandbox labels are never actually shipped.
* **Fix**: sandbox credentials are no longer silent defaults. Unconfigured installs now run in visible Test mode; in Production mode, missing credentials block label generation with a clear error instead of silently using the sandbox.
* **Connection health check**: replaces the single "Test API connection" button. Per-service live status: SOAP extension, server reachability, credentials, and real contract checks for pickup point codes 86 / 5Q / 6S with Chronopost's own error messages. The label service is not simulated — the panel says so.
* **Compat**: Tested up to WordPress 7.1.
* **Docs**: readme FAQ, bilingual guides and the built-in Getting started tab rewritten for the new mode and health check.
* **Admin CSS**: native WordPress admin styles on WooCommerce → ChronoFresh (settings, guide, health check panel). No shipping method or rate changes.

2026-07-24 - version 1.2.1
* **i18n**: All plugin UI source strings are now in English (WordPress.org / GlotPress requirement).
* **i18n**: French UI is provided via translation (fr_FR / translate.wordpress.org), not hardcoded in PHP.

2026-07-22 - version 1.2.0
* **Fresh Pickup Points (6S)**: Added the new "Chrono Fresh Relais 13H" shipping method — fresh delivery (0°C – 8°C) to pickup points, offered by Chronofresh since the beginning of 2026.
* **Checkout Integration**: The interactive pickup point map, opening hours and point selection fully support the new fresh pickup point service.
* **Label Generation**: Fresh products are now mapped to product code 6S when a pickup point is selected, with the mandatory DLC/expiration date.
* **Documentation**: Getting Started guide updated with the 6S product code.
* **Documentation**: New bilingual user guide (docs/USER-GUIDE.md + docs/MODE-DEMPLOI.md) covering setup, product codes, daily workflow and troubleshooting.

2026-05-27 - version 1.1.0
* Released on May 27, 2026:
* Added: Live parcel tracking via trackSkybillV2 (Chronopost TrackingService) directly in the order admin metabox.
* Added: Label cancellation via cancelListSkybill — cancel any label from the order page.
* Added: Bulk label generation from WooCommerce orders list.
* Added: Automatic order status change after label generation (configurable).
* Added: Per-product DLC (days until expiration) field — required by ChronoFresh for fresh/freeze shipments.
* Added: Global default DLC setting under WooCommerce → ChronoFresh.
* Added: Built-in Getting Started guide tab with step-by-step onboarding.
* Fixed: Compliance with ChronoFresh requirements — expirationDate now respects per-product or global DLC setting.
* Updated: Tested up to WordPress 7.0.

2026-05-08 - version 1.0.4
* **Advanced Map Integration**: Added an interactive Leaflet map for seamless and visual pickup point selection at checkout.
* **Smart UI Interactions**: Implemented automatic map centering and visual markers highlighting upon point selection.
* **Checkout Stability**: Resolved critical fragment refresh issues occurring with Stripe and high-performance payment gateways.
* **Race Condition Fix**: Eliminated AJAX timing conflicts to ensure pickup point data is always saved before order placement.
* **Performance Optimization**: Massive code refactoring and removal of legacy templates/unused assets for a lighter footprint.
* **Enhanced Security**: Reinforced nonce verification and strict input sanitization across all AJAX endpoints.
* **Dependency Alerts**: Added clear admin notices to detect and report missing PHP extensions (SOAP) immediately.

2025-08-25 - version 1.0.3
* **Logic Fix**: Added explicit "Ambient" temperature fallback when no specific shipping class is defined.
* **Stability**: Prevented unrecognized states for products linked via Expedition Class, ensuring smoother label generation.

2025-08-22 - version 1.0.2
* **Multi-Temperature Support**: Enabled mixed orders (Ambient, Fresh, Freeze) within the same checkout session.
* **Extended Compatibility**: Added support for custom shipping methods and third-party plugins like alg_wc_shipping.
* **Error Handling**: Implemented safe null-product handling to prevent fatal errors during label generation for deleted items.
* **Service Mapping**: Refined label logic to use product temperature types for accurate Chronopost service codes (5M, 5Q, 2R, 2S).
* **Logging**: Improved debug logs for parcel splitting and skipped items for better merchant troubleshooting.

2025-08-09 - version 1.0.1
* **Security Fix**: Critical update for nonce verification to secure pickup point API calls.
* **Bug Fix**: Resolved a parsing issue within the pickup search response.

2025-08-01 - version 1.0.0
* **Initial Release**: Official launch featuring core Chronofresh shipping integration and pickup point support.
