Italian (Italy)
Knowledge Base  >  Vik Appointments  >  Hook  >  Servizio  >  Check Service Visibility

apply_filters( 'vikappointments_check_service_visibility', bool $show, object $service, string $date )

Fires while checking whether a service is published or not.


Description 

This hook can be used to apply additional conditions while checking whether the specified service is published or not.

When this hook is triggered, the system already validated the standard conditions and the service is going to be used by the website.


Parameters

$show

(bool)  False to hide the service.

$service

(object)  The service to check. 

$date

(string)  The UTC check-in date in military format (Y-m-d H:i:s).


Example

/**
 * This hook can be used to apply additional conditions while checking whether
 * the specified service is published or not. When this hook is triggered, the
 * system already validated the standard conditions and the service is going
 * to be used by the website.
 *
 * @param  boolean  $show     False to hide the service.
 * @param  object   $service  The service to check.
 * @param  string   $date     The check-in date (UTC).
 */
add_filter('vikappointments_check_service_visibility', function($show, $service, $date)
{
    /**
     * @todo apply some custom validations
     */

    return $show;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Ultimo aggiornamento: 2025-02-11
Utile?

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.