thisismillett
Forum Replies Created
-
Forum: Plugins
In reply to: [New User Approve] How to customize the approval message to the admin?Hjsurk, I am also trying to integrate with a woo commerce install. I was beating my head against the wall trying to accomplish the same thing, since my shop is a business to business and I can’t have just anyone making purchases. I also want as much data in the email as possible so I don’t have to bounce around too much.
I ended up solving it with two approaches. I have a heavily customized situation, and it turned out that my customer is setup as a user in one step, then a lot of the important details from the registration page are added to the user meta in following steps. However, the NUA scripts fire between these two stages.
To build a direct link to the edit-user.php page in the admin, I added a tag to the email_tags array (just like the code examples above). I used the $attributes[‘user_login’] as the argument for get_userdatabylogin(), then build out the link string with the id.
For all the meta data that hasn’t been inserted yet when this code apparently fires, I just accessed the post object directly inside the new_user_approve_notification_message_default filter. I was able to get all the data I wanted into the registration notification email this way.