LLMS_REST_Webhook::is_valid_user_action( int $user_id )
Determine if the current user-related action is valid for the webhook
Parameters Parameters
- $user_id
-
(int) (Required) WP User ID.
Return Return
(bool)
Source Source
File: libraries/lifterlms-rest/includes/models/class-llms-rest-webhook.php
* Processes information from the origination action hook
*
* Determines if the webhook should be delivered and whether or not it should be scheduled or delivered immediately.
*
* @since 1.0.0-beta.1
* @since 1.0.0-beta.17 Mark this hook's first argument as processed to ensure it doesn't get processed again within the current request.
* And don't rely anymore on the webhook's `pending_delivery` property to achieve the same goal.
* @since 1.0.0 Remove the processed flag as the ActionScheduler prevents multiple additions of the same hook.
*
* @param mixed ...$args Arguments from the hook.
* @return int|false Timestamp of the scheduled event when the webhook is successfully scheduled.
* false if the webhook should not be delivered or has already been delivered in the last 5 minutes.
*/
public function process_hook( ...$args ) {
if ( ! $this->should_deliver( $args ) ) {
return false;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.1 | Introduced. |