Automattic\WooCommerce\Admin\API\Reports\Import

Controller::get_import_totals()publicWC 1.0

Get the total orders and customers based on user supplied params.

Method of the class: Controller{}

No Hooks.

Return

WP_Error|WP_REST_Response.

Usage

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

Controller::get_import_totals() code WC 7.3.0

public function get_import_totals( $request ) {
	$query_args = $this->prepare_objects_query( $request );
	$totals     = ReportsSync::get_import_totals( $query_args['days'], $query_args['skip_existing'] );

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

	return rest_ensure_response( $data );
}