<span style=”caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; white-space: normal;”>What is the best plugin for location detection?</span>
]]>Hi my awesome support,
Data source: HostIP.info Web-API
When using the shortcode [geoip_detect2 property="city"]
, it returns Columbus, OH
, which is great.
Then I tried these shortcodes:
[geoip_detect2_show_if country="US" city="Columbus, OH"]Welcome to Columbus, OH[/geoip_detect2_show_if]
[geoip_detect2_show_if country="US" city="Columbus"]Welcome to Columbus, OH[/geoip_detect2_show_if]
[geoip_detect2_show_if city="Columbus"]Welcome to Columbus, OH[/geoip_detect2_show_if]
None of them shows the expected text.
Please help and thank you so much!
]]>We are currently operating a multilingual website using Polylang Pro and are seeking a sophisticated geolocation-based redirection solution.
Our specific requirements are as follows:
We’re interested to know if your service can provide a solution that integrates seamlessly with Polylang Pro to achieve this functionality. If so, could you please provide details on the implementation process and any associated costs?
Thank you for your time and expertise. We look forward to your response.
Best regards
Hagai Shaul
]]>Hi, thanks for the plugin. Its great.
I was wondering if there is any workaround to avoid affecting the response time of the visits?
After activating the plugin, and starting using it. I found out that my response time has increased X4
thanks
]]>Is there a daily limit for the initial setup of the data source, HostIP.info Web-API?
In my environment, using the MaxMind City or Country database poses a risk due to conflicts with other plugins. Therefore, if the limitations aren’t too restrictive, I would like to continue using the default settings.
]]>Just updated from a very old version to the latest with PHP8.3, I got this error:
Fatal error: Uncaught Error: Undefined constant “GEOIP_DETECT_DEBUG” in /home/gtisoft/home3/website-implementation/staging/wp-content/plugins/geoip-detect/check_requirements.php:82 Stack trace: #0 /home/gtisoft/home3/website-implementation/staging/wp-content/plugins/geoip-detect/geoip-detect.php(61): geoip_detect_version_check_after_plugins_loaded() #1 /home/gtisoft/home3/website-implementation/staging/wp-includes/class-wp-hook.php(324): {closure}(”) #2 /home/gtisoft/home3/website-implementation/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/gtisoft/home3/website-implementation/staging/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/gtisoft/home3/website-implementation/staging/wp-settings.php(555): do_action(‘plugins_loaded’) #5 /home/gtisoft/home3/website-implementation/staging/wp-config.php(118): require_once(‘/home/gtisoft/h…’) #6 /home/gtisoft/home3/website-implementation/staging/wp-load.php(50): require_once(‘/home/gtisoft/h…’) #7 /home/gtisoft/home3/website-implementation/staging/wp-blog-header.php(13): require_once(‘/home/gtisoft/h…’) #8 /home/gtisoft/home3/website-implementation/staging/index.php(17): require(‘/home/gtisoft/h…’) #9 {main} thrown in /home/gtisoft/home3/website-implementation/staging/wp-content/plugins/geoip-detect/check_requirements.php on line 82
Any clue how to fix it?
]]>Hello,
I am using the latest version of Geolocation IP Detection on my website, and in preparation to site migration to PHP 8.1, I tested plugin compatibility with PHP 8.1 using PHPCompatibility tool. There are multiple issues with the plugin code, please see the output below. Please let me know when do you plan to resolve these.
Thanks,
Mike
FILE: …tested\geoip-detect\vendor\symfony\polyfill-intl-normalizer\Normalizer.php FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
93 | WARNING | INI directive 'mbstring.func_overload' is deprecated since PHP | | 7.2
FILE: …-untested\geoip-detect\vendor\symfony\property-access\PropertyAccessor.php FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
125 | WARNING | Since PHP 7.0, functions inspecting arguments, like
| | func_get_arg(), no longer report the original value as passed
| | to a parameter, but will instead provide the current value.
| | The parameter "$writeInfoExtractor" was used, and possibly | | changed (by reference), on line 124.
FILE: …ent\plugins-untested\geoip-detect\vendor\symfony\string\AbstractString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …gins-untested\geoip-detect\vendor\symfony\string\AbstractUnicodeString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …content\plugins-untested\geoip-detect\vendor\symfony\string\ByteString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …nt\plugins-untested\geoip-detect\vendor\symfony\string\CodePointString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …tested\geoip-detect\vendor\symfony\string\Exception\ExceptionInterface.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …\geoip-detect\vendor\symfony\string\Exception\InvalidArgumentException.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …untested\geoip-detect\vendor\symfony\string\Exception\RuntimeException.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE) FILE: …untested\geoip-detect\vendor\symfony\string\Inflector\EnglishInflector.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …-untested\geoip-detect\vendor\symfony\string\Inflector\FrenchInflector.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …tested\geoip-detect\vendor\symfony\string\Inflector\InflectorInterface.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …content\plugins-untested\geoip-detect\vendor\symfony\string\LazyString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …lugins-untested\geoip-detect\vendor\symfony\string\Resources\functions.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …ugins-untested\geoip-detect\vendor\symfony\string\Slugger\AsciiSlugger.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …s-untested\geoip-detect\vendor\symfony\string\Slugger\SluggerInterface.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
FILE: …tent\plugins-untested\geoip-detect\vendor\symfony\string\UnicodeString.php FOUND 1 ERROR AFFECTING 1 LINE
12 | ERROR | 'string' is a reserved keyword as of PHP version 7.0 and should
| | not be used to name a class, interface or trait or as part of a | | namespace (T_NAMESPACE)
Time: 5.13 secs; Memory: 66MB
]]>
Topic resolved.
Please ignore and delete.
I am using this plugin to detect geoip location of the user but at the same time i am using WP Fastest Cache Plugin to load website faster. But, cache is not providing the latest geoip of the user. So, i have disabled cache plugin now. Is there anything we can do to fix this issue?
]]>Hi,
I try to show/hide some content for visitors from M?nchengladbach (and Erkelenz). So I tried this shortcode:
[geoip_detect2_show_if city=”M?nchengladbach” operator=”or” city=”Erkelenz”]
But this one doesn’t work correctly, only for the city ?Erkelenz“, but not for ?M?nchengladbach“. Any idea, why this could be? Or is it not possible to check for two cities with the operator or?
Thanks for any help
Anna
I got this email from Maxmind. Does anyone know if this plugin is compatible with this change? Is there anything I need to do in the plugin settings to ensure it can follow redirects and connect to the hostname mentioned?
]]>Hi! Great plugin and it works awesome!
Just hit a road block, and would like your thoughts on how to run a jQuery snippet when the body class (added by) geoeip-detect is added via Ajax?
Sample$(document).ready(function($) {
if ($('body').hasClass('geoip-country-AU')) { //class added by geo-ip detect via AJAX
$('#pum-3882').popmake('open');
}
});
I used Maxmind to get user information in contact form 7 but in every email i get same user information like below
Using (user agent): Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36
Date and Time: April 16, 2024 1:20 pm
Postcode:
TimeZone: America/Chicago
Internet Service Provider: Affinity-inter
IP of the user: 216.36.236.0
Country: United States
Data from: Maxmind Precision Web-API
Code Contact Form 7 is:
[geoip_detect2_text_input postal property:postal.code class:hidden type:hidden][geoip_detect2_text_input timezone property:location.timeZone class:hidden type:hidden][geoip_detect2_text_input isp property:traits.isp class:hidden type:hidden]
and in mail is:
Using (user agent): [_user_agent]
Date and Time: [_date] [_time]
Postcode: [postal]
TimeZone: [timezone]
Internet Service Provider: [isp]
[geoip_detect2_user_info]
How to fix this?
]]>Hi Benjamin,
Used your plugin successfully via Cloudflare previously, but since moving to Cloudways hosting, we have experienced caching issues (with incorrect content being cached and shown to users within/outside geographic locations).
How we wish to use it is mostly quite basic – in terms of showing a local (Australian) phone number if the user is within Australia, and showing our International phone number if the user is outside of Australia.
Can you please let me know if your plugin can work with Cloudways GeoIP detection, as per https://support.cloudways.com/en/articles/5126366-how-to-use-geoip-with-your-application?
Thank you,
Luke
]]>It fails both in wp admin as well as wp cli. The error I get is
PHP Fatal error: Declaration of YellowTree\GeoipDetect\DataSources\AbstractReader::country($ip) must be compatible with GeoIp2\ProviderInterface::country(string $ipAddress): GeoIp2\Model\Country in […]/wp-content/plugins/geoip-detect/data-sources/abstract.php on line 105
Running latest version of geoip-detect and wordpress
]]>I’m trying to uninstall and it just hangs. I tried activating and deactivating again, but same issue. My apologies if the problem is not your plugin. Here’s the error log entry:
[Wed Mar 06 12:03:07.689996 2024] [proxy_fcgi:error] [pid 1124720:tid 139957588154112] [remote 154.6.90.18:11880] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Undefined constant “YellowTree\GeoipDetect\DataSources\GEOIP_DETECT_DEBUG” in /public_html/wp-content/plugins/geoip-detect/data-sources/registry.php:131\nStack trace:\n#0 /public_html/wp-content/plugins/geoip-detect/data-sources/registry.php(153): YellowTree\GeoipDetect\DataSources\DataSourceRegistry->clearCache()\n#1 /public_html/wp-content/plugins/geoip-detect/init.php(215): YellowTree\GeoipDetect\DataSources\DataSourceRegistry->uninstall()\n#2 /public_html/wp-includes/class-wp-hook.php(324): on_uninstall()\n#3 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#4 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#5 /public_html/wp-admin/includes/plug…’, referer: https://website.com/wp-admin/plugins.php
]]>Hi,
I was hoping to get the member location on a BuddyBoss website.
If the locations are continously stored in a field I might be able to use it in a search form to then display users by distance.
So, 2 questions:
Hi, i’ve using your plugin for a while now and it works fine as i tested it using vpn. Recently, i’ve started creating blogs and i paste the same shortcodes from (product posts) with post_id added. However, the location isn’t as accurate, if you compare my shop page and blog
shop: https://cultfave.com/shop/best-korean-serums-for-oily-skin/
blog: https://cultfave.com/best-korean-serum-for-oily-skin/
Please only check for amazon link (or shopee if Malaysia). I would also like to know your recommended setting for using cloudflare ip location as I leave it as is since using the plugin. Like do i check the “add known proxides to this provider: cloudflare”? Also i’m using litespeed cache, and there’s also caching option.
screenshot: https://www.flickr.com/photos/200152043@N08/53540812319/in/dateposted-public/
Thank you!
]]>Fatal error: Declaration of GeoIp2\Database\Reader::country(string $ipAddress): GeoIp2\Model\Country must be compatible with GeoIp2\ProviderInterface::country($ipAddress) in?/var/www/vhosts/stage.lumivyx.com/httpdocs/wp-content/plugins/wc-aelia-foundation-classes/src/vendor/geoip2/geoip2/src/Database/Reader.php?on line?107
]]>Thank you for developing the plug-in.
Are the only two geographic factors currently city and country?
Is it possible to identify user by COUNTY in the US?
]]>Hello, my site uses the Aelia Currency Switcher plugin (https://aelia.co/shop/currency-switcher-woocommerce/), which loads come common libraries from the Aelia Foundation plugin. Some of those include the GeoIP2 package, just like geoip-detect does.
It’s worked fine for the past 3-4 years, but the Aelia Foundation recently updated to a newer version of the GeoIP2 API. I believe the reason had to do with PHP 8.x compatibility.
Their plugin and this plugin won’t coexist in PHP 8 because of the differing function signatures. Sample error:
PHP Fatal error: Declaration of GeoIp2\Database\Reader::country(string $ipAddress): GeoIp2\Model\Country must be compatible with GeoIp2\ProviderInterface::country($ipAddress) in /var/www/site.com/htdocs/wp-content/plugins/wc-aelia-foundation-classes/src/vendor/geoip2/geoip2/src/Database/Reader.php on line 107
geoip-detect uses version 2.10.0 (2019-12-12), while aelia-foundation upgraded to 2.13.
Are there reasons to not upgrade geoip-detect to use the more recent API? Until this happens, whether officially or if I update my local version, I’m unable to upgrade my Aelia plugins…
Thank you for any suggestions,
Tom
]]>Hi, may i know how do i show text for two countries?
I’ve tried the following, but none of them works
[geoip_detect2_show_if country=”AU,NZ”] Text [/geoip_detect2_show_if]
[geoip_detect2_show_if country=”AU, NZ”] Text [/geoip_detect2_show_if]
[geoip_detect2_show_if country=”AU” operator=”or” country=”NZ”] Text [/geoip_detect2_show_if]
[geoip_detect2_show_if country=”AU” country=”NZ”] Text [/geoip_detect2_show_if]
The first one shows when the visitors are from Australia but not New Zealand. The third one shows [geoip_detect2_show_if not_country=”..]. The last one shows nothing.
May i know how do i show the text for visitors from the two countries? So far i’m using it for showing each country (UK, CA, IN, SG, etc), For this case it’s two.
Thanks!
]]>Hello!
How would you see this being used for IP-based search results? Any particular setup that has been tested or recommended?
Thank you!!
]]>Hi Benjamin,
Your plugin throws a false positive warning when WP Staging backup plugin is installed like “These maxmind files were loaded from other plugins…”
Error: https://monosnap.com/file/bAVSadkiWwFXkAIKSbWskXMVNM74EQ
In WP Staging, we have a class that has the file name DebugLogFileReader.php.
Your code checks only for the ending *Reader.php, thus adding our class to the error handler. I suggest comparing against the whole file name or taking a portion of the absolute path into comparison.
Relevant code: https://monosnap.com/file/HrO89GVvf2YEEwnLKvGBcbmMTLmCaN
Cheers
René
Hello there ??
First of all, thank you for your great plugin.
I have a WP Multisite and need to use it on all site. Unfortunnatelly, it seems I have to configure the plugin on each and every site separately. Isn’t it possible to do the configuration (mode, license etc…) on the main site and use this on all the subsites?
Kind regards,
Cedric
We get the error Undefined array key “PT” in /wp-content/plugins/geoip-detect/legacy-api.php on line 59. Could it be because “PT” is missing from _geoip_detect_get_country_code_mapping()
?
Hi,
I use this plugin to show or hide a menu item by the country IP.
I need show a menu item only in USA so I create a free account in Maxmind and used the free KEY in the option: Maxmind GeoIP Lite City (Automatic download & update) .
The question is:
Thank you.
Hi, all my users are from Malaysia. Say if I use the shortcode below to show the page content only for local users:
[geoip_detect2_show_if country=”MY”] TEXT [/geoip_detect2_show_if]
Will there be chances that somebody may be mistakenly excluded even if he is from Malaysia (due to his IP address undetected)?
If the answer is yes, any workaround in this case? My aim is nobody (in Malaysia) should be excluded.
Regards.
Hello,
We found out that your plugin conflicts with “WP Rocket”. When the plugin is activated, the cache and preload is not initiated. This means that we can’t improve our website speed.
Is there a solution for this or any documentation so that we can fix this issue?
Looking forward hearing from you. Thank you in advance.
With kind regards, Maarten Arts
The site is installed on a Nginx server. With fastcgi_cache. This server displays the cached version regardless of the visitor’s IP. On website installed woocommerce too. All ?AJAX endpoint options is enabled in plugin settings.
I use these functions:geoip_detect2_get_info_from_current_ip()
Please help with the solution.
]]>