Last active
May 28, 2020 17:13
-
-
Save pablo-sg-pacheco/03d879c0b78f17cd2c539b054b14cb54 to your computer and use it in GitHub Desktop.
Woocommerce - Direct Bank Transfer - Add fields on thank you page and order received email
This file contains hidden or 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
<?php | |
/** | |
* Adds CNPJ and Company Name fields on the Thank You page and Order Received Email when using 'Direct Bank Transfer' payment gateway. | |
*/ | |
add_filter( 'woocommerce_bacs_account_fields', function ( $fields ) { | |
$fields['cnpj']['label'] = __( 'CNPJ', 'domain' ); | |
$fields['cnpj']['value'] = '99.999.999/9999-99'; | |
$fields['company_name']['label'] = __( 'Razao Social', 'domain' ); | |
$fields['company_name']['value'] = 'Uma empresa doce e bacana Ltda'; | |
return $fields; | |
} ); |
Oi @rafaelparaizo ,
Acabei de editar com o que vc pediu. Pode testar e me diz se ta ok ;)
Perfeito,
Funcionou certinho!!!
Muito obrigado!
;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Olá amigo,
como faço para adicionar o campo CNPJ e Razão Social?