before send mail function not getting called
-
In the process of updating my functions.php to work with v3.9, my function is not getting called and causing the following debug error:
[03-Aug-2014 21:25:33 UTC] PHP Warning:
Parameter 1 to wpcf7_attach_instructions() expected to be a reference, value given in /home/danbro89/staging.secretfamiliesmc.org/wp-includes/plugin.php on line 470This is the function:
/*
function wpcf7_attach_instructions(&$WPCF7_Form) {
//check if it is the Team Sign Up form
if ($WPCF7_Form->id()==405)
{
// get the dropdown menu value and the corresponding instruction file
$submission = $WPCF7_Submission::get_instance();
if ($submission) {
$myDocName = $submission->get_posted_data(‘TeamType’).”.pdf”;
}
$mail_2 = $WPCF7_Form->prop(‘mail_2’);
$mail_2[‘attachments’] = “uploads/Instructions/”.$myDocName ;
$mail_2[‘attachments’] = “\nuploads/Instructions/TeamSignUp.pdf”; // attach team sign up sheet
$WPCF7_Form->set_properties(array(‘mail_2’ => $mail_2));
error_log(“***********WRITTING TO LOG *******************”);
error_log($mail_2);
}
}
add_action(“wpcf7_before_send_mail”,”wpcf7_attach_instructions”);*/
my site is https://www.staging.secretfamiliesmc.org
Thanks for your assistance.
- The topic ‘before send mail function not getting called’ is closed to new replies.