Skip to content Skip to sidebar
availability:

WPML Version: 4.9.3

description:

Use this filter to control whether WPML sends its notification emails. If needed, you can also target specific email types and prevent only those from being sent.

type:
filter
category:
Miscellaneous
parameters:

$enabled
(bool) (Required) Whether WPML should send the email. Default true.

$args
(array) (Required) Data about the email being sent.

  • $to (string) The email recipient.
  • $subject (string) The email subject line.
  • $message (string) The email body content.
  • $headers (string|array) The email headers.
  • $attachments (array) Any file attachments.
  • $group (string) An identifier for the type of email. WPML uses the following built-in groups:
    • ate-request-activation – Sent when a user requests activation of the Automatic Translation Engine.
    • jobs-summary-report – A summary report of pending or completed translation jobs.
    • overdue-jobs-report – A report listing translation jobs that have passed their deadline.
    • batch-report – A report on the status of a translation batch.
    • translation-manager-instructions – Instructions sent by a Translation Manager to translators.
hook example usage:

Add the code to your theme’s functions.php file or a custom plugin.

Example 1: Disable all emails sent by WPML

add_filter( 'wpml_mail_enabled', '__return_false' );

Example 2: Disable emails from a specific group

add_filter( 'wpml_mail_enabled', function($args) {
  return $args['group'] !== 'jobs-summary-report';
} );