Skip to content

Instantly share code, notes, and snippets.

@moskalukigor
Last active November 9, 2016 13:05
Show Gist options
  • Save moskalukigor/585caef9928bc2933a79b463b8c661af to your computer and use it in GitHub Desktop.
Save moskalukigor/585caef9928bc2933a79b463b8c661af to your computer and use it in GitHub Desktop.
cf7 get field and skip mail
add_action("wpcf7_before_send_mail", "wpcf7_do_something_else");
function wpcf7_do_something_else($cf7) {
$wpcf = WPCF7_ContactForm::get_current();
$wpcf->skip_mail = true;
$cookieForm = array(
'billing_first_name' => $_POST["text-873"],
'billing_last_name' => $_POST["text-251"],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment