=== Sendelly – Points relais ===
Contributors: sendelly
Tags: shipping, pickup points, point relais, relay, woocommerce
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Offer Sendelly carrier pickup points (points relais) as native WooCommerce shipping options at checkout.

== Description ==

Sendelly is a multi-tenant fulfillment platform: connect your e-commerce stores, sync orders, pick & pack with a barcode-driven flow, and hand shipments to carriers (labels, pickup points, live tracking).

This plugin brings **carrier pickup points (points relais)** to your WooCommerce checkout:

* The nearest pickup points (Chronopost, Mondial Relay, and any other carrier configured in your Sendelly account) appear as **native shipping options** — each point is one selectable line with its name, distance and address.
* Works in **both** the classic shortcode checkout and the **Checkout Blocks** — no custom JavaScript, no iframe, no map widget.
* When the buyer picks a point and orders, the plugin stamps the order so Sendelly's order sync resolves the chosen pickup point automatically — the shipping label is created for that point.
* The price is yours: set it on the shipping method instance, or leave it empty and let a Sendelly shipping rule decide.

Requirements: a Sendelly account with this WooCommerce store connected. The connection takes one paste: copy the connection code from the Sendelly dashboard into the shipping method settings.

Compatible with High-Performance Order Storage (HPOS) and the cart/checkout Blocks.

== Installation ==

1. Upload the plugin through Plugins → Add New → Upload Plugin (or unzip it into `wp-content/plugins/`), then activate it.
2. In the Sendelly dashboard, open Configuration → Boutiques, select (or connect) this WooCommerce store and copy its **connection code**.
3. In WordPress, go to WooCommerce → Settings → Shipping → **Sendelly – Pickup points**, paste the connection code and save. The status row should show "Connected"; use "Test connection" to verify.
4. Add **Sendelly – Pickup points** as a shipping method to the shipping zone(s) where you want to offer pickup points (e.g. France).
5. Optionally set a price on the method instance — leave it empty to let your Sendelly shipping rules price it.

== Frequently Asked Questions ==

= Où trouver le code de connexion ? =

Dans le tableau de bord Sendelly : Configuration → Boutiques → réglages de la boutique WooCommerce. Copiez le code de connexion et collez-le dans WooCommerce → Réglages → Expédition → Sendelly – Pickup points.

= Does it work with the Checkout Blocks? =

Yes. The pickup points are ordinary WooCommerce shipping rates, so they render natively in the classic checkout and in the Checkout Blocks alike.

= What data is sent to Sendelly? =

At checkout, the destination address, the cart contents (titles, quantities, weights, totals) and your configured price tier are sent to your own Sendelly store endpoint, signed with the secret from your connection code. No payment data is ever sent.

= The pickup points do not show up at checkout. =

Check that: the plugin is connected (status row in the method settings), the method is added to the matching shipping zone, and the customer entered a postcode or city. Enable "Debug logging" and read the `sendelly` source in WooCommerce → Status → Logs.

== Changelog ==

= 1.1.0 =
* Rates requests now carry a signed timestamp (`X-Sendelly-Timestamp`); requests older than 5 minutes are rejected by Sendelly, so a captured request cannot be replayed. Requires the current Sendelly API.
* Prices use Sendelly's fixed ×100 minor-unit convention for every currency (zero- and three-decimal currencies were mispriced).
* The connection code's rates URL must point at Sendelly (`sendelly-woocommerce/` filter `sendelly_wc_allowed_rates_hosts` for self-hosted backends).
* The debug log no longer contains the buyer's address.

= 1.0.0 =
* Initial release: nearest carrier pickup points as native shipping rate lines (classic + Blocks checkout), order meta stamping for Sendelly order sync, connection code settings with test button, French translation.
