Is there a hook that allows me to manually mark a user account as verified?

WPFactory Plugins – Empower Stores Success Forums Email Verification for WooCommerce Is there a hook that allows me to manually mark a user account as verified?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #101353
    Pranbir
    Guest

    Any hook is there using which I can manually mark a user account verified?
    I am creating a custom plugin and at the time of sign-up based on some data I need to mark them verified and for others, activation mail should be sent.
    Any idea how can I achieve this?

    #101354
    Zohaib
    Participant

    Hi Pranbir,

    You can mark users as verified from your WordPress dashboard Users Menu. You will first need to enable the option. It is located under WooCommerce > Settings > Email Verification > Admin. Enable the relevant options here.

    As for the hooks I have passed your request to our development team, they will get back to you soon.

    #101355
    WPFactory Plugins
    Participant
    Plugin Author

    Hi Pranbir,

    Sorry for the delay.

    If you simply want to mark an user account as verified you could try to update the user meta like this:

    update_user_meta( $user_id, 'alg_wc_ev_is_activated', '1' );

    If you want to check programmatically if a user is verified by his ID you could try this function:

    alg_wc_ev_is_user_verified_by_user_id( $user_id );

    If you want to use a hook to mark the user as verified you could try this filter: alg_wc_ev_is_user_verified

    An example:

    add_filter( 'alg_wc_ev_is_user_verified', function( $is_user_verified, $user_id ) {
        // $is_user_verified = true | false
        return $is_user_verified;
    }, 10, 2 );
    

    Let me know if it helps 😉

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.