• Resolved siprof

    (@siprof)


    Hello,

    I noticed that admin-ajax.php being called every 5 seconds. But it only happens when I open WordPress Dashboard. I check the payload, it was ‘duplicator_dashboad_widget_info’

    Is it necesarry to call admin-ajax.php every 5 seconds? How to reduce the calls?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mohammedeisa

    (@mohammedeisa)

    Hi @siprof ,

    Thanks for reaching our to Duplicator support.

    I will consult the development team about the 5 seconds call but you can remove the dashboard widget using the below code:

    add_action(‘admin_init’, function () {
    if (class_exists(Duplicator\Views\DashboardWidget::class)) {
    if (is_multisite()) {
    remove_action(‘wp_network_dashboard_setup’, array(Duplicator\Views\DashboardWidget::class, ‘addDashboardWidget’));
    } else {
    remove_action(‘wp_dashboard_setup’, array(Duplicator\Views\DashboardWidget::class, ‘addDashboardWidget’));
    }
    }
    });

    Please add the above code to your active theme functions.php file.

    I hope this helps.

    Thanks!

    Thread Starter siprof

    (@siprof)

    The code doesn’t work at the first time, I noticed there are ‘ and ’ instead of ‘ so I changed them to ‘ and now it works :

    add_action('admin_init', function () {
    if (class_exists(Duplicator\Views\DashboardWidget::class)) {
    if (is_multisite()) {
    remove_action('wp_network_dashboard_setup', array(Duplicator\Views\DashboardWidget::class, 'addDashboardWidget'));
    } else {
    remove_action('wp_dashboard_setup', array(Duplicator\Views\DashboardWidget::class, 'addDashboardWidget'));
    }
    }
    });

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘admin-ajax.php being called every 5 seconds’ is closed to new replies.