• Hi, it seems that the contact forms plugin (up to date, PHP is 8.1) are not sending the Sender Email to the theme functions.php – I do get those kinds of errors, and no emails are sent. The Array Key of course does exist.

    Functions.php Excerpt:
    // add data to thank you form
    add_filter(‘wpcf7_posted_data’, ‘save_application_form’, 10, 1);
    function save_application_form( $array ) {

    if ( isset( $_SESSION ) ) {
        $array["you_field"] = $_SESSION['kreditor-your-email']; //you_email
        $array["you_name"] = $_SESSION['kreditor-name']; //you_name
        return $array;
    }

    }

    Error in Log:

    2024/04/25 09:30:50 [error] 39887#39887: *5997 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “kreditor-your-email” in /www/blabla_960/public/wp-content/themes/generatepress_child/functions.php on line 345PHP message: PHP Warning: Undefined array key “kreditor-name” in /www/blabla_960/public/wp-content/themes/generatepress_child/functions.php on line 346″ while reading response header from upstream, client: 87.54.121.200, server: http://www.blabla.dk, request: “POST /wp-json/contact-form-7/v1/contact-forms/4279/feedback HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php8.1-fpm-blabla.sock:”, host: “www.blabla.dk:24695”, referrer: “https://www.blabla.dk/rykker-med-inkassovarsel/”

The topic ‘CF does not send email json to functions.php’ is closed to new replies.