<?php
/**
 * Author: Rymera Web Co
 *
 * @package SAAI\Traits
 */

namespace SAAI\Traits;

/**
 * Trait Template_Loader
 *
 * This trait handles the loading of template files.
 *
 * @since 1.0.1
 */
trait Template_Loader {

    /**
     * Load templates in an overridable manner.
     *
     * @since 1.0.1
     * @access public
     *
     * @param string $template Template path.
     * @param array  $args     Options to pass to the template.
     * @param string $path     Default template path.
     */
    public function load_template( $template, $args = array(), $path = '' ) {
        $path = $path ? $path : SAAI_TEMPLATES_DIR;
        wc_get_template( $template, $args, '', $path );
    }
}
