Created
December 1, 2016 13:25
-
-
Save mijimoco/4828b9c2821b3bbfe8beebfdde7a4860 to your computer and use it in GitHub Desktop.
Woocommerce remove billing&shipping fields from checkout form
This file contains 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
// Hook in to Remove Checkout Fields | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
function custom_override_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_state']); | |
unset($fields['billing']['billing_address_2']); | |
unset($fields['billing']['billing_city']); | |
unset($fields['billing']['billing_postcode']); | |
unset($fields['billing']['billing_country']); | |
unset($fields['shipping']['shipping_company']); | |
unset($fields['shipping']['shipping_state']); | |
unset($fields['shipping']['shipping_address_2']); | |
unset($fields['shipping']['shipping_city']); | |
unset($fields['shipping']['shipping_postcode']); | |
unset($fields['shipping']['shipping_country']); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment