AIサマリー
説明
について wpforms_emails_mailer_get_reply_to_address
フィルタを使うと、WPForms のメールに使われる User Registration アドオンの返信先メールアドレスを変更することができます。
パラメータ | タイプ | 記述 |
---|---|---|
$reply_to | ストリング | WPFormsが使用しようとしている現在のReply-Toアドレス。上書きするには別の文字列を返します。 |
$email | オブジェクト | Eメール・オブジェクトのインスタンス。Eメールテンプレートやプロパティへのアクセスを提供します。 |
ソース
wpforms/src/Emails/Mailer.php
例
/**
* Set a custom Reply-To address for User Registration emails only.
*
* @link https://wpforms.com/developers/wpforms_emails_mailer_get_reply_to_address/
*
* @param string $reply_to Current Reply-To address.
* @param object $email The email object instance.
*
* @return string
*/
function wpf_dev_user_registration_reply_to( $reply_to, $email ) {
// Target User Registration general notifications.
if ( isset( $email->template )
&& $email->template instanceof \WPFormsUserRegistration\EmailNotifications\Templates\General ) {
// Use a dedicated inbox for replies from registration emails.
$reply_to = '[email protected]';
}
return $reply_to;
}
add_filter( 'wpforms_emails_mailer_get_reply_to_address', 'wpf_dev_user_registration_reply_to', 10, 2 );