Back to Developer Guides

This guide applies to:

  • Basic Edition
  • Plus Edition
  • Pro Edition
  • Business Edition

Description

WordPress filter that enables the manipulation of the arguments passed to wp_mail function before sending an email notification.

The email notification functionality is further explained in our guide on Email Notifications.

Placement

This code should be placed in the file of your custom plugin.

Source Code

This filter is located in the SSA_Notifications::ssa_wp_mail() function in includes\class-notifications.php.


Usage for ssa/email/args

add_filter('ssa/email/args', 'my_function_name', 10, 1);

Parameters

  • $args array
    The data that will be passed to wp_mail function as well as set_ssa_from_name function, this array has the following key value pairs:
    • ‘to’ => $to,
    • ‘subject’ => $subject,
    • ‘message’ => $message,
    • ‘headers’ => $headers,
    • ‘attachments’ => $attachments,
    • ‘from_email’ => $from_email,
    • ‘from_name’ => $from_name,

Example – Custom Email Notification

add_filter('ssa/email/args', 'custom_email_notification', 10, 1);

function custom_email_notification( $args )
{
    $args['subject'] = 'My New Subject';
    return $args;
}

Still stuck?

File a support ticket with our five-star support team to get more help.

File a ticket

  • Please provide any information that will be helpful in helping you get your issue fixed. What have you tried already? What results did you expect? What did you get instead?
  • This field is for validation purposes and should be left unchanged.


Related Guides