1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Add currency / symbol
add_filter( 'woocommerce_currencies', 'add_rand_currency' );
add_filter( 'woocommerce_currency_symbol', 'add_rand_currency_symbol' );

function add_rand_currency( $currencies ) {
    $currencies['ZAR'] = __( 'South African Rand (R)', 'woothemes' );
    return $currencies;
}

function add_rand_currency_symbol( $symbol ) {
	$currency = get_option( 'woocommerce_currency' );
	switch( $currency ) {
		case 'ZAR': $symbol = 'R'; break;
	}
	return $symbol;
}