I'm using WooCommerce, and using a BACS Payment method which is actually Bank Trasnfer. The fields account details are fine, but for Indian context.. i need to change following two fields labels to something else. For example:

Change IBAN label to MICR Code, and BIC to IFSC.

And also need to disable Sort Code.

However, please note that I don't to make chanegs into plugin's code itself. So looking for some function that can help change the label from my theme function file.

Any help is appreciated.

  • Are you sure the documentation has nothing about this? The answer to your other similar Question was a "Google this for me" solution...
    – brasofilo
    Dec 31 '12 at 13:06
  • Yes, after posting it here.. I find a way to implement it in Woo Commerce codex. But earlier I was unable to find that, hence posted it here. Thanks
    – Krunal
    Jan 1 '13 at 5:27

It gets its label using a localisation call, __('IBAN', 'woocommerce'), so you could always just intercept that and change the text:

* filter translations, to replace some WooCommerce text with our own
* @param string $translation the translated text
* @param string $text the text before translation
* @param string $domain the gettext domain for translation
* @return string
function wpse_77783_woo_bacs_ibn($translation, $text, $domain) {
    if ($domain == 'woocommerce') {
        switch ($text) {
            case 'IBAN':
                $translation = 'MICR';

            case 'BIC':
                $translation = 'IFSC';

    return $translation;

add_filter('gettext', 'wpse_77783_woo_bacs_ibn', 10, 3);
  • hey, thanks. I was sure there must be a way for this.. but I was unable to figure out it my self. How did you find it? May be next time I can figure out it myself.
    – Krunal
    Jan 1 '13 at 5:25
  • I went to the best documentation there is: the source code. Documentation often lies or is deficient, but the source code rarely lies. In this instance, I looked in the code for that payment gateway module: woocommerce/classes/gateways/bacs/class-wc-bacs.php
    – webaware
    Jan 1 '13 at 6:01
  • Thanks. This also works if you are trying to get it to show Australian bank information which is represented as BSB and Account Number. Dec 11 '13 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.