Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #21487

    Hello:

    I´d like to change the symbol “$” for the symbol “MXN” (Mexican Pesos). In two areas:

    1) In the “Car Button” located in the top of the page.

    2) In the “Payment Page”.

    Can you explain me the steps to do it.

    Thanks.

    #112006

    woocommerce>basic settings>currency

    #112007

    Hi!

    Thanks mAqq for helping us out.

    Best regards,

    Peter

    #112008

    Hi.

    The currency it´s all ready in Mexican Pesos.

    But, What I need to change is the symbol “$” and place de symbol “MXN”

    ¿Can I do that?

    Thanks.

    #112009

    Hey!

    You can use a filter function. http://docs.woothemes.com/document/add-a-custom-currency-symbol/

    Regards,

    Peter

    #112010

    Hi.

    I understand the filter funcion, but sorry I kind of new in this.

    ¿Where exactly I have to paste the code?

    Thanks.

    #112011

    Is this the correct route:

    wp-content/themes/replete/functions.php

    #112012

    Hey!

    Yes, that’s the correct file – just insert the code at the very bottom of it and change the currency symbol.

    Regards,

    Peter

    #112013

    I need to place “Pesos Mexicanos” in currency type.

    And the symbol “MXN” in the symbol type.

    But I don´t now where exactly this info goes.

    This is the original code.

    ¿Can you send me this code with the correct change of concepts?

    Thanks.

    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;

    }

    #112014

    I think what you are looking for is:

    add_filter( 'woocommerce_currencies', 'add_my_currency' );

    function add_my_currency( $currencies ) {
    $currencies['ABC'] = __( 'Pesos Mexicanos', '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 = 'MXN'; break;
    }
    return $currency_symbol;
    }

    Regards,

    Devin

    #112015

    Hello:

    Thanks for all your help!!

    Done.

    :)

    #112016

    Glad we could help :)

    Let us know if you have any other questions or issues.

    Regards,

    Devin

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Change Symbol $ for MXN’ is closed to new replies.