rcp_require_email_verification

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/

Filters whether or not email verification is required when processing a membership registration.

Parameters:

  • $required (bool) - Whether or not email verification is required for this registration/user.
  • $posted (array) - Array of POSTed values through the registration form.
  • $user_id (int) - ID of the user making this registration.
  • $price (float) - Price of the membership the user is registering for.

Example:

This code makes it so email verification is required for registrations less than $50. Email verification is not performed if the price is greater than or equal to $50.

function ag_rcp_require_email_verification( $required, $posted, $user_id, $price ) {
	if ( $price >= 50 ) {
		return false;
	} else {
		return true;
	}
}
add_filter( 'rcp_require_email_verification', 'ag_rcp_require_email_verification', 10, 4 );
Powered by Zendesk