WordPress at a glance
function is not described

wc_sanitize_phone_number() WC 3.6.0

Sanitize phone number. Allows only numbers and "+" (plus sign).

No Hooks.

Return

String. Nothing.

Usage

wc_sanitize_phone_number( $phone );
$phone(string) (required)
Phone number.

Changelog

Since 3.6.0 Introduced.

Code of wc_sanitize_phone_number() WC 5.3.0

<?php
function wc_sanitize_phone_number( $phone ) {
	return preg_replace( '/[^\d+]/', '', $phone );
}