Simple Connection for ChronoFresh

Beskrivelse

If you sell food (or anything that must travel ambient, fresh 0–8 °C, or frozen) with Chronopost Chronofresh, this plugin talks to the official SOAP APIs from WooCommerce: shipping methods at checkout, pickup-point map, PDF labels, tracking, and cancellation.

You need an active Chronofresh contract. The plugin does not replace Chronopost: it uses the account number and password they give you. Out of the box the plugin runs in Test mode on the public Chronopost sandbox account so you can try everything without credentials — a warning banner stays visible in wp-admin, because sandbox labels look real but no parcel is ever picked up or shipped. Switch to Production mode and enter your own credentials before shipping.

Features

  • Twelve offers: the 13 h set (home, agency, pickup), Fresh 18, Ambient 18, Freeze 18, and Chrono Classic for dry parcels to Europe. The customer sees a plain sentence; the shipping zone keeps the Chronopost name and the product code.
  • Fresh pickup points (code 6S) — deliver fresh products (0°C – 8°C) to Chronofresh pickup points (must be enabled on your contract).
  • Dynamic pickup point map (Leaflet) with opening hours at checkout.
  • Live parcel tracking via Chronopost TrackingService (same shipping credentials).
  • Label cancellation directly from the order admin page.
  • Bulk label generation from the orders list.
  • Auto order status change after label generation (configurable).
  • Per-product DLC (expiration date) field — mandatory for ChronoFresh compliance.
  • Explicit Test / Production mode with a persistent admin banner while the sandbox account is in use.
  • Connection health check — per-service diagnostics (SOAP extension, server reachability, credentials, and which pickup point product codes 86 / 5Q / 6S your contract accepts), with Chronopost’s own error messages.
  • Optional Ask (WordPress 7) — under the health check and on the order Labels box: a sentence that reads health, the saved pickup point, or tracking. It never creates or cancels a label. Abilities: chronofresh/get-connection-health, get-pickup-point, get-tracking.
  • Private label storage — PDF labels, logs and debug files sit in a closed folder with unguessable names; labels open only from the order screen, for users who can manage WooCommerce.
  • Weight-aware parcel splitting — weights are read in your store unit (g, kg, lbs, oz) and parcels are split unit by unit above the max weight you set.
  • Built-in Getting Started tab under WooCommerce ChronoFresh.
  • Step-by-step guides in docs/USER-GUIDE.md (English) and docs/MODE-DEMPLOI.md (French).

External services

This plugin connects to Chronopost APIs to handle shipping calculations, pickup point searches, label generation, and tracking.
It sends customer shipping details (address, postcode, city, weight) when searching pickup points or generating labels.
This service is provided by Chronopost: Terms of use, Privacy policy.

Support

Installation

  1. Upload the simple-connection-for-chronofresh-woocommerce folder to /wp-content/plugins/.
  2. Activate the plugin via the WordPress ‘Plugins’ page.
  3. Open WooCommerce ChronoFresh (not WooCommerce Settings). Switch the Mode to Production and enter your Chronopost account number, password, and shipper phone. (Or keep Test mode to explore first — labels will not be real.)
  4. Run the connection health check, then add ChronoFresh methods in WooCommerce Settings Shipping for your zones.

FAQ

What Chronofresh account / contract do I need?

A commercial Chronofresh contract from Chronopost (not a consumer Chronopost.fr login). Your sales rep gives you an account number and API password. Ask them to enable the product codes you will use (for example 2R home fresh, 6S fresh pickup points, 2S freeze). Until a code is on the contract, Chronopost returns errors such as 33 / 35.

What is Test mode? Can I ship with it?

No. Test mode signs every call with the official Chronopost sandbox pair from their Web Services documentation. It is only there so you can explore the plugin (map, labels, workflow) before you have a contract. Sandbox labels look real but no parcel is ever picked up. A warning banner stays visible in wp-admin until you switch to Production mode.

Where do I enter the credentials?

WooCommerce ChronoFresh Settings tab: switch the Mode to Production, then fill in the account number and password. Also set shipper phone (printed on the label), default DLC in days, max kg per parcel, and optional auto order status. Store address under WooCommerce Settings General is the shipper on the label.

The health check passes but label generation still fails.

