This is our list of filters and actions available in MailPoet for use by developers.
A Filter is a function that can be hooked to an event in WordPress (called hooks).
Need a developer to help you? We recommend those at Codeable (affiliate link).
Filters |
| mailpoet_api_newsletters_get_after |
| mailpoet_api_newsletters_save_before |
| mailpoet_cron_worker_sending_queue_batch_size |
| mailpoet_display_docsbot_widget |
|
mailpoet_sending_newsletter_render_after
This filter is replaced with mailpoet_sending_newsletter_render_after_pre_process starting from MailPoet 3.98.1 |
|
mailpoet_sending_newsletter_render_after_pre_process |
| mailpoet_mailer_smtp_connection_timeout |
|
mailpoet_mailer_smtp_transport_agent (this filter is replaced with mailpoet_mailer_smtp_option starting from MailPoet 3.89.3) Sets additional transport options; mostly to modify context options for ssl:// and tls:// transports http://php.net/manual/en/context.ssl.php This is an example of how to use this filter. |
|
wpmu_registration_enabled |
| mailpoet_mailer_smtp_host |
| mailpoet_mailer_smtp_port |
| mailpoet_mailer_smtp_encryption |
| mailpoet_mailer_smtp_username |
| mailpoet_mailer_smtp_password |
| mailpoet_mailer_smtp_options |
|
mailpoet_mailer_smtp_instance |
|
mailpoet_archive_no_newsletters |
| mailpoet_archive_title |
| mailpoet_archive_email_processed_date |
| mailpoet_archive_email_subject_line |
| mailpoet_rendering_post_process |
|
mailpoet_newsletter_shortcode_link
Creates custom link shortcode that’s rendered when newsletter is sent/previewed. |
|
mailpoet_newsletter_shortcode
Creates custom shortcode that’s rendered when newsletter is sent/previewed. |
|
mailpoet_conflict_resolver_whitelist_style
Prevents third-party plugin’s JS or CSS dependencies from being unloaded. |
|
mailpoet_form_widget_post_process
Sets rendered form body before output. Used to modify form parameters (e.g., setting form’s |
|
mailpoet_newsletter_post_excerpt_length
Sets custom post excerpt size. Used when fetching posts inside Editor (ALC or regular Post block) or during rendering. |
|
mailpoet_permission_access_plugin_admin
Sets permission to view MailPoet/Mailpoet → Help/MailPoet → Premium/MailPoet → Welcome/MailPoet → Update pages. |
|
mailpoet_permission_manage_settings
Sets permission to view MailPoet → Settings. |
|
mailpoet_permission_manage_emails
Sets permission to view MailPoet → Emails. |
|
mailpoet_permission_manage_subscribers
Sets permission to view MailPoet → Subscribers. |
|
mailpoet_permission_manage_forms
Sets permission to view MailPoet → Forms. |
|
mailpoet_permission_manage_segments
Sets permission to view MailPoet → Segments. |
|
mailpoet_permission_update_plugin
Sets permission to activate/deactivate plugin. |
|
mailpoet_cron_request_url
Overrides default URL used to access the plugin in the background |
mailpoet_cron_request_args Overrides default arguments used by https://codex.wordpress.org/Function_Reference/wp_remote_get |
| mailpoet_subscription_before_subscribe |
Action, which fires before a subscription is stored in the database. You can use this action to intercept the subscription being stored by throwing an UnexcpectedValueException. Example:
add_action(
'mailpoet_subscription_before_subscribe',
function($data, $segmentIds, $form) {
if ($form->id() !== 10 || !in_array(21, $segmentIds)) {
return;
}
if ($data['some_custom_field'] === 'wrong') {
throw new \MailPoet\UnexpectedValueException("You can not use 'wrong' in the some_custom_field.");
}
},
10,
3
);
mailpoet_subscription_limit_enabled
mailpoet_subscription_limit_window
Overrides throttling window (IP addresses memory span). Default: DAY_IN_SECONDS
mailpoet_subscription_limit_base
Overrides throttling base timeout (the first one that gets doubled every time). Default: MINUTE_IN_SECONDS
mailpoet_segments_with_subscriber_count
Add dynamic segments on newsletters and subscribers page.
mailpoet_get_subscribers_in_segment_finders
Enables hooking a finder which can find subscribers in a dynamic segment.
mailpoet_get_subscribers_listings_in_segment_handlers
Loads listings handlers for subscribers in a dynamic segment.
mailpoet_subscribers_listings_filters_segments
Loads dynamic segment for subscribers filter.
mailpoet_transient_cache_enabled
A boolean to enable the transient cache for MailPoet. Default is true.
mailpoet_bridge_api_request_timeout
Sets timeout for Bridge API HTTP requests. Useful on slow hosts where connection times out on large HTTP requests.
mailpoet_search_terms_args
Update search terms arguments. Useful for sites with a lot of tags to prioritise categories in search.
mailpoet_manage_subscription_page_form_fields
Customize form fields displayed on the Manage Subscription page. The argument is an array of fields and their properties.
mailpoet_manage_subscription_page
Customize the template of the Manage Subscription page. The argument is a rendered HTML code of the page to be displayed.
mailpoet_unsubscribe_confirmation_page
Change confirmation sentence. The URL to confirm unsubscribing is sent as a 2nd parameter to the filter.
mailpoet_display_custom_fonts
Disable Google Fonts to stop loading it.
mailpoet_display_form_supported_post_types
Add a custom post type where forms should be displayed.
mailpoet_display_form_in_product_listing
Set whether forms should be displayed on Shop page / product listings (default to `true`)
mailpoet_re_captcha_size
It can be either normal or compact (docs).
Actions |
| mailpoet_initialized |
| mailpoet_api_setup |
| mailpoet_setup_reset |
|
mailpoet_api_newsletters_duplicate_after |
| mailpoet_api_newsletters_save_after |
|
mailpoet_conflict_resolver_styles |
| mailpoet_conflict_resolver_scripts |
| mailpoet_conflict_resolver_router_url_query_parameters |
| mailpoet_subscriber_created |
|
mailpoet_subscriber_updated |
| mailpoet_subscriber_deleted |
| mailpoet_multiple_subscribers_created |
| mailpoet_multiple_subscribers_updated |
| mailpoet_multiple_subscribers_deleted |
MailPoet Premium
Filters |
| mailpoet_newsletters_listing_stats_before |
| mailpoet_newsletters_listings_standard_actions |
| mailpoet_newsletters_listings_welcome_notification_actions |
| mailpoet_newsletters_listings_notification_history_actions |
| mailpoet_newsletters_3rd_step_fields |
| mailpoet_newsletters_types |
| mailpoet_newsletters_listings_welcome_notification_actions |
| mailpoet_api_newsletters_save_before |
| mailpoet_api_newsletters_get_after |
| mailpoet_sending_newsletter_render_after |