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/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.
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/country-selector.php
To:
wp-content/themes/yourtheme/woocommerce-product-price-based-on-countries/country-selector.php
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
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/currency-switcher.php
To:
wp-content/themes/yourtheme/woocommerce-product-price-based-on-countries/currency-switcher.php
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.