Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_API_Server::get_paginated_url( int $page )
Returns the request URL with the page query parameter set to the specified page
Description Description
Parameters Parameters
- $page
-
(Required)
Return Return
(string)
Source Source
File: includes/legacy/api/v2/class-wc-api-server.php
private function get_paginated_url( $page ) { // remove existing page query param $request = remove_query_arg( 'page' ); // add provided page query param $request = urldecode( add_query_arg( 'page', $page, $request ) ); // get the home host $host = parse_url( get_home_url(), PHP_URL_HOST ); return set_url_scheme( "http://{$host}{$request}" ); }
Changelog Changelog
Version | Description |
---|---|
2.1 | Introduced. |