Created
May 12, 2015 08:39
-
-
Save NiklasHogefjord/593c59af9b464ad23cba to your computer and use it in GitHub Desktop.
DIBS for WooCommerce - filter the language parameter sent to DIBS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DIBS payment gateway for WooCommerce | |
* Filter the language parameter sent to DIBS. | |
* Useful when you want the language of the DIBS Payment Window to match the language in your WooCommerce store. | |
* | |
**/ | |
add_filter( 'dibs_language', 'my_dibs_language' ); | |
function my_dibs_language() { | |
// Get ISO language code | |
$iso_code = explode('_', get_locale()); | |
return $iso_code[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment