Skip to content

Instantly share code, notes, and snippets.

@lenivene
Created November 5, 2017 13:52
Show Gist options
  • Save lenivene/0558a44302341fe521080f158eb6f92b to your computer and use it in GitHub Desktop.
Save lenivene/0558a44302341fe521080f158eb6f92b to your computer and use it in GitHub Desktop.
Remove fields checkout
<?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
* E-mail
* 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