Filters & Hooks
Marc Wagner
March 11, 2025
Available filters and hooks #
For developers, we offer the option of accessing integrated WordPress hooks to connect the system to external interfaces.
Double opt-ins
Allows you to process opt-ins that have been performed twice. (e.g. if the opt-in link is clicked twice).
/** * @param string * @param OptIn $OptIn */ function already_confirmed($hash, $OptIn){ // Do Something } add_action('f12_cf7_doubleoptin_already_confirmed', 'already_confirmed', 10, 2);
Before the opt-in confirmation
Allows you to edit an opt-in before it is saved.
/** * @param string * @param OptIn $OptIn */ function before_confirm($hash, $OptIn){ // Do Something } add_action('f12_cf7_doubleoptin_before_confirm', 'before_confirm', 10, 2);
After the opt-in confirmation
Allows the opt-in to be modified after confirmation. Also allows the opt-in to be passed to interfaces after confirmation.
/** * @param string * @param OptIn $OptIn */ function after_confirm($hash, $OptIn){ // Do Something } add_action('f12_cf7_doubleoptin_after_confirm', 'after_confirm', 10, 2);
After sending the opt-in mail
Allows further steps to be carried out after the opt-in mail has been sent.
/** * @param array $form_data - An Array containing all dynamic form fields and placeholder data. * @param int $post_id - The Form ID */ function after_optin_mail_sent($form_data, $post_id){ // Do Something } add_action('f12_cf7_doubleoptin_sent', 'after_optin_mail_sent', 10, 2);
Advanced CF7 DB — Exclude mail from tracking
If you are using the Advanced CF7 DB plugin and do not want to capture the opt-in mail, for example, you can simply use the following code:
/** * Remove Advanced CF7 DB Hook for Opt-in Mails. */ add_action('f12_cf7_doubleoptin_sent', function($form, $form_id){ remove_action('wpcf7_before_send_mail','vsz_cf7_before_send_email'); }, 10, 2);

Article from:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.