Support » Plugin: Contact Form 7 » Selectable Recipient Validation Error Workaround

  • After the new update v4.4

    You cannot put [your-recipient] into the “To” field without it throwing a syntax error.

    I think it is only validating for emails and doesn’t like the square brackets.

    Anyway I turned off the validation as a quick workaround to get things working again.

    File: contact-form-7/includes/config-validator.php

    Code Snippet:
    $recipient = $components[‘recipient’];
    $recipient = new WPCF7_MailTaggedText( $recipient,
    array( ‘callback’ => $callback ) );
    $recipient = $recipient->replace_tags();
    $recipient = wpcf7_strip_newline( $recipient );

    /* This is causing problems to Selectable Recipients
    if ( ! $this->test_to_field_syntax( $recipient ) ) {
    $this->add_error( sprintf( ‘%s.recipient’, $template ),
    self::error_invalid_syntax );
    }
    */

    $additional_headers = $components[‘additional_headers’];
    $additional_headers = new WPCF7_MailTaggedText( $additional_headers,
    array( ‘callback’ => $callback ) );
    $additional_headers = $additional_headers->replace_tags();

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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Selectable Recipient Validation Error Workaround’ is closed to new replies.