In my case I will add a custom validation on my subscriber email field to check if the email was already on the database.
This is my sample code below:
add_filter( 'wpcf7_validate_email*', 'hdev_custom_email_subscription_validation_filter', 20, 2 ); function hdev_custom_email_subscription_validation_filter( $result, $tag ) { if ( 'your-email-subscriber' == $tag->name ) { //tag name $your_email_subscriber = isset( $_POST['your-email-subscriber'] ) ? trim( $_POST['your-email-subscriber'] ) : ''; global $wpdb; //check if the current email inputted is on the database $get_results = $wpdb->get_results("SELECT * FROM `wp_postmeta` tbl1 LEFT JOIN `wp_postmeta` tbl2 ON tbl1.post_id=tbl2.post_id WHERE (tbl1.meta_key = 'form_id' AND tbl1.meta_value = 863 ) AND (tbl2.meta_key = 'wpcf7s_posted-your-email-subscriber' AND tbl2.meta_value = '".$your_email_subscriber."')"); if(!empty($get_results)){ $result->invalidate( $tag, "This email address has been already subscribed!" ); } } return $result; }