I have a problem with WooCommerce billing phone validation.
I installed YITH checkout manager for edit checkout fields and delete a phone number field, but when I try going to the next step I see the error for phone validation! Also I added below code in my functions, but there was no change.
help me to fix this error.
add_filter('woocommerce_checkout_fields', 'no_phone_validation')
function no_phone_validation($woo_checkout_fields_array)
{
unset($woo_checkout_fields_array['billing']['billing_phone']['validate']);
return $woo_checkout_fields_array;
}
2
Answers
You should better try before everything else to make this field optional (not required) to avoid the field validation:
Code goes in functions.php file of your active child theme (or active theme). It could works.
You should try below code. It worked for me and I am sure that it’ll work for you as well