I\'m trying to add custom fields to the WooCommerce checkout and there seems to be no output for hidden fields.
In woocommerce-template.php
, hidden fie
You have to pass the parameters when you add your filter.. Something like
The third parameter in add_filter function is the numbers of parameter that the filter receive.
The last parameter is the priority...
add_filter('woocommerce_form_field_hidden', 'my_form_field_hidden', 4 , 15);
Now you have to set the paramteres in the filter function.
if ( ! function_exists('my_form_field_hidden') ) {
function hp_form_field_hidden($no_parameter, $key, $args, $value) {
$field = '
' . $after;
return $field;
}
}
I hope it helps