I am working on a site and there I am using woocommerce
.
If the user logged in or not, they can add to cart a product, go to cart, go to checkout. But now I want that only logged in users can access these pages.
If the guest user click on the add to cart button the message appear You must be logged in
. If user go to cart page or checkout page they redirect to register page.
Is there any plugin or hook in Woocommerce?