Ledger Nano X - The secure hardware wallet

Require Login Before Product View

sparkweb Apr 17th, 2012 180 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Require that users are logged in before they can view any product pages (redirects to a page called "login")
  2. add_filter("foxyshop_template_redirect", "my_logged_in_users_only", 10, 2);
  3. function my_logged_in_users_only($url, $filename) {
  4.         if (!is_user_logged_in()) {
  5.                 header("Location: /login/");
  6.                 die;
  7.         }
  8.         return $url;
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand