WordPress Plugin
WordPress plugin with API settings and reusable helper calls.
Overview
The plugin stores API credentials in admin settings and provides functions to resolve visitor GEO/IP profile or request lookup for any explicit IP.
Setup Guide
- Download plugin ZIP.
- Upload in WordPress plugins page.
- Activate and configure API endpoint and key.
- Use helper functions in theme/plugin code.
Implementation Notes
- Install and activate the package in your CMS.
- Set API endpoint and API key in module settings.
- Validate client IP detection and User-Agent forwarding.
- Call lookup before auth/checkout/risk decisions.
- Add fallback handling for timeout/429/5xx responses.
Recommended flow: GEO/IP context first, business rules second.
Minimum CMS Version
WordPress 6.0+ (PHP 7.4+)
README: implementation details
WordPress plugin quick flow:
1) Copy portcore-geoip -> wp-content/plugins/
2) Activate plugin in admin
3) Configure Settings -> Portcore GEOIP (endpoint + key)
Lookup:
$geo = pc_geoip_lookup('2001:bc8:1da0:1e:da5e:d3ff:fe6f:dc87');
Optional context:
$geo = pc_geoip_lookup('8.8.8.8', ['user_id' => 'crm_501', 'user_agent' => 'Custom-UA/1.0']);
Summary:
echo pc_geoip_render_summary($geo);