説明

wpforms_emails_mailer_get_from_name フィルターを使用すると、WPForms のメールで使用される「差出人」名をカスタマイズできます。たとえば、サイト名をブランド名や特定のメールテンプレートの特定のラベルに置き換えることができます。

デフォルトでは、カスタム名が設定されていない場合、この値は WordPress のサイト名から取得されます。

パラメータータイプ説明
$from_name文字列WPForms が使用しようとしている現在の差出人名。別の文字列を返すと上書きできます。
$emailオブジェクトメールオブジェクトのインスタンス。メールテンプレートやプロパティにアクセスできます。

ソース

wpforms/src/Emails/Mailer.php

/*
* Customize the from name address that Save and Resume addon uses
* 
* @link https://wpforms.com/developers/how-to-customize-the-from-email-address-for-the-save-and-resume-addon/
*/
      
    function save_resume_change_from_name( $from_name, $email ) {
      
        if ( $email->template instanceof WPFormsSaveResume\Email\Templates\SaveResume ) {
              
            // Change from name with Save and Resume email
            $from_name = 'Sullie Eloso'; 
              
        }
          
        return $from_name;
          
    }
    add_action( 'wpforms_emails_mailer_get_from_name', 'save_resume_change_from_name', 10, 2 );

参考記事