Skip to content

Commit

Permalink
Merge pull request #735 from Automattic/update/webhook-filters
Browse files Browse the repository at this point in the history
Remove unnecessary filters for webhook notifications
  • Loading branch information
hanifn authored Jun 28, 2024
2 parents d3aae9e + 39e71fd commit cf678bb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/notifications/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,17 +877,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

0 comments on commit cf678bb

Please sign in to comment.