woocommerce_dashboard_status_widget_top_seller_query filter-hookWC 2.2.0

Allows modification of the query to determine the top seller product in the dashboard status widget.

Usage

add_filter( 'woocommerce_dashboard_status_widget_top_seller_query', 'wp_kama_woocommerce_dashboard_status_widget_top_seller_query_filter' );

/**
 * Function for `woocommerce_dashboard_status_widget_top_seller_query` filter-hook.
 * 
 * @param array $query SQL query parts.
 *
 * @return array
 */
function wp_kama_woocommerce_dashboard_status_widget_top_seller_query_filter( $query ){

	// filter...
	return $query;
}
$query(array)
SQL query parts.

Changelog

Since 2.2.0 Introduced.

Where the hook is called

WC_Admin_Dashboard::get_top_seller()
woocommerce_dashboard_status_widget_top_seller_query
woocommerce/includes/admin/class-wc-admin-dashboard.php 124
$query = apply_filters( 'woocommerce_dashboard_status_widget_top_seller_query', $query );

Where the hook is used in WooCommerce

Usage not found.