WC_Report_Stock::prepare_items()
Prepare customer list items.
Description Description
Source Source
File: includes/admin/reports/class-wc-report-stock.php
public function prepare_items() { $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); $current_page = absint( $this->get_pagenum() ); $per_page = apply_filters( 'woocommerce_admin_stock_report_products_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 ), ) ); }