MailerPress capabilities

A WordPress capability is a named permission given to a role. MailerPress adds its own capabilities, each unlocking one area (settings, AI, campaigns, templates, contacts, lists, tags, segments or automations), so you can control what clients, team members and administrators can do. This article lists them, explains how they are assigned and how to change them durably.

The capabilities are part of MailerPress (free). The Access Control screen, which lets you change them without code, requires MailerPress Pro 2.1.0 or later.

List of capabilities

By default, a role gets a MailerPress capability when it has the matching WordPress capability (Based on column). The last column shows the result for the standard WordPress roles. Custom roles follow the same rule.

CapabilityAccess Control labelBased onDefault roles
mailerpress_manage_settingsManage settingsmanage_optionsAdministrator
mailerpress_use_aiUse AImanage_optionsAdministrator
mailerpress_manage_campaignsManage campaignsedit_postsAdministrator, Editor, Author, Contributor
mailerpress_edit_others_campaingsEdit othersโ€™ campaignsedit_others_postsAdministrator, Editor
mailerpress_publish_campaignsPublish campaignspublish_postsAdministrator, Editor, Author
mailerpress_delete_email_campaignsDelete campaignsdelete_postsAdministrator, Editor, Author, Contributor
mailerpress_manage_templatesManage templatesedit_themesAdministrator
mailerpress_manage_contactsManage contactsedit_others_postsAdministrator, Editor
mailerpress_delete_contactsDelete contactsmanage_optionsAdministrator
mailerpress_manage_listsManage listsmanage_categoriesAdministrator, Editor
mailerpress_delete_listsDelete listsmanage_categoriesAdministrator, Editor
mailerpress_manage_tagsManage tagsmanage_categoriesAdministrator, Editor
mailerpress_delete_tagsDelete tagsmanage_categoriesAdministrator, Editor
mailerpress_manage_segmentationManage segmentationedit_others_postsAdministrator, Editor
mailerpress_manage_automationsManage automationspublish_postsAdministrator, Editor, Author

Note the spelling of mailerpress_edit_others_campaings: it is the exact name stored in WordPress. In PHP, you can use the constants of the \MailerPress\Core\Capabilities class instead (for example Capabilities::EDIT_OTHERS_CAMPAIGNS or Capabilities::USE_AI).

What each capability opens in the admin

  • Dashboard: any MailerPress capability.
  • New Campaign and Campaigns: mailerpress_manage_campaigns.
  • Email Editor: mailerpress_manage_campaigns, mailerpress_manage_templates, mailerpress_manage_automations or mailerpress_manage_settings.
  • Audience: mailerpress_manage_contacts, mailerpress_manage_lists, mailerpress_manage_tags, mailerpress_manage_segmentation or mailerpress_manage_settings.
  • Templates: mailerpress_manage_templates.
  • Automations: mailerpress_manage_automations.
  • Integrations, Webhooks, Tools, Settings and License: mailerpress_manage_settings.
  • AI features (MailerPress Pro): mailerpress_use_ai. Generating automations with AI also requires mailerpress_manage_automations.

The Access Control tab itself requires the WordPress capabilities manage_options and promote_users, not a MailerPress capability.

When MailerPress assigns capabilities

MailerPress assigns its capabilities to all roles on activation and after each MailerPress update. Each time, it adds a capability to the roles that have the matching WordPress capability and removes it from the others.

So if you change MailerPress capabilities with a role editor plugin such as User Role Editor, the next MailerPress update can reset your changes. For durable changes, use one of the two methods below.

Change capabilities with Access Control (MailerPress Pro)

Go to MailerPress > Tools > Access Control, tick the permissions for each role and click Save settings. Your choices are reapplied after every update. Roles with manage_options always keep mailerpress_manage_settings. See Manage access to MailerPress features by WordPress role.

Change capabilities with code

Use the mailerpress_role_capability_enabled filter (a WordPress hook that lets your code change a value). MailerPress runs it for each role and capability when it assigns capabilities. Return true to grant the capability, false to remove it. This example gives Use AI to Editors:

add_filter( 'mailerpress_role_capability_enabled', function ( $enabled, $role_name, $capability, $base_capability ) {
    if ( 'editor' === $role_name && 'mailerpress_use_ai' === $capability ) {
        return true;
    }
    return $enabled;
}, 20, 4 );
  • Add the snippet to a custom plugin or a must-use plugin (a plugin WordPress always loads) so it is always active.
  • The filter only runs when capabilities are assigned. To apply it now, deactivate and reactivate MailerPress.
  • MailerPress Pro applies Access Control choices through the same filter at priority 10. With priority 20, your rule takes precedence.

Check a capability in your code

Use the standard WordPress function:

if ( current_user_can( 'mailerpress_manage_contacts' ) ) {
    // The current user can view, create and edit MailerPress contacts.
}