WordPress at a glance
function is not described

wc_sanitize_permalink() WC 2.6.0

Sanitize permalink values before insertion into DB.

Cannot use wc_clean because it sometimes strips % chars and breaks the user's setting.

No Hooks.

Return

String. Nothing.

Usage

wc_sanitize_permalink( $value );
$value(string) (required)
Permalink.

Changelog

Since 2.6.0 Introduced.

Code of wc_sanitize_permalink() WC 5.3.0

<?php
function wc_sanitize_permalink( $value ) {
	global $wpdb;

	$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );

	if ( is_wp_error( $value ) ) {
		$value = '';
	}

	$value = esc_url_raw( trim( $value ) );
	$value = str_replace( 'http://', '', $value );
	return untrailingslashit( $value );
}