I had a project to restrict access to a WooCommerce WordPress website. There involved a number of configuration
First, I had used a plugin called WooCommerce Private Store. This protected all of WooCommerce using either a single password or if you were logged into WordPress. Unfortunately, this left a few pages visible that I had created using a related plugin called WooCommerce Product Table. This plugin allows for a table view to the WooCommerce products but there were outside the WooCommerce Store.
So, I next found a plugin called If Menu. This plugin would hid the menus depending on if the user was logged into WordPress or not. This was great until I realized that it only hide the menus and the full URL was still accessible.
So, did some more research about visibility of content in WordPress. I was reminded of the Private setting for pages. However, it was only visible to Administrators and Editor. More research lead to another plugin called User Role Editor. The allowed me to edit the role of Customer to see Private pages. So, know when you logged in, the menu appears and the pages would load.
The final step was to help with forcing someone to login. That was accomplished by the Force Login plugin. In hindsight, this plugin might have handle the entire need because it protected the entire website instead of just protecting WooCommerce. So, a combination of options could be used depending on the situation.