Geolocation not working – IP issues ?
-
Hello. I’ve set up Geolocation but it is not working.
I’m based in France and have VAT activated and configured correctly. However when I test my website from different location using a VPN or a website like https://www.locabrowser.com/, prices are always displayed with VAT even when connected from a country where it should be displayed without VAT.
Then if I go to the checkout page and update the billing / shipping address to USA for exemple, the price updates and it’s showing without VAT, as it should.
I did check my
wp-content
folder and I do have theGeoIP database
file.However, when I go to
WooCommerce > Status > logs
I do have several Maxmind error logs that display undreds of lines saying :2020-08-10T05:03:45+00:00 NOTICE The value "213.174.150.1, 213.174.150.1" is not a valid IP address. 2020-08-10T07:43:47+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address. 2020-08-10T07:43:47+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address. 2020-08-10T07:43:51+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address.
and on and on (1255 lines for the last report)
Any idea what my problem could be ?
Thanks
- This topic was modified 4 years, 3 months ago by alexis888. Reason: adding spacing
The page I need help with: [log in to see the link]
-
Hi there,
Can you please advise what you have set as the default customer location under the General Settings tab as shown here:
Link to image: https://d.pr/i/ZTLqOvCould you also please share a copy of your site’s System Status? You can find it via WooCommerce > Status.
Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.Hey @kbassart, sorry for the late response after yours was pretty fast !
I do have Geolocate selected and I don’t have a cache plugin installed (yet, but planning on setting up Swift Lite in the next few days).Here is System status : https://pastebin.com/V2MXTNRM
Thanks !
Hi @alexis888!
Can you please change your default customer location to something else, like “No location by default” option, then save it, then change it back to “Geolocate” and re-save it once again, to see if that helps resolve the issue.
Cheers!
Hello @rynald0s ,
unfortunately that didn’t solve the issue and I’m still getting the same type of error in my logs :2020-08-18T08:27:17+00:00 NOTICE The value "172.98.93.176, 172.98.93.176" is not a valid IP address. 2020-08-18T08:27:17+00:00 NOTICE The value "172.98.93.176, 172.98.93.176" is not a valid IP address. 2020-08-18T08:27:21+00:00 NOTICE The value "172.98.93.176, 172.98.93.176" is not a valid IP address. 2020-08-18T08:27:40+00:00 NOTICE The value "109.234.164.55, 109.234.164.55" is not a valid IP address. 2020-08-18T08:27:55+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address. 2020-08-18T08:27:55+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address. 2020-08-18T08:28:01+00:00 NOTICE The value "78.226.156.39, 78.226.156.39" is not a valid IP address.
and so on and on.
FYI I’ve then updated WooCommerce to the latest version and tried again but same result, it’s still not working :/
I’ve also tried on different web browsersHi @alexis888. As a next step, I recommend conflict testing following this guide – https://docs.woocommerce.com/document/how-to-test-for-conflicts/
If that doesn’t help, please share your system report with me. You can find it by going to WooCommerce > Status > Get system report and then click Copy for support to be able to paste it in your reply.
Hello @drwpcom
thanks for your answe.I just wanted to let you know I didn’t have time to check yet as I have more urgent projects to put in production but I will take a look hopefully before the end of the week or next week at last.
Hello @drwpcom ,
I finally had time to try to debug this issue with no luck. I’ve tried disabling all plugins except WooCommerce and switching to default Twenty Twenty theme but Geolocation still doesn’t work.I’m using a VPN (either Nord VPN or Opera’s native VPN feature) to connect on a Norwegian server so prices should be displayed without VAT but they are not. And when I get to the cart page my default shipping destination in the shipping calcultor is set to France (where I am actually from).
I thought it could have been my caching pluging (Swift Lite) that was causing the issue but it doesn’t seem to be.
I don’t get it, maybe I’m doing something wrong or have something set up wrong in WooCommerce.Here is the Status report and let me know if you’d like to have access to the website. I’ve created a staging one so we can mess around with it as much as we want to solve this issue !
Thank you
### WordPress Environment ### WordPress address (URL): https://8cb4-c01ce81bedb9.wptiger.fr Site address (URL): https://8cb4-c01ce81bedb9.wptiger.fr WC Version: 4.5.2 REST API Version: ? 4.5.2 WC Blocks Version: ? 3.1.0 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? 1.5.0 Log Directory Writable: ? WP Version: 5.5.1 WP Multisite: – WP Memory Limit: 4 Go WP Debug Mode: – WP Cron: ? Language: fr_FR External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.21 PHP Post Max Size: 512 Mo PHP Time Limit: 360 PHP Max Input Vars: 2000000 cURL Version: 7.72.0 OpenSSL/1.1.1g SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.24-MariaDB Max Upload Size: 512 Mo Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.5.2 WC Database Prefix: wp_ Taille totale de la base de données: 34.42MB Taille de la base de données: 21.96MB Taille de l’index: 12.46MB wp_woocommerce_sessions: Données?: 0.05MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_api_keys: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_attribute_taxonomies: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_downloadable_product_permissions: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_woocommerce_order_items: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_order_itemmeta: Données?: 0.06MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_tax_rates: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_woocommerce_tax_rate_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_shipping_zones: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_woocommerce_shipping_zone_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_shipping_zone_methods: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_woocommerce_payment_tokens: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_payment_tokenmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_log: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_actions: Données?: 0.02MB + Index?: 0.11MB + Moteur InnoDB wp_actionscheduler_claims: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_groups: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_logs: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_commentmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_comments: Données?: 0.02MB + Index?: 0.09MB + Moteur InnoDB wp_duplicator_packages: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_gdpr_cc_options: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_layerslider: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_layerslider_revisions: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_links: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_options: Données?: 2.17MB + Index?: 0.16MB + Moteur InnoDB wp_postmeta: Données?: 14.52MB + Index?: 8.03MB + Moteur InnoDB wp_posts: Données?: 3.41MB + Index?: 2.03MB + Moteur InnoDB wp_sgpb_subscribers: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_sgpb_subscription_error_log: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_swift_performance_warmup: Données?: 0.06MB + Index?: 0.06MB + Moteur InnoDB wp_termmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_terms: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_term_relationships: Données?: 0.39MB + Index?: 0.28MB + Moteur InnoDB wp_term_taxonomy: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_usermeta: Données?: 0.05MB + Index?: 0.03MB + Moteur InnoDB wp_users: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB wp_wc_admin_notes: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_wc_admin_note_actions: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_category_lookup: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_wc_customer_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_download_log: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_order_coupon_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_order_product_lookup: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_wc_order_stats: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB wp_wc_order_tax_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_product_meta_lookup: Données?: 0.41MB + Index?: 0.73MB + Moteur InnoDB wp_wc_reserved_stock: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_wc_tax_rate_classes: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_webhooks: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wpmailsmtp_tasks_meta: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB ### Post Type Counts ### acf-field: 1 acf-field-group: 1 attachment: 507 carousels: 4 custom_css: 1 customize_changeset: 2 nav_menu_item: 16 page: 12 portfolio_page: 60 post: 1 product: 75 product_variation: 3853 revision: 46 secupress_log_action: 101 shop_order: 27 shop_order_refund: 2 slides: 3 testimonials: 2 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (19) ### Advanced Custom Fields: par Elliot Condon – 5.9.1 Better Search Replace: par Delicious Brains – 1.3.3 Classic Editor: par Contributeurs et contributrices WordPress – 1.6 Contact Form 7: par Takayuki Miyoshi – 5.2.2 Duplicate Page: par mndpsingh287 – 4.3 Duplicator: par Snap Creek – 1.3.38 Edge CPT: par Edge-Themes – 1.3.1 GDPR Cookie Compliance (CCPA, PIPEDA ready): par Moove Agency – 4.3.2 Google Authenticator: par Ivan Kruchkoff – 0.52 En-têtes HTTP pour améliorer la sécurité de votre site web: par Carl Conrad – 2.5.6 éditeur de page: par Michael M - WPBakery.com – 6.0.2 Loco Translate: par Tim Whitlock – 2.4.3 SecuPress Free — Sécurité WordPress: par SecuPress – 1.4.12 Swift Performance Lite: par SWTE – 2.1.5 UpdraftPlus - Sauvegarde/Restauration: par UpdraftPlus.Com DavidAnderson – 1.16.29 WooCommerce Weight Based Shipping: par weightbasedshipping.com – 5.3.6 WooCommerce Monetico Gateway: par Nicolas Maillard – 2.1 WooCommerce: par Automattic – 4.5.2 WP Mail SMTP: par WPForms – 2.4.0 ### Inactive Plugins (0) ### ### Must Use Plugins (3) ### SecuPress COOKIEHASH: par – 1.0 SecuPress Salt Keys: par – 1.0.1 Swift Performance Lite early loader: par – ### Settings ### API Enabled: ? Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Base de la boutique: #51008 - /vente-en-ligne/ Panier: #52152 - /panier/ Commander: #52208 - /commander/ Mon compte: #52153 - /mon-compte/ Conditions générales de vente et d’utilisation: #51990 - /conditions-generales-de-vente/ ### Theme ### Name: Vigor Child Version: 1.0.1 Author URL: https://demo.edge-themes.com/ Child Theme: ? Parent Theme Name: Vigor Parent Theme Version: 3.0.1 Parent Theme Author URL: https://demo.edge-themes.com WooCommerce Support: ? ### Templates ### Archive Template: Votre thème a un fichier woocommerce.php vous ne serez pas en mesure de substituer le modèle personnalisé woocommerce/archive-product.php étant donné que woocommerce.php a la priorité sur archive-product.php. Ceci vise à prévenir les problèmes d’affichage. Overrides: vigor/woocommerce/cart/cart-empty.php vigor/woocommerce/cart/cart-shipping.php vigor/woocommerce/cart/cart-totals.php vigor/woocommerce/cart/cart.php version 3.5.0 est obsolète. La version du noyau est 3.8.0 vigor/woocommerce/cart/shipping-calculator.php version 3.5.0 est obsolète. La version du noyau est 4.0.0 vigor/woocommerce/checkout/form-coupon.php vigor-child/woocommerce/checkout/review-order.php vigor/woocommerce/checkout/thankyou.php version 3.2.0 est obsolète. La version du noyau est 3.7.0 vigor/woocommerce/content-product.php vigor/woocommerce/content-single-product.php vigor/woocommerce/global/form-login.php vigor/woocommerce/global/quantity-input.php version 3.6.0 est obsolète. La version du noyau est 4.0.0 vigor/woocommerce/loop/add-to-cart.php vigor/woocommerce/loop/loop-start.php vigor/woocommerce/loop/pagination.php vigor/woocommerce/loop/rating.php vigor/woocommerce/loop/result-count.php version 3.3.0 est obsolète. La version du noyau est 3.7.0 vigor/woocommerce/loop/sale-flash.php vigor/woocommerce/myaccount/form-login.php version 3.6.0 est obsolète. La version du noyau est 4.1.0 vigor/woocommerce/myaccount/form-lost-password.php vigor/woocommerce/myaccount/my-address.php vigor/woocommerce/myaccount/my-orders.php vigor/woocommerce/product-searchform.php vigor/woocommerce/single-product/add-to-cart/external.php vigor/woocommerce/single-product/add-to-cart/grouped.php version 3.4.0 est obsolète. La version du noyau est 4.0.0 vigor/woocommerce/single-product/add-to-cart/simple.php vigor/woocommerce/single-product/add-to-cart/variable.php vigor/woocommerce/single-product/meta.php vigor/woocommerce/single-product/related.php version 3.0.0 est obsolète. La version du noyau est 3.9.0 vigor/woocommerce/single-product/sale-flash.php vigor/woocommerce/single-product/tabs/additional-information.php vigor-child/woocommerce/single-product/tabs/description.php vigor/woocommerce/single-product/tabs/tabs.php version 2.4.0 est obsolète. La version du noyau est 3.8.0 vigor/woocommerce/single-product/title.php vigor/woocommerce/single-product/up-sells.php vigor/woocommerce/single-product-reviews.php version 3.6.0 est obsolète. La version du noyau est 4.3.0 Outdated Templates: ? Apprenez comment mettre à jour ### Action Scheduler ### Terminé: 61 Oldest: 2020-09-07 09:20:22 +0200 Newest: 2020-10-02 09:38:19 +0200
And I’m still having the same kind of MaxMind log issues mentionned in my first message when I go to
WooCommerce > Status > logs
Hi @alexis888. Stepping back a bit, have you integrated Maxmind Geolocation as explained in the documentation here?
Hey @drwpcom , off course I did yes. I just generated a new key though and geolocation seems to work now. Weird.
Now I have a caching problem though. When I’m connected to let’s say USA and check a product page using Chrome Incognito mode, the price is displayed without VAT (that’s what I want).
Then if I close Chrome browser, disable my VPN (so I’m connected in France), and check in incognito mode again, or in another browser I never use (so don’t have browser cache for this product page), I’m still seeing the price without VAT. I assume that’s because my page is cached in my cache plugin (Swift) and so will be served to clients regarless of where they are connected from ?Do you recommend to exclude all product pages from Swift ? Or should I used the Geolocation with cache support feature (with that ugly ?v=7516fd43adaa in the URL) ?
Thank you !
Hi @alexis888. Good to hear that geolocation is now working in your store!
We have a guide for configuring caching plugins here – https://docs.woocommerce.com/document/configuring-caching-plugins/.
It sounds like you may be displaying prices with/without VAT on the product page based on geolocation. In that case, you may need to exclude the product pages from caching as well. Swift support could provide more definitive guidance than I can for their plugin, but it does sound to me like you are coming across a caching issue and will need to change some settings to resolve it. You may want to test the different options or consult with Swift for the best way forward. Good luck!
Thanks for the heads up ! I’ll get in touch with Swift then.
Best regards
- The topic ‘Geolocation not working – IP issues ?’ is closed to new replies.