WC_Helper_API::url( string $endpoint )

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


Description Description


Parameters Parameters

$endpoint

(Required) The endpoint to request.


Top ↑

Return Return

(string) The absolute endpoint URL.


Top ↑

Source Source

File: includes/admin/helper/class-wc-helper-api.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.