Support » Plugin: Page Restrict » Restrict woocommerce shop page

  • LV2013


    Can I restrict acces to my woocommerce shop for non registered users? I have a slideshow on my homepage were visitors can see some products and when they klick on the webshop button in my menu I would like them to register first. Is this possible with this plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello, you conseguio solve your problem? Because I need the same help.

    Hi there!! im looking for the same here!

    I was faced with this problem today.

    Here was my solution:

    //Add this to the top of your header.php file (in your theme). By: Bradford Nelson
    //Check if user is not logged in
    if ( !is_user_logged_in() ) {
    	$url_uri = $_SERVER['REQUEST_URI'];
    	//redirect shop page.
    	if ( $url_uri == '/shop/' ) {
    		wp_redirect( home_url( '/restricted' ) );

    Note* you can change the ‘/restricted’ to any page slug you want, or just use home_url() to redirect to the home page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restrict woocommerce shop page’ is closed to new replies.