Support » Plugin: WooCommerce SagePay Direct Payment Gateway » Currency switcher

  • Hi I’m using the plugin and it works fine. But I need as a requirement for my website to allow users to pay in different currencies. For this purpose I installed a plugin called woocommerce-aelia-currencyswitcher.

    Your plugin pick the currency from an array in the plugin, rather than ussing the one passed with the order, which I can handle with the currencyswitcher plugin…

    Any ideas about how can I bug the currency in ds-sagepay-direct.php to allow the gateway to pick the currency switched when the order is placed?


Viewing 1 replies (of 1 total)
  • Plugin Author swicks


    H, sorry I’m not familiar with this currencyswitcher plugin – what you could do is insert a filter into the sagepay plugin just before the parameter array is changed to a string (~line 565).

    $this->params = apply_filters("sagepay_direct_params", $this->params);

    add filter into your currencyswitcher plugin similar to this…

    add_filter('sagepay_direct_params', array($this, 'sagepay_direct_params'));

    Handle the currency change within the function similar to this…

    public function sagepay_direct_params($params)
                //manipulate params
                $params['Currency'] = 'EUR';
                return $params;

    hope that help

Viewing 1 replies (of 1 total)
  • The topic ‘Currency switcher’ is closed to new replies.