WordPress at Your Fingertips
function is not described

wc_products_array_filter_readable() WC 3.4.0

Callback for array filter to get products the user can view only.

No Hooks.

Return

true|false.

Usage

wc_products_array_filter_readable( $product );
$product(WC_Product) (required)
WC_Product object.

Changelog

Since 3.4.0 Introduced.

Code of wc_products_array_filter_readable() WC 5.5.2

<?php
function wc_products_array_filter_readable( $product ) {
	return $product && is_a( $product, 'WC_Product' ) && current_user_can( 'read_product', $product->get_id() );
}