Hooks and filters available for developers to extend plugin functionality. All snippets on this page belong in your child theme’s functions.php file, in a custom plugin, or in a code-snippets plugin.
How to Check User Verification Status?
Use the following code to check if a user has verified their email:
if ( function_exists( 'cev_pro' ) && cev_pro()->function->is_user_email_verified( $user_id ) ) {
// User is verified.
}
This helper returns true both for a fully verified customer and for one who has verified their email but is still awaiting their first paid order, which is the state used when Paid-Order Gatekeeping is enabled. It is therefore the correct check for any access, prompt or gating decision.
To read the raw state instead, the user-meta key is customer_email_verified and its value is one of true, pending_paid_order or false:
$state = get_user_meta( $user_id, 'customer_email_verified', true );
Available Actions
The plugin’s core (outside Smart Form) fires one general-purpose action:
do_action( 'cev_paid_order_gatekeeping_completed', $user_id, $source );
// $source is 'paid_order' (customer's first paid order completed)
// or 'admin' (an admin used Force activate).
Fires when a pending paid order customer is promoted to fully verified, so your own coupon, marketing-list, or membership integrations can release anything they were holding back. See Settings for how Paid-Order Gatekeeping works.
How to Change the OTP Button Label?
Use this filter to customize the “Send Verification Code” button text on the checkout verification form:
add_filter( 'cev_get_otp_button_text', function ( $text ) {
return 'Get Your Code';
} );
Available Filters
| Filter | Parameters | Since | Description |
|---|---|---|---|
| cev_get_otp_button_text | $button_text | Not documented in code | Change the text of the checkout “Send Verification Code” button. |
| cev_verification_code_length | $code_label, $code_length | Not documented in code | Changes only the code-length label shown in the verification popup (e.g. “4-digit code”) — it does not change the actual OTP length, which is a separate admin setting. See the warning below. |
| cev_login_auth_message | $message, $email | Not documented in code | Change the message shown in the login authentication popup. |
| cev_resend_limit_message | $message | Not documented in code | Change the message shown when a customer reaches the resend limit. |
| cev_email_from_name | $from_name, $context | 2.8.6 | Change the From name used on verification emails. |
| cev_email_from_address | $from_address, $context | 2.8.6 | Change the From address used on verification emails. |
| cev_back_office_roles | $roles (array), $user (WP_User) | 2.10.0 | Change which roles are treated as store staff and exempted from verification. Return the full array of exempt role slugs. |
| cev_challenge_unverified_login | $challenge (bool), $user_id | 2.10.0 | Control whether an unverified customer is challenged at login. Return false to skip the challenge for that user. |
| cev_should_enforce_login_auth_for_user | $enforce (bool), $user_id, $policy, $roles | 2.10.0 | Control whether Login Authentication applies to a given user. |
| cev_disposable_extra_domains | $extra (array), default [] | 2.10.0 | Return an array of extra domains to treat as disposable, in addition to the built-in and admin-defined lists. |
| cev_disposable_extra_excluded_domains | $extra (array), default [] | 2.10.0 | Return an array of extra domains to always allow, overriding the disposable rule. |
| cev_email_validation_rules | $rules (array of callables), $email, $context | 2.10.0 | Each rule is callable(string $email, string $context): true|WP_Error, run in order; the first WP_Error short-circuits the chain. Add, remove, or reorder rules by returning a modified array. |
| cev_signup_risk | $result { score:int, reasons:string[] }, $email, $context | 3.0.2 | Adjust the computed sign-up risk score/reasons before it’s used to allow, challenge, or block. Only exists from 3.0.2 — adding this filter on an older version will never fire. |
| cev_login_risk | $result { score:int, reasons:string[] }, $user_id, $login_details (array), $known_profiles (array) | 3.0.2 | Adjust the computed login-risk score/reasons. login_details describes the current login attempt; known_profiles holds the user’s previously-seen device/location profiles. Only exists from 3.0.2. |
| cev_login_risk_failed_threshold | $threshold (int), default 3 | 3.0.2 | Number of recent failed login attempts that adds risk score. Undocumented elsewhere. |
| cev_login_risk_idle_days | $days (int), default 60 | 3.0.2 | Number of idle days since last login that adds risk score. Undocumented elsewhere. |
| cev_pro_email_language_slug | $slug, $user_id, $recipient_email | 2.10.0 | Change the language used when sending a verification email (WPML/Polylang). |
Smart Form
The Smart Form has its own set of filters, covering custom registration fields, compatibility with stores that add required WooCommerce registration fields, and the redirect applied after login or registration.
Customizing the Smart Form: Custom Fields, Validation and Redirects