I've resolved my issue by writing the following snippet:
<?php
/* WPML WooCommerce: Change currency back to default upon checkout
* Issue: Visitor gets charged selected currency amount in original currency, causing a 25% loss in sales.
* Resolution: Hook before checkout page gets displayed to force the currency back to default.
*/
function wa_woocommerce_revert_currency_on_checkout($currency) {
error_log("Currency: ".$currency);
if (is_checkout() && $currency != "CAD") { // Check if current page is checkout and currency is not CAD
return "CAD"; // Set currency to CAD. TODO: Get default site currency dynamically.
} else {
return $currency;
}
}; add_filter('wcml_client_currency', 'wa_woocommerce_revert_currency_on_checkout', 10, 1);
?>
Cheers,
Maxim
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.