woocommerce_admin_reports хук-фильтрWC 1.0

Filter the list of allowed reports, so that data can be loaded from third party extensions in addition to WooCommerce core. Array items should be in format of array( 'slug' => 'downloads/stats', 'description' => '', 'url' => '', and 'path' => '/wc-ext/v1/...'.

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

add_filter( 'woocommerce_admin_reports', 'wp_kama_woocommerce_admin_reports_filter' );

/**
 * Function for `woocommerce_admin_reports` filter-hook.
 * 
 * @param array $endpoints The list of allowed reports..
 *
 * @return array
 */
function wp_kama_woocommerce_admin_reports_filter( $endpoints ){

	// filter...
	return $endpoints;
}
$endpoints(массив)
The list of allowed reports..

Где вызывается хук

Controller::get_items()
WC_Admin_Reports::get_reports()
woocommerce_admin_reports
woocommerce/src/Admin/API/Reports/Controller.php 108
$reports = apply_filters( 'woocommerce_admin_reports', $reports );
woocommerce/includes/admin/class-wc-admin-reports.php 143
$reports = apply_filters( 'woocommerce_admin_reports', $reports );

Где используется хук в WooCommerce

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