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'));
}
}
});