Your cart is empty!
Check Employee Visibility
apply_filters( 'vikappointments_check_employee_visibility', bool $show, object $employee )
Fires while checking whether an employee is visible or not.
Description
This hook can be used to apply additional conditions while checking whether the specified employee is listable or not.
When this hook is triggered, the system already validated the standard conditions and the employee is going to be listed into the website.
Parameters
- $show
-
(bool) False to hide the employee.
- $employee
-
(object) The employee to check.
Example
/**
* This hook can be used to apply additional conditions while checking whether
* the specified employee is listable or not. When this hook is triggered, the
* system already validated the standard conditions and the employee is going
* to be listed into the website.
*
* @param boolean $show False to hide the employee.
* @param object $employee The employee to check.
*/
add_filter('vikappointments_check_employee_visibility', function($show, $employee)
{
/**
* @todo apply some custom validations
*/
return $show;
}, 10, 2);
Changelog
Version | Description |
---|---|
1.2 | Introduced. |
Last Update: 2021-08-12
Helpful?