PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

wc_price not changing currency symbol

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

I did major updates on my site and i am using a invoice generator plugin, which uses wc_price to display prices on the invoice. It was working properly, but after updating plugins and wordpress it just keeps showing the site's default currency symbol.

 

echo wc_price(123.45, array('currency'=>'HUF'));

result: € 123.45

my woocs config:

View post on imgur.com

Hello

what plugin version number are you using?

1.3.8

can you help?

Hello

Try  for  test  in  file - wp-content\plugins\woocommerce-currency-switcher\index.php - delete  this  code  - https://c2n.me/4gHy2BU.png  and  check your function

Hi there is no change :(

echo wc_price(123.45, array('currency'=>'HUF'));

result: € 123.45

Does your plugin register currencies with these filters, right?

add_filter( 'woocommerce_currencies', 'add_cw_currency' );

add_filter('woocommerce_currency_symbol', ', 10, 2);

 

I don't understand what's the problem here.

Hello

Ok! Please  try  it

global $WOOCS;

$WOOCS->set_currency('HUF');

echo wc_price(123.45, array('currency'=>'HUF'));

Does your plugin register currencies with these filters, right? - Yes! It depends where you call this function.

works great, thanks a lot!

Solution: put this on the top of the invoice template

global $WOOCS;
$WOOCS->set_currency($this->order->get_order_currency());

Hello

Ok!  Great!

Welcome;)