Singular_Order_Page::template( string $name, array $context = array(), bool $echo = true )
ET Template class instance.
Contents
Parameters
- $name
-
(string) (Required) The name of the template to load.
- $context
-
(array) (Optional) The context to pass to the template.
Default value: array()
- $echo
-
(bool) (Optional) Whether to echo the template or return it.
Default value: true
Return
(string|void)
Source
File: src/Tickets/Commerce/Admin/Singular_Order_Page.php
public function template( $name, $context = [], $echo = true ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound
if ( ! $this->template ) {
$this->template = new Tribe__Template();
$this->template->set_template_origin( Tribe__Tickets__Main::instance() );
$this->template->set_template_folder( 'src/admin-views/commerce/orders/single' );
$this->template->set_template_context_extract( true );
$this->template->set_template_folder_lookup( true );
}
return $this->template->template( $name, $context, $echo );
}
Changelog
| Version | Description |
|---|---|
| 5.13.3 | Introduced. |