=== Fofo Express for WooCommerce ===
Contributors: fofoexpress
Tags: delivery, shipping, benin, cotonou, courier
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Home delivery by Fofo Express couriers in Cotonou and its surroundings: price at checkout, delivery created from the order, live status.

== Description ==

Fofo Express is a home delivery service in Benin. This plugin connects your WooCommerce shop to your Fofo Express account, so your orders become deliveries without retyping anything.

**At checkout**

* A "Fofo Express" shipping method, priced with the Fofo Express rate card for the customer's neighbourhood, or a fixed price of your choice (with adjustment, rounding and free delivery above an amount).
* A neighbourhood list and an optional map: the customer places a pin at their door or uses their current position. With a pin, the price is exact and the courier is called without waiting for the customer.
* Works with the block checkout and the classic checkout.

**In your orders**

* Automatic sending when an order reaches the status you choose, or manual validation of each order (one by one or in bulk).
* A Fofo Express box on the order: status and progress, pickup code for the courier, courier name and phone, amount to collect, cancellation, resending after a failure.
* A "Delivery" column in the order list.
* Order notes at each step; the order is marked "Completed" when delivered.
* Cash on delivery: the courier collects the order total for the payment methods you choose.
* Email alerts when a delivery fails, is cancelled or expires.

**For your customers**

* Delivery progress in "My account" and a mention in WooCommerce emails.
* The customer receives the tracking link and the delivery code by WhatsApp from Fofo Express.

**Sandbox**

Test everything with a sandbox key and a simulated courier, then switch to production.

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. In your Fofo Express web space, open Developers › API keys and create a key with the delivery and quote scopes.
3. In WooCommerce › Settings › Fofo Express, paste the key, save, then click "Test the connection" and choose your pickup point.
4. In WooCommerce › Settings › Shipping, add the "Fofo Express" method to the zone that covers Benin.
5. Optional, for instant updates: in Developers › Webhooks, add the webhook address shown in the plugin settings and paste the signing secret in the plugin.

Your shop currency must be the West African CFA franc (XOF).

== Frequently Asked Questions ==

= Do I need a Fofo Express account? =

Yes, a validated shop account. Sign up in the Fofo Express mobile app or at https://fofoexpress.com.

= Who pays the delivery? =

You do: Fofo Express charges the delivery to your shop. What the customer pays at checkout is up to you (Fofo Express rate, fixed price, free delivery above an amount).

= What if the customer does not place a pin? =

Fofo Express sends them a WhatsApp link to share their location before a courier is called.

= Can I check each order before a courier is called? =

Yes. Tick "I validate each order before a courier is called" in the settings, then send orders from the order screen or in bulk from the order list.

= Does it work without webhooks? =

Yes. Deliveries in progress are refreshed every 10 minutes. Webhooks make updates instant.

== External services ==

This plugin relies on the following third-party services.

**Fofo Express API** (https://api.fofoexpress.com, and https://sandbox-api.fofoexpress.com in sandbox mode)
Used to load your delivery zones, pickup points and parcel categories, to compute delivery prices, and to create, follow and cancel deliveries.
Data sent: when a price is shown at checkout, the pickup point and the customer's neighbourhood or pin coordinates; when a delivery is created, the customer's first and last name, phone number, delivery coordinates and landmark if given, address, order number, item names and quantities, customer note and amount to collect. The service also sends delivery updates back to your site (webhooks).
Terms of use: https://www.fofoexpress.com/conditions — Privacy policy: https://www.fofoexpress.com/confidentialite

**OpenStreetMap tiles** (https://tile.openstreetmap.org)
Used to display the map at checkout when the map is enabled. The customer's browser requests map images from OpenStreetMap; its IP address and the viewed area are sent to the OpenStreetMap Foundation.
Tile usage policy: https://operations.osmfoundation.org/policies/tiles/ — Privacy policy: https://osmfoundation.org/wiki/Privacy_Policy

The map can be switched off in WooCommerce › Settings › Fofo Express.

== Third-party libraries ==

* Leaflet 1.9.4 (BSD-2-Clause), https://leafletjs.com — source: https://github.com/Leaflet/Leaflet/tree/v1.9.4

== Screenshots ==

1. Settings with the setup checklist.
2. Fofo Express box on an order.
3. Delivery map at checkout.
4. Delivery column in the order list.

== Changelog ==

= 0.1.0 =
* First version.
