If you would like to allow users to view your product pages but not be able to purchase the product, you can do so with a couple of quick settings.
Go to WooCommerce > Settings > Members Only. You’ll need to specify ‘All Product Pages’ as the ‘Restricted Content’ type.
To allow users to view the product pages without being able to purchase the product, check the ‘Access Product Pages’ field. This means that restricted users will be able to load the product page but the ‘Add to Cart’ button will be hidden.
If you’d like to display an alternative message, you can add text to the ‘Add To Cart Text’ field. The text you enter here will be displayed instead of the Add to Cart button.
And if you’d like to display an alternative Add to Cart button that will redirect the user to your log-in page, check the ‘Redirect from Add to Cart Button’ field. This will display a button with the ‘Add to Cart Text’ that will redirect the user when clicked. The user will be redirected to the page specified in the ‘If Restricted, Redirect To’ setting.