cPanel Forums

Hi, after installing nginx as reverse proxy i noticed that some of website functions doesn't work anymore. In a website i have this piece of code: PHP: //// SHO

nginx problem with logged in users code

Hi, after installing nginx as reverse proxy i noticed that some of website functions doesn't work anymore.

In a website i have this piece of code :

PHP:
//// SHOP PAGES ONLY FOR LOGGED IN USERS
function wdo_user_redirect() {
    if (! is_user_logged_in() && (is_woocommerce() || is_cart() || is_checkout())) {
        wp_redirect('/my-account/');
        exit;
    }
}
add_action('template_redirect', 'wdo_user_redirect');
that redirects visitors to the login page if they aren't...

nginx problem with logged in users code
+ نوشته شده در  ساعت 13:34  توسط generator  برچسب ها: