403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.150
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/yeslicense.org/wp-content/plugins/yaymail/src/Utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/yeslicense.org/wp-content/plugins/yaymail/src/Utils/TemplateRenderer.php
<?php

namespace YayMail\Utils;

use YayMail\Models\TemplateModel;
use YayMail\Shortcodes\ShortcodesExecutor;
use YayMail\Models\SettingModel;
use YayMail\YayMailTemplate;


defined( 'ABSPATH' ) || exit;

/**
 * TemplateRenderer Classes
 * Define all utility functions to be used for rendering templates
 */
class TemplateRenderer {

    public $template = null;

    public function __construct( $template ) {
        if ( $template instanceof YayMailTemplate ) {
            $this->template = $template;
        }
    }

    public function generate_content( $render_data ) {
        if ( empty( $this->template ) ) {
            return '';
        }

        // Handle the cases when order is numeric (order_id)
        if ( isset( $render_data['order'] ) && is_numeric( $render_data['order'] ) ) {
            $order = wc_get_order( $render_data['order'] );
            if ( $order ) {
                $render_data['order'] = $order;
            }
        }

        // TODO: Need to generate render_data based on email type
        $args = [
            'template'    => $this->template,
            'render_data' => $render_data,
            'settings'    => yaymail_settings(),
        ];

        return yaymail_get_content( 'templates/emails/email-content.php', $args );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit