English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Site Pages  >  Packages Order  >  Display Package Summary

apply_filters( 'vikappointments_display_order_package_summary', string $htmlobject $item, object $order )

Fires while displaying the details of a purchased package.


Description

Trigger hook to let the plugins add custom HTML contents within the block of a purchased package. This procedure repeats up to the number of purchased items.

The following image indicates where the resulting HTML can be appended.


Parameters

$html

(string)  The HTML to include.

$item

(object)  The object holding the package details.

$order

(VAPOrderPackage)  The instance holding the order details.


Example

/**
 * Trigger event to let the plugins add custom HTML contents within the block of the purchased package.
 *
 * @param  string  $html   The HTML string to include within the document.
 * @param  object  $item   The package details.
 * @param  object  $order  The purchased order.
 */
add_filter('vikappointments_display_order_package_summary', function($html, $item, $order)
{
    // append custom HTML after the package details
    $html .= '<code>HTML CODE WILL BE ADDED HERE</code>';   

    return $html;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-07-30
Helpful?