Last active
June 9, 2020 19:58
-
-
Save jgalea/5884548 to your computer and use it in GitHub Desktop.
Remove billing details from WooCommerce checkout.
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
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
function custom_override_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_first_name']); | |
unset($fields['billing']['billing_last_name']); | |
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_country']); | |
unset($fields['billing']['billing_state']); | |
unset($fields['billing']['billing_phone']); | |
unset($fields['order']['order_comments']); | |
unset($fields['billing']['billing_address_2']); | |
unset($fields['billing']['billing_postcode']); | |
unset($fields['billing']['billing_company']); | |
unset($fields['billing']['billing_email']); | |
unset($fields['billing']['billing_city']); | |
return $fields; | |
} |
Great, i found this one and it's working.
But you put billing_last_name Twice
This worked! Thank you very much. But it still left the titles "Billing" and "Additional Information" on the page.
Any additional code I can use to remove those? Cheers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jean, the top part of <?php should be removed. Might cause some unpleasant suprises you know ;)!