Set currency programmatically | WordPress.org

[ad_1]

Hi,
There is no way to force the currency because “Price Based on Country” is not a currency switcher plugin.
Currency is a property of the pricing zone, and the pricing zone depends on the customer’s country.

You can use the filter “wc_price_based_country_stop_pricing” for the plugin does not load the pricing zone.
Note that this hook runs on the WordPress init hook.

The code snippet add_filter('wc_price_based_country_stop_pricing', '__return_true'); turns off the pricing zone loading, so WooCommerce works as default (shop base currency)

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer