For developers who need to go beyond the level settings, the Email Confirmation Add On offers one action hook and several filter hooks. Use them to run your own code when a member confirms, change where members land after clicking the validation link, add parameters to the link, or change who can validate members.

Actions

pmproec_after_validate_user

Fires after a member is marked as confirmed. Use this to update a CRM or mailing list, assign a role, or log the confirmation.

This action fires when the member clicks their validation link and when an administrator clicks Validate Now in the Email Confirmation panel on the Edit Member screen. It does not fire when an administrator uses the Validate User row action on the Members list or Users screen.

do_action( 'pmproec_after_validate_user', int $user_id, string $validation_key );

Parameters

  • $user_id: int; The ID of the member who was confirmed.
  • $validation_key: string; The confirmation key the member had before they were confirmed.

Example

function my_pmproec_after_validate_user( $user_id, $validation_key ) {
	// Save the date the member confirmed.
	update_user_meta( $user_id, 'my_email_confirmed_date', current_time( 'mysql' ) );
}
add_action( 'pmproec_after_validate_user', 'my_pmproec_after_validate_user', 10, 2 );

Filters

pmproec_logged_in_validate_redirect

Filters where a logged-in member is redirected after they click a valid confirmation link. Return any URL, such as your Membership Account page or a welcome page.

apply_filters( 'pmproec_logged_in_validate_redirect', string $url );

Parameters

  • $url: string; The redirect URL. Default is your site’s home page (home_url()).

Example

function my_pmproec_logged_in_validate_redirect( $url ) {
	return pmpro_url( 'account' );
}
add_filter( 'pmproec_logged_in_validate_redirect', 'my_pmproec_logged_in_validate_redirect' );

pmproec_logged_out_validate_redirect

Filters where a logged-out member is redirected after they click a valid confirmation link.

apply_filters( 'pmproec_logged_out_validate_redirect', string $url );

Parameters

  • $url: string; The redirect URL. Default is the login URL (wp_login_url()).

pmproec_extra_query_args

Filters extra query arguments added to the validation link in the checkout email. The link still works with extra arguments, so you can use this to add tracking parameters or values your own code reads after the member confirms.

This filter only applies to the link in the checkout email. Use pmproec_query_args for the link in the Resend Confirmation email.

apply_filters( 'pmproec_extra_query_args', array $query_args );

Parameters

  • $query_args: array; Query arguments to add to the link, as key => value pairs. Default empty array.

pmproec_query_args

Filters extra query arguments added to the validation link in the Resend Confirmation email.

apply_filters( 'pmproec_query_args', array $query_args );

Parameters

  • $query_args: array; Query arguments to add to the link, as key => value pairs. Default empty array.

Example

function my_pmproec_query_args( $query_args ) {
	$query_args['utm_source'] = 'confirmation-email';
	return $query_args;
}
add_filter( 'pmproec_query_args', 'my_pmproec_query_args' );
add_filter( 'pmproec_extra_query_args', 'my_pmproec_query_args' );

pmproec_validate_user_cap

Filters the capability a user needs to see the Validate User and Resend Confirmation Email row actions on the Members list and Users screen, and to validate a member with the Validate User action.

The Email Confirmation panel on the Edit Member screen uses Paid Memberships Pro’s own capability for editing members, not this filter.

apply_filters( 'pmproec_validate_user_cap', string $capability );

Parameters

  • $capability: string; The required capability. Default edit_users.

Last updated on November 12, 2026


Was this article helpful?
YesNo