Description

Filter used to used to enable/disable notification emails sending asynchronously. Default behavior is enabled.

Parameters

$enabled
(bool) Returning true disables asynchronously notification emails. Default is false.
$fields
(array) Field data.
$entry
(array) Entry data.
$form_data
(array) Processed form settings/data, prepared to be used later.
$entry_id
(int) Entry ID, if available.
$trigger
(string) Location that triggered filter.

Source

wpforms/includes/class-emails.php

More Information

Beginning in WPForms 1.5.9, form email notifications are sent asynchronously, similar to a “background process”. In some cases, particularly with sites that have low traffic, this can cause a delay with notifications sending out. This filter can be used to disable asynchronously form notifications and have notifications sent instantly during form processing.

Example

/**
 * Disable form notifications sending asynchronously.
 *
 * @link    https://wpforms.com/developers/wpforms_tasks_entry_emails_trigger_send_same_process/
 *
 * @param   bool   $enabled    Default is false (emails send asynchronously).
 *
 * @return  bool
 */
add_filter( 'wpforms_tasks_entry_emails_trigger_send_same_process', '__return_true' );

Snippet Reference: How to Disable the Background Processing for Sending Email Notifications