There are several options for which content you want to hide on your site. You define it in the ‘Restricted Content’ setting in WooCommerce > Settings > Members Only.
Hide your WooCommerce product pages
If you would just like to prevent unauthorised users from accessing product pages, leaving all other WooCommerce pages accessible, then choose ‘All Product Pages’ in the ‘Restricted Content’ setting.
Make your entire WooCommerce store members only
You can hide all your WooCommerce store pages, including product pages, category and tag archives, the shop page, the cart and checkout pages. To do so, set ‘Restricted Content’ to ‘All WooCommerce pages’. This will leave other content on your site viewable but anyone who is not logged in or who doesn’t have the correct password won’t even know you have a store.
Hide WooCommerce categories
If you’d like to restrict access to specific WooCommerce categories, choose ‘Specified Categories’ in ‘Restricted Content’. You’ll get an additional field called ‘Restricted Categories’ where you can enter the names of the categories you’d like to protect.
Protect your entire site
If you would like to password protect your entire site, or require that a user must log in and/or be a certain user role, you can do by setting ‘Restricted Content’ to ‘Entire Site’. This will hide all pages, except the page with your log-in or password form.