Created
November 5, 2017 13:52
-
-
Save lenivene/0558a44302341fe521080f158eb6f92b to your computer and use it in GitHub Desktop.
Remove fields checkout
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 | |
add_filter( 'woocommerce_checkout_fields' , 'wp_remove_fields_checkout' ); | |
function wp_remove_fields_checkout( $fields ){ | |
/** | |
* All unset \/ | |
* Nome | |
* Sobrenome | |
* Empresa | |
* Endereço | |
* Endereço de entrega | |
* Cidade | |
* Cep | |
* Pais | |
* Estado | |
* Telefone | |
* Comentários | |
* Usuário | |
* Senha | |
* Confirmar Senha | |
*/ | |
unset( $fields['billing']['billing_first_name'] ); | |
unset( $fields['billing']['billing_last_name'] ); | |
unset( $fields['billing']['billing_company'] ); | |
unset( $fields['billing']['billing_address_1'] ); | |
unset( $fields['billing']['billing_address_2'] ); | |
unset( $fields['billing']['billing_city'] ); | |
unset( $fields['billing']['billing_postcode'] ); | |
unset( $fields['billing']['billing_country'] ); | |
unset( $fields['billing']['billing_state'] ); | |
unset( $fields['billing']['billing_phone'] ); | |
unset( $fields['order']['order_comments'] ); | |
unset( $fields['billing']['billing_email'] ); | |
unset( $fields['account']['account_username'] ); | |
unset( $fields['account']['account_password'] ); | |
unset( $fields['account']['account_password-2'] ); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment