Change a subsite Admin role of a WordPress Multisite after 24 hours registering

You probably want the built-in cron scheduler.

You’ve got two options: either

  1. set up a one-off job to downgrade the user 24 hours after registering using wp_schedule_single_event()
  2. instead set up a daily job with wp_schedule_event() to check all blogs for users without KYC data and deactivate them if necessary.

You should probably change your code above so that it checks for KYC data (stored in user meta? or a post on the site?) and also sends the user an email notification of the change too.

Note that WordPress cron events only run when there’s web traffic. If you have lots of traffic then that should be fine: else they’ll get delayed until the next web request to the site. You might want to set up the system task scheduler to trigger cron events.