aam_get_user_ip_address_filter
Purpose
Override the client IP used by security and geo features.
Callback
- Type: Filter.
- Arguments:
$ip. - Return: the filtered first argument.
Example
add_filter('aam_get_user_ip_address_filter', function ($ip) {
return $ip ?: ($_SERVER['REMOTE_ADDR'] ?? null);
}, 10, 1);
Falls back to the server-reported address only when AAM has no IP. Trust forwarded headers only behind a configured proxy.
See the complete hook list.