WordPress at a glance
function is not described

wc_get_loop_product_visibility() WC 4.4.0

Gets the cached current visibility for a product from the woocommerce_loop global.

No Hooks.

Return

true|false|null. The cached product visibility, or null if on visibility has been cached for that product.

Usage

wc_get_loop_product_visibility( $product_id );
$product_id(int) (required)
Product id to get the cached visibility for.

Changelog

Since 4.4.0 Introduced.

Code of wc_get_loop_product_visibility() WC 5.3.0

<?php
function wc_get_loop_product_visibility( $product_id ) {
	return wc_get_loop_prop( "product_visibility_$product_id", null );
}