WOOCS - WooCommerce Currency Switcher

WC Fields Factory

The plugin URL: https://wordpress.org/plugins/wc-fields-factory/

  • In file functions.php add next code:
    add_filter('wcff_negotiate_price_after_calculation', function($price) {
        if (class_exists('WOOCS')) {
            global $WOOCS;
            if ($WOOCS->is_multiple_allowed) {
                $currencies = $WOOCS->get_currencies();
                $conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
                $price = $price / $conversion_rate;
            }
        }
    
        return $price;
    });