Support » Plugin: Contact Form 7 » Fatal error: Call to undefined method WPCF7_ContactForm::replace_mail_tags()

  • Resolved Tim Berneman

    (@tberneman)


    I just noticed that I’m getting an error using CF7 3.9.1 “Fatal error: Call to undefined method WPCF7_ContactForm::replace_mail_tags()” in a special function that I wrote. This may have been since the major change in CF7 3.9 and gone undetected. Was that function deprecated or is there an alternative?

    https://wordpress.org/plugins/contact-form-7/

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

    (@takayukister)

    You can use wpcf7_mail_replace_tags() for an alternative.

    $mail_body_after = wpcf7_mail_replace_tags( $mail_body_before );

    That worked!

    My line of code was:
    $output = $cf7->replace_mail_tags( $cf7->mail[“body”] );

    I changed it to:
    $output = wpcf7_mail_replace_tags( $cf7->mail[“body”] );

    Thanks!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error: Call to undefined method WPCF7_ContactForm::replace_mail_tags()’ is closed to new replies.