Sending newsletter to custom roles

Hi,
I see that the eNewsletter plugin can be set to send a letter to specific roles, but the problem is that only the standard WP roles are supported.

I have custom roles on my site, is there a way to include those in the list as well?

Restricting targeted email sending to standard WP roles doesn't really make much sense if you ask me.

Thanks,
Tom

  • halasyt

    I managed to "hack" it in, not a real hack actually, but maybe useful to others, so here you go:

    The roles displayed are hardcoded into the file page-send-newsletter.php on line 196. So edit that file, and in the array, simply include the custom role slugs you created. After this, the role will appear on the newsletter sending page, and it will send the newsletter to the role's users as expected :slight_smile:

    Not a very elegant solution, but it works. If you don't want to hardcode your custom roles, you could also use the $wp_roles global variable to fetch all roles, but this was just a bit easier right now.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.