WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Report_Customer_List::prepare_items() public WC 1.0

Prepare customer list items.

Это метод класса: WC_Report_Customer_List{}

Возвращает

Null. Ничего.

Использование

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

Код WC_Report_Customer_List::prepare_items() WC 4.5.2

woocommerce/includes/admin/reports/class-wc-report-customer-list.php
<?php
public function prepare_items() {
	$current_page = absint( $this->get_pagenum() );
	$per_page     = 20;

	/**
	 * Init column headers.
	 */
	$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );

	add_action( 'pre_user_query', array( $this, 'order_by_last_name' ) );

	/**
	 * Get users.
	 */
	$admin_users = new WP_User_Query(
		array(
			'role'   => 'administrator',
			'fields' => 'ID',
		)
	);

	$manager_users = new WP_User_Query(
		array(
			'role'   => 'shop_manager',
			'fields' => 'ID',
		)
	);

	$query = new WP_User_Query(
		apply_filters(
			'woocommerce_admin_report_customer_list_user_query_args',
			array(
				'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ),
				'number'  => $per_page,
				'offset'  => ( $current_page - 1 ) * $per_page,
			)
		)
	);

	$this->items = $query->get_results();

	remove_action( 'pre_user_query', array( $this, 'order_by_last_name' ) );

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