Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter martiniro

    (@martiniro)

    Solved.
    I installed Code Snippets and I used the code from here:
    https://docs.woocommerce.com/document/add-a-custom-currency-symbol/
    And it worked.

    The code I used is bellow (notice the space before and after LEI currency symbol):

    add_filter( ‘woocommerce_currencies’, ‘add_ron_currency’ );
    function add_ron_currency( $ron_currency ) {
    $ron_currency[‘Romanian LEU/LEI’] = __( ‘Romanian LEU/LEI’, ‘woocommerce’ );
    return $ron_currency;
    }

    add_filter(‘woocommerce_currency_symbol’, ‘add_ron_currency_symbol’, 10, 2);
    function add_ron_currency_symbol( $custom_currency_symbol, $custom_currency ) {
    switch( $custom_currency ) {
    case ‘Romanian LEU/LEI’: $custom_currency_symbol = ‘ LEI ‘; break;
    }
    return $custom_currency_symbol;
    }

Viewing 1 replies (of 1 total)