Woocommerce Free shipping method not working with multiple currencies. I define the Minimum order amount 100 for free shipping in Europe Zone.
The primary currency is set EURO and it's working fine but then I switch country (Norway) free shipping automatically applied (because Norway currency KR is very lower to EURO and free shipping consider only minimum mount number, not currency ), it's not applied based on the currency. converter.
add_filter('woocommerce_package_rates', function ($methods, $rates) {
$currency = get_woocommerce_currency();
foreach ((array)$methods as &$method) {
if ($currency != 'USD' && $currency != 'GBP' && $currency != 'CHF') {
// echo "Hello";
// print_r($method->get_cost());
$method->set_cost(round(get_exchanged_currency($currency, $method->get_cost(), true, 'EUR', '', true), 2));
}
}
return $methods;
}, 10, 2);
The above code working fine to calculate the flat rate shipping cost.
I want to implement free shipping based on user local currency converter (IE free shipping minimum order value = 100 EURO if a user chooses Norway country then free shipping applied only if the order value is 1062.19 Kr).
I appreciate it if someone can help me with this.
