search ]

Widen Address Fields in WooCommerce

Add the following code to your child theme functions.php file to make the address field wider:

/**
 * Make the billing address fields wider
 */

function custom_woocommerce_billing_fields( $fields ) {

     $fields['billing_address_1']['class'] = array( 'form-row-wide' );
     $fields['billing_address_2']['class'] = array( 'form-row-wide' );

     return $fields;
}
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields');
Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo