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

Custom ordering for store performance indicators.

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

add_filter( 'woocommerce_rest_report_sort_performance_indicators', 'wp_kama_woocommerce_rest_report_sort_performance_indicators_filter' );

/**
 * Function for `woocommerce_rest_report_sort_performance_indicators` filter-hook.
 * 
 * @param array $indicators A list of ordered indicators.
 *
 * @return array
 */
function wp_kama_woocommerce_rest_report_sort_performance_indicators_filter( $indicators ){

	// filter...
	return $indicators;
}
$indicators(массив)
A list of ordered indicators.

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

Controller::sort()
woocommerce_rest_report_sort_performance_indicators
woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php 334-351
$stat_order = apply_filters(
	'woocommerce_rest_report_sort_performance_indicators',
	array(
		'revenue/total_sales',
		'revenue/net_revenue',
		'orders/orders_count',
		'orders/avg_order_value',
		'products/items_sold',
		'revenue/refunds',
		'coupons/orders_count',
		'coupons/amount',
		'taxes/total_tax',
		'taxes/order_tax',
		'taxes/shipping_tax',
		'revenue/shipping',
		'downloads/download_count',
	)
);

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

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