LLMS_REST_Webhook_Data::get_hooks()

Retrieve an array of hooks for the webhook topic.


Return Return

(string[])


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-webhook-data.php

	public function get_hooks() {

		if ( 'action' === $this->get_resource() ) {
			$hooks = array( $this->get_event() => 1 );
		} else {
			$all_hooks = LLMS_REST_API()->webhooks()->get_hooks();
			$topic     = $this->get( 'topic' );
			$hooks     = isset( $all_hooks[ $topic ] ) ? $all_hooks[ $topic ] : array();
		}

		return apply_filters( 'llms_rest_webhook_get_hooks', $hooks, $this->get( 'id' ) );

	}


Top ↑

Changelog Changelog

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