Require Login for WooCommerce Shop Page
-
I would like to add a redirect to my login page for anyone attempting to view my store. The below code is what I’ve come up with but I’m unable to get it working. Please both review this function and and also advice the best place to add it. I assume it would go at the top of archive-product.php
<?php if ( ! is_woocommerce() ) { is_user_logged_in(); } { wp_redirect('/my-account/customer-login/'); exit; }?>
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Require Login for WooCommerce Shop Page’ is closed to new replies.