Hi, @asmolyakov
It should work. I am able to reproduce the location blocking as follows:
Blacklist of extra IP addresses prior to country code/pattern:
2603:6081:54F0:02D0:0000:0000:0000:0000/64
My test IPv6 is:
2603:6081:54f0:2d0:adeb:aa77:52a:ae6e
Hardcode custom IPv4/IPv6 address for testing:
/**
* Example 1: Usage of 'ip-location-block-ip-addr'
* Use case: Replace ip address for test purpose
*
* @param string $ip original ip address
*
* @return string $ip replaced ip address
*/
function my_replace_ip( $ip ) {
return '2603:6081:54f0:2d0:adeb:aa77:52a:ae6e'; // IPV6
}
add_filter( 'ip-location-block-ip-addr', 'my_replace_ip' );