WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Import

Controller::import_items() public WC 1.0

Import data based on user request params.

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

No Hooks.

Return

WP_Error|WP_REST_Response. Nothing.

Usage

$Controller = new Controller();
$Controller->import_items( $request );
$request(WP_REST_Request) (required)
Request data.

Code of Controller::import_items() WC 5.3.0

<?php
public function import_items( $request ) {
	$query_args = $this->prepare_objects_query( $request );
	$import     = ReportsSync::regenerate_report_data( $query_args['days'], $query_args['skip_existing'] );

	if ( is_wp_error( $import ) ) {
		$result = array(
			'status'  => 'error',
			'message' => $import->get_error_message(),
		);
	} else {
		$result = array(
			'status'  => 'success',
			'message' => $import,
		);
	}

	$response = $this->prepare_item_for_response( $result, $request );
	$data     = $this->prepare_response_for_collection( $response );

	return rest_ensure_response( $data );
}