?AlkantarClanX12
| Current Path : /home/r/a/n/rankinh/lynkandco/wp-content/plugins/nexteuv-shop/modules/single/ |
| Current File : /home/r/a/n/rankinh/lynkandco/wp-content/plugins/nexteuv-shop/modules/single/index.php |
<?php
/**
* WooCommerce - Single Core Class
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if( !class_exists( 'NextEuv_Shop_Single' ) ) {
class NextEuv_Shop_Single {
private static $_instance = null;
private $settings;
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
function __construct() {
// Load WooCommerce Comments Template
add_filter( 'comments_template', array( $this, 'nexteuv_shop_comments_template' ), 20, 1 );
// Load Modules
$this->load_modules();
}
/**
* Override WooCommerce comments template file
*/
function nexteuv_shop_comments_template( $template ) {
if ( get_post_type() !== 'product' ) {
return $template;
}
$plugin_path = NEXTEUV_SHOP_PATH . 'templates/';
if ( file_exists( $plugin_path . 'single-product-reviews.php' ) ) {
return $plugin_path . 'single-product-reviews.php';
}
return $template;
}
/*
Load Modules
*/
function load_modules() {
// Customizer Widgets
include_once NEXTEUV_SHOP_PATH . 'modules/single/customizer/index.php';
// Metabox Widgets
include_once NEXTEUV_SHOP_PATH . 'modules/single/metabox/index.php';
}
}
}
if( !function_exists('nexteuv_shop_single') ) {
function nexteuv_shop_single() {
return NextEuv_Shop_Single::instance();
}
}
nexteuv_shop_single();