I’m building a shop in WooCommerce and wish to restrict access & viewing of the shop to logged in members only.
I don’t mind having links to the shop visible (such as in the nav bar), as clicking the shop link, or trying to directly access a shop item would check if the user is logged in, and if not, then redirected to ‘My Account’ to create an account.
Any there any options available to me via plugins or the functions.php?
Secondly, I found an answer the thread below, which is almost exactly what I want: Make WooCommerce pages accessible for logged in users only
I made the suggested changes, but I got an error. Would the error be that I have to insert information unique to my WP install in the following line: