Automattic\WooCommerce\StoreApi\Utilities

Pagination::get_current_page()protectedWC 1.0

Get current page.

Метод класса: Pagination{}

Хуков нет.

Возвращает

int. Get the page from the request object.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_current_page( $request );
$request(\WP_REST_Request) (обязательный)
The request object.

Код Pagination::get_current_page() WC 8.7.0

protected function get_current_page( $request ) {
	return (int) $request->get_param( 'page' );
}