Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Cart & Software Integration » WooCommerce »

Processing Multiple Currencies in WooCommerce

By default, the Helcim Commerce plugin for WooCommerce supports a single merchant account and currency. However, you can modify the plugin in order to support both CAD + USD by following the steps below.

Modification Instructions

  • Install the Helcim Commerce WooCommerce Plugin, following these instructions: https://www.helcim.com/support/article/207-cart-software-integration-woocommerce/

  • Create two Helcim.js configurations, one for your CAD Terminal, and for your USD terminal.

  • When setting up the plugin in WooCommerce, enter the CAD Helcim.js configuration token in your settings.

  • Modify the plugin's php file.

    • The file is called (class-wc-commerce-helcim.php) and it should be located at: /plugins/HelcimCommerce/assets/ depending on your WordPress and WooCommerce installation.

    • The code to modify should be found approx. at line 239 (see "Original Plugin Code" sample to the right)

    • Modify the php with the new code (see sample on the right)

    • Enter your USD Helcim.js configuration as part of the php code, where it says "CHANGE-TO-USD-TOKEN"

  • Test a transaction in each currency before going to production.

Code Samples

Original Plugin Code PHP

<!--SETTINGS-->
<input type="hidden" id="woocommerce" value="1">
<input type="hidden" id="token" value="<?php echo $this->token; ?>">

Modified Plugin Code PHP

<!--SETTINGS-->
<input type="hidden" id="woocommerce" value="1">
<input type="hidden" id="token" value="<?php

	// CHECK CURRENCY
	if(get_woocommerce_currency() == 'CAD'){

		// SET HELCIM.JS CONFIGURATION TOKEN (CAD)
		echo $this->token;

	}else{

		// SET HELCIM.JS CONFIGURATION TOKEN (USD)
		echo 'CHANGE-TO-USD-TOKEN';

	}

?>">