PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Get Currency By Domain

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

I'd like to alias multiple domains to our Woo site and ideally have WOOCS map the domain to the currency like this...

Is there a hook/filter perhaps that can be implemented that would set the currency used by WOOCS by inspecting the domain?

Hello

unfortunately the plugin does not have this feature

To set  currency - https://currency-switcher.com/function/woocs-set_currency

FYI -- For anyone looking for a solution, we did this with the following code...

add_action('template_redirect', 'override_currency');
function override_currency() {
  global $WOOCS;
  $host = $_SERVER[HTTP_HOST];
  if(preg_match("/.*mysite.co.uk/", $host)) {
    $WOOCS->set_currency('GBP');
  }
  elseif(preg_match("/.*mysite.nl/", $host)) {
    $WOOCS->set_currency('EUR');
  }
  elseif(preg_match("/.*mysite.ca/", $host)) {
    $WOOCS->set_currency('CAD');
  }
  else {
    $WOOCS->set_currency('USD');
  }
}

Hello

Great!  Thank you  for your cooperation