Geolocation IP Detection
Provides geographic information detected by an IP adress. This can be used in themes or other plugins, as a shortcode, or via CSS body classes. The city & country names are translated in different languages (supported languages). Features: You can use one of these data sources (see comparison): Free (default source): HostIP.info (IPv4 only) Free with registration: Maxmind GeoIP2 Lite City, automatically updated weekly Commercial: Maxmind GeoIP2 City or Maxmind GeoIP2 Country Commercial Web-API: Maxmind GeoIP2 Precision (City, Country or Insights) Hosting-Provider dependent: Cloudflare or Amazon AWS CloudFront (Country) Free or Commercial Web-API: Ipstack Commercial Web-API via AWS Marketplace: Fastah Provides these 5 functions (see API Documentation): geoip_detect2_get_info_from_ip($ip, $locales = array('en'), $options = array()): Lookup Geo-Information of the specified IP geoip_detect2_get_info_from_current_ip($locales = array('en'), $options = array()): Lookup Geo-Information of the current website user geoip_detect2_get_current_source_description(...): Return a human-readable label of the currently chosen source. geoip_detect2_get_external_ip_adress(): Fetch the internet adress of the webserver geoip_detect2_get_client_ip(): Get client IP (even if it is behind a reverse proxy) For the property names, see the results of a specific IP in the wordpress backend (under Tools > Geolocation IP Detection). You can include these properties into your posts and pages by using the shortcode [geoip_detect2 property="country.name" default="(country could not be detected)" lang="en"] (where ‘country.name’ can be one of the other property names as well, and ‘default’ and ‘lang’ are optional). You can show or hide content by using a shortcode [geoip_detect2_show_if country="FR, DE" not_city="Berlin"]TEXT[/geoip_detect2_show_if]. See Shortcode Documentation. When enabled on the options page, it adds CSS classes to the body tag such as geoip-province-HE, geoip-country-DE and geoip-continent-EU. If you are using a page cache, it is recommended to use the AJAX mode (see AJAX) When enabled on the options page, the client IP respects a reverse proxy of the server. If you are using Contact Form 7, you can use these shortcodes: A select input with all countries, the detected country being selected by default: [geoip_detect2_countries mycountry] A text input that is pre-filled with the detected city (or other property): [geoip_detect2_text_input city property:city lang:fr id:id class:class default:Paris] Geolocation information for the email text: [geoip_detect2_user_info] If you are using WP Forms, you can use this shortcode: Geolocation information for the email text: [geoip_detect2_user_info] Together with SVG Flags you can show the flag of the detected country: [geoip_detect2_current_flag] (see documentation) See Documentation for more info. How can I use these functions? You could choose the currency of the store based on the country name You could pre-fill the shipping country You could show the store nearest to your customer You show or hide content specific to a geographic target group Etc. … You tell me! I’m rather curious what you’ll do with this plugin! Be careful to comply to the applicable laws. For example Regulation (EU) 2018/302 … If you need to get the user’s timezone, it is more accurate to use JS solutions. System Requirements: You will need at least PHP 7.2.5 . Also, if you use the plugin WooCommerce, you’ll need at least WooCommerce 3.9.0 . GDPR: See Is this plugin GDPR-compliant? This extension is “charity-ware”. If you are happy with it, please leave a tip for the benefit of this charity. (See FAQ for more infos.) Here are other ways to contribute to the development of this plugin. This product can provide GeoLite2 data created by MaxMind, available from http://www.maxmind.com. Troubleshooting Does geoip_detect2_get_info_from_current_ip() return the same country, regardless of where you are visiting the site from? Maybe your server has a reverse proxy configured. You can check this: Go to the options page and look for “reverse proxy”. Are there 2 IPs listed there? If so, which one corresponds to your public IP? Or maybe you are using a site cache plugin. Then enable the option Disable caching a page that contains a shortcode or API call to geo-dependent functions. More Troubleshooting Hints
Top keywords
- detect214×1.97%
- geoip14×1.97%
- geoip detect214×1.97%
- country13×1.83%
- ip13×1.83%
- see9×1.26%
- city8×1.12%
- info7×0.98%
- maxmind6×0.84%
- shortcode6×0.84%
- show6×0.84%
- current5×0.70%
Price Based on Country for WooCommerce
Documentation | Upgrade to Pro Price Based on Country for WooCommerce allows you to define country-specific prices for your WooCommerce products, either in a single currency or across multiple currencies. The plugin is designed for stores that sell internationally and need greater control over how prices are presented to customers across regions. You can adapt your pricing strategy to reflect local markets and currencies. KEY FEATURES The core plugin is 100% free. It provides all functionality needed to sell internationally with localized pricing. ✔️ Multi-Currency Add multi-currency support to WooCommerce to enable selling products in multiple currencies and reduce checkout friction. ✔️ Geolocation The plugin detects the country of the website visitor automatically through the geolocation feature included in WooCommerce and displays the price and currency you have defined previously for this country. Compatible with cache plugins. ✔️ Manual Fixed Price Leave the price to be calculated using the exchange rate, or set a fixed price manually for each country or region. ✔️ Country Switcher Widget Add a country switcher to your store to let users manually change their country. ✔️ Multilingual Ready Compatible with WPML and Polylang workflows (sync data between product translations). How It Works Prices are organized into pricing zones, each one associated with one or more countries. For each zone, you can choose a currency. You may rely on automatic currency conversion using exchange rates, or define fixed prices manually for full control. Once configured, prices are displayed dynamically based on the customer’s country, while remaining compatible with caching and performance plugins. Use Cases Boost international sales – Display price in local currency to reduce checkout friction and cart abandonment. Regional strategy – Adjust prices based on regional purchasing power. Absorb shipping costs – Set higher prices for countries with expensive shipping without scaring away local customers. Keeping profit – Maintain consistent margins across international markets. Price Based on Country PRO The PRO version extends the core functionality with features that save time, automate tasks, and provide integration with professional plugins. Automatic Exchange Rate Updates – The daily automatic update of the exchange rate allows prices to stay in sync without manual intervention. Pretty prices – Converted prices can be rounded to clean values, helping maintain a professional appearance across currencies (e.g., 19.99 instead of 19.43). Custom Currency Symbol – Display the prices as USD 99.99, US$ 99.99, … Bulk Updates from file – Save hours of manual work by updating the product prices in bulk using the CSV import or “WP All Import” integration. Support for Manual Orders – Update the order with the regional price from the administration panel. Additional Shortcodes and Widgets – Display custom content based on the user’s country or the price of a specific product in a pricing table with the PRO shortcodes. Exclusive Compatibilities and Integrations – The PRO version adds compatibility with several WooCommerce.com extensions, including WooCommerce Subscriptions by Woo, Product Bundles for WooCommerce by Woo, Product Add-Ons for WooCommerce by Woo, and other professional extensions like German Market by Marketpress or WP All Import. Free vs PRO full comparison