WordPress at Your Fingertips
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.


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


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


Since 4.4.0 Introduced.

Code of wc_get_loop_product_visibility() WC 5.7.0

function wc_get_loop_product_visibility( $product_id ) {
	return wc_get_loop_prop( "product_visibility_$product_id", null );