Skip to content

Instantly share code, notes, and snippets.

@JPKCom
Forked from robdvr/gist:7451695
Created July 25, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JPKCom/5854207a20087c1b2489212fb9a1edf2 to your computer and use it in GitHub Desktop.
Save JPKCom/5854207a20087c1b2489212fb9a1edf2 to your computer and use it in GitHub Desktop.
Adding Bootstrap Forms to WooCommerce
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields');
function custom_woocommerce_billing_fields( $fields ) {
$fields['billing_address_1']['class'] = array( 'form-group' );
$fields['billing_address_1']['input_class'] = array( 'form-control' );
return $fields;
}
@JPKCom
Copy link
Author

JPKCom commented Jul 25, 2016

or

add_filter('woocommerce_form_field_args', 'wc_form_field_args',10,3); function wc_form_field_args($args, $key, $value) { $args['input_class'] = array( 'form-control' ); return $args; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment