Italian (Italy)

apply_filters_ref_array( 'vikappointments_build_service_search_employees_query', bool $status, mixed &$queryobject $servicearray $options )

Fires while loading the employees assigned to the service to display.


Description

Trigger hook to manipulate at runtime the query used to load the employees available for the service to display under the Service Details page in the front-end.

Third party plugins can extend the query by applying further conditions or selecting additional data.


Parameters

$status

(bool)  True on success, false otherwise.

&$query

(mixed)  Either a query builder object or a plain string.

$service

(object)  The object holding the details of the service to display.

$options

(array)  An array of options.

  • id_service - the ID of the service to load;
  • id_employee - the ID of the employee assigned to the specified service.

Example

The example below always excludes the employee with ID #5.

/**
 * Trigger hook to manipulate the query at runtime. Third party plugins
 * can extend the query by applying further conditions or selecting
 * additional data.
 *
 * @param  bool    $status   True on success, false otherwise.
 * @param  mixed   &$query   Either a query builder or a query string.
 * @param  object  $service  The service details.
 * @param  array   $options  An array of options.
 */
add_filter('vikappointments_build_service_search_employees_query', function($status, &$query, $service, $options)
{
    $query->where("`e`.`id` <> 5");

    return true;
}, 10, 4);

Changelog

Version Description
1.2.12 Introduced.
Ultimo aggiornamento: 2024-05-14
Utile?
Potrebbe interessarti:

Questo sito web utilizza i cookie

Questo sito web utilizza cookie e tecnologie simili. Alcune di queste tecnologie sono necessarie per il corretto funzionamento del sito web (essenziali). Altre tecnologie sono utilizzate per valutare il comportamento degli utenti (analisi), per integrare media esterni o per scopi pubblicitari. Se l'utente accetta, queste tecnologie vengono attivate. I dettagli sono riportati nella Privacy Policy. Da questa stessa pagina è inoltre possibile aggiornare/revocare il consenso. Se non si fornisce il consenso, verranno attivati solo i cookie con funzioni essenziali.

Sul nostro sito web utilizziamo tecnologie provenienti dagli Stati Uniti. Pertanto, se acconsentite, acconsentite anche al trasferimento dei vostri dati negli Stati Uniti. Desideriamo sottolineare che gli Stati Uniti non hanno un livello di protezione dei dati paragonabile a quello dell'Unione Europea e che qualsiasi azienda statunitense può essere obbligata dalle autorità statali a consegnare i vostri dati senza che voi abbiate alcuno strumento efficace di protezione legale contro questo.