display a message to activate Email

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #142214
    golofaev73
    Participant

    Hello! How can I display a message indicating that I need to confirm my email anywhere in the template?

    #142286
    Moshtafizur
    Moderator
    Plugin Support

    Hi there,

    Thank you for reaching out.

    When a user registers an account, the plugin will display a notice indicating that an activation email has been sent. If the user attempts to log in without activating the account, another notice will appear, informing them that they must activate the account first. Additionally, the notice will include a link to resend the activation email.

    Best regards.

    #142296
    golofaev73
    Participant

    Hello! I have my own template for my personal account and I want to check whether the email is confirmed and display a message

    #142580
    pablo-pacheco
    Moderator

    Hi,

    If you want to check if the user is verified, we have this function:

    alg_wc_ev_is_user_verified_by_user_id( $user_id ).

    Let me know if it helps.

    • This reply was modified 3 months, 2 weeks ago by pablo-pacheco.
    #142601
    golofaev73
    Participant

    Thank you! it works… but the verification message is displayed in the do_action(‘woocommerce_before_customer_login_form’) hook
    How can I display it where I indicate?

    #142656
    pablo-pacheco
    Moderator

    Great 🙂

    You mean, how to display the message in the ‘woocommerce_before_customer_login_form’ hook?

    If you’re inside it, you can simply use an echo function. Example:

    add_action( 'woocommerce_before_customer_login_form', function () {
       $user_id = get_current_user_id();
       if ( alg_wc_ev_is_user_verified_by_user_id( $user_id ) ) {
          echo '<h1>Verified</h1>';
       } else {
          echo '<h1>Not Verified</h1>';
       }
    } );
    #142670
    golofaev73
    Participant

    Thank you! I know this.. I want to display a message with a link anywhere if the email is not verified–

    “You need to verify your email to access this content. You can resend the email with verification link by clicking here. “

    #143062
    pablo-pacheco
    Moderator

    Please, update to version 2.8.2 I just released.

    Now you can use the [alg_wc_ev_custom_msg] shortcode like this:

    [alg_wc_ev_custom_msg hide_clauses="verified,guests" content_template="You need to verify your email to access this content. You can resend the email with verification link by clicking <a href='%resend_verification_url%'>here</a>."].

    Let me know if it helps.

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