Created
May 28, 2022 13:28
-
-
Save NickMkrtchyan/85f76cd88a11157bbec5d51873babb8a to your computer and use it in GitHub Desktop.
Woocommerce Checkout Field Editor Snippet
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
// 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