LLMS_REST_Webhook::schedule( array $args )
Schedule the webhook for async delivery
Parameters Parameters
- $args
-
(array) (Required) Numeric array of arguments from the originating hook.
Return Return
(bool)
Source Source
File: libraries/lifterlms-rest/includes/models/class-llms-rest-webhook.php
*
* @since 1.0.0-beta.1
*
* @param int $delay Time (in seconds).
* @param array $args Numeric array of arguments from the originating hook.
* @param LLMS_REST_Webhook $this Webhook object.
*/
$delay = apply_filters( 'llms_rest_webhook_repeat_delay', 300, $args, $this );
if ( ! $next || $next >= ( $delay + gmdate( 'U' ) ) ) {
return as_schedule_single_action( time(), 'lifterlms_rest_deliver_webhook_async', $schedule_args, 'llms-webhooks' ) ? true : false;
}
return false;
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.17 | Stop setting the webhook's property pending_delivery to 1 when scheduling the delivery. We now rely on the method is_already_processed() to determine whether the webhook scheduling should be avoided. |
| 1.0.0-beta.1 | Introduced. |