<?php

if(!class_exists('Intense_Post_Type_Product')) {
	class Intense_Post_Type_Product extends Intense_Post_Type {
		function __construct() {
			$this->type = 'product';
			$this->title = 'Enter Title';
			$this->singular = __( 'WooCommerce Product', 'intense' );
			$this->plural = __( 'WooCommerce Products', 'intense' );
			$this->category_taxonomy_key = '';
			$this->taxonomies = '';
			$this->fields = array(
				array (
					'key' => 'field_47f6d5ah8n49035',
					'label' => __( 'Subtitle', "intense" ),
					'name' => 'intense_product_subtitle',
					'type' => 'text',
					'default_value' => '',
					'placeholder' => '',
					'prepend' => '',
					'append' => '',
					'formatting' => 'html',
					'maxlength' => '',
				),
				array (
					'key' => 'field_7u890ky0h615a5905',
					'label' => __( 'Single Product Template', "intense" ),
					'name' => 'intense_product_single_template',
					'type' => 'select',
					'choices' => array_merge(
						array( '' => '' ),
						intense_locate_available_plugin_templates('/custom-post/product/single/'),
						intense_locate_single_cpt_templates( 'wooproduct', true )
					),
					'default_value' => '',
					'allow_null' => 0,
					'multiple' => 0,
				),
			);		
		}

		public function register() {
			
		}

		public function get_subtitle() {
			return get_field('intense_product_subtitle');
		}
	}
}