File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
/home/pabloaso/public_html/wp-content/plugins/woocommerce-mercadopago/src/Helpers/Template.php
<?php

namespace MercadoPago\Woocommerce\Helpers;

if (!defined('ABSPATH')) {
    exit;
}

class Template
{
    /**
     * Output $template on response
     */
    public static function render(string $template, array $args = []): void
    {
        wc_get_template(static::templateName($template), $args, null, Paths::templatesPath());
    }

    /**
     * Get $template html
     */
    public static function html(string $template, array $args = []): string
    {
        return wc_get_template_html(static::templateName($template), $args, null, Paths::templatesPath());
    }

    private static function templateName(string $template): string
    {
        return Paths::addExtension("/$template", 'php');
    }
}