
外掛標籤
開發者團隊
② 後台搜尋「AfriHex Address for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
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
