LLMS_REST_Webhook_Data::get_hooks()
Retrieve an array of hooks for the webhook topic.
Return Return
(string[])
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' ) );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.1 | Introduced. |