The health check runs real calls on the pickup-point service, which lets it verify authentication and whether product codes 86 / 5Q / 6S are on your contract. It deliberately does not call the label service, because the only way to test that is to create a real label — the check will never do that behind your back. Generate a label on a test order: Chronopost errors (e.g. a home-delivery product code missing from your contract) are shown on the order screen and in the debug logs.

Can I generate a label with the Ask / AI field?

No. Ask only reads: connection health, the pickup point already saved on the order, or Chronopost tracking for labels that already exist. Generate, regenerate and cancel stay on the ChronoFresh Labels buttons.

Where is Ask?

WooCommerce ChronoFresh, under Connection health check; and at the bottom of the ChronoFresh Labels box on an order. WordPress 7: Settings Connectors (install the AI plugin from that screen) then Settings AI Enable AI. If blocked, Tools Connector Approvals approve this plugin.

PHP SOAP?

Required. If the plugin shows that the extension is missing, ask your host to enable php-soap (WooCommerce Status).

Where are debug logs?

In /wp-content/uploads/simple-connection-for-chronofresh-woocommerce/, one file per day named chronofresh-YYYY-MM-DD-<site code>.log. Open them over FTP / SFTP or your host’s file manager: the folder is closed to web browsers. Export CSV logs (WooCommerce ChronoFresh) downloads the latest entries without server access. Logs are deleted after 14 days (filter sccfcw_log_retention_days).

With Debug mode on, the plugin also writes each label request and response there as scc-soap-*.xml, with the API password masked and the PDF removed. Turn Debug mode off once the issue is solved.

Why does one order produce several labels?

Two reasons. Each temperature group (Ambient, Fresh, Freeze) ships in its own parcel. Within a group, a parcel is closed once it reaches Max weight per parcel (WooCommerce ChronoFresh, 20 kg by default), counting unit by unit: 30 × 1 kg gives a 20 kg parcel and a 10 kg parcel.

Weights come from the product Shipping tab, in the unit chosen under WooCommerce Settings Products. A product without a weight counts as 1 kg, so a box of 24 items without weights counts as 24 kg. Set a weight on every product you ship, including chained products and Mix and Match contents.

Can I generate the labels of an order again?

Only for parcels that have no active label. Chronopost bills every label it creates, so the button reads Generate missing labels once an order has labels, and it skips parcels already labelled. To replace a label, Cancel it first, then generate again. Bulk generation skips orders whose parcels are all labelled and tells you how many.

If an error stops a generation half way, the labels created before it stay on the order; generating again only creates the missing ones. The tracking email lists each parcel once, after a generation completes.

Where are the PDF labels stored? Who can open them?

In /wp-content/uploads/simple-connection-for-chronofresh-woocommerce/labels/, with random file names, in a folder closed to web browsers (.htaccess for Apache; on Nginx the random names keep them out of reach). The PDF button on the order opens them through WordPress, for users with the manage_woocommerce capability only.

I don’t see the “Generate label” button / ChronoFresh Labels box on an order. Why?

The box appears on orders that use a ChronoFresh shipping method, or that contain at least one product with a Temperature type set (product page Shipping tab). If neither applies — for example the order was shipped with another carrier and its products were created before the plugin was installed, so they have no temperature type yet — the box is hidden. Also check Screen Options (top right of the order screen): the “ChronoFresh Labels” panel may simply be unticked. Before 1.3.2 the box also stayed hidden when products had no temperature type even on ChronoFresh orders; that is fixed.

What happens if a product has no temperature type, or “No temperature”?

At label generation it ships as Ambient (codes 5M / 5N / 5Q depending on the method). The ChronoFresh Labels box shows a notice listing such products so you can set Fresh or Freeze on the product page before generating, if needed.

Is it secure?

Admin and AJAX actions use nonces and check the manage_woocommerce capability. Inputs are sanitized and outputs escaped. Labels, logs and debug files are private (see the PDF labels question above); debug files never contain the API password. Chronopost still receives order addresses when you search pickup points or generate labels (see External services).

How are Mix and Match Products labelled?

Child products inside a WooCommerce Mix and Match Products container are packed with the container: one label for the whole assortment, and the parcel weight includes the children. They are not listed individually in the “ships as Ambient” notice — look at the container product’s temperature type instead. WooCommerce Chained Products is different: each linked product is an independent order line with no parent to detect, so give every chained product its own weight on the product page (Shipping tab) or parcel splitting by weight can be wrong.

Can other bundling plugins group items onto one label?

