add_action( 'wcml_switch_currency', 'the_callback_function', 10, 1 );
Description
Run your custom functions right after the client currency for the front end is switched via AJAX requests.
Arguments
There is one parameter being passed to this action: new_currency.
$new_currencystringThe new currency code is switched to, e.g. “USD”, “EUR”, etc.
Example Usage
add_action( 'wcml_switch_currency', 'my_custom_action', 10, 1 ); function my_custom_action( $new_currency ) { // my custom action }