LLMS_REST_Webhook::should_deliver( array $args )

Determines if an originating action qualifies for webhook 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

	 *
	 * @param array $args Numeric array of arguments from the originating hook.
	 * @return bool
	 */
	protected function schedule( $args ) {

		// Remove object & array arguments before scheduling to avoid hitting column index size issues imposed by the ActionScheduler lib.
		foreach ( $args as $index => &$arg ) {
			if ( is_array( $arg ) || is_object( $arg ) ) {
				$arg = null;
			}
		}

		$schedule_args = array(
			'webhook_id' => $this->get( 'id' ),
			'args'       => $args,
		);

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1
[verison] Drop checking whether the webhook is pending in favor of a check on if is already processed within the current request. Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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