WC_Helper_API::url()public staticWC 1.0

Using the API base, form a request URL from a given endpoint.

{} It's a method of the class: WC_Helper_API{}

No Hooks.


String. The absolute endpoint URL.


$result = WC_Helper_API::url( $endpoint );
$endpoint(string) (required)
The endpoint to request.

Code of WC_Helper_API::url() WC 6.6.1

public static function url( $endpoint ) {
	$endpoint = ltrim( $endpoint, '/' );
	$endpoint = sprintf( '%s/%s', self::$api_base, $endpoint );
	$endpoint = esc_url_raw( $endpoint );
	return $endpoint;