WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

DataDownloadIPs::get_items() public WC 3.5.0

Return the download IPs matching the passed parameters.

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

No Hooks.

Return

WP_Error|WP_REST_Response. Nothing.

Usage

$DataDownloadIPs = new DataDownloadIPs();
$DataDownloadIPs->get_items( $request );
$request(WP_REST_Request) (required)
Request data.

Changelog

Since 3.5.0 Introduced.

Code of DataDownloadIPs::get_items() WC 5.3.0

<?php
public function get_items( $request ) {
	global $wpdb;

	if ( isset( $request['match'] ) ) {
		$downloads = $wpdb->get_results(
			$wpdb->prepare(
				"SELECT DISTINCT( user_ip_address ) FROM {$wpdb->prefix}wc_download_log
				WHERE user_ip_address LIKE %s
				LIMIT 10",
				$request['match'] . '%'
			)
		);
	} else {
		return new \WP_Error( 'woocommerce_rest_data_download_ips_invalid_request', __( 'Invalid request. Please pass the match parameter.', 'woocommerce' ), array( 'status' => 400 ) );
	}

	$data = array();

	if ( ! empty( $downloads ) ) {
		foreach ( $downloads as $download ) {
			$response = $this->prepare_item_for_response( $download, $request );
			$data[]   = $this->prepare_response_for_collection( $response );
		}
	}

	return rest_ensure_response( $data );
}