Skip to content

Instantly share code, notes, and snippets.

@thejamescollins
Forked from simonlk/WooCommerce - Change Sort Code to BSB
Last active August 29, 2015 13:57
Show Gist options
  • Save thejamescollins/9885791 to your computer and use it in GitHub Desktop.
Save thejamescollins/9885791 to your computer and use it in GitHub Desktop.
WooCommerce - Change Sort Code to BSB
<?php
/**
* Rename WooCommmerce's "Sort Code" to "BSB". Useful for Australian stores
* Ref: https://gist.github.com/om4james/9885791
*/
function woocommerce_sort_code_rename_to_bsb($translation, $text, $domain) {
if ($domain == 'woocommerce') {
switch ($text) {
case 'Sort Code':
$translation = 'BSB';
break;
}
}
return $translation;
}
add_filter('gettext', 'woocommerce_sort_code_rename_to_bsb', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment