Disable Billing Address Fields On WooCommerce Checkout Page

I saw this WooCommerce question the other day on Reddit and wanted to provide another (of the many) solutions already online for it. Not in the “Mine is better” sense but more of the “I’m learning how to do this too” thing. This example is more of an edge case than anything else but is doable with some PHP. And, a good learning opportunity. So keep readin’…

Custom WooCommerce and Shopify Solutions

Discover useful WooCommerce and Shopify custom solutions for your online store today at affordable prices!


Note: All examples in this post are part of a development/learning WooCommerce install using the default Storefront theme. PHP code is placed in the child theme’s function.php file.


Code, content, and community for developers.

The LAMP stack and the PHP technologies and frameworks it runs.

I’m not 100% sure this works for every scenario because sometimes the billing and shipping addresses may differ. But, if you only want the customer to fill out the shipping address fields on the WooCommerce Checkout Page, you can disable some of those similar Billing address fields.

By default in the Storefront theme, on the Checkout Page, you have this Billing details section:

For a more custom learning experience for me (and you!) and a better overall checkout experience (I think), I’ll use a combination of billing and shipping fields. Since both the billing and shipping sections have some repeating address fields, I’ll keep just those from the shipping section.

Here is the code I use in the child theme’s functions.php file:

add_filter( 'woocommerce_checkout_fields', 'woo_no_billing_fields' );

function woo_no_billing_fields( $fields ) {
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['shipping']['shipping_first_name'] );
unset( $fields['shipping']['shipping_last_name'] );
return $fields;
}

Now we have the combination of billing and shipping checkout fields available for a complete order:

This Isn’t Bulletproof

I’d like to emphasize again that I don’t necessarily think this is an ideal checkout process for every type of online store. But, may work well for a specific kind of situation.

One immediate problem I see is that if the Ship to a different address checkbox is not checked, does that wreck the checkout process? I will have to research a solution and write an article on that in the future.


Do you have a need for this exact customization for your WooCommerce online store? Consider hiring me to complete this for you, hassle-free. Contact me for more information.


Credit Resources

I am so grateful for all of the fantastic resources and content available online. This article is an example of those I studied in order to solidify these concepts: https://www.businessbloomer.com/woocommerce-checkout-customization/.


Thank you for reading this post. Please share it with someone else who would enjoy it as well.


Disclaimer: The majority of examples in this post, are performed in a personal development/learning workstation environment and should not be considered production quality or ready. Your particular goals and needs may vary. Like always, just because you can do something doesn’t mean you should. My opinions are my own.

More ways I can help

  • Need hosting for your next web application or WordPress site? I highly recommend Hostinger and use them to host my niche bass fishing site. The service is second to none.
  • Desktop and mobile wallpapers, digital downloads, photography services, Shopify and WooCommerce customizations, and content writing – all in one E-commerce Shop. Find your next digital purchase today!
  • Take your Laravel applications next level with Battle Ready Laravel by Ash Allen. Learn how to improve the performance, maintainability, and security of your Laravel projects in this e-book.

Disclosure: Some of this blog post’s services and product links are affiliate links. At no additional cost to you, should you make a purchase by clicking through one of them, I will receive a commission.

Code, content, and community for developers.

The LAMP stack and the PHP technologies and frameworks it runs.


📰 OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.


Hey thanks for commenting! Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.