ご注意!

この記事には PHP コードが含まれており、開発者を対象としています。このコードは便宜上提供していますが、コードのカスタマイズやサードパーティの開発についてはサポートを提供していません。

追加のガイダンスについては、WPBeginner の カスタムコードの追加方法に関するチュートリアル を参照してください。

閉じる

説明

The wpforms_tasks_entry_emails_trigger_send_same_process filter is used to enable/disable notification emails sent asynchronously. The default behavior is enabled.

パラメーター

$enabled
(bool) Returning true disables asynchronously notification emails. The default is false.

ソース

wpforms/includes/emails/class-emails.php

詳細情報

Since WPForms version 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.

/**
 * 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' );

参考記事

How to Disable the Background Processing for Sending Email Notifications