=== Oce'Relay Point Relais ===
Contributors: rorosoa
Tags: point relais, delivery, la reunion, shipping, woocommerce
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
WC requires at least: 7.0
WC tested up to: 11.0
Stable tag: 1.0.0
Donate link: https://ocerelay.com
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Pickup point delivery for La Reunion Island: interactive map, pickup point selection at checkout, automatic shipment creation.

== Description ==

Oce'Relay Point Relais adds a pickup point delivery method to your WooCommerce store, dedicated to La Reunion Island (France).

**Features**

* Interactive map (OpenStreetMap/Leaflet) showing Oce'Relay pickup points, with automatic marker clustering
* Paginated list with search by name, address or postal code
* Customer geolocation: automatic sort by distance, distance badge in km
* Opening hours and status (open / closing soon / closed) shown for each pickup point
* Compatible with both the classic checkout and the WooCommerce block checkout
* Weight-based pricing table, or a fixed rate negotiated with Oce'Relay
* Configurable free shipping threshold
* Pickup point selection is required before the order can be placed
* Shipping address automatically replaced with the selected pickup point's address
* Shipment automatically created with Oce'Relay when payment is confirmed
* Tracking code and shipping label link shown directly on the order admin screen
* Return handling (return shipment to a pickup point chosen by the merchant)

**Requirements**

An Oce'Relay API key is required to use this plugin. It is provided in your Oce'Relay merchant account ([ocerelay.com](https://ocerelay.com)). The Oce'Relay pickup point delivery service is only available for deliveries to La Reunion Island.

== Installation ==

1. Install and activate WooCommerce if you haven't already.
2. Upload the plugin via **Plugins > Add New > Upload Plugin**, or install it directly from the WordPress.org plugin directory.
3. Activate the plugin.
4. Go to **WooCommerce > Settings > Oce'Relay** and enter your API key.
5. Click **Synchronize pickup points**.
6. Go to **WooCommerce > Settings > Shipping**, add a shipping zone covering La Reunion Island, and add the **Point Relais Oce'Relay** shipping method to it.

== Frequently Asked Questions ==

= Where do I find my Oce'Relay API key? =

In your Oce'Relay merchant account on ocerelay.com.

= Does the plugin work outside of La Reunion Island? =

No, the Oce'Relay service is only available for deliveries to La Reunion Island (country code RE, or a French postal code starting with 974).

= Does the pickup point selector work with the block checkout? =

Yes, the plugin automatically detects the checkout type (classic or blocks) and adapts without any extra configuration.

= How do I refresh the list of pickup points? =

Go back to **WooCommerce > Settings > Oce'Relay** and click **Synchronize pickup points** again whenever Oce'Relay adds or updates pickup points.

== External services ==

This plugin connects to the Oce'Relay API (api.ocerelay.com) to provide pickup point delivery for La Reunion Island. This is the plugin's core service — without it, the plugin has no functionality, since it is a dedicated connector to the merchant's own Oce'Relay carrier account.

The following requests are made to the Oce'Relay API:

* When the merchant clicks "Synchronize pickup points" in the plugin settings: the list of Oce'Relay pickup points (name, address, coordinates, opening hours) is fetched and stored locally as a WordPress option.
* When a customer's order is confirmed (payment complete, processing, or completed): the order's shipping name, email, phone, delivery address, weight and the chosen pickup point ID are sent to Oce'Relay to create the shipment. A tracking code and label URL are returned and stored on the order.
* When a WooCommerce refund is created for an order that has an Oce'Relay shipment: a return shipment request is sent to Oce'Relay (order number only).
* When the merchant selects a pickup point for a return, from the order admin screen: the chosen pickup point ID is sent to Oce'Relay.

All requests are authenticated with the merchant's own Oce'Relay API key, configured in the plugin settings. Data is only sent for stores that have an active Oce'Relay merchant account and have chosen the Oce'Relay shipping method.

This service is provided by Oce'Relay: [Terms of Service](https://www.ocerelay.com/cgu), [Privacy Policy](https://www.ocerelay.com/donnees-personnelles).

This plugin also loads map tiles from OpenStreetMap (`tile.openstreetmap.org`) to display the interactive pickup point map at checkout. See [OpenStreetMap's Privacy Policy](https://osmfoundation.org/wiki/Privacy_Policy) for details.

== Screenshots ==

1. Interactive pickup point map at checkout, with marker clustering
2. Paginated pickup point list with search, distance and opening hours
3. Plugin settings under WooCommerce > Settings > Oce'Relay
4. Shipment tracking and label link on the order admin screen

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
