WordPress at Your Fingertips
function is not described

WC_Report_Downloads::prepare_items() public WC 1.0

Prepare download list items.

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

Return

null. Nothing.

Usage

$WC_Report_Downloads = new WC_Report_Downloads();
$WC_Report_Downloads->prepare_items();

Code of WC_Report_Downloads::prepare_items() WC 5.8.0

public function prepare_items() {

	$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );
	$current_page          = absint( $this->get_pagenum() );
	// Allow filtering per_page value, but ensure it's at least 1.
	$per_page = max( 1, apply_filters( 'woocommerce_admin_downloads_report_downloads_per_page', 20 ) );

	$this->get_items( $current_page, $per_page );

	/**
	 * Pagination.
	 */
	$this->set_pagination_args(
		array(
			'total_items' => $this->max_items,
			'per_page'    => $per_page,
			'total_pages' => ceil( $this->max_items / $per_page ),
		)
	);
}