• Resolved hoy

    (@whereskarlo)


    Hello,

    I am getting along very nicely with this plugin. I’m now interested in playing around with the global variables, in an attempt to make a currency switcher button for the website.

    How do the global variables work if I would like to convert all prices on a page? Do I have provide the logic, or is that provided by the plugin? I can’t determine from the description:

    The variables are global_convert_from and global_convert_to.

    This is useful if, say, you have multiple versions of the site in different languages – you can then assign these global variables depending on which site is being viewed and all currency will be converted based upon these settings.

    These will only override the options screen and not specific parameters specified with a shortcode or function call.

    Does this mean the global variables ONLY define a default from / to currency, in case from /to is omitted in a conversion operation?

    I am writing all code in php, so trying to understand in which scenario I should use the global variables and what difference they make.

    • This topic was modified 1 year, 2 months ago by hoy.
    • This topic was modified 1 year, 2 months ago by hoy.
Viewing 1 replies (of 1 total)
  • Plugin Contributor David Artiss

    (@dartiss)

    You are correct – this just defines a default from/to currency. If you provide either of these when you call the function it will override the globals.

Viewing 1 replies (of 1 total)
  • The topic ‘Global variables documentation’ is closed to new replies.