Created
June 11, 2022 23:03
-
-
Save daddiofaddio/81b8af330a98e61c876c3aa67737067d to your computer and use it in GitHub Desktop.
Woocommerce add Bootstrap5 styling to checkout fields
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
/* WOO CHECKOUT FIELDS BS STYLING */ | |
add_filter('woocommerce_checkout_fields', 'addBootstrapToCheckoutFields'); | |
function addBootstrapToCheckoutFields($fields) { | |
foreach ($fields as & $fieldset) { | |
foreach ($fieldset as & $field) { | |
$field['class'][] = 'form-group'; | |
$field['input_class'][] = 'form-control'; | |
} | |
} | |
return $fields; | |
} | |
add_filter('woocommerce_checkout_fields', 'custom_remove_woo_checkout_fields'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment