Your cart is empty!
Build Employees Data
apply_filters( 'vikappointments_build_service_search_employees_data', bool $status, array &$employees, object $service, array $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?