Вы можете попробовать это
/**
* Require 9 digit number. Format to 000-000-0000 at submission
* stackoverflow/54700465
*/
add_filter( 'woocommerce_billing_fields', 'wc_filter_phone', 10, 1 );
function wc_filter_phone( $address_fields ) {
$address_fields['billing_phone']['min-lenght="9"'];
$format_number = preg_replace("/^(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $address_fields);
return $format_number;
}
// End