Created
September 27, 2016 00:06
-
-
Save luizbills/6bd1de7d30e754ab3bb2c6f80a268545 to your computer and use it in GitHub Desktop.
Remover campos de CPF e CNPJ quando estiver no checkout em inglês
This file contains 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
add_filter( 'woocommerce_checkout_fields' , 'prefix_remove_some_checkout_fields' ); | |
function prefix_remove_some_checkout_fields( $fields ) { | |
if ( $_GET['lang'] === 'en' ) { | |
unset( $fields['billing']['billing_persontype'] ); | |
unset( $fields['billing']['billing_cpf'] ); | |
unset( $fields['billing']['billing_cnpj'] ); | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment