Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions modules/notifications/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -878,17 +878,11 @@ public function send_email( $action, $post, $subject, $message, $message_headers
public function send_to_webhook( $message, $action, $user, $post ) {
$webhook_url = $this->module->options->webhook_url;

// apply filters to the URL
$webhook_url = apply_filters( 'ef_notification_send_to_webhook_url', $webhook_url, $action, $user, $post );

// Bail if the webhook URL is not set
if ( empty( $webhook_url ) ) {
return;
}

// apply filters to the message
$message = apply_filters( 'ef_notification_send_to_webhook_message', $message, $action, $user, $post );

// Set up the payload
$payload = [
'text' => $message,
Expand Down