tshapiro

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • tshapiro
    Participant

    I found the PHP code that was causing the issue:

    `function cfabw_dashboard_redirect() {
    // bail early if user can access WP admin section
    if( cfabw_user_level_is(‘administrator’) || cfabw_user_level_is(‘country_admin’) ) {
    return;
    }

    global $pagenow;
    if( ‘profile.php’ != $pagenow ) {
    $dashboard_page_id = cfabw_get_page_id_by_template(‘admin-template-dashboard.php’);
    wp_redirect( get_page_link($dashboard_page_id) );
    exit;
    }
    }
    add_action( ‘admin_init’, ‘cfabw_dashboard_redirect’);’

    The code is meant to redirect users who are not administrators to a custom dashboard created for the site. We don’t want users who are not admins to be able to access the default WordPress dashboard…

    Do you have any idea why this code was breaking the AJAX function? I would really appreciate it if you could help me figure out what I’m doing wrong here.

    tshapiro
    Participant

    Also, I want to stress that this functionality was working when I started using the plugin and stopped working after an update so I think it’s definitely something to do with your code (and my code) not playing well.

    tshapiro
    Participant

    I bought a pro license just to get your help debugging so I feel very disappointed by your lack of help.

    tshapiro
    Participant

    This reply is private.

Viewing 4 posts - 1 through 4 (of 4 total)