WordPress at Your Fingertips
function is not described

WC_Shortcode_Products::set_product_as_visible() public WC 3.2.0

Set product as visible when querying for hidden products.

{} It's a method of the class: WC_Shortcode_Products{}

No Hooks.

Return

true|false.

Usage

$WC_Shortcode_Products = new WC_Shortcode_Products();
$WC_Shortcode_Products->set_product_as_visible( $visibility );
$visibility(true|false) (required)
Product visibility.

Changelog

Since 3.2.0 Introduced.

Code of WC_Shortcode_Products::set_product_as_visible() WC 5.9.0

public function set_product_as_visible( $visibility ) {
	return $this->custom_visibility ? true : $visibility;
}