July 22, 2014 1014 Views 3 Comments

Remove WooCommerce Billing Address Fields

SHARE THIS ARTICLE

WooCommerce is by far one of the most user-friendly solutions for selling products or services via your WordPress website. The free plugin allows you to accept Payments, track Invetory, run Marketing Campagigns and generate performance Reports.

Remove Billing Address Fields

While the out-of-the-box solution is perfect for many there may be some users like myself who require a little customization to make the checkout process a little easier. On the Checkout page users are required to fill in several Billing address fileds which is not so bad for many users especially those selling tangible products.

// REMOVE BILLING FIELDS --WooCommerce
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_last_name']);
unset($fields['billing']['billing_email']);
unset($fields['billing']['billing_city']);
return $fields;
}

Remove Headings

After removing all the Billing fields and associated labels we’re left with 2 more labels “Billing Address” and “Additional Information”. These labels/headings can be removed or edited by:

  1. Navigate to the woocommerce folder inside of your wordpress theme directory (eg: /wp-content/themes/mytheme/woocommerce)
  2. Go into the woocommerce/templates/checkout/form-billing.php template file, scroll to Line 19 and replace label with “” OR whatever label you prefer.
  3. Next, locate the form-shipping.php template file inside the smae folder, scroll to Line 55 and replace the label accordingly.
  4. That’s It! Refresh the cart page to see the difference.

WooCommerce Documentation

For a full documentation on editing or removing woocommerce fields and labels goto Removing WooCommerce Fields

  • John

    At first I did not think there was any reason to remove the billing address fields. But now that I read through your post I can see that it could be considered redundant and that is just enough to get a customer frustrated at the checkout. Thanks for posting this!

    • epicallyfun

      Yeah, it helps. Unless you are manually shipping something.

  • epicallyfun

    Thank you! I have always wanted to know how to do that for WooCommerce on WordPress. I needed it for my e-store, thanks!