×

 

Home Contact Us Payments SC Commerce SC Commerce Docs SC Commerce Snippets

Simply Computing

We make websites. Simple.

Change address checkout fields to textarea

The main address fields can be made into a textarea data entry fields with this code. This could be used in conjunction with the remove checkout fields function to hide the second address field.

		/**
 * Change address checkout fields to textarea
 */

add_filter('woocommerce_checkout_fields' , 'cc_change_address_input_type', 10, 1);

function cc_change_address_input_type($fields) {

  $fields['billing']['billing_address_1']['type'] = 'textarea';
  $fields['shipping']['shipping_address_1']['type'] = 'textarea';
  return $fields;

}
	
   View Raw Code ID: 9949