Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsListTable::get_offset_arguments()protectedWC 1.0

Returns the offset argument based on the current request.

{} It's a 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;

Code of ReviewsListTable::get_offset_arguments() WC 7.1.0

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;
}