Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WooCommerce Re: WooCommerce

#132990
ecommercekid
Member

I just installed WooCommerce and it looks good. There’s one major problem however, I want the currency to display in ‘ABC’ and I’ve updated it using the suggested code by WooCommerce and that is

add_filter( ‘woocommerce_currencies’, ‘add_my_currency’ );

function add_my_currency( $currencies ) {
$currencies = __( ‘Currency name’, ‘woocommerce’ );
return $currencies;
}

add_filter(‘woocommerce_currency_symbol’, ‘add_my_currency_symbol’, 10, 2);

function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case ‘ABC’: $currency_symbol = ‘$’; break;
}
return $currency_symbol;
}

The real problem is, I want to show ABC currency on all the display pages. It works fine. BUT when someone checks out from Paypal, it should convert to USD. Someway where I can mention the exchange rate for example 500 ABC currency / 100 = 5 – if the exchange rate can be updated via admin panel or otherwise a fixed value.

Can someone help me with this update? It will be very useful, thanks.