WordPress at Your Fingertips
function is not described

wc_set_loop_product_visibility() WC 4.4.0

Set the current visbility for a product in the woocommerce_loop global.

No Hooks.

Return

null. Nothing.

Usage

wc_set_loop_product_visibility( $product_id, $value );
$product_id(int) (required)
Product it to cache visbiility for.
$value(true|false) (required)
The poduct visibility value to cache.

Changelog

Since 4.4.0 Introduced.

Code of wc_set_loop_product_visibility() WC 5.6.0

function wc_set_loop_product_visibility( $product_id, $value ) {
	wc_set_loop_prop( "product_visibility_$product_id", $value );
}