Title: AfriHex Address for WooCommerce
Author: yeboah70
Published: <strong>November 25, 2026</strong>
Last modified: November 25, 2026

---

Search plugins

![](https://ps.w.org/afrihex-address-for-woocommerce/assets/banner-772x250.png?rev
=3821766)

![](https://ps.w.org/afrihex-address-for-woocommerce/assets/icon-256x256.png?rev
=3821766)

# AfriHex Address for WooCommerce

 By [yeboah70](https://profiles.wordpress.org/yeboah70/)

[Download](https://downloads.wordpress.org/plugin/afrihex-address-for-woocommerce.0.1.0.zip)

 * [Details](https://wordpress.org/plugins/afrihex-address-for-woocommerce/#description)
 * [Reviews](https://wordpress.org/plugins/afrihex-address-for-woocommerce/#reviews)
 *  [Installation](https://wordpress.org/plugins/afrihex-address-for-woocommerce/#installation)
 * [Development](https://wordpress.org/plugins/afrihex-address-for-woocommerce/#developers)

 [Support](https://wordpress.org/support/plugin/afrihex-address-for-woocommerce/)

## Description

Ghanaian addresses are given as GhanaPostGPS codes (“GA-183-8164”) or as directions(“
opposite Goil, Madina Zongo Junction”). Street-and-number address forms lose both.
This plugin adds a **Delivery location** field to the checkout:

 * Type a GhanaPostGPS code, a place name, or landmark directions; suggestions appear
   as you type.
 * Or tap “Use my current location”.
 * The chosen spot shows on a small map. The customer can drag the pin to their 
   gate.
 * When the order is placed, the location is checked on your server with AfriHex(`
   POST /v2/address/validate`) and saved on the order: GhanaPostGPS code, coordinates,
   verdict (verified / confirm with customer / could not locate), landmark, and 
   entrance details such as “2nd gate · blue gate”.
 * The location appears on the admin order page, in order emails, on the customer’s
   order page, and in the REST API (`afrihex_location` on `/wp-json/wc/v3/orders`),
   so delivery partners get it.

If AfriHex can’t be reached, checkout is **not** blocked: the order is saved with
what the customer typed, marked “Not checked yet”, and checked again automatically(
after 5 minutes, 30 minutes and 3 hours). You can also re-check from the order page,
optionally with a corrected GhanaPostGPS code.

Works with both the block-based Checkout and the classic `[woocommerce_checkout]`
shortcode, and with High-Performance Order Storage.

#### External service

This plugin uses the AfriHex API (https://api.afrihex.com), operated by AfriHex.

 * In the customer’s browser, as they type: what they type, and their location if
   they tap “Use my current location”, is sent with your **publishable** key to 
   look up suggestions.
 * On your server, when an order is placed: the delivery location the customer chose
   and the order’s address lines are sent with your **secret** key to check them.
 * The map loads tiles from the tile server set in the settings (OpenStreetMap by
   default, https://www.openstreetmap.org, tile usage policy: https://operations.
   osmfoundation.org/policies/tiles/).

The map uses Leaflet 1.9.4 (BSD-2-Clause, https://leafletjs.com), bundled in assets/
vendor/leaflet.

AfriHex terms: https://afrihex.com/terms — privacy: https://afrihex.com/privacy

## Screenshots

[⌊The field at checkout with the chosen place and draggable pin.⌉⌊The field at checkout
with the chosen place and draggable pin.⌉[

The field at checkout with the chosen place and draggable pin.

[⌊Suggestions for a GhanaPostGPS code.⌉⌊Suggestions for a GhanaPostGPS code.⌉[

Suggestions for a GhanaPostGPS code.

[⌊The delivery location on the admin order page.⌉⌊The delivery location on the admin
order page.⌉[

The delivery location on the admin order page.

[⌊Settings.⌉⌊Settings.⌉[

Settings.

## Blocks

This plugin provides 1 block.

 *   AfriHex delivery location

## Installation

 1. Upload the `afrihex-address-for-woocommerce` folder to `/wp-content/plugins/`, 
    or upload the zip under Plugins  Add New  Upload.
 2. Activate it. WooCommerce must be active.
 3. Go to **WooCommerce  AfriHex Address**.
 4. Paste your publishable key (`afx_pub_…`). In the AfriHex dashboard, add your shop’s
    address (shown on the settings page, e.g. `https://myshop.com.gh`) to that key’s
    websites.
 5. Paste your secret key (`afx_live_…`) and, for testing, your test key (`afx_test_…`).
    Click **Test secret key**.
 6. Open your checkout. The field appears under the shipping address; nothing needs
    to be added to the page.

Secret keys can instead be set in `wp-config.php`:

    ```
    define( 'AFRIHEX_SECRET_KEY', 'afx_live_…' );
    define( 'AFRIHEX_TEST_SECRET_KEY', 'afx_test_…' );
    ```

## FAQ

### Is my secret key sent to the browser?

No. Only the publishable key, which only works from your shop’s own web address 
and only for lookups, is put in the checkout page. The secret key is used from your
server and is never printed into any page, including the settings page.

### What happens if AfriHex is down?

The order goes through. What the customer typed is saved, the order is marked “Not
checked yet”, and the check is retried automatically. Nothing is lost.

### Can I stop orders with an address that can’t be found?

Yes: tick “Ask the customer to correct an address AfriHex cannot locate”. By default
such orders go through and are flagged “Could not locate” for you to follow up.

### What is removed when I delete the plugin?

Its settings and scheduled retries. Locations saved on past orders are kept. To 
remove those too, add `define( 'AFRIHEX_REMOVE_ALL_DATA', true );` to `wp-config.
php` before deleting.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“AfriHex Address for WooCommerce” is open source software. The following people 
have contributed to this plugin.

Contributors

 *   [ yeboah70 ](https://profiles.wordpress.org/yeboah70/)

[Translate “AfriHex Address for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/afrihex-address-for-woocommerce)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/afrihex-address-for-woocommerce/),
check out the [SVN repository](https://plugins.svn.wordpress.org/afrihex-address-for-woocommerce/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/afrihex-address-for-woocommerce/)
by [RSS](https://plugins.trac.wordpress.org/log/afrihex-address-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.1.0

 * First version.

## Meta

 *  Version **0.1.0**
 *  Last updated **2 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.4 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [address](https://wordpress.org/plugins/tags/address/)[checkout](https://wordpress.org/plugins/tags/checkout/)
   [delivery](https://wordpress.org/plugins/tags/delivery/)[ghana](https://wordpress.org/plugins/tags/ghana/)
 *  [Advanced View](https://wordpress.org/plugins/afrihex-address-for-woocommerce/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/afrihex-address-for-woocommerce/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/afrihex-address-for-woocommerce/reviews/)

## Contributors

 *   [ yeboah70 ](https://profiles.wordpress.org/yeboah70/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/afrihex-address-for-woocommerce/)