<?php

if (! defined('ABSPATH')) {
    exit;
} require_once PUFFERGO_PLUGIN_DIR . '/templates/data/class-puffergo-related-products.php';
require PUFFERGO_PLUGIN_DIR . '/templates/data/class-puffergo-product-data.php';
$data = PufferGo_Product_Data::from_current_post();
wp_enqueue_script('puffergo-product-gallery');
$variant_id = PufferGo_Template_Loader::get_active_content_template('product-single');
$template_file = PufferGo_Template_Loader::get_content_template_file('product-single', $variant_id);
PufferGo_Template_Loader::render_layout_header();

if ($template_file) {
    require $template_file;
} else {
    echo '<main class="puffergo-fullpage-layout puffergo-content-wrapper"><p>' . esc_html__('Template not found.', 'puffergo') . '</p></main>';
} PufferGo_Template_Loader::render_layout_footer();
