WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::get_limit_params() protected WC 1.0

Fills LIMIT parameters of SQL request based on user supplied parameters.

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

No Hooks.

Return

Array. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_limit_params( $query_args );
$query_args(array)
Parameters supplied by the user.

Code of DataStore::get_limit_params() WC 5.3.0

<?php
protected function get_limit_params( $query_args = array() ) {
	if ( isset( $query_args['per_page'] ) && is_numeric( $query_args['per_page'] ) ) {
		$this->limit_parameters['per_page'] = (int) $query_args['per_page'];
	} else {
		$this->limit_parameters['per_page'] = get_option( 'posts_per_page' );
	}

	$this->limit_parameters['offset'] = 0;
	if ( isset( $query_args['page'] ) ) {
		$this->limit_parameters['offset'] = ( (int) $query_args['page'] - 1 ) * $this->limit_parameters['per_page'];
	}

	return $this->limit_parameters;
}