Skip to navigation Skip to content
WooCommerce Price Based on Country Logo
  • Pricing
  • Product
    • Features
    • Screenshots
    • Basic VS Pro
  • Testimonials
  • Support
    • Documentation
    • Support
  • Login
  • Pricing
  • Product
    • Features
    • Screenshots
    • Basic VS Pro
  • Testimonials
  • Support
    • Documentation
    • Support
  • Login
  • Cart

Getting Started

13
  • Minimum requirements
  • Installing Price Based on Country
  • Upgrade from Basic (Free) to Pro
  • Configuring WooCommerce geolocation
  • Settings & Options
  • Setting up Pricing Zones
  • Managing Country-Based Product Pricing
  • How to test the pricing zones
  • Widgets included with Price Based on Country
  • Shortcodes included with Price Based on Country
  • Manual orders and subscriptions
  • Bulk update from CSV file
  • Geolocation with cache support

Common Issues

7
  • The plugin does not detect the country
  • I’m testing, but it does not work
  • Prices entered with tax show a wrong value in the front-end
  • PayPal disappeared from the checkout page
  • A payment gateway is not available for a currency/country
  • I’m using the AliDropship plugin, and I have issues with the prices
  • The MaxMind GeoIP Database does not exist

Developer Docs

2
  • Create a custom country/currency switcher template via a theme
  • Add flags to currency or country switchers with a code snippet

FAQs

11
  • Does the plugin automatically detects the country (IP based location) & switch currency accordingly?
  • Does the plugin allow manually set prices for each country/currency?
  • Is it compatible with my payment gateway?
  • Will it work on a multisite installation?
  • Does the plugin allow hide/show the price and products based on the customer country?
  • Can I use the plugin to set different prices based on State, zip code, province, or city?
  • Does the plugin allow setting a specific currency for the checkout process?
  • Will it work with my theme?
  • Can I set more than one currency per country?
  • Do you have a demo or a trial?
  • Do you offer refunds?

Account

6
  • I need the invoice. How do I download it?
  • Can I use my license on a staging site?
  • Can I upgrade my license?
  • How do I disable auto-renewal or cancel the subscription?
  • Sorry, you have reached your activation limit for this license
  • How to Fix the “Deprecated Version” Error in Price Based on Country PRO
View Categories

Create a custom country/currency switcher template via a theme

If you are a developer (or you have PHP knowledge), you can customize the templates included in Price Based on Country in an upgrade-safe way using overrides.

To create a custom template, you have to copy the template into a directory within your theme named woocommerce-product-price-based-on-countries

Example: To override the country switcher template, copy: wp-content/plugins/woocommerce-product-price-based-on-countries/templates/country-selector.php to wp-content/themes/yourtheme/woocommerce-product-price-based-on-countries/country-selector.php

After copying the file, you can edit it to suit your style requirements.

Override the templates via theme ensures that any changes you make will not be erased when you update Price Based on Country.

Note: Use a child-theme guarantee that you will not lose your changes when updating your parent theme.

Create a custom country switcher #

The country switcher template is part of the Basic version.  To override this template, copy the file

wp-content/plugins/woocommerce-product-price-based-on-countries/templates/country-selector.php

Country switcher template location

To:

wp-content/themes/yourtheme/woocommerce-product-price-based-on-countries/country-selector.php

Override country switcher template via theme

Open the file and make any changes you need.

Variables available in the country switcher template: #

  • $countries — A key-value pair array that contains the list of countries in the format: country code > country name
  • $selected_country — The current country code selected.

Create a custom currency switcher #

Pro version featureUpgrade to Pro now!

The country switcher template is part of the Pro-addon. To override this template copy the file

wp-content/plugins/woocommerce-price-based-country-pro-addon/templates/currency-switcher.php

Currency switcher file location

To:

wp-content/themes/yourtheme/woocommerce-product-price-based-on-countries/currency-switcher.php

Override currency switcher template via theme

Open the file and make any changes you need.

Variables available in the currency switcher template: #

  • $options — A key-value pair array in the format: country code > currency text.
  • $selected_country — The current country code selected.

See also #

  • Widgets included with Price Based on Country
  • Shortcodes included with Price Based on Country

Was this page helpful?

  • Happy
  • Sad
Add flags to currency or country switchers with a code snippetAdd flags to currency or country switchers with a code snippet
On this page
  • Create a custom country switcher
    • Variables available in the country switcher template:
  • Create a custom currency switcher
    • Variables available in the currency switcher template:
  • See also
Company
  • About
  • Contact
  • Terms & Conditions of Use
  • Privacy Policy
Product
  • Pricing
  • Features
  • Screenshots
  • Blog
Latest Blog Posts
  • Now Available: Price Based on Country 4.3.0 – Enhanced Performance & LearnDash Support
  • Introducing Price Based on Country for WooCommerce 4.0 – Faster, Stable, and Efficient
  • Introducing WP All Import Add-On for “Price Based on Country for WooCommerce” Plugin!
  • Price Based on Country is now compatible with the WooCommerce Gift Cards plugin

Made with in Valencia, Spain

  • My Account
  • Search
  • 0