Content of the page

$WPCS->back_converts()

Content of the article

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:

  • 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

func-79-1