I am trying to validate each of the checkout fields, but I still get the general error message “Please fill out all required fields.” I cleared the cache, so this is excluded.
I added this code in the functions.php of the child theme:
add_action(‘woocommerce_checkout_process’, ‘my_custom_checkout_field_process’);
function my_custom_checkout_field_process() {
// Check if set, if its not set add an error.
if ( strlen($_POST[‘billing_first_name’])<2 )
wc_add_notice( __( 'Please enter a full name first.' ), 'error' );
}
But I guess that the general message has priority because it is a client side validation. Can you tell me in which file is this validation done so I can overwrite it? I also tried to translate this string but I was not able to find it in the translations files of woocommerce, xstore core, xstore theme.
Thanks,
Mircea