Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ehsanaghaei

    (@ehsanaghaei)

    the Symbol in Persian should be,
    “ریال”.

    Plugin Contributor Ken Nguyen

    (@kendy73)

    Hi ehsanaghaei,

    Please set those custom functions in your child theme 🙂

    
    /**
     * Add new currency
     *
     * @param $currencies
     *
     * @return mixed
     */
    function thim_add_learnpress_currency( $currencies ) {
    	$currencies['IRR'] = 'Iran Rial Currency (IRR)';
    	return $currencies;
    }
    
    add_filter( 'learn_press_get_payment_currencies', 'thim_add_learnpress_currency' );
    
    /**
     * Add new currency symbol
     *
     * @param $currency_symbol
     * @param $currency
     *
     * @return string
     */
    function thim_new_learnpress_currency_symbol( $currency_symbol, $currency ) {
    	if ( $currency == 'IRR' ) {
    		$currency_symbol = 'ریال';
    	}
    	return $currency_symbol;
    }
    
    add_filter( 'learn_press_currency_symbol', 'thim_new_learnpress_currency_symbol', 10, 2 );

    Cheers!

    Ken

    • This reply was modified 8 years, 3 months ago by Ken Nguyen.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Iran Rial Currency (IRR)’ is closed to new replies.