Support » Plugin: Accept PayPal Payments using Contact Form 7 » Array to string conversion error on thank you page

  • Resolved runhap

    (@runhap)


    Hi, I am getting an error on my thank you page, everything goes through fine to sandbox paypal and then when paypal redirects back to the thank you page (or even just the homepage but I have set up the thankyou page) it directs fine to the thank you page but produces the following error:

    Notice: Array to string conversion in /home/xxxxxxxx/wp-content/plugins/contact-form-7-paypal-extension/inc/lib/class.cf7pe.lib.php on line 581

    xxxxxxxx is my url pathname

    Then when contactform7 brings in the emails it just prints ‘array’ instead of the value of the array.

    But, I also have the spreadsheet plugin installed and the array value is passing fine to the spreadsheet I am guessing because this is passed before it goes to paypal whereas the values are being passed to the email after it goes through payapl.

    Please excuse my basic knoweldge of this, I am not a full time developer I just tinker, but getting really stuck on this.

    line 581 in the lib file is this:

    $value = str_replace( ‘[‘ . $k . ‘]’ , $v, $value );

    The code within this is:

    $new_mail = array();
    if ( !empty( $mail ) && !empty( $data ) ) {
    foreach ( $mail as $key => $value ) {
    if( $key != ‘attachments’ ) {
    foreach ( $data as $k => $v ) {
    $value = str_replace( ‘[‘ . $k . ‘]’ , $v, $value );
    }
    }
    $new_mail[$key] = $value;
    }
    }

    return $new_mail;
    }

    am at a loss, have uninstalled all other plugins installed them again, gone back to the 2020 theme and I still can’t seem to work out why it is throwing this error in the email it returns.

    Running most latest version of wordpress, plugins and using crome on win10.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Array to string conversion error on thank you page’ is closed to new replies.