Redirect logged in users from a specific page to Woocommerce my account page
问题 In Woocommerce I am trying to find a solution for checking if a user is logged in on custom page and if so, redirect user to "My Account" page. Any help on this is appreciated. 回答1: Try the following, where you will replace 'some-page' by your real page ID, slug or name. The code will redirect for a defined specific page logged in users to the my account page: add_action('template_redirect', 'specific_logged_in_redirect'); function specific_logged_in_redirect() { if ( is_page('some-page') &&