A Cozmoslabs Product
Documentation / Developer Knowledge Base / Email / Bypass Email Confirmation on specific form

Bypass Email Confirmation on specific form

This function will allow you bypass the Email Confirmation feature if the registration is happening through a specific form.

Make sure to:

wppb_register_success is located in Profile Builder: /front-end/class-formbuilder.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
* Confirm user email automatically on specific form
*/
add_action( 'wppb_register_success', 'wppbc_activate_user_on_specific_form', 20, 3 );
function wppbc_activate_user_on_specific_form( $http_request, $form_name, $user_id ){
	global $wpdb;
 
	if ($form_name != 'FORM_NAME')
		return '';
 
	$user_email = $http_request['email'];
	$query = $wpdb->get_row($wpdb->prepare("SELECT activation_key FROM ".$wpdb->prefix."signups WHERE user_email = %s", $user_email));
 
	wppb_manual_activate_signup($query->activation_key);
}

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket