wc_sanitize_endpoint_slug()WC 3.5.0

Format the endpoint slug, strip out anything not allowed in a url.

Хуков нет.

Возвращает

Строку.

Использование

wc_sanitize_endpoint_slug( $raw_value );
$raw_value(строка) (обязательный)
The raw value.

Список изменений

С версии 3.5.0 Введена.

Код wc_sanitize_endpoint_slug() WC 8.7.0

function wc_sanitize_endpoint_slug( $raw_value ) {
	return sanitize_title( $raw_value ?? '' );
}