Skip to main content

How to Use AfriRegions

Step-by-step guide to install, configure, and get the most out of the plugin.

Installation

Prerequisites
WordPress 5.8+WooCommerce 6.0+PHP 7.4+
  1. 1Upload the plugin to /wp-content/plugins/ or install from WordPress.org
  2. 2Activate via the Plugins menu
  3. 3Go to WooCommerce → Settings → General and add your African countries to selling/shipping locations
  4. 4Navigate to WooCommerce → AfriRegions to configure

Zone-Based Shipping

Define different shipping rates for each region, city, or neighborhood. The most specific rule always wins.

  1. 1Go to WooCommerce → Shipping → Create or edit a shipping zone
  2. 2Click Add Shipping Method → select Zone Shipping
  3. 3Set a Default price (fallback rate)
  4. 4Add rules for specific regions, cities, or neighborhoods
  5. 5Optionally set a Free Shipping threshold
  6. 6Add Shipping Tiers (Pro) for Express / Same Day options with surcharges
DeidoNeighborhood1,000 CFA
DoualaCity1,500 CFA
LittoralRegion2,000 CFA
Default2,500 CFA

Address Validation

Automatically verifies that the selected neighborhood belongs to the chosen city. Blocks checkout if there's a mismatch, preventing wrong deliveries before they happen.

City
Douala
NeighborhoodDeido

Delivery Restrictions

Block orders from regions or cities you don't serve yet. Customers see a custom message like "We're expanding to your area soon!"

  1. 1Go to WooCommerce → AfriRegions → Restrictions
  2. 2Toggle Enable Restrictions
  3. 3Set your custom blocked message
  4. 4Check entire regions or individual cities to block
  5. 5Save, blocked zones are enforced at checkout
Littoral
Douala
Extrême-Nord

Zones Manager

Add, edit, or remove cities and neighborhoods for any region. All changes happen via AJAX, no page reloads.

  1. 1Go to WooCommerce → AfriRegions → Zones
  2. 2Use the search bar to find a region
  3. 3Expand a region to see its cities
  4. 4Click "Add a city" and enter the name
  5. 5Expand a city to see neighborhoods, click "Add" to create new ones
  6. 6Delete cities or neighborhoods with the X button
Littoral
Douala
Deido
Akwa

Smart Search

Customers type a neighborhood name and all address fields auto-fill instantly. Fuzzy matching tolerates typos, typing "Bsatos" still finds "Bastos".

  1. 1Go to Settings → enable Smart Search
  2. 2Customize colors in Smart Search Appearance (optional)
  3. 3At checkout, a search field appears above the dropdowns
  4. 4Customer types a name → results show neighborhoods, cities, regions
  5. 5Selecting a result auto-fills Region, City, and Neighborhood
  6. 6Last 5 selections are remembered for returning customers
deido
Deido, Douala, Littoral
Deido Nord, Douala

Pickup Points

Let customers collect orders from relay points, partner stores, or branch offices. Points are auto-filtered by the customer's city.

  1. 1Go to WooCommerce → Shipping → Add Shipping Method → Pickup Point
  2. 2Add pickup locations with name, address, city, phone, and hours
  3. 3At checkout, customers see only points in their city
  4. 4If none in their city, points from their region are shown
  5. 5Selected point is saved with the order for fulfillment
AfriRelais Akwa
Rue Joss, Akwa · Douala
500 CFA
Point Bonanjo
Blvd de la Liberté · Douala
500 CFA

Travel Agency Shipping

Intercity delivery via travel agencies and bus companies, a common delivery model in Cameroon, Senegal, Cote d'Ivoire, and more. Route-based pricing with agency selection.

  1. 1Go to WooCommerce → Shipping → Add Shipping Method → Travel Agency
  2. 2Define agencies (name, address, phone, hours)
  3. 3Set route prices: Default → Region → City (most specific wins)
  4. 4At checkout, customer selects their preferred agency
  5. 5Price is based on route, not agency, agency is for pickup location
DoualaYaoundé3,000 CFA
Général Express Voyages
Central Voyages

Landmark Field

Adds an optional "How to find me" text field at checkout. Customers describe landmarks near their address, essential in areas without formal street names.

Example

"Opposite Total station, blue building, 2nd floor"

Neighborhood · directions
Près de la station Total, portail bleu, 2e étage

REST API

Access geographic data programmatically via /wp-json/scpwoo/v1/. Rate-limited (120 req/min), CORS-protected, opt-in via Settings.

GET /wp-json/scpwoo/v1/regions
GET /wp-json/scpwoo/v1/regions/{code}
GET /wp-json/scpwoo/v1/cities
GET /wp-json/scpwoo/v1/cities/{name}
GET /wp-json/scpwoo/v1/neighborhoods
GET /wp-json/scpwoo/v1/neighborhoods/{city}
GET /wp-json/scpwoo/v1/search?q=query