aless.napoletani
Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- aless.napoletaniParticipant
Thank you – that’s worked perfectly.
aless.napoletaniParticipantHi Shamim,
I’ve added that function, I had to amend it as I only want users within a particular role to receive email notifications:
// Allow Frontend PM Admin (frontend_pm_admin) to receive email notifications from Front End PM PRO add_filter('fep_get_user_option', function( $value, $option, $default, $userid, $is_default ){ if( 'allow_emails' !== $option ){ return $value; } $user = wp_get_current_user(); if ( in_array( 'frontend_pm_admin', (array) $user->roles ) ) { $value = true; } else { $value = false; } return $value; }, 10, 5);But now, it only sends if BOTH the users are in this ‘frontend_pm_admin’ role. If the user sending the message is a normal user, then the notification doesn’t happen. It only happens if BOTH users are in the ‘frontend_pm_admin’ role.
Is there a way to only allow notifications for this ‘frontend_pm_admin’ role please?
aless.napoletaniParticipantThank you – that has worked.
Is there a way to enable email notifications for certain roles?
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)