Useful function when you want to convert any amount in non-basic currency into basic currency amount. For example you have 40GBP. Basic currency of your shop is EUR, to convert that 40GBP into XX EUR you are need do next:
1 2 | global $WPCS; $res=$WPCS->back_convert(40,0.8343,2); |
- 40 - amount in GBP
- 0.8343 - rate of 1 GBP relatively to 1 EUR. Currency rate can be get by the next function: $WPCS->get_currencies()
- 2 - decimals in the result value $res
