Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter levzi

    (@levzi)

    Just to add that I am not experienced in any way with coding.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter levzi

    (@levzi)

    I have tried copy and pasting:

    add_filter( ‘woocommerce_currencies’, ‘add_my_currency’ );

    function add_my_currency( $currencies ) {
    ?????$currencies[‘NGN’] = __( ‘Naira’, ‘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 ‘NGN’: $currency_symbol = ‘?’; break;
    ?????}
    ?????return $currency_symbol;
    }

    Using ‘FileZilla’ I uploaded this coding to the beginning of the file:
    /wp-content/plugins/woocommerce/woocommerce-functions.php

    that didn’t work so i tried uploading it to:
    /wp-content/plugins/woocommerce/woocommerce-core-functions.php

    Any ideas why it will not work correctly?
    Is my code wrong, am I uploading it to the wrong file, is there a specific area within the file I need to upload it?

    If you could help, I would sincerely appreciate it.

    Kind Regards,
    Adam Niazi

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Don’t add the code to core – add it to your theme’s functions.php file.

    Thread Starter levzi

    (@levzi)

    What do you mean by to the ‘core’? And also just to inform you that I am using the WooCommerce plugin with the Flexishop theme. So I still upload it to the Flexishop theme rather than the WooCommerce plugin.

    To make this slightly easier to understand could you tell me which folder I would find this functions.php file in please.

    Thanks for your help so far.

    Kind Regards,
    Adam Niazi

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter levzi

    (@levzi)

    That link doesn’t really help me much ‘mikejolley’.

    It merely states what the functions.php file does.

    Kind Regards,
    Adam Niazi

    Plugin Contributor Mike Jolley

    (@mikejolley)

    If you read it…

    A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php.

    Thread Starter levzi

    (@levzi)

    thanks thats all done now!

    And what about switching position of the currency label?
    The default is ‘$ 100’, but I need to be ‘100 UAH’ (or ‘100 $’), so the label needed to be in the end. Can I do this?

    Sorry, found in settings..

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: WooCommerce – excelling eCommerce] Addition of currency’ is closed to new replies.