So, I'm developing a plugin, I wanted to know if I call
$timestamp = wp_next_scheduled( 'scheduled_hook' );
wp_unschedule_event( $timestamp, 'scheduled_hook' );
Without checking if it's scheduling at all, will it give me an error or will it just go through it and unschedule it in case it is actually scheduled and ignore it otherwise?
wp_unschedule_event()
returnsWP_Error
on failure, so I would assume that this is what happens.