Multiple Currencies in WooCommerce
  • 22 Nov 2022
  • 1 Minute to read

Multiple Currencies in WooCommerce

Editing the Helcim plugin to support multiple currencies

By default, the Helcim Commerce plugin for WooCommerce support a single merchant account and currency. However, you can modify the plugin in order to support both CAD and USD by following the steps below. This is only applicable for plugins v3.0.0 and above, please refer to the Legacy Article here if you are using versions below 3.0.0.

Modification Instructions

  • Install the Helcim Commerce WooCommerce Plugin, following these instructions.
  • On your Helcim Commerce API Configuration, add access to 2 terminals(USD and CAD)
  • When setting up the plugin in WooCommerce, enter the CAD Helcim Commerce Terminal Id in your settings.
  • Modify the plugin's php file.
    • the file is called (HelcimDirectService.php) and it should be located at: wp-content/plugins/helcim-commerce-for-woocommerce/classes/HelcimDirectService.php depending on your WordPress and WooCommerce installation.
    • The code to modify should be found approximately at line 130. (See Original Code sample below)
    • Modify the php with the new code (see New Code sample below)
    • Enter your USD Helcim Commerce API Terminal Id as part of the php code, where it says "CHANGE_TO_USD_TERMINAL_ID"
  • Test a transaction in each currency before going to production.

Original Code

$helcimArgs['terminalId'] = $wcHelcimGateway->getTerminalId();

New Code

$helcimArgs['terminalId'] = $wcHelcimGateway->woocommerceCurrencyAbbreviation() === 'CAD' ? $wcHelcimGateway->getTerminalId() : "CHANGE_TO_USD_TERMINAL_ID";

Was this article helpful?