Limited time discount Book Smarter This Christmas
Up to 50%Off

How can I use WordPress hooks for notifications in Amelia

Amelia provides a wide range of hooks related to notifications, allowing you to modify notification data, control delivery timing, customize email and SMS content, and run custom actions when notifications are created, updated, sent, or deleted. These hooks help you extend Amelia safely without adjusting core plugin files.

Info Note

Hooks require programming knowledge, and support is limited to general guidance.

Notification added

How do I modify notification data before it is added?

amelia_before_notification_added_filter

Type: filter

Use this filter to modify notification data before it is added.

				
					function example($notification)
{
    return $notification;
}

add_filter('amelia_before_notification_added_filter', 'example', 10, 1);
				
			

How do I run code before a notification is added?

amelia_before_notification_added

Type: action

Runs before a notification is added.

				
					function example($notification)
{
    // do action
}

add_action('amelia_before_notification_added', 'example', 10, 1);
				
			

How do I run code after a notification is added?

amelia_after_notification_added

Type: action

Runs after a notification is added.

				
					function example($notification)
{
    // do action
}

add_action('amelia_after_notification_added', 'example', 10, 1);
				
			

Notification updated

How do I modify notification data before it is updated?

amelia_before_notification_updated_filter

Type: filter

Use this filter to modify notification data before it is updated.

				
					function example($notification)
{
    // change notification data
    return $notification;
}

add_filter('amelia_before_notification_updated_filter', 'example', 10, 1);
				
			

How do I run code before a notification is updated?

amelia_before_notification_updated

Type: action

Runs before a notification is updated.

				
					function example($notification)
{
    // do action
}

add_action('amelia_before_notification_updated', 'example', 10, 1);
				
			

How do I run code after a notification is updated?

amelia_after_notification_updated

Type: action

Runs after a notification is updated.

				
					function example($notification)
{
    // do action
}

add_action('amelia_after_notification_updated', 'example', 10, 1);
				
			

Notification status updated

How do I run code before a notification status is updated?

amelia_before_notification_status_updated

Type: action

Runs before a notification status is updated.

				
					function example($status, $notificationId)
{
    // do action
}

add_action('amelia_before_notification_status_updated', 'example', 10, 2);
				
			

How do I run code after a notification status is updated?

amelia_after_notification_status_updated

Type: action

Runs after a notification status is updated.

				
					function example($status, $notificationId)
{
    // do action
}

add_action('amelia_after_notification_status_updated', 'example', 10, 2);
				
			

Get notifications

How do I modify notifications before they are retrieved?

amelia_get_notifications_filter

Type: filter

Use this filter to modify notifications before they are retrieved for the back end.

				
					function example($notifications)
{
    return $notifications;
}

add_filter('amelia_get_notifications_filter', 'example', 10, 1);
				
			

How do I run code before notifications are retrieved?

amelia_get_notifications

Type: action

Runs before notifications are retrieved for the back end.

				
					function example($notifications)
{
    // do action
}

add_action('amelia_get_notifications', 'example', 10, 1);
				
			

Get SMS history

How do I modify SMS history data before it is retrieved?

amelia_get_sms_history_filter

Type: filter

Use this filter to modify SMS history data before it is retrieved for the back end.

				
					function example($notifications)
{
    return $notifications;
}

add_filter('amelia_get_sms_history_filter', 'example', 10, 1);
				
			

How do I run code before SMS history is retrieved?

amelia_get_sms_history

Type: action

Runs before SMS history is retrieved for the back end.

				
					function example($notifications)
{
    // do action
}

add_action('amelia_get_sms_history', 'example', 10, 1);
				
			

Send SMS request

How do I modify data before an SMS request is executed?

amelia_before_send_sms_request_filter

Type: filter

Use this filter to modify data before an SMS request is executed.

				
					function example($data, $action)
{
    return $data;
}

