Skip Navigation
availability:

WooCommerce Multilingual Version: 3.9.2

description:

This is a filter used to define whether or not the multi-currency filters for AJAX actions are loaded.

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

There is only one parameter passed to this filter: load.

$load
(bool) The boolean value to define whether or not to load AJAX actions.
hook example usage:

Example

/**
 * Add this code to the functions.php file of your theme.
 */
add_filter( 'wcml_load_multi_currency_in_ajax', 'do_not_load_multi_currency_in_ajax', 10, 1 );

function do_not_load_multi_currency_in_ajax( $load ) {

    if ( is_checkout() ) { 
        $load = false; // If this is the checkout page, do not load multi-currency filters in AJAX actions
    }

    return $load;

}