Support » Plugin: WooCommerce » Change the currency symbol from '$' to 'USD' in Woocommerce

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Test is done with default 2015 theme but still i cant find solution.

    Plugin Author royho

    (@royho)

    Please do the above again and post the URL so I can take a look. Also post a screenshot of where you put the code.

    Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Hey,

    Here is the URL : http://leo-design.info/SON2/

    I cant see any changes after add your code functions.php. See the below screenshot. http://d.pr/i/390Q

    Plugin Author royho

    (@royho)

    So again, I need you to perform the steps I asked which is to turn all plugins off except WooCommerce and switch your theme to 2015 and then I can check.

    Also your code screenshot does not show me where you put the code. Please use pastebin.com to paste all of your code inside functions.php so I can see.

    Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Here is the link with all plugin deactivate except Woocommerce : http://leo-design.info/QAMIS/panier/

    Here is the Pastbin link of functions.php : http://pastebin.com/iRENAzvL

    I hope Now you can help me.

    Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Here is the Product link : http://leo-design.info/QAMIS/product/qamis-standard-11/. Above link may be not worked from your end because its cart page. You can check here and help me out.

    Thanks

    Plugin Author royho

    (@royho)

    Ok the reason it didn’t work for you is because the code I gave you is for WooCommerce 2.5 ( so my fault ). For 2.4 you need the following.

    add_filter( 'woocommerce_currency_symbol', 'change_currency_symbol', 10, 2 );
    
    function change_currency_symbol( $symbols, $currency ) {
    	if ( 'USD' === $currency ) {
    		return 'USD';
    	}
    
        return $symbol;
    }

    However keep the code I gave you for 2.5 when it is released, you will need it.

    Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Yes It works but if i have to use for Euros or any other currency so how can i write the above Hook?

    Like this :

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

    function change_currency_symbol( $symbols, $currency ) {
    if ( ‘USD’ === $currency ) {
    return ‘USD’;
    }
    if ( ‘EUROS’ === $currency ) {
    return ‘Euro’;
    }
    if ( ‘AED’ === $currency ) {
    return ‘AED’;
    }

    return $symbol;
    }

    I want to apply all 3 of this. Is this Correct ?

    Plugin Author royho

    (@royho)

    Like this:

    add_filter( 'woocommerce_currency_symbol', 'change_currency_symbol', 10, 2 );
    
    function change_currency_symbol( $symbols, $currency ) {
    	if ( 'USD' === $currency ) {
    		return 'USD';
    	}
    
    	if ( 'EUR' === $currency ) {
    		return 'Euro';
    	}
    
    	if ( 'AED' === $currency ) {
    		return 'AED';
    	}
    
            return $symbols;
    }
    Thread Starter Manan Ghadawala

    (@manan-ghadawala)

    Thanks Brother. I appreciate your Help.

    Help! I tried to add this plugin to my site and did something I shouldn’t have, apparently. It messed up my whole woocommerce section and so I returned and deleted the section I had added.

    Now my site is down and I can’t even access the WordPress Admin to see what happened to the code. Could you help me out please?

    Hello,

    I don’t have a functions.php file in my Child theme, only custom CSS.

    How would I change the $ dollar sign to HKD$ for example?

    Thanks in advance.

    @marcx if you don’t have functions.php you can create it

    Hello,

    I hope you can help me with my issue with the single product currency price display. The currency symbol is not aligning with the price. it’s like this on product display:

    $
    22.00
    In Stock
    ADD CART Button

    I really appreciate your assistance on this issue.

    Thanks,
    Ron

    @ronnel1025 do you have a link to the page?

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Change the currency symbol from '$' to 'USD' in Woocommerce’ is closed to new replies.