Forum Replies Created
-
AuthorPosts
-
June 14, 2022 at 8:11 am in reply to: How can I repeat on a page the email address to which a verification email sent? #101589
Gavin Mair
ParticipantHi Jaed,
Super. Thank you all.
Toby
June 5, 2022 at 7:26 pm in reply to: How can I repeat on a page the email address to which a verification email sent? #101585Gavin Mair
ParticipantHi Jaed,
Thank you for letting me know :). I tried both shortcodes and have two questions.
- 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? - 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
March 8, 2022 at 5:15 pm in reply to: Why does the “resend” link not send an email confirmation? #101554Gavin Mair
ParticipantHi,
Is it possible to create a link that sends someone a verification link in the same way as the ‘resend’ option when looking at the ‘Users’ table on the WordPress backend?
Existing users get a verification email if we send it from the backend.
March 8, 2022 at 1:22 pm in reply to: Why does the “resend” link not send an email confirmation? #101553Gavin Mair
ParticipantHi Zohaib,
Those are exactly the settings I was using. However, the resend link is not sending a verification to any of those existing users when they click it.
Gavin Mair
ParticipantHi Pablo,
Ah, you have a filter for exactly that! Super. Thank you for sending that to me. I had to get something working today but I’ll give that snippet a go.
Does you team plan to write a complete reference to the plugin’s actions and filters etc.? I’d love to see that.
Great job on this plugin. I got it this week and it was very easy to configure. 🙂
Thank you for yours and Zohaib’s help.
Enjoy your weekend!
Gavin Mair
ParticipantHi Pablo,
Oh, it’s the user ID. In that case I’ll just check for the presence of the query parameter (by name) but not take into account its value. That way it will always work.
Please let me know if you spot any flaws in my approach if you test the code.
Gavin Mair
ParticipantIt seems that the number in
&alg_wc_ev_activate_account_message=
changed from323
to327
. I’m not sure why. What’s the correct number for the following message?‘Thank you for your registration. Your account has to be activated before you can log in. Please check your email.’
Gavin Mair
ParticipantHi Zohaib,
I unblocked the WooCommerce order received (‘thank you’) page and was able to redirect to a custom URL by using the
&alg_wc_ev_activate_account_message=323
query parameter that is added when email verification is pending after checkout.Hopefully this is a good way to go about this.
Here is the PHP snippet for other users.
/* About: Email Verification (WPFactory) | Redirect to a custom page from the order received page after WooCommerce checkout. Author: Toby Date: 03/03/2022 */ function td_redirect_when_awaiting_email_verification_on_order_received_page() { // Inspect URL query parameters to detect if verification is pending. global $wp; $page_url_with_query_params = add_query_arg( $_SERVER['QUERY_STRING'], '', home_url( $wp->request ) ); $awaiting_verification = str_contains($page_url_with_query_params, "&alg_wc_ev_activate_account_message=323"); if (is_order_received_page() && $awaiting_verification) { // Do redirect. redirect_to_page("welcome"); } } // Redirect to a page given its slug. function redirect_to_page($pageSlug) { $URL = get_site_url() . "/$pageSlug"; wp_redirect($URL); exit; // wp_redirect() does not exit / die automatically. } // Register the action. add_action('template_redirect', 'td_redirect_when_awaiting_email_verification_on_order_received_page');
Gavin Mair
ParticipantHi Zohaib,
Thank you for getting back to me.
I’ve disabled a ‘thank you’ page customisation that was interfering with this as it’s not longer needed. I have the following settings on the ‘Email Verification > ‘Advanced’ section.
- The redirect for ‘Prevent login after register’ is successfully going to a custom redirect URL of ‘/welcome’.
- After blocking the ‘thank you’ page, users are now redirected to the WooCommerce ‘/my-account’ dashboard (where the login form appears) once they have completed checkout. I now need to change this so they are instead sent to ‘/welcome’.
Gavin Mair
ParticipantHi,
An update: I am using the following PHP snippet to redirect users back to a custom login form if they log out (instead of the default WooCommerce one at ‘/my-account’). I need a way to change the redirect to a custom URL after the user has completed the WooCommerce checkout. I want to send them to a ‘/welcome’ page where I have a custom message asking them to check their email for a verification link.
add_action('wp_logout', 'redirect_after_logout'); function redirect_after_logout() { $loginURL = get_site_url() . "/login"; wp_redirect($loginURL); exit(); }
- Unfortunately, the
-
AuthorPosts