woocommerce_product_is_visible filter-hookWC 1.0

Returns whether or not the product is visible in the catalog.

Usage

add_filter( 'woocommerce_product_is_visible', 'wp_kama_woocommerce_product_is_visible_filter', 10, 2 );

/**
 * Function for `woocommerce_product_is_visible` filter-hook.
 * 
 * @param  $visible 
 * @param  $id      
 *
 * @return 
 */
function wp_kama_woocommerce_product_is_visible_filter( $visible, $id ){

	// filter...
	return $visible;
}
$visible
-
$id
-

Where the hook is called

WC_Product::is_visible()
woocommerce_product_is_visible
woocommerce/includes/abstracts/abstract-wc-product.php 1574
return apply_filters( 'woocommerce_product_is_visible', $visible, $this->get_id() );

Where the hook is used in WooCommerce

woocommerce/includes/shortcodes/class-wc-shortcode-products.php 657
add_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) );
woocommerce/includes/shortcodes/class-wc-shortcode-products.php 663
remove_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) );