Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active December 18, 2015 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/5804120 to your computer and use it in GitHub Desktop.
Save deckerweb/5804120 to your computer and use it in GitHub Desktop.
EN: In WooCommerce, for German users: Change Austria to "Oesterreich" instead of "Österreich" (as in translation files). // DE: Um in WooCommerce die Österreich-Anzeige auf Oe zu ändern -- einige Nutzer wollten das, weil deren Theme JavaScript-mäßig schlecht programmiert ist...
<?php
/** Do NOT include the opening php tag */
add_filter( 'woocommerce_countries', 'ddw_wcde_austria_oesterreich', 10, 1 );
/**
* For German users: Change Austria to "Oesterreich" instead of "Österreich" (as in translation files).
*
* @author David Decker - DECKERWEB
* @link http://deckerweb.de/twitter
*
* @param $country
*
* @return string For Austria country string.
*/
function ddw_wcde_austria_oesterreich( $country ) {
/** Set new country string */
$country[ 'AT' ] = 'Oesterreich';
/** Return changed string */
return $country;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment