Change Input Field to Textarea on Checkout

Let’s say you need to form the “address” field at checkout bigger. rather than an “input type = text”, we’d require an “input type = textarea” in HTML. You just need to add this following Snippet to Functions.php.

add_filter( 'woocommerce_checkout_fields' , 'codeithub_change_address_input_type', 10, 1 );
 
function codeithub_change_address_input_type( $fields ) {
$fields['billing']['billing_address_1']['type'] = 'textarea';
return $fields;
}

Before:

Default Street Address

After:

Textarea Field
See also  Removing company name from WooCommerce checkout

Leave a Reply