Redirect only if you are on page X | Woocommerce 3+

0

I want to redirect the user after logging in to the main page, but only if it is on page X. This is because some pages are protected with a password.

My code:

add_filter('woocommerce_login_redirect', 'redirecionar');
function redirecionar() {
    $redirect = 'https://paginaweb.pt';
    return $redirect;
}
    
asked by anonymous 04.08.2018 / 16:06

0 answers