Mix and Match Products is supported when that plugin is active. Other bundling plugins can hook sccfcw_order_item_parent_id (the filter receives 0, the order item, and the order) and return the container order item ID so those children are packed with their parent the same way.

Anmeldelser

Der er ingen anmeldelser for denne widget.

Bidragsydere & udviklere

“Simple Connection for ChronoFresh” er open source-software. Følgende personer har bidraget til dette plugin.

Bidragsydere

“Simple Connection for ChronoFresh” er blevet oversat til 1 sprog. Tak til oversætterne for deres bidrag.

Oversæt “Simple Connection for ChronoFresh” til dit eget sprog.

Interesseret i udvikling?

Gennemse koden, tjek SVN repository, eller abonner på udviklerloggen via RSS.

Ændringslog

1.4.4

October 21, 2026:
* Added: checkout titles are plain sentences (“Chilled delivery before 1 PM”). The shipping-zone list keeps the Chronopost name and the code. The label box shows the parcels before anything is billed and stops when the phone, the store address, the pickup point or the offer is missing.
* Added: Getting started checklist and three shop setups (chilled France, mixed France, dry Europe). Account and password are hidden in Test mode. The product field is Ambient, Chilled or Frozen, and the use-by date shows only for chilled and frozen products.
* Added: Chronopost errors 30, 33 and 35 explain the next step. Orders list: label column, “To ship without a label”, and a bulk print of the PDFs. Pickup points are buttons, with the chosen point kept on screen. Tracking events on the thank-you page and My Account, and the tracking email uses the store template.
* Added: four offers — Chrono Fresh 18 (5Z), Chrono Ambient 18 (5S), Chrono Freeze 18 (6A), all France, next day before 6 PM, and Chrono Classic (44), dry parcels to Europe in 1 to 3 days. Enable them per shipping zone; Classic serves the countries of the zone it is added to, is hidden when the cart holds a chilled or frozen product, and sends the real destination country (with the goods value for destinations outside the EU).
* Changed: the label now uses the offer the customer chose and paid for. Orders that mix temperatures are completed with the offer of the same family (13 h with 13 h, 18 h with 18 h); the standard Relais 86 and the 18 h offers no longer ship as another code. An order that no offer can carry is refused before any label is created. Orders with another carrier’s method keep the old temperature-based choice.
* Changed: every offer now lives in one table (SCCFCW_ChronoFresh_Methods, filter sccfcw_shipping_methods): code, temperature, delivery mode, use-by date, countries. Filter sccfcw_soap_request adjusts the request before it is sent.
* Improved: pickup point searches are cached for an hour (filter sccfcw_relay_cache_ttl) and time out after 10 seconds instead of blocking checkout when Chronopost is slow. The unused sccfcw_available_relays_* option is no longer written.
* Fixed: a pickup point is now checked against Chronopost’s list for the delivery address when the order is placed, and a point chosen for one postcode no longer follows the customer to another address. If Chronopost cannot be reached the point is accepted.
* Fixed: labels are stored in the order’s own meta, so they are found with High-Performance Order Storage without compatibility mode (labels written by earlier versions are adopted on first read). The ChronoFresh Labels box is now a normal meta box on the HPOS order screen; the script that injected it is gone.
* Fixed: Ask did not refuse when the Connector Approval matrix existed but did not list ChronoFresh, so prompts could reach any active connector. It now refuses until a connector is checked for ChronoFresh (filter sccfcw_ai_unpinned_when_not_listed restores the old behaviour).
* Fixed: the tracking email is plain text but its text was HTML-escaped, which showed &#039; for apostrophes.
* Added: uninstall.php. Deleting the plugin always removes the API password, logs and caches; a new setting “Delete all plugin data when the plugin is deleted” also removes the other settings, label PDFs and the pickup point and label data on orders.
* Removed: unused code for the legacy pickup point field and the cart shipping calculator.

1.4.3

October 20, 2026:
* Security: label requests and responses were saved as XML files in the public uploads folder on every label generation, including the Chronopost API password and customer contact details. They are now written only in Debug mode, with the password masked, and every XML file written by earlier versions is deleted on update.
* Security: PDF labels and daily logs are now stored with unguessable names in a folder closed to web browsers, and labels open only through WordPress for users who can manage WooCommerce. Existing labels and logs are moved over on update; their PDF buttons keep working.
* Fixed: product weights were read as kilograms whatever the store unit, so a shop set to grams sent 400 g as 400 kg and got one parcel (and one label) per order line. Weights are now converted from the store unit, for labels and pickup point searches.
* Fixed: the weight sent to Chronopost for a Mix and Match container now includes its contents, as the parcel splitting already did.
* Changed: parcels are split unit by unit above the max weight: 30 × 1 kg with a 20 kg limit now gives two parcels (20 kg + 10 kg) instead of one 30 kg parcel.
* Fixed: labels could be created twice. Each label is now saved as soon as Chronopost returns it; generating again skips parcels that already have an active label (button renamed Generate missing labels); bulk generation skips fully labelled orders. Cancel a label first to replace it.
* Fixed: a relay label accepted by Chronopost but returned without a valid PDF triggered a second request and a second parcel. The plugin no longer retries after Chronopost accepts a parcel; such a parcel is listed on the order without a PDF so it can be cancelled.
* Fixed: the tracking email was sent again on every generation. It now lists each parcel once, after a generation completes.
* Fixed: the “Generate label” action in the orders list showed no result; it now shows a success or error notice on the order screen.
* Improved: routine log lines written on every page view moved to Debug level; logs no longer contain raw form data or customer email addresses, and are deleted after 14 days. CSV export checks the user capability and neutralises spreadsheet formulas.
* Design: the ChronoFresh Labels box uses native WordPress admin styles (notices, list rows, muted cancelled state); “Parcel” is now translatable.
* Docs: readme FAQ (logs, label storage, several labels per order, generating again) and both user guides updated.

1.4.2

September 2, 2026:
* Fixed: the Ask feature ignored WordPress’s Connector Approval matrix and could send prompts to any active AI connector instead of only the one checked for ChronoFresh under Settings Connectors Approvals. It now pins the approved connector explicitly, and returns a clear error if none is checked.
* Fixed: the relay_5Q / relay_6S health-check ids never matched after sanitization, so a targeted check (Run checks panel, or Ask asking specifically about 5Q/6S) silently ran every diagnostic instead of just the one requested. No behavior change to the default “run everything” flow.

1.4.0

August 28, 2026:
* Added: optional Ask field (WordPress 7 AI plugin + a connector) under Connection health check and at the bottom of the order ChronoFresh Labels box. It only reads health diagnostics, the saved pickup point, or tracking. It never creates or cancels a label.
* Added: Abilities chronofresh/get-connection-health, chronofresh/get-pickup-point, chronofresh/get-tracking (manage_woocommerce, mcp.public).
* Docs: user guides cover Ask vs the existing Run checks / Track buttons.

1.3.3

August 26, 2026:
* Fixed: orders containing a WooCommerce Mix and Match Products container generated one label per child product instead of one for the whole container. Child items are now packed with their container instead of being treated as separate parcels, and no longer listed individually in the “ships as Ambient” notice.
* Improved: a Mix and Match container’s parcel weight now includes the combined weight of its child items, so it isn’t split into extra parcels just because the container product itself has no weight set.
* Note: WooCommerce Chained Products (StoreApps) adds its linked products as fully independent order items with no container reference to detect, so this fix does not apply to it — make sure each chained product has its own weight set on the product page (Shipping tab) so parcel splitting stays accurate.

1.3.2

August 26, 2026:
* Fixed: the pickup point block did not appear on the order confirmation (“thank you”) page when the active theme overrides WooCommerce’s order-details-customer.php template without the woocommerce_order_details_after_customer_details hook (common in custom themes). The block is now also attached to woocommerce_order_details_after_order_table, with a guard so standard themes never show it twice.
* Fixed: a pickup point selected on the cart page appeared deselected on the checkout page (and after every checkout refresh), forcing the customer to pick it again. The widget now restores the point saved in the session — highlighted in the list, marked on the map, opening hours shown — as long as it is still among the points available for the current address.
* Fixed: the “Generate label” button and the ChronoFresh Labels box were hidden on orders whose products had no temperature type saved yet (e.g. products created before the plugin), even though label generation ships those products as Ambient by default. The box now appears on any order using a ChronoFresh shipping method, and shows a notice listing products that will ship as Ambient so you can set Fresh/Freeze first.
* Docs: new FAQ entries explaining when the ChronoFresh Labels box appears and how products without a temperature type are shipped; troubleshooting rows added to both user guides.

1.3.1

August 26, 2026:
* Fixed: the pickup point chosen at checkout was not saved on the order. The save ran on woocommerce_checkout_create_order with update_post_meta() before the order existed (ID 0), so the meta was silently lost; it now uses update_meta_data() on the order object. Blocks (Store API) checkout, which never fired that hook, is now supported too, including the “please select a pickup point” validation.
* Fixed: when the pickup point meta was missing, label generation silently searched the nearest relay to the customer’s address and shipped there — potentially not the chosen point. This fallback is removed: the label now fails with a clear, actionable error instead.
* Added: the chosen pickup point (name, address, relay ID) is now visible on the admin order screen under the shipping address, on the customer’s thank-you page and order view, and in order emails. Orders placed before 1.3.1 with a missing point show an explicit warning.
* Fixed: the relay’s own postcode/city are now saved and used on the label (previously the customer’s address city was sent for the relay block).
* Fixed: the internal chronofresh_code shipping meta no longer appears in customer-facing order details and emails.

1.3.0

August 25, 2026:
* Added: explicit Test / Production mode setting. Test mode uses the public Chronopost sandbox account (nothing to type) and shows a persistent wp-admin warning banner, because sandbox labels are never actually shipped.
* Fixed: the sandbox credentials are no longer silent defaults. Installs that never configured real credentials used to generate sandbox labels that looked real; they now run in visible Test mode. In Production mode, missing credentials block label generation with a clear error instead of falling back to the sandbox.
* Added: connection health check replacing the old single “Test API connection” button. Per-service rows with live status: PHP SOAP extension, Chronopost server reachability, credentials, and real contract checks for pickup point product codes 86 / 5Q / 6S (Chronopost’s own error message is shown, e.g. when 6S is not on your contract). The label service is deliberately not simulated — the panel says so honestly.
* Compat: Tested up to WordPress 7.1.
* Docs: readme FAQ rewritten for Test/Production mode and the health check; docs/USER-GUIDE.md, docs/MODE-DEMPLOI.md and the built-in Getting started tab updated to match.
* Design: native WordPress admin CSS on WooCommerce ChronoFresh (settings, Getting started table/callout, health check panel).

1.2.1

  • Released on July 24, 2026:
  • Updated: All plugin UI source strings switched to English so WordPress.org translations (GlotPress) use English originals.
  • Updated: French remains available via the fr_FR translation file / translate.wordpress.org.

1.2.0

  • Released on July 22, 2026:
  • Added: New shipping method “Chrono Fresh Relais 13H” (product code 6S) — fresh delivery (0°C – 8°C) to pickup points, available at Chronofresh since the beginning of 2026.
  • Added: Pickup point map, opening hours and selection at checkout now fully support the fresh pickup point service.
  • Updated: Label generation maps fresh products to code 6S when a pickup point is selected (DLC/expiration date included as required by Chronofresh).
  • Updated: Getting Started guide with the new 6S product code.
  • Added: Bilingual user guide (English + French) shipped in the docs/ folder.

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.

1.0.4

  • Released on May 8, 2026:
  • Added: Interactive Leaflet map for pickup point selection.
  • Fixed: Compatibility issues with WooCommerce fragments and Stripe refreshes.
  • Improved: Performance and stability by removing legacy code and unused templates.
  • Improved: Better handling of AJAX race conditions at checkout.

1.0.3

Released on August 25, 2025:
* Added: Explicit select when no temperature is defined, which default to ambient for label generation, avoiding any unrecognized state for products linked to chronofresh via Expedition Class.

1.0.2

Released on August 22, 2025:
* Enhanced: Added support for mixed orders (ambient, fresh, freeze) with any shipping method, including custom methods like alg_wc_shipping.
* Fixed: Resolved fatal error when generating labels for orders with deleted or invalid products by safely handling null products.
* Improved: Updated label generation to rely on product temperature types (_temperature_type) instead of shipping method, ensuring accurate Chronopost codes (5M, 5Q, 2R, 2S).
* Updated: Default Chronopost test credentials to match provided API keys for seamless testing.
* Enhanced: Improved logging for skipped items and parcel splitting for better debugging.
* Boost your shipping with Premium features like real-time tracking and automated multi-label generation at deter-mi.net!

1.0.1

Released on August 9, 2025: Includes critical fix for nonce verification to ensure secure and pickup api call bug

1.0.0

  • Initial release with Chronofresh shipping and pickup point support.