Italian (Italy)
Knowledge Base  >  Vik Appointments  >  Hook  >  Pagine del Sito  >  Ordine  >  Mostrare i Dettagli

apply_filters( 'vikappointments_display_order_details', string $html, string $locationobject $order )

Fires while displaying the details of the order.


Description

Trigger event to let the plugins add custom HTML contents within the order details box. This hook fires several times, once for each supported location.

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


Parameters

$html

(string)  The HTML to include.

$location

(string)  The position in which the HTML code will be placed.

  • before - before the order box;
  • top - at the beginning of the order box;
  • actions - within the actions toolbar;
  • order - after the order details (below the status);
  • payment - after the payment details (below the total cost);
  • fields - at the end of the custom fields box;
  • bottom - at the end of the order box;
  • after - after the order box.
$order

(VAPOrderAppointment)  The instance holding the order details.


Example

/**
 * Trigger hook to let the plugins add custom HTML contents within the order details box.
 *
 * @param  string  $html      The HTML string to include within the document.
 * @param  string  $location  The HTML will be always placed after the specified location.
 * @param  object  $order     The purchased order.
 */
add_filter('vikappointments_display_order_details', function($html, $location, $order)
{
    if ($location == 'order')
    {
        // append custom HTML after the order status
        $html .= '<code>HTML CODE WILL BE ADDED HERE</code>';   
    }

    return $html;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Ultimo aggiornamento: 2021-07-30
Utile?

Questo sito web utilizza i cookie

Questo sito web utilizza cookie e tecnologie simili. Alcune di queste tecnologie sono necessarie per il corretto funzionamento del sito web (essenziali). Altre tecnologie sono utilizzate per valutare il comportamento degli utenti (analisi), per integrare media esterni o per scopi pubblicitari. Se l'utente accetta, queste tecnologie vengono attivate. I dettagli sono riportati nella Privacy Policy. Da questa stessa pagina è inoltre possibile aggiornare/revocare il consenso. Se non si fornisce il consenso, verranno attivati solo i cookie con funzioni essenziali.

Sul nostro sito web utilizziamo tecnologie provenienti dagli Stati Uniti. Pertanto, se acconsentite, acconsentite anche al trasferimento dei vostri dati negli Stati Uniti. Desideriamo sottolineare che gli Stati Uniti non hanno un livello di protezione dei dati paragonabile a quello dell'Unione Europea e che qualsiasi azienda statunitense può essere obbligata dalle autorità statali a consegnare i vostri dati senza che voi abbiate alcuno strumento efficace di protezione legale contro questo.