[Resolved] Executing wpmail() when user info changes
So, working with a site that’s built by someone else. Plugins and hacks are not guaranteed to be done exactly right, but this is what I have right now:
Every user in the system (standard WP users, level subscriber) has some extra information fields, created by some custom plugin. One is a YES/NO checkbox that states whether or not the user will be listed on the site. Works fine.
However, I want to add functionality so that a wpmail() function is fired when that setting for any user changes from NO to YES. Hence:
1. open user details at http://www.mysite.com/wp-admin/users.php
2. click on user to view details
3. change checkbox from unchecked to checked
4. hit UPDATE PROFILE button
And so right after that, the wpmail() needs to be executed.
I will hardcode the recipient and message and such, but I need to know how/where I put the actual execution. Dirty solutions are accepted, the site is a mess already anyway. 😉 But since it probably involves creating a plugin solution, I’ve put it in this section (feel free to move if it’s misplaced).
Thanks for your help!
- The topic ‘[Resolved] Executing wpmail() when user info changes’ is closed to new replies.