Open dechov opened 6 years ago
Is there any update on this? I am unable to use Canada Post as a shipping option when the store currency is USD.
I have not been able to reproduce this. @dechov were you able to?
I suspect just using get_option( 'woocommerce_currency' )
instead of get_woocommerce_currency()
be a safe "fix", but I'd like to verify it's actually fixing something.
Edit: I've tried having the cron schema fetch get kicked off from a customer session that has selected USD on a store with a default currency of CAD. No luck in getting the schemas to change to USD..
Sorry for the delay – I'd come up with these testing instructions:
define( 'WOOCOMMERCE_CONNECT_FREQUENT_FETCH', true );
Tried testing earlier, and (besides failing to follow my own testing instructions) I ran into some caching of the currency that appeared on the front-end, making it unresponsive to changes to Currency Switcher settings.
Now that the currency has switched (possibly due to restarting my VM), I am able to reproduce the issue using the instructions above. get_option
sounds fine to me, unless of course there are other cases where we wouldn't want to bypass filters on the currency.
3753842-zen
Reported in support forum thread: https://wordpress.org/support/topic/woo-services-canada-post-shipping-problem/
There appears to be a potential compatibility issue with plugins that filter
woocommerce_currency
, such as Currency Switcher for WooCommerce. The configured shipping method is disappearing after a day, likely because a customer session (in which the currency is filtered to USD) is triggering a scheduled service settings fetch. The proper shipping method becomes available once again upon saving the settings, which forces another service settings fetch.Should we be using the unfiltered currency, or is there another way we might want to address this?