Change ICL_LANGUAGE_CODE for WPML

I got an error:

PHP Warning: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' (this will throw an Error in a future version of PHP) in path/functions.php on line 19

So I want to change ICL_LANGUAGE_CODE to wpml_current_language filter. But I can't make it.

I want to change this:

add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);

function change_existing_currency_symbol( $currency_symbol, $currency ) {
    switch( $currency ) {
        case 'AED':         
        if(ICL_LANGUAGE_CODE=='ar'){        
        $currency_symbol = 'د.إ'; 
        }else{
                 $currency_symbol = 'AED'; 
            } 
        break;          
    }
    return $currency_symbol;
}

Topic warnings plugin-wpml Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.