How to Remove WooCommerce Billing Fields

Remove WooCommerce billing fields

Hello friends, Good Morning. Today we are going to learn a WooCommerce trick. This trick is about How to remove WooCommerce billing fields. I want to tell you that WooCommerce is a very powerful WordPress tool which converts simple website into an E-commerce one. Nowadays if we go through the stat,  WooCommerce has 73,299,254 downloads and if we talk about percentage, WooCommerce powered 28% on all Online Store.

WooCommerce, the most customizable eCommerce plateform for building your online business.

A few days back, One of my friends asks me a question regarding WooCommerce that how to remove the billing field from the checkout page. He didn’t mention any field but today we will show how to remove WooCommerce billing fields. So, let’s start

There are two ways to remove WooCommerce billing fields on the checkout page, below they are:

  1. Add the below snippet to the functions.php file of your website active theme.
  2. Install WooCommerce Checkout Field Editor plugin for more customization.

Adding below snippet will risky if you do directly from the WordPress Dashboard. We highly recommended you to do this from either FileZilla(File Transfer Protocol) or through cPanel. What you have to do this to Login Cpanel or Connect FTP, Open wp-contents folder >> Themes >> theme name Child >> functions.php. Here is the snippet to remove WooCommerce billing fields.

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_woofields' );
function custom_override_checkout_woofields( $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_last_name']);
    unset($fields['billing']['billing_email']);
    unset($fields['billing']['billing_city']);
    return $fields;
}

Here is another example if you want to remove any specific billing field, let suppose Company Name then your snippet would look like this:

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
 
function custom_override_checkout_fields( $fields ) {
    unset($fields['billing']['billing_phone']);
    return $fields;
}

So friends, finally a few lines of code and you can easily remove any WooCommerce billing field from the checkout page.

Friends, if this WooCommerce tip&trick helps you then please let me know in the comment box and please don’t forget to share this, Keep learning.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Please share your thought

All the tools you need to build professional forms online.

Create custom web forms to capture leads

Collect payments

Automate your workflows

Build your business online

Create custom web forms to capture leads, collect payments, automate your workflows, and build your business online