woocommerce_product_related_posts_force_display хук-фильтрWC 1.0

Don't bother if none are set, unless woocommerce_product_related_posts_force_display is set to true in which case all products are related.

Использование

add_filter( 'woocommerce_product_related_posts_force_display', 'wp_kama_woocommerce_product_related_posts_force_display_filter', 10, 2 );

/**
 * Function for `woocommerce_product_related_posts_force_display` filter-hook.
 * 
 * @param  $false      
 * @param  $product_id 
 *
 * @return 
 */
function wp_kama_woocommerce_product_related_posts_force_display_filter( $false, $product_id ){

	// filter...
	return $false;
}
$false
-
$product_id
-

Где вызывается хук

wc_get_related_products()
woocommerce_product_related_posts_force_display
woocommerce/includes/wc-product-functions.php 958
if ( empty( $cats_array ) && empty( $tags_array ) && ! apply_filters( 'woocommerce_product_related_posts_force_display', false, $product_id ) ) {

Где используется хук в WooCommerce

Использование не найдено.