wp_unschedule_event
wp_unschedule_event ( $timestamp, $hook, $args = array(), $wp_error = false )
Parameters:- (int) timestamp Unix timestamp (UTC) of the event.
- (string) hook Action hook of the event.
- (array) args Optional. Array containing each separate argument to pass to the hook's callback function.
Although not passed to a callback, these arguments are used to uniquely identify the
event, so they must match those used when originally scheduling the event. If the
arguments do not match exactly, the event will not be found. Default empty array.
- (bool) wp_error Optional. Whether to return a WP_Error on failure. Default false.
Returns:- (bool|WP_Error) True if event successfully unscheduled. False or WP_Error on failure.
Defined at:Change Log: - Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Description
Unschedules a previously scheduled event.The `$timestamp` and `$hook` parameters are required so that the event can be
identified.