[plugin: Contact Form 7 ] Runnign function before and after
-
Hi,
i’ll try to execute a couple of functions before and after sending mail.The functions “before” is ok but i’m not able to run the function after mail sent.
My code inside the function.php file
add_action( 'wpcf7_before_send_mail', 'FunctionsBefore'); function FunctionsBefore($contact_form) { $idForm = $contact_form->id; ... } add_action( 'wpcf7_mail_sent', 'FunctionsAfter' ); function FunctionsAfter($contact_form) { $idForm = $contact_form->id; ... }
Debugging i see that when i’m at line add_action( ‘wpcf7_mail_sent’, ‘FunctionsAfter’ ); the $contact_form var is no more defined.
Where is my mistake?
Thank’s a lot and sorry for my english.
- The topic ‘[plugin: Contact Form 7 ] Runnign function before and after’ is closed to new replies.