My plugin using wpcf7_before_send_mail isn't working
-
I use a basic plugin with the function below. What can I change to capture the object and update the object?
I understand i’ll have to set the properties as shown on this page http://contactform7.com/2014/07/02/contact-form-7-39-beta/
But this function isn’t firing at all. Would really appreciate some help, thanks
function wpcf7_process (&$WPCF7_ContactForm) { $fullname = $WPCF7_ContactForm->posted_data['your-name']; $email = $WPCF7_ContactForm->posted_data['your-email']; $phone = $WPCF7_ContactForm->posted_data['phone']; (.......other code......) $WPCF7_ContactForm->mail['body'] .= "================="; $WPCF7_ContactForm->mail['body'] .= "\r\n"; $WPCF7_ContactForm->mail['body'] .= 'HTTP_REFERER: '.$_SERVER['HTTP_REFERER']; $WPCF7_ContactForm->mail['body'] .= "\r\n"; } add_action("wpcf7_before_send_mail", "wpcf7_process");
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘My plugin using wpcf7_before_send_mail isn't working’ is closed to new replies.