-
-
Save Giannisduke/11992e8a249d345f2f4c03905420fbab to your computer and use it in GitHub Desktop.
WooCommerce Bootstrap Checkout Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woocommerce_checkout_fields', 'addBootstrapToCheckoutFields' ); | |
function addBootstrapToCheckoutFields($fields) { | |
foreach ($fields as &$fieldset) { | |
foreach ($fieldset as &$field) { | |
// if you want to add the form-group class around the label and the input | |
$field['class'][] = 'form-group'; | |
// add form-control to the actual input | |
$field['input_class'][] = 'form-control'; | |
} | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment