Home / Admin / Change Arabic Currency symbol to the currency short code
Duplicate Snippet

Embed Snippet on Your Site

Change Arabic Currency symbol to the currency short code

example
change د.إ
to AED

and all the Arabic currencies

Code Preview
php
<?php
/**
 * change arabic currency symbol to short Currency name for AED, SAR, QAR , BHD , OMR , KWD
 */
 add_filter( 'woocommerce_currency_symbol', 'wc_change_uae_currency_symbol', 10, 2 );
function wc_change_uae_currency_symbol( $currency_symbol, $currency ) {
switch ( $currency ) {
case 'AED':
$currency_symbol = 'AED';
break;
case 'SAR':
$currency_symbol = 'SAR';
break;
case 'BHD':
$currency_symbol = 'BHD';
break;
case 'OMR':
$currency_symbol = 'OMR';
break;
case 'QAR':
$currency_symbol = 'QAR';
break;
case 'KWD':
$currency_symbol = 'KWD';
break;
}
return $currency_symbol;
}

Comments

Add a Comment