Skip to content

Instantly share code, notes, and snippets.

@imran-khan1
Last active July 12, 2019 07:48
Show Gist options
  • Save imran-khan1/b5db347de3ee6dd20cb2aa014aa74116 to your computer and use it in GitHub Desktop.
Save imran-khan1/b5db347de3ee6dd20cb2aa014aa74116 to your computer and use it in GitHub Desktop.
<?php
/*
* Remove some checkout billing fields
*/
function ci_woo_billing_fields($fields){
unset( $fields["billing_country"] );
unset( $fields["billing_company"] );
unset( $fields["billing_address_1"] );
unset( $fields["billing_address_2"] );
unset( $fields["billing_city"] );
unset( $fields["billing_state"] );
unset( $fields["billing_postcode"] );
unset( $fields["billing_phone"] );
return $fields;
}
add_filter( 'woocommerce_billing_fields', 'ci_woo_billing_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment