### [wpforms_disable_all_emails](https://wpforms.com/developers/wpforms_disable_all_emails/)

**Published:** February 17, 2021
**Author:** Editorial Team

**Excerpt:** The wpforms_disable_all_emails filter applies to all notification emails and can be used to prevent form notification emails from being sent site-wide.

**Content:**

## Description

The `wpforms_disable_all_emails` filter is used to disable all form notification emails.

## Parameters

$disable*(bool) (Required)* If true, all notification emails will be disabled (default is `false`).## Source

`wpforms/includes/emails/class-emails.php`

## More Information

The `wpforms_disable_all_emails` filter applies to all [notification emails](https://wpforms.com/docs/setup-form-notification-wpforms/ "How to Set Up Form Notification Emails in WPForms") within the form submission process. It can be used to prevent form notification emails from being sent site-wide, regardless of settings within the form builder.

## Examples

**Note:** This filter will disable **all** email notifications for **all** forms and should be used with caution.

```

/**
* Filter used to disable all form notification emails.
*
* @link https://wpforms.com/developers/wpforms_disable_all_emails/
*
* @param bool $disable Default is false. If true, disables email notifications.
*
* @return bool
*/

function wpf_dev_disable_all_emails( $disable ) {

    // Disable ALL WPForms email notifications site wide
        $disable = true;
        return $disable;
}

add_filter( 'wpforms_disable_all_emails', 'wpf_dev_disable_all_emails', 10, 1 );

```

**Categories:** Filters Hooks

**Tags:** PHP

---

