Home Forums Plugins CURCY – WooCommerce Multi Currency Show CLASS for active currency

Show CLASS for active currency

  • Author
    Posts
  • #95665

    do
    Participant

    I understand the currency on display for any product will change when the currency is changed, however if you are creating a custom widget box with a price written manually (with a link to the product). There are places on the website where the price of a product is written manually.

    Is there a way for the currently selected currency (available via shortcode widget on my site) to output some signal or ‘currently active class’ (for example if user selects USD then the plugin will output a class such as ‘.active-currency-usd’). The reason for this is I can then use CSS to show or hide various text/prices based on which class is active.

    One example is if they select the canadian currency, I use CSS to hide all flags EXCEPT show the canadian flag on the page (and other canadian graphics), etc. So being able to show which currency is active via a CLASS would be awesome. How can this be done?

    So if I have a user who selects GBP then the ‘active-currency-gbp’ class will hide all the other text and show user “GBP £100”, and if they select USD then the ‘active-currency-usd’ class will show and hide all the other text and show the user “USD $120”.

    I hope this makes sense? Is something like this possible?

You must be logged in to see replies to this topic. Click here to login or register