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

ReportCSVExporter::map_report_controller() WC 1.0

Get a REST controller instance for the report type.

Это метод класса: ReportCSVExporter

Хуки из метода
Возвращает

true/false/WC_REST_Reports_Controller. Report controller instance or boolean false on error.

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

$ReportCSVExporter = new ReportCSVExporter();
$var = $ReportCSVExporter->map_report_controller();

Код ReportCSVExporter::map report controller: woocommerce/packages/woocommerce-admin/src/ReportCSVExporter.php WC 4.1.1

<?php
protected function map_report_controller() {
	// @todo - Add filter to this list.
	$controller_map = array(
		'products'   => 'Automattic\WooCommerce\Admin\API\Reports\Products\Controller',
		'variations' => 'Automattic\WooCommerce\Admin\API\Reports\Variations\Controller',
		'orders'     => 'Automattic\WooCommerce\Admin\API\Reports\Orders\Controller',
		'categories' => 'Automattic\WooCommerce\Admin\API\Reports\Categories\Controller',
		'taxes'      => 'Automattic\WooCommerce\Admin\API\Reports\Taxes\Controller',
		'coupons'    => 'Automattic\WooCommerce\Admin\API\Reports\Coupons\Controller',
		'stock'      => 'Automattic\WooCommerce\Admin\API\Reports\Stock\Controller',
		'downloads'  => 'Automattic\WooCommerce\Admin\API\Reports\Downloads\Controller',
		'customers'  => 'Automattic\WooCommerce\Admin\API\Reports\Customers\Controller',
		'revenue'    => 'Automattic\WooCommerce\Admin\API\Reports\Revenue\Stats\Controller',
	);

	if ( isset( $controller_map[ $this->report_type ] ) ) {
		// Load the controllers if accessing outside the REST API.
		if ( ! did_action( 'rest_api_init' ) ) {
			do_action( 'rest_api_init' );
		}

		return new $controller_map[ $this->report_type ]();
	}

	// Should this do something else?
	return false;
}