Emails are not normally sent for new users added in the admin, so I’m wondering what’s going on. Are you sure that adding a new record in the admin generates an email?
I have no filter in the plugin available to use to control email going out, but you can use the WordPress filter ‘wp_mail’ to control your outgoing emails.
Thread Starter
gld
(@gld)
Sorry Roland, I should have been more specific. The ‘admins’ are users with extra rights but are not using the Admin form. I have another page which uses a customized signup form to add these users. From the plugin perspective, I’m assuming these events are being seen exactly the same for both situations?
OK, well make sure that signup form is properly configured: the emails are sent when the confirmation page is shown, are your admins seeing a confirmation message after adding a new record?
Thread Starter
gld
(@gld)
Yes it does that as well. I guess I need to intercept it before it goes to the confirmation form? I do need a different confirmation message for the admins.
You can set the page the user will be sent to in the signup shortcode using the “action” attribute. That page will need to have the [pdb_signup_thanks] shortcode in order for the submission to be completed. If you want to customize that message (the plugin only has one confirmation message setting) you need to use a custom template for the signup thanks shortcode.
The only way to intercept the outgoing email is to use the ‘wp_mail’ filter provided by WordPress. In your filter callback. you would inspect the outgoing message (or just check which page the user is on) and abort it if it is coming from your “admin” form submission.