title: Payment Gateway adding language url (Wordpress/Polylang/Woocommerce)
body: <p>I have a Wordpress Website running Woocommerce. The website is available in 3 different languages. I Run the Polylang Plugin. I have a payment Gateway called Europabank. When i order a product and select this gateway everything works perfectly. I can pay the given amount and the payment is succesful. But after the payment the user gets redirected to the website confirmation page. The plugin handles this with the following code:</p>
  
  <pre><code>'feedbackurl' =&gt; WC ()-&gt;api_request_url ( 'WC_Gateway_EuropabankMpi' ),
  'redirecturl' =&gt; WC ()-&gt;api_request_url ( 'WC_Gateway_EuropabankMpi' ), 
  </code></pre>
  
  <p>After the payment the url will look like this:</p>
  
  <blockquote>
    <p><a href="http://my-website-url.com/wc-api/WC_Gateway_EuropabankMpi/?somedata" rel="nofollow">http://my-website-url.com/wc-api/WC_Gateway_EuropabankMpi/?somedata</a></p>
  </blockquote>
  
  <p>This url will give a 404 error because the language is not provided, when i change the url into: (added <strong>/en/</strong>)</p>
  
  <blockquote>
    <p><a href="http://my-website-url.com/en/wc-api/WC_Gateway_EuropabankMpi/?somedata" rel="nofollow">http://my-website-url.com/en/wc-api/WC_Gateway_EuropabankMpi/?somedata</a></p>
  </blockquote>
  
  <p>will work. So i need to add the language code to the url. Which i can do with:</p>
  
  <pre><code>&lt;?php  $currentlang = get_bloginfo('language');
                  switch ($currentlang) {
                  case "nl-NL":
                  echo "/nl/";
                  break;
                  case "fr-FR":
                  echo '/fr/';
                  break;
                  case "en-GB":
                  echo '/en/';
                  break;
                  default: echo '/en/';
          };?&gt;
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>Where do i have to add this code? I don't mind changing the Plugin directly cause it will not need to be updated, but if you have a update proof solution that would be obviously better.</p>
  
  <p><strong>Plugin Versions &amp; links</strong></p>
  
  <ul>
  <li>Wordpress : Version 4.4.1 </li>
  <li>Woocommerce: Version 2.4.12</li>
  <li><a href="https://nl.wordpress.org/plugins/polylang/" rel="nofollow">Polylang</a> : Version 1.7.12</li>
  <li><a href="https://www.europabank.be/ecommerce-professioneel" rel="nofollow">Europabank MPI</a> : Version 1.0</li>
  </ul>