WC_Auth::get_formatted_url()protectedWC 1.0

Decode and format a URL.

Method of the class: WC_Auth{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_formatted_url( $url );
$url(string) (required)
URL.

WC_Auth::get_formatted_url() code WC 9.4.2

protected function get_formatted_url( $url ) {
	$url = urldecode( $url );

	if ( ! strstr( $url, '://' ) ) {
		$url = 'https://' . $url;
	}

	return $url;
}