• Resolved Anonymous User 15325940

    (@anonymized-15325940)


    Hi, I still cannot use woocommerce an geolocation plugin at the same time. Is there a solution?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Benjamin Pick

    (@benjamin4)

    Which version of WooCommerce are you using?

    Thread Starter Anonymous User 15325940

    (@anonymized-15325940)

    WooCommerce: 5.0.0
    Wordpress: 5.6.2

    Plugin Author Benjamin Pick

    (@benjamin4)

    And what is the problem or error message you face?

    Thread Starter Anonymous User 15325940

    (@anonymized-15325940)

    I get the following error:

    Fatal error: Uncaught Error: Call to undefined method MaxMind\Db\Reader::getWithPrefixLen() in /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php:246 Stack trace: #0 /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(217): GeoIp2\Database\Reader->getRecord('City', 'City', '185.xx.xxx.xxx') #1 /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php(73): GeoIp2\Database\Reader->modelFor('City', 'City', '185.xx.xxx.xxx') #2 /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/geoip-detect-lib.php(192): GeoIp2\Database\Reader->city('185.xx.xxx.xxx') #3 /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/api.php(83): _geoip_detect2_get_record_from_reader(Object(GeoIp2\Database\Reader), '185.xx.xxx.xxx', '') #4 /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/ in /www/htdocs/xxx/xxx/wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.php on line 246

    Any help or idea is greatly appreciated (and, by the way, THANKS for your great plugin and support!)

    Plugin Author Benjamin Pick

    (@benjamin4)

    Oh, ok, I know that error message all to well … it’s because WooCommerce uses a different version of the Maxmind library at the same time.

    Can you try out 4.0.2-beta1 please?

    https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing

    Thread Starter Anonymous User 15325940

    (@anonymized-15325940)

    Tried it – didn’t work ??

    Plugin Author Benjamin Pick

    (@benjamin4)

    That’s weird, because now it’s the same library as WooCommerce’s. Do you maybe have another plugin that has Maxmind files? For example, look for files called “Reader.php”. It’s still the same error message and it disappears when you disable WooCommerce?

    (The weird thing is also that WooCommerce 5.0 worked in my Dev environment, also for 4.0.1 – but then it also depends on the order WordPress loads the plugins.)

    • This reply was modified 3 years, 9 months ago by Benjamin Pick.
    Thread Starter Anonymous User 15325940

    (@anonymized-15325940)

    I searched all folders for Reader.php I found it in Azonpress (for affiliate amazon links).

    Plugin Author Benjamin Pick

    (@benjamin4)

    Yes, this has Maxmind capabilities as well …

    https://wpmanageninja.com/docs/azonpress/setting-up-with-azonpress/configure-custom-geo-targeting-in-azonpress/

    Can you disable that plugin and check if my plugin and WooCommerce work together then? If so, could you maybe ask them to use the same versions of the Maxmind libraries?

    “geoip2/geoip2”: “2.10.0”
    “maxmind-db/reader”: “1.6.0”
    “maxmind/web-service-common”: “0.7.0”

    Thread Starter Anonymous User 15325940

    (@anonymized-15325940)

    WORKED!!! Thank you so much for your support! I will contact azonpress.

    Plugin Author Benjamin Pick

    (@benjamin4)

    Great! You’re welcome!

    Hello! Please can you explain me how to make auto detection for cities works for woocommerce?

    I have default maxmind intergration ( which shows only country) and installed your plugin with Automatic download & update of Maxmind GeoIP Lite City setting

    But cities still not appear to be recognised

    Thank you!

    Plugin Author Benjamin Pick

    (@benjamin4)

    Woocommerce has its own maxmind integration, that’s why it conflicted with this plugin. So you have to configure it independently from Geolocation IP:

    Here is the doc but I can’t tell you more details …
    https://docs.woocommerce.com/document/maxmind-geolocation-integration/

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘woocommerce and geolocation plugin’ is closed to new replies.