add_filter('amelia_before_send_sms_request_filter', 'example', 10, 2);
				
			

How do I run code before an SMS request is executed?

amelia_before_send_sms_request

Type: action

Runs before an SMS request is executed.

				
					function example($data, $action)
{
    // do action
}

add_action('amelia_before_send_sms_request', 'example', 10, 2);
				
			

How do I run code after an SMS request is executed?

amelia_after_send_sms_request

Type: action

Runs after an SMS request is executed.

				
					function example($data, $action)
{
    // do action
}

add_action('amelia_after_send_sms_request', 'example', 10, 2);
				
			

Scheduled notifications sent

How do I run code before scheduled notifications are sent?

amelia_before_send_scheduled_notifications

Type: action

Runs before scheduled notifications are sent.

				
					function example()
{
    // do action
}

add_action('amelia_before_send_scheduled_notifications', 'example', 10, 0);
				
			

How do I run code after scheduled notifications are sent?

amelia_after_send_scheduled_notifications

Type: action

Runs after scheduled notifications are sent.

				
					function example()
{
    // do action
}

add_action('amelia_after_send_scheduled_notifications', 'example', 10, 0);
				
			

Change scheduled notification time

How do I modify the notification time after an appointment?

amelia_modify_scheduled_notification_time_after

Type: filter

Use this filter to modify the notification time after an appointment.

				
					function example($timeAfter, $notification)
{
    return $timeAfter;
}

add_filter('amelia_modify_scheduled_notification_time_after', 'example', 10, 2);
				
			

How do I modify the last notification send time?

amelia_modify_scheduled_notification_last_time

Type: filter

Use this filter to modify the last time a notification is sent.

				
					function example($lastTime, $notification)
{
    return $lastTime;
}

add_filter('amelia_modify_scheduled_notification_last_time', 'example', 10, 2);
				
			

How do I modify the notification time before an appointment?

amelia_modify_scheduled_notification_time_before

Type: filter

Use this filter to modify the notification time before an appointment.

				
					function example($timeBefore, $notification)
{
    return $timeBefore;
}

add_filter('amelia_modify_scheduled_notification_time_before', 'example', 10, 2);
				
			

Change notification data

How do I modify email data before it is sent?

amelia_manipulate_email_data

Type: filter

Use this filter to modify email data before it is sent.

				
					function example($data)
{
    $data['skipSending'] = true;
    return $data;
}

add_filter('amelia_manipulate_email_data', 'example', 10, 1);
				
			

How do I modify test email data?

amelia_manipulate_test_email_data

Type: filter

Use this filter to modify test email data.

				
					function example($data)
{
    return $data;
}

add_filter('amelia_manipulate_test_email_data', 'example', 10, 1);
				
			

How do I modify SMS data before it is sent?

amelia_manipulate_sms_data

Type: filter

Use this filter to modify SMS data before it is sent.

				
					function example($data)
{
    $data['skipSending'] = true;
    return $data;
}

add_filter('amelia_manipulate_sms_data', 'example', 10, 1);
				
			

Dynamic notification placeholders

How do I add a custom dynamic placeholder?

amelia_dynamic_placeholder_{nameOfPlaceholder}

Type: filter

Use this filter to add a custom placeholder that can be used in notification templates.

				
					function example($data)
{
    return 'service custom name';
}

add_filter('amelia_dynamic_placeholder_serviceCustomName', 'example', 10, 1);
				
			

Notification deleted

How do I run code before a notification is deleted?

amelia_before_notification_deleted

Type: action

Runs before a notification is deleted.

				
					function example($notification)
{
    // do action
}

add_action('amelia_before_notification_deleted', 'example', 10, 1);
				
			

How do I run code after a notification is deleted?

amelia_after_notification_deleted

Type: action

Runs after a notification is deleted.

				
					function example($notification)
{
    // do action
}

add_action('amelia_after_notification_deleted', 'example', 10, 1);