Linux 软件免费装
Banner图

CodeFaeries Country Based Content for WooCommerce - Redirects and Prices by Country

开发者 lwsdevelopers
更新时间 2026年11月21日 04:02
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

geolocation redirect by country hide price price by country country restrictions

下载

1.3.0 1.4.1 1.3.1 1.4.2 1.4.3 1.5.0

详情介绍:

Country Based Content adapts your WooCommerce store to each visitor's country. Redirect visitors to another page, hide prices or the add-to-cart button, and adjust prices by country, using the country detected by WooCommerce's built-in geolocation. The free version has no limit on the number of rules. Pro version Free features Redirect by country Hide prices, the add-to-cart button or whole products by country Price by country Exemptions and testing Geolocation on your server The plugin makes no remote request itself: the country is detected by WooCommerce's geolocation. When WooCommerce's MaxMind GeoLite2 database resolves the visitor's address, detection stays on your server, with no data sent to third parties. Otherwise WooCommerce may fall back to an external service (see "External services"). To keep detection on your server, enter a MaxMind license key in WooCommerce > Settings > Integration > MaxMind Geolocation. Pro version Get the Pro version Requirements Do you like Country Based Content? A review on wordpress.org helps other store owners find it: leave a review. Thank you.

安装:

  1. Upload the plugin files to /wp-content/plugins/codefaeries-country-based-content/ or install directly through the WordPress plugins screen
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Ensure WooCommerce is installed and activated
  4. Important: Enable WooCommerce geolocation:
  5. Go to WooCommerce → Settings → General
  6. Set "Default customer location" to "Geolocate" or "Geolocate (with page caching support)"
  7. Navigate to WooCommerce → Country Based Content to configure the plugin
  8. Enable desired features in the "Features & Settings" tab
  9. Create your rules in the respective tabs

屏幕截图:

  • Price by country: the same category seen from France and from Switzerland, where a rule adds 10 %
  • Hide whole products by country: a product listed for France is absent from the category for the United States
  • Country switcher: visitors choose their country with the [cbc_country_selector] shortcode, and prices follow
  • Redirect by country: rules with a source path and a target URL, and the simulator showing where a visitor from Spain lands
  • Content rules by country, category or product, and the simulator listing the effects applied to a product
  • Features and settings: turn each feature on, and take the country from geolocation or from the customer's address

升级注意事项:

1.5.0 Recommended: editing a content or price rule no longer risks clearing its categories and products. Adds an address-based country source and an optional country switcher. 1.4.3 Rules now apply to the block cart and checkout, to add-to-cart links and to variations, and "Force Country" no longer affects real visitors. Hiding products completely becomes free. 1.4.1 Adds wildcard source patterns for redirections and a choice of how price rules combine, and fixes the simulators and the Danger Zone uninstall. 1.3.1 First public release on WordPress.org.

常见问题:

Is Country Based Content free?

Yes. Redirects by country, hiding prices and the add-to-cart button, price adjustments by country, exemptions and the test simulator are free, with no limit on the number of rules. The Pro version adds payment and shipping restrictions, currency conversion, a content shortcode, state and region targeting and more.

Can I redirect visitors by country?

Yes. Create a redirection rule with the countries and the target URL. A rule can also target a path on your site, where * matches any characters, and reuse the matches in the target with $1, $2.

Can I hide prices for some countries?

Yes. A content rule hides the price, or the add-to-cart button, for the countries you choose, on all products, on specific categories or on individual products.

Can I set a different price per country?

Yes. A price rule increases or decreases the price by a percentage, adds or subtracts a fixed amount, or sets a different price. Customers pay the adjusted price at checkout.

Does it need WooCommerce?

Yes. It requires WooCommerce 8.0 or higher with geolocation enabled (WooCommerce > Settings > General > Default customer location).

How does country detection work?

Country detection is done by WooCommerce's geolocation. When WooCommerce's MaxMind GeoLite2 database resolves the address, detection happens locally on your server with no external API call. Otherwise WooCommerce may fall back to an external service (see "External services").

How accurate is the geolocation?

Country-level detection is typically 99%+ accurate. Users with VPNs or corporate proxies may be detected in a different location.

Does this affect actual checkout prices?

Yes. Price adjustment rules modify the actual product price, so customers pay the adjusted price at checkout. This ensures price consistency throughout the shopping experience.

Does this work with page caching?

Yes. The plugin is designed to work with page caching. For best results, use WooCommerce's "Geolocate (with page caching support)" option.

Can I test rules without affecting real visitors?

Yes. Use the "Force Country" option in Developer Tools to simulate visits from any country: it applies only to logged-in shop managers and administrators, so your visitors keep their own country. You can also use the Test Simulator on each rules page to preview which rules would apply.

What happens if a visitor uses a VPN?

The visitor will be detected based on their VPN exit location. Consider using the "Exempt logged-in users" option so registered customers always see accurate information.

Will redirections break my advertising campaigns?

No. The "Exempt bots and crawlers" option (enabled by default) prevents redirections for search engine and ad-platform crawlers, so campaign verification works as expected.

Is it privacy friendly?

Yes, when WooCommerce's MaxMind GeoLite2 database resolves the visitor's address: the IP address is then used on your server only. The plugin itself does not store personal data and makes no remote request. If the database is not installed or cannot resolve the address, WooCommerce may send the IP address to an external geolocation service (see "External services").

更新日志:

1.5.0 - 2026-11-20 1.4.3 - 2026-11-20 1.4.2 - 2026-10-05 1.4.1 - 2026-10-05 1.3.1