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

How can I use WordPress hooks for employees in Amelia

Amelia provides several hooks related to employees, allowing you to modify employee data or run custom actions when employees are added, updated, retrieved, or managed. 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.

Employee added

How do I modify employee data before it is added?

amelia_before_provider_added_filter

Type: filter

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

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

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

How do I run code before an employee is added?

amelia_before_provider_added

Type: action

Runs before an employee is added.

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

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

How do I run code after an employee is added?

amelia_after_provider_added

Type: action

Runs after an employee is added.

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

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

Employee updated

How do I modify employee data before it is updated?

amelia_before_provider_updated_filter

Type: filter

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

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

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

How do I run code before an employee is updated?

amelia_before_provider_updated

Type: action

Runs before an employee is updated.

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

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

How do I run code after an employee is updated?

amelia_after_provider_updated

Type: action

Runs after an employee is updated.

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

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

Get employees

How do I modify employees before they are retrieved?

amelia_get_providers_filter

Type: filter

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

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

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

How do I run code before employees are retrieved?

amelia_get_providers

Type: action

Runs before employees are retrieved for the back end.

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

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

Get employee

How do I modify an employee before it is retrieved?

amelia_get_provider_filter

Type: filter

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

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

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

How do I run code before an employee is retrieved?

amelia_get_provider

Type: action

Runs before an employee is retrieved for the back end.

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

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