Skip Navigation
availability:

WooCommerce Multilingual Version: 4.3.3

description:

This filter adds ?wcmlc={currency_code} to the URL, which specifies a query string with the currency code. This is useful when your site has cache enabled and doesn’t show currency changes correctly.

type:
filter
category:
Multi-currency Feature
parameters:
add_filter( 'wcml_is_cache_enabled_for_switching_currency', 'the_callback_function', 10, 1 );

There is only one parameter passed to this filter:

$enabled

(bool) Set to true to enable the filter.
hook example usage:

Example

/**
* Enable the query string argument on currency change.
*/
add_filter( 'wcml_is_cache_enabled_for_switching_currency', '__return_true' );