WordPress at Your Fingertips
function is not described

wc_get_relative_url() WC 3.2.0

Make a URL relative, if possible.

No Hooks.

Return

String.

Usage

wc_get_relative_url( $url );
$url(string) (required)
URL to make relative.

Changelog

Since 3.2.0 Introduced.

Code of wc_get_relative_url() WC 5.6.0

function wc_get_relative_url( $url ) {
	return wc_is_external_resource( $url ) ? $url : str_replace( array( 'http://', 'https://' ), '//', $url );
}