Skip to content

Instantly share code, notes, and snippets.

@primozcigler
Last active December 9, 2016 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save primozcigler/4fb346fea293e13d2df66c7aeb788fb0 to your computer and use it in GitHub Desktop.
Save primozcigler/4fb346fea293e13d2df66c7aeb788fb0 to your computer and use it in GitHub Desktop.
proposed change for edd-vat wp plugin
// https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-
if ( apply_filters( 'edd_vat_use_cf_ip_header', false ) && ! empty( $_SERVER['HTTP_CF_IPCOUNTRY'] ) && 'XX' !== $_SERVER['HTTP_CF_IPCOUNTRY'] )
{
$this->ip_address_country = $_SERVER['HTTP_CF_IPCOUNTRY'];
return $this->ip_address_country;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment