WordPress.org

Ready to get started?Download WordPress

Forums

WP E-commerce Access Restriction (2 posts)

  1. jes2505
    Member
    Posted 1 year ago #

    I am using WP E-Commmerce (Version 3.8.7.6.2) on my website http://www.cruisecreative.com. I need the entire store to be access restricted. I can't figure out how to do this. I've used a plugin (Page Restrict) to restrict the products page so at least no one can access the store from the home page unless they're logged in, but the category pages can still be accessed without logging in if someone has the URL (they show up in Google searches).

    Can someone help me with this? Just to restate, I don't want anyone to see my products unless they are logged in. The store contains licensed artwork and only approved users that are logged in should see this artwork. It seems like it would be relatively simple. I did purchase a premium token from Get Shopped and posted this question 3 days ago, but no response yet and I need to get this security issue fixed asap. I've looked at the Members Only plugin, but it doesn't describe the simple functionality I need.

    Thanks,
    Jamie

  2. jkbeck
    Member
    Posted 11 months ago #

    I see you posted this 4 months ago and hope you found an answer by now but in case you didn't...

    You can use the WP function is_user_logged_in() to create a custom function.

    http://codex.wordpress.org/Function_Reference/is_user_logged_in

    I'm still pretty novice to coding (<4months on php) but I'd do something like:

    <?php
    if ( !is_user_logged_in() ) {
    header("location: http://yourwebsite.you-need-to-log-in.php");
    }
    ?>

    You can either create a function or just use a small amount of code and add it to all of your page templates. That way any time a page is accessed it will check to see if they are logged in and if they are not it will redirect them to the page of your choice.

Topic Closed

This topic has been closed to new replies.

About this Topic