LLMS_REST_Webhooks_Query::get_webhooks()

Retrieve an array of LLMS_REST_Webhook objects for the given result set returned by the query


Return Return

(array)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/class-llms-rest-webhooks-query.php

	public function get_webhooks() {

		$hooks   = array();
		$results = $this->get_results();

		if ( $results ) {

			foreach ( $results as $result ) {
				$hooks[] = LLMS_REST_API()->webhooks()->get( $result->id, true );
			}
		}

		if ( $this->get( 'suppress_filters' ) ) {
			return $hooks;
		}

		/**
		 * Filters the list of webhooks
		 *
		 * @since 1.0.0-beta.1
		 *
		 * @param LLMS_REST_Webhook[]      $webhooks       Array of LLMS_REST_Webhook instances.
		 * @param LLMS_REST_Webhooks_Query $webhooks_query Instance of LLMS_REST_Webhooks_Query.
		 */
		return apply_filters( 'llms_rest_webhook_query_get_webhooks', $hooks, $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.16 Drop usage of this->get_filter( 'get_webhooks' ) in favor of 'llms_rest_webhook_query_get_webhooks'.
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.