Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary filters for webhook notifications #735

Merged
merged 1 commit into from
Jun 28, 2024
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
Loading