Viewing 1 replies (of 1 total)
  • Hi! Maybe this can be works. This code redirects wp-admin/profile.php to
    any url that you want to redirect non-admin users… In your theme, in functions.php file add (change here_comes_your_url for your real redirect page url):

    function wpse_redirect_profile_access(){
    //admin won’t be affected
    if (current_user_can(‘manage_options’)) return ”;

    //if we’re at admin profile.php page
    if (strpos ($_SERVER [‘REQUEST_URI’] , ‘wp-admin/profile.php’ )) {
    wp_redirect ( home_url( ‘here_comes_your_url’ )); // to page like: example.com/my-profile/
    exit();
    }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Change redirect URL to work with WooCommerce Membership’ is closed to new replies.