Created
January 10, 2021 21:35
-
-
Save purplefeel/9396daaaa2495c1af2cb1de8a2a1ead2 to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter('woocommerce_billing_fields','wpb_custom_billing_fields'); | |
// remove some fields from billing form | |
// ref - https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ | |
function wpb_custom_billing_fields( $fields = array() ) { | |
unset($fields['billing_company']); | |
unset($fields['billing_address_1']); | |
unset($fields['billing_address_2']); | |
unset($fields['billing_state']); | |
unset($fields['billing_city']); | |
unset($fields['billing_phone']); | |
unset($fields['billing_postcode']); | |
unset($fields['billing_country']); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment