Site icon Hip-Hop Website Design and Development

WP3.6: PHP Deadly error: Name to undefined operate wpmu_delete_user()

I am working WordPress 3.6, multisite. I’ve a plugin activated with this content material (it has been simplified):

operate prefix_delete_user() {
    $some_option = get_site_option( 'some_option' ); // at this level it really works
    wpmu_delete_user( 2 ); // at this level it does not
    return;
}
add_action( 'delete_user_daily', 'prefix_delete_user' );

operate setup_schedule() {
    if ( ! wp_next_scheduled( 'delete_user_daily' ) ) {
        wp_schedule_event( time(), 'day by day', 'delete_user_daily');
    }
}
add_action( 'wp', 'setup_schedule' );

Day-after-day, a brand new weblog with an ID of two is registered and day-after-day I want to take away it however I am getting the next error:

PHP Deadly error: Name to undefined operate wpmu_delete_user() in /dwelling/instance/ftp/instance.com/wp-content/plugins/expiration/expiration.php on line 96

I am questioning why this may be occurring?

Once I’m calling do_action( 'delete_user_daily' ); manually, it really works…