Woo – Remove Checkout Fields

Tutorial

The Code

Put your cursor on the block below and the "copy" button will appear on the top-right corner.

				
					// Remove checkout fields
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );


function custom_override_checkout_fields( $fields ) {
 // remove billing fields
    unset($fields['billing']['billing_company']); // Billing company
    unset($fields['billing']['billing_address_1']); // Billing Address 1
    unset($fields['billing']['billing_address_2']); // Billing Address 2
    unset($fields['billing']['billing_city']); // Billing city
    unset($fields['billing']['billing_postcode']); // Billing postcode
    unset($fields['billing']['billing_country']); // Billing country
    unset($fields['billing']['billing_state']); // Billing state
    unset($fields['billing']['billing_phone']); // Billing phone
   
    // remove shipping fields 
    unset($fields['shipping']['shipping_first_name']); // Shipping first name  
    unset($fields['shipping']['shipping_last_name']); // Shipping last name  
    unset($fields['shipping']['shipping_company']); // Shipping company  
    unset($fields['shipping']['shipping_address_1']); // Shipping address 1
    unset($fields['shipping']['shipping_address_2']); // Shipping address 2
    unset($fields['shipping']['shipping_city']); // Shipping city 
    unset($fields['shipping']['shipping_postcode']); // Shipping postcode
    unset($fields['shipping']['shipping_country']); // Shipping country
    unset($fields['shipping']['shipping_state']); // Shipping state
    
    // remove order comment fields
    unset($fields['order']['order_comments']); // Order comments
    return $fields;
   


}


// This removes the entire "Additional Information" section from checkout
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );