wp_clear_scheduled_hook not working?
-
Not sure if this is the right forum to ask this, but here goes.
I am working on a plugin that makes use of wp-cron. I have scheduled events using
wp_schedule_event( time(), $postspan, “myhook1” , $num );
which adds the hook just fine. But, when I try to remove the hook using
wp_clear_scheduled_hook(“myhook1”);
it appears the hook is still there, and it has a next time to execute.
I checked this out by adding the plugin “What’s in Cron?”, and then checked it by querying the cron entry in the options file. Shouldn’t wp_clear_scheduled_hook just remove the hook from the cron array? I now have a bunch of hooks in there with the same name because the remove function is not removing them.
- The topic ‘wp_clear_scheduled_hook not working?’ is closed to new replies.