Content of the page

$WOOCS->woocs_exchange_value()

Content of the article

Converts any value which is in the shop default currency into amount of the current selected currency.

For example, we get from any place of the site price/amount (70 for example) which keeps in meta field for example as decimal value in the default currency. But we want to recount this value for our purposes according to the current selected currency. Use next code:

So, if the amount is 70EUR (EUR is basic in this example) we will get amount in the current currency. For example basic currency is EUR, current selected currency is USD, so we will get $res about 77,15 USD.

Use it for example for marketing texts (inside content use shortcode [woocs_show_custom_price]) (keep price/amount in meta field as float or integer value), or for making any plugin compatible with WOOCS, as its described here for example.

This function uses with woocs_exchange_value action created for making any another plugin compatible with WOOCS.