Skip to content

Instantly share code, notes, and snippets.

@annuman97
Created June 18, 2025 07:37
Show Gist options
  • Save annuman97/00ba4708281dfb4145a3fefa03a9cdca to your computer and use it in GitHub Desktop.
Save annuman97/00ba4708281dfb4145a3fefa03a9cdca to your computer and use it in GitHub Desktop.
Sending Email Notification when Fluent Forms Admin Approval is enabled using wp_mail functions
add_action('fluentform/submission_inserted', 'bypass_admin_approval_email', 20, 3);
function bypass_admin_approval_email($entryId, $formData, $form)
{
if($form->id != 7) {
return;
}
$email = isset($formData['email']) ? sanitize_email($formData['email']) : '';
if ($email && is_email($email)) {
$subject = 'Thank you for your submission';
$message = 'We received your form and will review it soon.';
$headers = ['Content-Type: text/html; charset=UTF-8'];
wp_mail($email, $subject, $message, $headers);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment