• I’m using add_filter( 'wpcf7_mail_components', 'myfunctionnamehere' ); to attach an auto generated PDF of a completed form to sent emails.

    What I’d like to do is ONLY attach the form to Mail (1) but not Mail (2)… …is there any method that would allow me to either target Mail (1) only and explicitly exclude Mail (2)? I searched a bit but couldn’t find any documentation pertaining to this.

Viewing 1 replies (of 1 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    The third parameter passed to the callback function is the WPCF7_Mail object itself, and the object has the name() method that returns the name of the email template (‘mail’ or ‘mail_2’).

Viewing 1 replies (of 1 total)
  • The topic ‘Target Mail (1) & Mail (2) programmatically…’ is closed to new replies.