English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Site Pages  >  Service Details  >  Build Employees Data

apply_filters( 'vikappointments_build_service_search_employees_data', bool $status, array &$employees, object $servicearray $options )

Fires before assigning the employees list to the service.


Description

Trigger hook to manipulate at runtime the response of the query used to load the available employees for the service to display, under the Service Details page.

Third party plugins can alter the details of the loaded employees.


Parameters

$status

(bool)  True on success, false otherwise.

&$employees

(array)  The list holding the available employees.

$service

(object)  The object holding the service details.

$options

(array)  An array of options.


Example

/**
 * Trigger hook to manipulate the query response at runtime. Third party
 * plugins can include further details into the service object.
 *
 * @param  bool    $status      True on success, false otherwise.
 * @param  array   &$employees  A list of fetched employees.
 * @param  object  $service     An object holding the service details.
 * @param  array   $options     An array of options.
 *
 * @return  void
 */
add_filter('vikappointments_build_service_search_employees_data', function($status, &$employees, $service, $model)
{
    /**
     * @todo do stuff here
     */

    return true;
}, 10, 4);

Changelog

Version Description
1.2.12 Introduced.
Last Update: 2024-05-14
Helpful?

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.