In this document:
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;
}
Related Guides
-
Developer Settings
-
New Booking App
-
ssa/appointments/customer_information/get_defaults Filter
-
ssa/templates/get_template_vars Filter