I have a plugin I am writing that I want to interact with Contact Form 7.
In my plugin I added the following action add_action
add_action("wpcf7_before_send_mail", "wpcf7_do_something_else");
function wpcf7_do_something_else(&$wpcf7_data) {
// Here is the variable where the data are stored!
var_dump($wpcf7_data);
// If you want to skip mailing the data, you can do it...
$wpcf7_data->skip_mail = true;
}
I submitted the contact form but the add_action I had did nothing.
I'm unsure how to make my plugin intercept or do something when Contact Form 7
does something. Any, help on how to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…