WC_Report_Stock::prepare_items
Prepare customer list items.
Метод класса: WC_Report_Stock{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
$WC_Report_Stock = new WC_Report_Stock(); $WC_Report_Stock->prepare_items();
Код WC_Report_Stock::prepare_items() WC Report Stock::prepare items WC 10.4.0
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 ),
)
);
}