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.


Top ↑

Return Return

(bool)


Top ↑

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;

	}

}

Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.