Remove Fields in WooCommerce Billing and Shipping in Form Checkout

WooCommerce has the ability to remove the address fields in the checkout form of the billing and shipping forms.

This is great if you do not require the address fields as you may have a virtual/download only products that don’t require shipping, less fields to fill out = happy customers.

Before

<?php

add_filter('woocommerce_billing_fields','wpb_custom_billing_fields');
// remove some fields from billing form
// ref - https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
function wpb_custom_billing_fields( $fields = array() ) {

	unset($fields['billing_company']);
	unset($fields['billing_address_1']);
	unset($fields['billing_address_2']);
	unset($fields['billing_state']);
	unset($fields['billing_city']);
	unset($fields['billing_phone']);
	unset($fields['billing_postcode']);
	unset($fields['billing_country']);

	return $fields;
}

After :

Leave a Reply

Your email address will not be published. Required fields are marked *