Hello
you can do below change for this
file name is woo-custom-related-products/public/class-woo-custom-related-products-public.php
//$query[‘where’] .= ” AND p.ID IN ( {$related} )”;
$query[‘where’] = “WHERE 1=1 AND p.post_status = ‘publish’ AND p.post_type = ‘product’ AND exclude_join.object_id IS NULL AND p.ID IN ( {$related} )”;