English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Subscriptions  >  Customers  >  Load Order Details

apply_filters_ref_array( 'vikappointments_load_customer_subscription_order_details', bool $status, mixed &$query, int $id, mixed $langtag, array $options )

Fires while building the query used to fetch the details of a subscription purchased by a customer.


Description

External plugins can attach to this hook in order to manipulate the query at runtime, in example to alter the default ordering.


Parameters

$status

(bool)  True on success, false on failure.

&$query

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

$id

(int)  The ID of the order.

$langtag

(string|null)  The language tag. If null, the default one will be used.

$options

(array)  An array of options to be passed to the order instance.


Example

/**
 * External plugins can attach to this hook in order to manipulate
 * the query at runtime, in example to alter the default ordering.
 *
 * @param  boolean  $status   True on success, false on failure.
 * @param  mixed    &$query   The query string or a query builder object.
 * @param  integer  $id       The ID of the order.
 * @param  mixed    $langtag  The language tag. If null, the default one will be used.
 * @param  array    $options  An array of options to be passed to the order instance.
 */
add_filter('vikappointments_load_customer_subscription_order_details', function($status, &$query, $id, $langtag, $options)
{
    /**
     * @todo it is possible to manipulate here the query
     */

    return $status;
}, 10, 5);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-08-23
Helpful?

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.