Thursday, January 19, 2023
HomeWordPress Developmentphp - Why does WordPress not ship the consumer the e-mail so...

php – Why does WordPress not ship the consumer the e-mail so as to add a password?


I need to obtain that when the consumer registers on my web site, I ship him to a particular web page, and with out robotically logging in.

When we don’t register on a WordPress website, we’re registered and despatched an e mail so as to add a password, since I’ve it configured within the WooCommerce preferences:

WooCommerce => Accounts and Privateness. 

enter image description here

Looking, I got here throughout a perform that ensures that when the consumer enters their e mail within the registration enter, they aren’t robotically logged in. Firstly, when doing this, it took me to the web page that I’ve assigned, the place I clarify to the consumer to verify his e mail, however I’ve found that the WordPress e mail for the consumer so as to add a password just isn’t arriving.

This prevents the consumer from logging in, regardless that they efficiently logged into the WordPress dashboard. See the perform that it makes use of and that now prevents the mail from being despatched to the consumer to ascertain the password.

How can I make sure that the consumer doesn’t log in robotically and that the mail arrives to the consumer?

Can I get it by modifying this perform or do I want one other method to do it?

perform redirect_after_register() {

wp_logout();

wp_redirect( home_url("sigue-las-instrucciones") );

exit();

}

add_action('user_register', 'redirect_after_register');

They advised me that perhaps it might be that the precedence of the hook breaks the session earlier than sending the mail, and attempt to delay it with this recommendation:

add_action('user_register', 'redirect_after_register', 99);

Nevertheless it does not work both, the e-mail so as to add a password doesn’t attain the consumer

I’ve additionally tried a number of plugins to verify (Electronic mail Log , Verify & Log Electronic mail ) the Log of the emails and they don’t present any output message

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments