add bootstrap class to checkout fields woocommerce
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;
}
add bootstrap class to checkout fields woocommerce
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;
}
add bootstrap class to checkout fields woocommerce
/**
* Adding bootstrap classes to woocommerce checkout form
*
* @param $fields
* @return mixed
*/
function wti_add_bootstrap_to_checkout_fields($fields) {
foreach ($fields as &$fieldset) {
foreach ($fieldset as &$field) {
// Add 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;
}
add_filter('woocommerce_checkout_fields', 'wti_add_bootstrap_to_checkout_fields');
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us