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:

  • add your form name on line 8

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);
}