Filter to choose whether an email should be sent after each successful contact form submission. This filter takes precedence over the emailNotifications attribute.
Parameters
- $should_send
(bool | null) Should an email be sent after a form submission. – true: Send email regardless of emailNotifications setting – false: Don't send email regardless of emailNotifications setting – null: Use emailNotifications attribute to determine (default behavior)
- $post_id
int Post ID.
Changelog
- Introduced in Jetpack 2.6.0
How to use this hook
Notes
You can use this filter to disable all emails that may be sent when a form is submitted on your site, like so:add_filter( 'grunion_should_send_email', '__return_false' );