Skip to content

Instantly share code, notes, and snippets.

@hedqvist
Created January 18, 2018 17:36
Show Gist options
  • Save hedqvist/831a886cf65f9ca4b2d58f341c1532e1 to your computer and use it in GitHub Desktop.
Save hedqvist/831a886cf65f9ca4b2d58f341c1532e1 to your computer and use it in GitHub Desktop.
Add WooCommerce currency
<?php
/**
* @snippet WooCommerce - Fortnox plugin by Redlight Media - Add WooCommerce currency via functions.php
* @author Redlight Media AB / Christopher Hedqvist
* @compatible WooCommerce 3.2.5
*/
function redlight_fortnox_currency($orderData, $order_id) {
$orderData['Order']['Currency'] = get_woocommerce_currency();
return $orderData;
}
add_filter('obj_fortnox_order_data', 'redlight_fortnox_currency', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment