Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsListTable::get_offset_arguments()protectedWC 1.0

Returns the offset argument based on the current request.

Method of the class: ReviewsListTable{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_offset_arguments() : array;

ReviewsListTable::get_offset_arguments() code WC 8.6.1

protected function get_offset_arguments() : array {
	$args = [];

	if ( isset( $_REQUEST['start'] ) ) {
		$args['offset'] = absint( wp_unslash( $_REQUEST['start'] ) );
	} else {
		$args['offset'] = ( $this->get_pagenum() - 1 ) * $this->get_per_page();
	}

	return $args;
}