As you might already know, WooCommerce doesn’t come with a feature that lets you customize the checkout page.
So the normal step would be to start looking for a plugin, right?
But if it’s something simple, which can be done manually, like removing some billing fields from the WooCommerce checkout page, then why use yet another plugin?
Adding another plugin means more code, more scripts, more bloat that can drag down your site’s performance!
I always say that the fewer plugins you have, the better!
So, in this post, we’re not going to use a plugin. No, sir! Instead, I’ll show you how to add some simple code in order to remove whatever billing fields you want from the WooCommerce checkout page.
How to remove WooCommerce billing fields
To remove the billing fields in the WooCommerce checkout page, you’ll need to access your WordPress website’s files.
Once there, you need to locate the functions.php
file in your child theme, usually found in /public_html/wp-content/themes/YOURTHEMENAME-child/functions.php
After that, you need to edit it and add the code, depending on what billing fields you want to remove from the checkout page.
Here is the list of billing fields that WooCommerce uses:
- billing_first_name
- billing_last_name
- billing_company
- billing_address_1
- billing_address_2
- billing_city
- billing_postcode
- billing_country
- billing_state
- billing_email
- billing_phone
Now let’s say that you want to remove the “Postcode”, “State”, and “Phone” billing fields.
For that, you’ll have to add the following code in the functions.php
file, right after whatever code is already there.
add_filter( 'woocommerce_checkout_fields' , 'custom_checkout_fields' );
function custom_checkout_fields( $fields ) {
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_phone']);
return $fields;
}
Here’s how it looks on our theme, Avada (this is an affiliate link):
Now those three billing fields are gone from the WooCommerce checkout page.
Add more fields for removal
If you want to remove more fields later, all you need to do is to add another “unset” row, but with a different billing field.
Let’s say you’ll also want to remove the “Country” field.
All you have to do is to add this to the code: unset($fields['billing']['billing_country']);
And the code will look like this:
add_filter( 'woocommerce_checkout_fields' , 'custom_checkout_fields' );
function custom_checkout_fields( $fields ) {
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_phone']);
unset($fields['billing']['billing_country']);
return $fields;
}
Save the file and clear your caches
Don’t forget to save the file and also clear your cache from both your website and browser, if the changes don’t seem to take effect after just simply refreshing the checkout page.
That’s a wrap
Hope you found the guide comprehensive and helped you remove the billing fields from the WooCommerce checkout page.
Don’t forget to share and help your friends out too!
If you have questions or something to say, please drop a comment, contact us, or message on Facebook.
You can also follow us on Twitter and subscribe to our YouTube channel.
If you want to start your own WordPress blog, or need a website for your business, our WordPress services are at your disposal!
I remove Country,City,State Fields remove
But Checkout not working.
Show ‘add street address to continue’
nice post! But how to I remove the billing text
Thanks! What do you mean by ‘billing text’ exactly? The labels for the billing fields? They should be removed along with the fields.
add_filter( ‘woocommerce_enable_order_notes_field’, ‘__return_false’ );
add_filter( ‘woocommerce_enable_order_notes_field’, ‘__return_false’ );
I hurried with the assessment, in my case there was a conflict of plugins, be careful, there is a risk. But thanks so much for the post.
I want to remove the last name and middle name fields but when I try to implement this code the checkout not working
function remove_additional_information_checkout($fields){
unset( $fields[“billing_first_name”] );
unset( $fields[“billing_middle_name”] );
return $fields;
}
add_filter( ‘woocommerce_billing_fields’, ‘remove_additional_information_checkout’ );
I have seen the code here https://www.cloudways.com/blog/how-to-edit-delete-fields-and-email-in-woocommerce-custom-checkout-fields/ .Can you please guide me how to remove fields?
Thank you so much for this info on Removing Billing details from Woo checkout. Very generous!!