Skip to content

Instantly share code, notes, and snippets.

@NiklasHogefjord
Created May 12, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save NiklasHogefjord/593c59af9b464ad23cba to your computer and use it in GitHub Desktop.
Save NiklasHogefjord/593c59af9b464ad23cba to your computer and use it in GitHub Desktop.
DIBS for WooCommerce - filter the language parameter sent to DIBS.
/**
* 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