| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin template manager class. |
| 4 |
* |
| 5 |
* @since 1.6.0 |
| 6 |
* |
| 7 |
* @package woo-additional-terms |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace Woo_Additional_Terms; |
| 11 |
|
| 12 |
/** |
| 13 |
* Class TemplateManager. |
| 14 |
*/ |
| 15 |
class TemplateManager { |
| 16 |
|
| 17 |
/** |
| 18 |
* Render the template. |
| 19 |
* |
| 20 |
* @since 1.6.0 |
| 21 |
* |
| 22 |
* @param string $template_name The template name. |
| 23 |
* @param array $args The template arguments. |
| 24 |
* |
| 25 |
* @return void |
| 26 |
*/ |
| 27 |
public function echo_template( $template_name, $args = array() ) { |
| 28 |
|
| 29 |
// Supports internal WooCommerce caching. |
| 30 |
wc_get_template( |
| 31 |
$template_name, |
| 32 |
$args, |
| 33 |
'', |
| 34 |
trailingslashit( woo_additional_terms()->service( 'file' )->plugin_path( 'templates' ) ) |
| 35 |
); |
| 36 |
} |
| 37 |
} |
| 38 |
|