woocommerce_rest_report_sort_performance_indicators хук-фильтр . WC 1.0
Custom ordering for store performance indicators.
Использование
add_filter( 'woocommerce_rest_report_sort_performance_indicators', 'filter_function_name_785' ); function filter_function_name_785( $indicators ){ // filter... return $indicators; }
- $indicators(массив)
- A list of ordered indicators.
Где вызывается хук
woocommerce_rest_report_sort_performance_indicators
woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php 331-348
$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', ) );