woocommerce_rest_report_sort_performance_indicators filter-hookWC 1.0

Custom ordering for store performance indicators.

Usage

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(array)
A list of ordered indicators.

Where the hook is called

Controller::sort()
woocommerce_rest_report_sort_performance_indicators
woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php 318-335
$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',
	)
);

Where the hook is used in WooCommerce

Usage not found.