wc_admin_url()WC 1.0

Retrieves a URL to relative path inside WooCommerce admin with the provided query parameters.

No Hooks.

Return

String. Fully qualified URL pointing to the desired path.

Usage

wc_admin_url( $path, $query );
$path(string)
Relative path of the desired page.
Default: null
$query(array)
Query parameters to append to the path.
Default: array()

wc_admin_url() code WC 8.7.0

function wc_admin_url( $path = null, $query = array() ) {
	if ( ! empty( $query ) ) {
		$query_string = http_build_query( $query );
		$path         = $path ? '&path=' . $path . '&' . $query_string : '';
	}

	return admin_url( 'admin.php?page=wc-admin' . $path, dirname( __FILE__ ) );
}