How can I repeat on a page the email address to which a verification email sent?

Top WooCommerce & WordPress Plugins Forums Email Verification for WooCommerce How can I repeat on a page the email address to which a verification email sent?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #101579
    Toby
    Guest

    Hi there,

    Do you know how I might achieve the following?

    1. Repeat on a page the email address to which a user’s verification email was sent. This would be in the context of them having just registered.
    2. Allow a user to resend their verification link on the frontend via a form. If an unverified user goes to log in, they are are told they must activate their account and they get a resend link of the form mysite.com/login/?alg_wc_ev_user_id=355&alg_wc_ev_nonce=0b187a1ab2. However, it’d be great to make an explicit ‘resend verification’ form where the user types in their email and hits a ‘Resend’ button.

    My users often mistype their email or forget which email they registered with.

    Thanks in advance,

    Toby

    #101580
    Moshtafizur
    Moderator
    Plugin Support

    Hello Toby,

    Thanks for reaching out.

    > Repeat on a page the email address to which a user’s verification email was sent.

    We regret to inform you that this is not possible with our plugin at this time.

    > Allow a user to resend their verification link on the frontend via a form.

    At this moment, what is possible with our plugin is to block unverified users from logging in and then display a message on the frontend with a link to resend the email with the verification link. To do this, please make sure in the plugin’s settings that General > General Options > Block unverified login is enabled. Next, go to the Messages section, scroll down to the Messages > Activate field, where you may paste a message like this:

    Thank you for your registration. Your account has to be activated before you can login. Please check your email or you can resend the email with the verification link by clicking <a href="%resend_verification_url%">here</a>.

    Here, %resend_verification_url% is a placeholder.You must include it in the href attribute.

    However, both of your requests have already been forwarded to our development team. They will get back to you as soon as possible.

    #101581
    Toby
    Guest

    Hi Moshtafizur,

    Thanks for that information.

    • No problem about being unable to repeat the email address.
    • I already have the verification message (with its resend link) appearing when an unverified user tries to log in.

    I’ll wait to see if the developers have any ideas.

    Toby

    #101582
    Moshtafizur
    Moderator
    Plugin Support

    Hello Toby,

     
    This response is to let you know that our developers have started working on adding the features that you’ve requested. Both of these functions will be available in a future plugin version.

    #101583
    Toby
    Guest

    Hi Moshtafizur,

    That’s great news! Thank you very much to you all.

    Toby

    #101584
    Jaed
    Participant

    Hi Toby,

    We have implemented the features you requested. Please update the plugin to the latest version to achieve the functionalities. We have added 2 shortcodes, let me just give you a brief.

    1. [alg_wc_ev_new_user_info] shortcode will display user information.
    2. [alg_wc_ev_resend_verification_form] shortcode will create a resend verification form, which template is customizable and it will send a verification email with a link again to the given email address.

    Please let me know if you have a question about it. We are looking forward to helping you.

    Regards

    #101585
    Gavin Mair
    Participant

    Hi Jaed,

    Thank you for letting me know :). I tried both shortcodes and have two questions.

    1. Unfortunately, the [alg_wc_ev_new_user_info] shortcode does not show any information (i.e. no visual output). I placed it on the ‘/welcome’ page to which users are redirected after registration. Please can you describe the output I should expect to see and think why I might not be able to see it?
    2. The resend form worked, but how can I add success and failure messages after ‘Submit’ is pressed? Secondly, where can I find the PHP template for this you mentioned? It would be nice to change the button text for the ‘Submit’ button.

    Thank you for working on these features. I look forward to hearing from you soon.

    Toby

    #101586
    Jaed
    Participant

    Hi Toby,

    Thanks for your feedback on the shortcodes. Let me explain it to you.

    1. The shortcode [alg_wc_ev_new_user_info] accepts two arguments one is `info_type`  which value can be any properties of WP_User. You can put this to the myaccount page of WooCommerce as like I put here.
      I think you are using it on some other page where the user becomes redirected after registration. In that case, you need to check, after redirect, that the URL is containing a user ID in the query string with the key `alg_wc_ev_activate_account_message`. Without this value, that shortcode will not able to track correct user data. Please check this and let us know.
    2. It’s good to hear that the other shortcode worked well. Now to customize the template you do not have to edit any PHP template file. You can simply do it this way:
      [alg_wc_ev_resend_verification_form template='{user_email_input}Submit Now']

      You can also see it here. You can put a custom CSS class to design the form the way you want.

    Please let me know if you have any further questions. I am looking forward to helping you.

    Regards,
    Jaed

    #101587
    Toby
    Guest

    Hi Jaed,

    Thanks for getting back to me, and sorry for the slow reply.

    New user info shortcode

    Thanks for explaining the parameters — the shortcode works, as demonstrated here. However, currently the custom ‘/welcome’ page I redirect the user to does not get the
    alg_wc_ev_activate_account_message query string with the user ID. (I added it manually to check the shortcode works). Please help me fix this.

    Verification email resend form shortcode

    I customised the submit button text thanks to your instructions. I even automatically populated the form input field if the new user email is present.

    Query: Resend form vs Resend button

    The resend email form is great and I’ll soon put it on my login page, but I don’t think it should be necessary on my ‘/welcome’ page. I should not have to automatically populate the email field and submit a resend form.

    Question: Can’t I just have a resend button for the same resend link that appears on my ‘/login’ page when you try to log in with an email awaiting verification? Try to log in with [email protected] and you’ll see the resend message appear at the top of the page.

    If I can’t have a resend button, I can hide the email input field and effectively I’ll have what I want. Nevertheless, I thought I should point this out as a matter of user experience.

    Query: Error messages

    I’d like to implement the following error messages to provide user feedback. A form without error messages is a bad user experience.

    1. “No registration found under this email.”
    2. “This email has already been verified. Please log in.”

    It would be good if the resend form could have a numeric status code as a custom HTML data attribute (i.e. data-status-code) so that in JavaScript I could conditionally show other content if desired (e.g. a button to the registration page in the event of error message 1, or a ‘Go to login’ button for error message 2). I imagine some sort of event listener could be written to check the status code if an initially hidden field for error messages were shown in the event of an issue.

    Question: How can we implement these error messages?

    Please add this as a feature request if it is not already in the works. Now this functionality exists in the plugin, I expect it wouldn’t be difficult to add them.

    Please let me know if you have any questions. I look forward to hearing from you soon.

    Many thanks,

    Toby

    #101588
    Jaed
    Participant

    Hi Toby,

    Thank you for your further queries and suggestions.

    We are in a discussion about your requests. We will try to implement these in a better way and update you here soon.

    Regards.

    #101589
    Gavin Mair
    Participant

    Hi Jaed,

    Super. Thank you all.

    Toby

    #101590
    Jaed
    Participant

    Hi Toby,

    You will happy to hear that, We have implemented the feature you requested and released the updates on the latest version.

    Query: Resend form vs Resend button

    I am really sorry to say that I might not understand your query properly, Even my teammates, both failed to understand you properly. What we understood is, that you might want to have a resend verification email button only without the email field. This isn’t realistic enough, without the email field it’s not possible to track the correct user who will receive the verification email. But we are open to hearing more explanations on this if you have any.

    Query: Error messages

    We have understood your query and implemented the error messages with some codes. Let me explain the details of it. Now there are 3 codes you will be able to see.

    Response code 1: Type – success, Message – “Success: Your activation email has been resent. Please check your email.”
    Response code 2: Type – error, Message – “Error: No registration found under the email.”
    Response code 3: Type – error, Message – “Error: This user is already verified.”

    FYI: You can control these messages with this filter hook: `alg_wc_ev_resend_status_codes`

    Please let me know if you have any other queries.

    Regards

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