I know you're trying to make it work and it's frustrating that it doesn't yet. It's like that sometimes with customizations. I'll do what I can to help you, k? But let me first ask you a few things so we have a clearer picture.
I read the thread in the page you linked to. So you want to hide the link to a certain product if the user doesn't have the required access, is that right?
It's also possible, and generally much better, to just not send the link at all to the browser. You can customize your link with a conditional that checks the user's access, and adds the link based on that. If your WooCommerce page allows shortcodes, you can use the s2If shortcode. If you can use PHP, then it's possible with a PHP condition, of course. See: https://s2member.com/kb-article/s2if-simple-shortcode-conditionals/
The queries thing you saw in the s2 code, is related to this restriction: WP Admin > Restriction Options > Alternative Views
Does that help?