Italian (Italy)
Knowledge Base  >  Vik Appointments  >  Hook  >  Tasse  >  Before Query

apply_filters_ref_array( 'vikappointments_before_query_tax', bool $status, mixed &$query )

Fires while building the query used to fetch the tax details.


Description

Trigger hook to allow external plugins to manipulate the query used to load the tax details.

TIP: any column with an alias that starts with rule_ will be automatically injected within the VAPTaxRule instance.


Parameters

$status

(bool)  True on success, false on failure.

&$query

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


Example

/**
 * Trigger hook to allow external plugins to manipulate the query used
 * to load the tax details.
 *
 * @param  boolean  $status   True on success, false on failure.
 * @param  mixed    &$query   The query string or a query builder object.
 */
add_filter('vikappointments_before_query_tax', function($status, &$query)
{
    /**
     * @todo it is possible to manipulate here the query
     */

    return $status;
}, 10, 2);

Changelog

Version Description
1.2 Introduced.
Ultimo aggiornamento: 2021-08-18
Utile?
Potrebbe interessarti: