Home » WooCommerce » How to Remove wooCommerce checkout fields?

How to Remove wooCommerce checkout fields?

There are few ways to achive this, here I’m going to unset some fileds and modify them using PHP code.  To do this we use woocommerce_checkout_fields hook

Here is the php code which we need to place in functions.php file

// Remove some checkout fields
add_filter('woocommerce_checkout_fields', 'wpdumi_remove_checkout_fields');


function wpdumi_remove_checkout_fields($fields)
{
    unset($fields['billing']['billing_company']);
    $fields['billing']['billing_first_name']['label'] = 'Name';
    $fields['billing']['billing_phone']['placeholder'] = 'Phone';

    return $fields;
}

Here in above example we have removed billing Companey filed. and we have change the billing first name label to “Name” and billing phone placeholder text to “Phone” so now you can undestand the patten of how to edit/remove these checkout fileds from wooCommerce

Duminda Wijerathna

An all round web designer building websites Over 18 years. Interested in achieving a suitable placement in the field of IT in a growth oriented organization which offers diverse job responsibilities in order to utilize and improve my skills, Knowledge and experience.

Leave a Comment

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