Hi i use woocommerce-currency-converter-widget by woocommerce.

By default the plugin use EUR and GPB and i would like to change them with currency symbols.

I tried this method

add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'EUR': $currency_symbol = '€'; break;
}
return $currency_symbol;
}

but this changed the symbol only in products and not at the widget.

I talked with woo support and they didn't help me.
They need money for this (plugin is already paid)

Any solution?
Thanks

I haven't any experience with WooCommerce but the documentation I'm looking at says the widget configuration has a checkbox to specify using the currency symbol. Are you using both the currency converter widget and Multi-Currency (which has its own currency selector widget)?

I'm just not getting why an option to show currency symbols would require further customisation to get euros to display as '€' and pounds sterling as '£' - they're hardly custom symbols.


I talked with woo support and they didn't help me.
They need money for this (plugin is already paid)

Yes, I can see as much from the documentation:

If you are unfamiliar with code/templates and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our Support Policy.

Did you ask for help with the customisation, or did you ask for help with getting currency symbols displayed?

Does the WooCommerce > Settings page, Currency options > Currency drop-down not do what you want it to?

Weedpacket Yes the plugin has this option but i call it directly through a shortcode because i want it to a specific position. Due to this, there is no an option to display the symbols only text.

I asked for help with getting currency symbols displayed.

maxxd At these settings there is no option to display the symbol. Thanks for your time 🙂

    Just wondering if it might be easier to solve in JavaScript on the client side, if it's too difficult to figure out where/how in the server-side code to change it? Depending on how the HTML is structured and the use of HTML classes/IDs, it might -- if you're lucky -- be a simple string/replace thing?

    NogDog
    I resolved the widget by changing this code

    public function shortcode( $atts, $content = null ) {
    $defaults = array( 'currency_codes' => '', 'message' => '', 'show_symbols' => '0', 'show_reset' => '0', 'currency_display' => '', 'disable_location' => '0' );
    $settings = shortcode_atts( $defaults, $atts );

    		return $this->get_converter_form( $settings, false );
    	}

    to 'show_symbols' => '1',

    This seems to work.
    The only problem now is that on product filters still get the currency at EUR & GBP and not with symbols

      Write a Reply...