the answer for all question about Oxygen Builder plugin and WordPress

Is there a way to take a static number like 299.00 EUR and using a php code in Oxygen to make it alw

Is there a way to take a static number like 299.00 EUR and using a php code in Oxygen to make it always convert to the current value in USD?
For example, today 299 EUR might show up as $371.30, but tomorrow it might show up as $375 or something. Anyone know how to get this to auto-detect today’s conversion rate and just show it in USD?
Thanks!



Source

Checkout Woo Design Set

Capital Design Set

6 Comments
  1. Austin says

    You’ll have to use an API or something to fetch daily conversation rates and then simple PHP code can multiply the two to give you the currency.

    https://xurrency.com/api came up with a quick search.

  2. Harry says

    Theres probably a web service thst can be uded.

  3. Dharma says

    You can use this API using either JS or PHP cURL

    https://fixer.io/documentation

  4. Joel says

    as others have mentioned, using an API will be needed so you can fetch it daily (or more/less often). you could consider doing it via JS, instead of PHP, too.

    unless coded correctly, PHP will have issues with cache solutions (if you’re using one). if you’re serving a cached page showing USD to someone expecting EUR then it defeats the purpose.

    so in this case, JS might be a better solution as it’s calculated client-side (ie. after the cached version has been served)

  5. Acon says

    Not sure if this will suit you, but if you’re showing a USD price in your WooCommerce (while listing with EUR in your WC product dashboard), you can try a plugin called “Currency per Product for WooCommerce”. This is what I use for my business.

Leave A Reply

Your email address will not be published.

Oxyrealm Docs OxyMade - Oxygen Builder Design Set Mega collection