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

How can I use WordPress hooks for timeslots in Amelia

Amelia provides several hooks related to timeslots, allowing you to modify the data used to calculate timeslots or run custom actions before and after timeslots are generated. 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.

Get timeslots

How do I modify properties before timeslots are retrieved?

amelia_before_get_timeslots_filter

Type: filter

Use this filter to modify the properties used to retrieve timeslots.

				
					function example($props)
{
    // change properties
    return $props;
}

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

How do I run code before timeslots are calculated?

amelia_before_get_timeslots

Type: action

Runs before timeslots are calculated.

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

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

How do I modify retrieved timeslots?

amelia_get_timeslots_filter

Type: filter

Use this filter to modify timeslots after they are calculated.

				
					function example($resultData, $props)
{
    // change data
    return $resultData;
}

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

How do I run code after timeslots are calculated?

amelia_get_timeslots

Type: action

Runs after timeslots are calculated.

				
					function example($resultData, $props)
{
    // do action
}

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