woocommerce_top_rated_products_widget_args filter-hookWC 1.0

Usage

add_filter( 'woocommerce_top_rated_products_widget_args', 'wp_kama_woocommerce_top_rated_products_widget_args_filter' );

/**
 * Function for `woocommerce_top_rated_products_widget_args` filter-hook.
 * 
 * @param  $array 
 *
 * @return 
 */
function wp_kama_woocommerce_top_rated_products_widget_args_filter( $array ){

	// filter...
	return $array;
}
$array
-

Where the hook is called

WC_Widget_Top_Rated_Products::widget()
woocommerce_top_rated_products_widget_args
woocommerce/includes/widgets/class-wc-widget-top-rated-products.php 61-74
$query_args = apply_filters(
	'woocommerce_top_rated_products_widget_args',
	array(
		'posts_per_page' => $number,
		'no_found_rows'  => 1,
		'post_status'    => 'publish',
		'post_type'      => 'product',
		'meta_key'       => '_wc_average_rating',
		'orderby'        => 'meta_value_num',
		'order'          => 'DESC',
		'meta_query'     => WC()->query->get_meta_query(),
		'tax_query'      => WC()->query->get_tax_query(),
	)
); // WPCS: slow query ok.

Where the hook is used in WooCommerce

Usage not found.