How to Remove Checkout Fields from WooCommerce

The default list of fields that WooCommerce asks your customers to fill out during the checkout process is pretty large. Almost all store owners can find at least one or two of those fields that are just completely unnecessary for their buyers to provide. Unfortunately, disabling any of these fields one-by-one isn’t a particular simple task as WooCommerce doesn’t provide a simple way to edit these out of the box.

The list of checkout fields shown for billing is very long.

Checkout Fields for Billing in WooCommerce
An example of Checkout Fields for Billing in WooCommerce

The shipping checkout fields are a bit shorter but there are still quite a few.

Checkout Fields for Shipping in WooCommerce
An example of Checkout Fields for Shipping in WooCommerce

Finally, there are a handful of miscellaneous fields related to these like order notes as well that they tack on at the end of the checkout by default.

All together there are over 20 different possible checkout fields included with WooCommerce. You can remove these if you want to get your hands messy and write some code or you can take the easy way out and use our Remove WooCommerce Features plugin instead.

How to Disable WooCommerce Checkout Fields with Code

To get started doing this with code you will need to get on to your site’s server, find the directory that your WordPress theme is installed on and download the functions.php file to your local computer. Open the file with a text editor and you’re ready to begin.

Fair Warning!

This processes is probably the most involved of all the code tutorials we have on the site. Take not that any typos or mistakes in the code below will break your site until they are corrected. If you want to just skip ahead to doing this the fast and easy way with our plugin now is the time.

To start, you’re going to want to begin with adding the following code to your functions.php file:

add_filter( 'woocommerce_checkout_fields', 'my_remove_checkout_fields', 10 );
function rwf_checkout_fields( $fields ) {

}

This is going to be the container for the rest of our code which will turn off the checkout fields individually. Each checkout field has its own internal name inside of WooCommerce. To disable any one field we have to include a line in our file that matches the internal name like so:

add_filter( 'woocommerce_checkout_fields', 'my_remove_checkout_fields', 10 );
function rwf_checkout_fields( $fields ) {
    unset( $fields['billing']['billing_first_name'] );
}

In the above code, we are turning off the First Name field under Billing Details. Let’s say, for some crazy reason, we wanted to disable every field under Billing Details. The code would look like this:

add_filter( 'woocommerce_checkout_fields', 'my_remove_checkout_fields', 10 );
function rwf_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_state'] );
    unset( $fields['billing']['billing_postcode'] );
    unset( $fields['billing']['billing_country'] );
    unset( $fields['billing']['billing_phone'] );
    unset( $fields['billing']['billing_email'] );
}

Of course the idea of disabling all of the billing checkout fields isn’t very practical but if you wanted to just disable a few fields you can use the code above as a starting point. Just remove the lines for the fields you want to keep.

The shipping fields have similar, but slightly different names. Here is the code for disabling all of the shipping checkout fields.

add_filter( 'woocommerce_checkout_fields', 'my_remove_checkout_fields', 10 );
function rwf_checkout_fields( $fields ) {
    unset( $fields['shipping']['shipping_first_name'] );
    unset( $fields['shipping']['shipping_last_name'] );
    unset( $fields['shipping']['shipping_company'] );
    unset( $fields['shipping']['shipping_address_1'] );
    unset( $fields['shipping']['shipping_address_2'] );
    unset( $fields['shipping']['shipping_city'] );
    unset( $fields['shipping']['shipping_state'] );
    unset( $fields['shipping']['shipping_postcode'] );
    unset( $fields['shipping']['shipping_country'] );
}

Again, you probably won’t want to remove all of these but you can pick and choose the ones you want the same as the billing fields.

The last handful of fields are kind of miscellaneous. The code for those is:

add_filter( 'woocommerce_checkout_fields', 'my_remove_checkout_fields', 10 );
function rwf_checkout_fields( $fields ) {
    unset( $fields['order']['order_comments'] );
    unset( $fields['account']['account_username'] );
    unset( $fields['account']['account_password'] );
    unset( $fields['account']['account_password-2'] );
}

There you have it. With the above examples you should be able to edit your theme’s functions.php file in such a way that you can disable any checkout fields that you wish. Remember that editing a functions.php file is sometimes a temporary fix. Whenever your WordPress theme has an update your changes will be erased and you’ll have to make them all over again.

Now let’s take a look at how you can disable WooCommerce checkout fields with our plugin.

How to Remove WooCommerce Checkout Fields without Writing Any Code

Remove WooCommerce Features takes everything above and turns it into a simple button clicking exercise. You won’t have to edit any code, upload any files or pay a WordPress developer to do that all for you. To remove checkout fields using our plugin all you have to do is following these three steps.

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says “Remove Features.”

WooCommerce Admin Menu

Step #2

Find the setting for “Checkout Fields” and click the checkboxes that match the fields you want to remove:

Remove WooCommerce Features - Checkout Fields

Step #3

Press the “Save Settings” button.

Save Settings Button

That’s it. No code, no fuss. Once you have saved your settings the fields will be removed from your checkout right away. The best part is that no matter what theme you use (or updates it receives) your settings will always be applied.

Our plugin works with over 15 different commonly unwanted WooCommerce features so it’s useful for more than just checkout fields. Remove WooCommerce Features will let you:

There’s a thorough list of everything Remove WooCommerce Features can do here on our site if you would like to learn more about how our plugin can help you manage your store.