Geolocation IP Detection 5.6.4 has 2 actions and 43 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Geolocation IP Detection fires an action
add_action( 'geoip_detect2_maxmind_ccpa_blacklist_do_upate', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Geolocation IP Detection is about to use
add_filter( 'geoip_detect2_locales', function( $locales ) {
// Change $locales here.
return $locales;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
geoip_detect2_locales
filter/** * Filter: geoip_detect2_locales */ apply_filters( 'geoip_detect2_locales', $locales ); -
geoip_detect_cron_do_update
filter/** * Filter: Cron has fired. Find out if file should be updated now. */ apply_filters( 'geoip_detect_cron_do_update', !GEOIP_DETECT_AUTO_UPDATE_DEACTIVATED, false ); -
/** * Filter: geoip_detect2_record_data_after_cache After loading the information * from the Geolocation-Database AND after the cache, you can add information * to it. */ apply_filters( 'geoip_detect2_record_data_after_cache', $data, $ip ); -
/** * Filter: geoip_detect2_record_data_override_lookup Before doing the lookup, * changing the data (similar to a cache but also when skipCache is on). */ apply_filters( 'geoip_detect2_record_data_override_lookup', $data, $ip, $options ); -
/** * Filter: geoip_detect_record_information After loading the information from * the Geolocation database, you can add or remove information from it. */ apply_filters( 'geoip_detect_record_information', $record, $ip ); -
/** * By default, all internal IPs may be reverse proxies. */ apply_filters( 'geoip_detect2_client_ip_whitelist_internal_ips', true ); -
/** * Filter: Cron has fired. Find out if dynamic reverse proxy data should be * updated now. */ apply_filters( 'geoip_detect2_dynamic-reverse-proxies_do_automatic_update', true ); -
/** * Filter: geoip_detect2_maxmind_ccpa_blacklist_ip_subnets */ apply_filters( 'geoip_detect2_maxmind_ccpa_blacklist_ip_subnets', $list ); -
/** * Filter: Cron has fired. Find out if ccpa data should be updated now. */ apply_filters( 'geoip_detect2_maxmind_ccpa_do_automatic_update', true ); -
/** * With this filter, you can disable checking the Maxmind Server for CCPA * blacklist updates. */ apply_filters( 'geoip_detect2_maxmind_ccpa_do_update', true ); -
/** * With this filter, you can disable checking the blacklist from Maxmind. If * you do so, make sure you are compliant to the EULA in a different way. */ apply_filters( 'geoip_detect2_maxmind_ccpa_enabled', true ); -
geoip_detect2_options
filter/** * Filter: geoip_detect2_options You can programmatically change the defaults * etc. */ apply_filters( 'geoip_detect2_options', $options ); -
geoip_detect2_reader
filter/** * Filter: geoip_detect2_reader You can customize your reader here. This filter * will be called for every IP request. */ apply_filters( 'geoip_detect2_reader', $reader, $locales ); -
geoip_detect2_record_data
filter/** * Filter: geoip_detect2_record_data After loading the information from the * Geolocation database, you can add information to it. */ apply_filters( 'geoip_detect2_record_data', $data, $ip ); -
/** * Filter: geoip_detect2_record_information Use * geoip_detect2_record_data_after_cache instead if you want to modify the * data. */ apply_filters( 'geoip_detect2_record_information', $original_record, $ip, $locales ); -
/** * Filter: geoip_detect2_shortcode_country_select_countries Change the list of * countries that should show up in the select box. You can add, remove, * reorder countries at will. If you want to add a blank value (for seperators * or so), use a key name that starts with 'blank_' and then something at will * in case you need several of them. */ apply_filters( 'geoip_detect2_shortcode_country_select_countries', $countries, $attr ); -
/** * You can override the detected location information here. E.g. "Show if in * Paris, but if the user has given an adress in his profile, use that city * instead" (Does not work in AJAX mode) */ apply_filters( 'geoip_detect2_shortcode_show_if_ip_info_override', $info, $attr, $showContentIfMatch ); -
/** * Customize which key in the $_SERVER array (Request headers) should be used * for Geo-Detection The country should be given in 2-letter ISO 3166-1 codes, * uppercase (DE) or lowercase (de). */ apply_filters( 'geoip_detect2_source_header_http_key', $httpKey, $this->options['provider'] ); -
/** * Filter: geoip2_detect_wpcf7_special_mail_tags This filter is called if a * GeoIP-detection-tag was used. */ apply_filters( 'geoip2_detect_wpcf7_special_mail_tags', $lines, $name, $isHtml ); -
apply_filters( 'geoip_detect_get_abs_db_filename', $data_filename ); -
apply_filters( 'geoip_detect_source_get_status_HTML_maxmind', $html, $this->getId() ); -
geoip_detect2_download_url
filterapply_filters( 'geoip_detect2_download_url', $download_url ); -
geiop_detect_ipservices
filterapply_filters( 'geiop_detect_ipservices', $ipservices ); -
apply_filters( 'geoip_detect_enqueue_javascript', true, $reason ); -
apply_filters( "geoip_detect_enqueue_javascript_{$reason}", $do_it ); -
apply_filters( 'geoip_detect_get_abs_mmdb_filename', $filename ); -
apply_filters( 'geoip_detect_get_external_ip_adress', $ip_cache ); -
apply_filters( 'geoip_detect2_ajax_allowed_domains', $allowed_domains ); -
apply_filters( 'geoip_detect2_ajax_localize_script_data', $data ); -
geoip_detect2_ajax_options
filterapply_filters( 'geoip_detect2_ajax_options', [] ); -
apply_filters( 'geoip_detect2_ajax_record_data', $data, isset($data['traits']['ip_address']) ? $data['traits']['ip_address'] : '' ); -
geoip_detect2_client_ip
filterapply_filters( 'geoip_detect2_client_ip', $ip, $ip_list ); -
apply_filters( 'geoip_detect2_client_ip_use_whitelist', false ); -
apply_filters( 'geoip_detect2_client_ip_whitelist', $this->proxyWhitelist ); -
apply_filters( 'geoip_detect2_dynamic_reverse_proxies_aws_pre_ranges', $ip_ranges ); -
apply_filters( 'geoip_detect2_dynamic_reverse_proxies_aws_types', ['CLOUDFRONT'] ); -
apply_filters( 'geoip_detect2_dynamic_reverse_proxies_aws_urls', 'https://ip-ranges.amazonaws.com/ip-ranges.json' ); -
apply_filters( 'geoip_detect2_dynamic_reverse_proxies_cloudflare_urls', ['https://www.cloudflare.com/ips-v4', 'https://www.cloudflare.com/ips-v6'] ); -
apply_filters( 'geoip_detect2_dynamic_reverse_proxies_ips', $ips, $forceSave ); -
do_action( 'geoip_detect2_maxmind_ccpa_blacklist_do_upate' ); -
apply_filters( 'geoip_detect2_maxmind_ccpa_blacklist_url', 'api.maxmind.com/privacy/exclusions' ); -
do_action( 'geoip_detect2_options_changed' ); -
apply_filters( 'geoip_detect2_shortcode_show_if_else_seperator', '[else]' ); -
apply_filters( 'geoip_detect2_shortcode_show_if_parsed_result', $parsed, $attr, !$hide_if ); -
apply_filters( 'geoip2_detect_sources_not_cachable', [ 'auto', 'manual', 'header' ] );
Generated from Geolocation IP Detection's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: