View Categories

Email Verification: Developer Hooks, Filters and Shortcodes Reference

Customer Email Verification for WooCommerce exposes actions, filters and shortcodes so you can adjust the verification flow, the emails, and the blocking behavior in code without editing plugin files. Every hook listed here was read from the plugin source for Pro version 3.2.7, so the names are exact.

All settings referenced below live under WPFactory > Email Verification (also reachable at WooCommerce > Settings > Email Verification). Every hook and filter uses the alg_wc_ev_* prefix (a small number of older settings actions use alg_wc_email_verification_*).

The core verification filter #

This is the single most useful filter. Email Verification decides whether a user counts as verified by running alg_wc_ev_is_user_verified. Return true or false to override the decision for any user.

Filter Filtered value Arguments
alg_wc_ev_is_user_verified Whether the user is treated as verified $is_verified, $user_id
// Treat every user with the "wholesale" role as verified.
add_filter( 'alg_wc_ev_is_user_verified', function ( $is_verified, $user_id ) {
    $user = get_user_by( 'ID', $user_id );
    if ( $user && in_array( 'wholesale', (array) $user->roles, true ) ) {
        return true;
    }
    return $is_verified;
}, 10, 2 );

The settings gate filter #

alg_wc_ev_settings is how the plugin decides whether a Pro-only field is disabled. In the free version it returns the array array( 'disabled' => 'disabled' ) (or array( 'readonly' => 'readonly' )), which locks the field. In Pro it returns the value unchanged, unlocking it. It is used across the settings screens and is not intended for store customization.

Email filters #

These fire while the plugin builds and sends its activation, confirmation and admin emails. Whatever you return replaces the value the plugin would otherwise use.

Filter Filtered value Arguments
alg_wc_ev_email_subject The email subject before placeholder replacement $subject, $args
alg_wc_ev_email_subject_final The email subject after placeholders are applied $subject, $args
alg_wc_ev_email_content The email body before placeholder replacement $content, $args
alg_wc_ev_email_content_final The email body after placeholders are applied $content, $args
alg_wc_ev_email_content_heading The email heading $heading, $args
alg_wc_ev_email_template The email template (plain / wc / smart) $template
alg_wc_ev_wc_email_template The WooCommerce email template mode $wc_template
alg_wc_ev_activation_email_recipient The activation email recipient address $recipient, $args
alg_wc_ev_confirmation_email_recipient The confirmation email recipient address $recipient, $args
alg_wc_ev_allow_confirmation_email Whether the confirmation email is sent $allow, $args
alg_wc_ev_use_activation_wc_email Whether to route activation through a WooCommerce email object $use
alg_wc_ev_use_confirmation_wc_email Whether to route confirmation through a WooCommerce email object $use
alg_wc_ev_new_user_action The hook that triggers the activation email $action
alg_wc_ev_send_mail_message The final message passed to the mailer $message, $args
// Send the activation email to a CRM inbox as well as the customer.
add_filter( 'alg_wc_ev_activation_email_recipient', function ( $recipient, $args ) {
    return $recipient . ',cr*@*****le.com';
}, 10, 2 );

Placeholder filters #

Use these to add your own placeholders to the emails and messages. See the Email Verification placeholders reference for the full built-in list.

  • alg_wc_ev_common_placeholders – the %site_title% / %site_url% pair. Argument: $placeholders.
  • alg_wc_ev_user_placeholders_args – the per-user placeholders such as %user_email% and %resend_verification_url%.
  • alg_wc_ev_verification_param – the URL query argument used to carry the verification code. Default alg_wc_ev_verify_email.
  • alg_wc_ev_required_user_meta – the list of user meta keys required before an account can verify.
// Register a custom placeholder for the emails.
add_filter( 'alg_wc_ev_common_placeholders', function ( $placeholders ) {
    $placeholders['%support_phone%'] = '+1 555 0100';
    return $placeholders;
} );

Redirect and blocking filters #

Filter Controls
alg_wc_ev_redirect_on_registration The redirect target after registration
alg_wc_ev_redirect_after_checkout The redirect target after checkout for an unverified user
alg_wc_ev_block_content_notice The notice shown on blocked content
alg_wc_ev_block_content_redirect_url The redirect URL used by the Block content feature
alg_wc_ev_block_unverified_user_login_error_message The login error message shown to unverified users
alg_wc_ev_block_nonpaying_users_activation_error_notice The notice shown when a non-paying user is blocked
alg_wc_ev_block_nonpaying_users_activation_email_on_payment Whether the activation email is sent only on a paid order
alg_wc_ev_resend_status_codes The order statuses that allow a resend
alg_wc_ev_reset_and_mail_activation_link_validation Whether a reset-and-resend request is allowed to proceed

Advanced and processing filters #

  • alg_wc_ev_verification_info_customization – the My Account verification info block markup.
  • alg_wc_ev_bkg_process_email_params – the email parameters sent when a background job finishes.
  • alg_wc_ev_delete_unverified_users_loop_args – the query arguments used when deleting unverified users.
  • alg_wc_ev_html_replacement_params, alg_wc_ev_html_tags_converter_replacement_ids – the “Replace HTML tags” advanced feature.

Actions #

Action Fires when Arguments
alg_wc_ev_core_loaded The plugin core has finished loading $core
alg_wc_ev_user_account_activated A user account is successfully verified $user_id, $args
alg_wc_ev_user_account_deactivated A user account is unverified $user_id, $args
alg_wc_ev_verify_email_error A verification attempt fails –
alg_wc_ev_activation_link_already_used A one-time activation link is reused –
alg_wc_ev_non_paying_user_blocked A non-paying user is blocked from activating –
alg_wc_ev_reset_and_mail_activation_link A fresh activation link is generated and sent –
alg_wc_ev_trigger_activation_wc_email The WooCommerce activation email object is triggered –
alg_wc_ev_trigger_confirmation_wc_email The WooCommerce confirmation email object is triggered –
alg_wc_ev_after_thankyou_logout An unverified user is logged out after checkout –
alg_wc_email_verification_after_save_settings The settings are saved –
alg_wc_email_verification_after_reset_settings A settings section is reset –
// Add a user to a mailing group the moment their email is verified.
add_action( 'alg_wc_ev_user_account_activated', function ( $user_id, $args ) {
    update_user_meta( $user_id, '_newsletter_optin_ready', 'yes' );
}, 10, 2 );

Shortcodes #

Email Verification registers the following shortcodes. They work in both the free and Pro versions. Two of them, [alg_wc_ev_custom_msg] and [alg_wc_ev_email_content_placeholder], have an on/off toggle on the Shortcodes sub-tab (both enabled by default).

Shortcode Purpose Parameters
[alg_wc_ev_custom_msg] Shows verification status or a resend link, with optional hide rules verified_status, unverified_status, hide_clauses, wrapper_template, content_template
[alg_wc_ev_resend_verification_url] Outputs a “resend verification email” link wrapper_template, hide_if_verified, hide_for_guests, content_template
[alg_wc_ev_resend_verification_form] Renders a form where a visitor can request a fresh link email_address, show_to_logged_in_users, template, submit_btn_template, wrapper_template
[alg_wc_ev_new_user_info] Prints a field from the current user’s profile info_type (default user_email), not_found_msg
[alg_wc_ev_translate] Shows text conditionally on the active language lang, not_lang, lang_text, not_lang_text
[alg_wc_ev_email_content_placeholder] Marks where the activation email content is inserted into another email none

Deprecated: [alg_wc_ev_verification_status] was replaced by [alg_wc_ev_custom_msg] in version 2.8.2. It still resolves (it forwards to the new shortcode and emits a deprecation notice), but new pages should use [alg_wc_ev_custom_msg].

Need help? #

If you are extending Customer Email Verification for WooCommerce and a hook does not behave as expected, contact our team on the Email Verification support forum with the hook name and a short code sample, and we will point you to the right extension point.