Let’s see how to Easily Change WooCommerce Currency Symbol to AED using a custom Code.
What is WooCommerce?
There are a lot of alternatives available to you when building an eCommerce store. WooCommerce stands out among the finest choices. Using WordPress, you may create an online store with the aid of the WooCommerce plugin. It turns the foundational WordPress operating system into an eCommerce store that is ready to go.
Add the below custom code to your child theme’s file. Another way is to use a plugin that allows custom functions to be added, such as the Code snippets. plugin.
One important thing is that, please don’t add custom code directly to your parent theme’s functions.php
file. If do like that will be wiped entirely when you update the theme.
PHP code to Change WooCommerce Currency Symbol to AED
/***Change currency symbol to AED ***/
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;
}
return $currency_symbol;
}