Christmas shapes Christmas shapes
Santa's best deal Get up to 60  off! Get up to 60  off!
Grab the deal

Amelia WP Hooks for Google Calendar

Please note that using hooks requires a certain level of programming skills and included support refers only to advice.

Get authentication URL

amelia_get_google_calendar_auth_url_filter

Users can use this filter to change the authentication URL for an employee connecting to their google calendar

Type: filter

Example:

function example($authUrl, $employeeId)
{
    return $authUrl;
}

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

amelia_get_google_calendar_auth_url

Users can use this hook to do an action before the authentication URL for an employee connecting to their google calendar is returned

Type: action

Example:

function example($authUrl, $employeeId)
{
    // do action
}

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

Google calendar added

amelia_before_google_calendar_added_filter

Users can change the google calendar object before it is saved in the database (after successful authentication)

Type: filter

Example:

function example($accessToken, $employeeId)
{
    return $accessToken;
}

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

amelia_before_google_calendar_added

User can use this hook to do an action before the google calendar is saved in the database (after successful authentication)

Type: action

Example:

function example($googleCalendar, $employeeId)
{
    // do action
}

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

amelia_after_google_calendar_added

Users can use this hook to do an action after the google calendar is saved in the database (after successful authentication)

Type: action

Example:

function example($googleCalendar, $employeeId)
{
    // do action
}

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

Google calendar deleted

amelia_before_google_calendar_deleted

Users can use this hook to do an action before the google calendar is deleted from the database (when employee disconnects from account)

Type: action

Example:

function example($googleCalendar, $employeeId)
{
    // do action
}

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

amelia_after_google_calendar_deleted

Users can use this hook to do an action after the google calendar is deleted from the database (when employee disconnects from account)

Type: action

Example:

function example($googleCalendar, $employeeId)
{
    // do action
}

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

Event added

amelia_before_google_calendar_event_added_filter

Users can change the data of an event before it is inserted to the google calendar

Type: filter

Example:

function example($event, $appointment, $provider)
{
    return $event;
}

add_filter('amelia_before_google_calendar_event_added_filter', 'example', 10, 3);

amelia_before_google_calendar_event_added

Users can use this hook to do an action before an event is inserted to the google calendar

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_before_google_calendar_event_added', 'example', 10, 3);

amelia_after_google_calendar_event_added

Users can use this hook to do an action after an event is inserted to the google calendar

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_after_google_calendar_event_added', 'example', 10, 3);

Event updated

amelia_before_google_calendar_event_updated_filter

Users can change the data of an event before it is updated to the google calendar

Type: filter

Example:

function example($event, $appointment, $provider)
{
    return $event;
}

add_filter('amelia_before_google_calendar_event_updated_filter', 'example', 10, 3);

amelia_before_google_calendar_event_updated

Users can use this hook to do an action before an event is updated to the google calendar

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_before_google_calendar_event_updated', 'example', 10, 3);

amelia_after_google_calendar_event_updated

Users can use this hook to do an action after an event is updated to the google calendar

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_after_google_calendar_event_updated', 'example', 10, 3);

Event patched

amelia_before_google_calendar_event_patched_filter

Users can change the data of an event before it is patched to the google calendar (booking added or canceled)

Type: filter

Example:

function example($event, $appointment, $provider)
{
    return $event;
}

add_filter('amelia_before_google_calendar_event_patched_filter', 'example', 10, 3);

amelia_before_google_calendar_event_patched

Users can use this hook to do an action before an event is patched to the google calendar (booking added or canceled)

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_before_google_calendar_event_patched', 'example', 10, 3);

amelia_after_google_calendar_event_patched

Users can use this hook to do an action after an event is patched to the google calendar (booking added or canceled)

Type: action

Example:

function example($event, $appointment, $provider)
{
    // do action
}

add_action('amelia_after_google_calendar_event_patched', 'example', 10, 3);

Event deleted

amelia_before_google_calendar_event_deleted

Users can use this hook to do an action before an event is deleted from the google calendar

Type: action

Example:

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

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

amelia_after_google_calendar_event_deleted

Users can use this hook to do an action after an event is deleted from the google calendar

Type: action

Example:

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

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