I'm trying to add a note directly under the state field on the checkout form:
With something like this:
"If you need medication mailed outside of NC or SC, or you are not a client, please call".
I've tried various methods to accomplish this, but none seem to work. I've tried using CSS:
#billing_state:after {
content: "If you need medication mailed outside of NC or SC, or you are not a client, please call";
font-size: 14px;
color: red;
}
I've also tried adding this to the functions.php file:
add_filter('woocommerce_form_field_text', function ($field, $key, $args, $value) {
if ($key === 'billing_state') {
$field .= 'If you need medication mailed outside of NC or SC, or you are not a client, please
call';
}
return $field;
}, 10, 4);
But neither of these methods are working. This is the code for the state field I'm trying to target:

