Documentation

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
Shipping Rate
Default5,000 FCFA
Centre (Region)4,000 FCFA
Yaoundé (City)2,500 FCFA
Bastos (Neighborhood)1,500 FCFA
Most specific rule wins

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.

Address validated
Neighborhood doesn't match city

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
Delivery Zones
Centreavailable
Littoralblocked
Ouestavailable
Extrême-Nordblocked

Geo Data Manager

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

  1. 1Go to WooCommerce → AfriRegions → Geo Data
  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

Pickup Points

Pro

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
Select Pickup Point
Express Store Bastos
Rue 1.754, Yaoundé
Relay Point Mokolo
Marché Mokolo, Yaoundé

Travel Agency Shipping

Pro

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

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"

Statistics & Activity Log

Track orders by region and city with revenue leaderboards, date filters, and geographic breakdown. The Activity Log records every change — who added a city, who deleted a neighborhood, with timestamps.

REST API

Pro

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