Home
›
COMPATIBILITY
›
UPS Shipping Method by WooCommerce
UPS Shipping Method by WooCommerce
Plugin URL : https://woocommerce.com/products/ups-shipping-method/
to your current child wp theme file functions.php add next code:
add_filter('woocommerce_shipping_ups_check_store_currency', function ($alow, $currency, $xml, $_this) {
return false;
}, 99, 4);
add_filter('woocommerce_shipping_ups_rate', function ($data, $currency, $xml, $_this) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$current = $WOOCS->current_currency;
$currencies = $WOOCS->get_currencies();
$def_currency = $WOOCS->default_currency;
if ($current != $currency && isset($currencies[$currency])) {
$rate = $currencies[$currency]['rate'];
$data['cost'] = $data['cost'] / $rate;
$data['cost'] = $WOOCS->woocs_exchange_value(floatval($data['cost']));
}
}
}
return $data;
}, 99, 4);
← UPS Shipping and UPS Access Point™: Official Plugin By UPS
Visual Product Configurator for Woocommerce →
🌸
Shortcodes, functions, actions and filters reference for FOX WooCommerce Currency Switcher
Codex — FOX Currency Switcher
Got it
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.