WordPress at Your Fingertips
function is not described

WC_Validation::is_phone() public WC 1.0

Validates a phone number using a regular expression.

{} It's a method of the class: WC_Validation{}

No Hooks.

Return

true|false.

Usage

$result = WC_Validation::is_phone( $phone );
$phone(string) (required)
Phone number to validate.

Code of WC_Validation::is_phone() WC 5.6.0

public static function is_phone( $phone ) {
	if ( 0 < strlen( trim( preg_replace( '/[\s\#0-9_\-\+\/\(\)\.]/', '', $phone ) ) ) ) {
		return false;
	}

	return true;
}