woocommerce_product_related_posts_query filter-hookWC 1.0

Usage

add_filter( 'woocommerce_product_related_posts_query', 'wp_kama_woocommerce_product_related_posts_query_filter', 10, 3 );

/**
 * Function for `woocommerce_product_related_posts_query` filter-hook.
 * 
 * @param  $related_products_query 
 * @param  $product_id             
 * @param  $args                   
 *
 * @return 
 */
function wp_kama_woocommerce_product_related_posts_query_filter( $related_products_query, $product_id, $args ){

	// filter...
	return $related_products_query;
}
$related_products_query
-
$product_id
-
$args
-

Where the hook is called

WC_Product_Data_Store_CPT::get_related_products()
woocommerce_product_related_posts_query
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1470
$related_product_query = (array) apply_filters( 'woocommerce_product_related_posts_query', $this->get_related_products_query( $cats_array, $tags_array, $exclude_ids, $limit + 10 ), $product_id, $args );

Where the hook is used in WooCommerce

Usage not found.