English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Packages  >  Translate Order Details

apply_filters( 'vikappointments_translate_packages_order_details', bool $status, mixed $order, string $langtag )

Fires while translating the object holding the packages order details.


Description

External plugins can use this event to apply the translations to additional details manually included within the order object.


Parameters

$status

(bool)  True on success, false on failure.

$order

(mixed)  The order details object.

$langtag

(string)  The requested language tag.


Example

/**
 * External plugins can use this event to apply the translations to
 * additional details manually included within the order object.
 *
 * @param  boolean  $status   True on success, false on failure.
 * @param  mixed    $order    The order details object.
 * @param  string   $langtag  The requested language tag.
 */
add_filter('vikappointments_translate_packages_order_details', function($status, $order, $langtag)
{
    /**
     * @todo it is possible to translate here the order object
     */

    return $status;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-08-21
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information