Skip to content

Instantly share code, notes, and snippets.

@NickMkrtchyan
Created May 28, 2022 13:28
Show Gist options
  • Save NickMkrtchyan/85f76cd88a11157bbec5d51873babb8a to your computer and use it in GitHub Desktop.
Save NickMkrtchyan/85f76cd88a11157bbec5d51873babb8a to your computer and use it in GitHub Desktop.
Woocommerce Checkout Field Editor Snippet
// Woocommerce checkout Fields editor
add_filter( 'woocommerce_checkout_fields', 'woo_checkout_field_editor' );
function woo_checkout_field_editor( $fields ) {
unset( $fields['billing']['billing_first_name'] );
unset( $fields['billing']['billing_last_name'] );
unset( $fields['billing']['billing_country'] );
unset( $fields['billing']['billing_email'] );
unset( $fields['billing']['billing_phone'] );
// 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_state'] );
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment