<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * WooCommerce Options
 */

$wp_customize->add_section(
			'magazinestyle_woo_settings',
			array(
				'title'       => __( 'Magazine Style WooSettings', 'magazine-style' ),
				'capability'  => 'edit_theme_options',					
				'panel'			=> 'woocommerce',
			));
		
$wp_customize->add_setting(
			'magazinestyle_woostyle',
			array(
				'default'           => 'enable',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'sanitize_text_field',
				'capability'        => 'edit_theme_options',
				'panel'			=> 'woocommerce',
			));
		$wp_customize->add_control(
			new WP_Customize_Control(
				$wp_customize,
				'magazinestyle_woostyle',
				array(
					'label'       => __( 'WooCoomerce Design Theme/Default Woo', 'magazine-style' ),
					'description' => __( 'Enable or disable Featured Image', 'magazine-style' ),
					'section'     => 'magazinestyle_woo_settings',
					'type'        => 'select',
					'choices'     => array(
						'enable' => __( 'Theme Style', 'magazine-style' ),
						'disable' => __( 'WooCommerce Style', 'magazine-style' ),
					),
					'priority'    => apply_filters( 'magazinestyle_bootstrap_version_priority', 10 ),
				)));			

				//Cart Icon
				$wp_customize->add_setting('magazinestyle_headercarticon',	
				array(
					'default'			=> true,
					'type'				=> 'theme_mod',
					'capability'		=> 'edit_theme_options',
					'sanitize_callback'	=> 'magazinestyle_customize_sanitize_checkbox'
				));
			$wp_customize->add_control('magazinestyle_headercarticon',
				array (                             
					'type'    => 'checkbox',
					'label' => __('Cart Icon','magazine-style'),
					'description'        => __( 'Display Cart Icon in Header', 'magazine-style' ),
					'settings'   => 'magazinestyle_headercarticon',
					'section' => 'magazinestyle_woo_settings',
					'priority'    => apply_filters( 'magazinestyle_headercarticon_priority', 45 ),
				));	

				//Cart Total
				$wp_customize->add_setting('magazinestyle_carttotal',	
				array(
					'default'			=> true,
					'type'				=> 'theme_mod',
					'capability'		=> 'edit_theme_options',
					'transport'   => 'postMessage',
					'sanitize_callback'	=> 'magazinestyle_customize_sanitize_checkbox'
				));
			$wp_customize->add_control('magazinestyle_carttotal',
				array (                             
					'type'    => 'checkbox',
					'label'       => __( 'Display Cart Total', 'magazine-style' ),
					'settings'   => 'magazinestyle_carttotal',
					'section' => 'magazinestyle_woo_settings',
					'priority'    => apply_filters( 'magazinestyle_carttotal_priority', 45 ),
				));	

				//My Account
				$wp_customize->add_setting('magazinestyle_wooaccount',	
				array(
					'default'			=> true,
					'type'				=> 'theme_mod',
					'capability'		=> 'edit_theme_options',
					'sanitize_callback'	=> 'magazinestyle_customize_sanitize_checkbox'
				));
			$wp_customize->add_control('magazinestyle_wooaccount',
				array (                             
					'type'    => 'checkbox',
					'label' => __('My Account Icon','magazine-style'),
					'description'        => __( 'Display My Account in Header', 'magazine-style' ),
					'settings'   => 'magazinestyle_wooaccount',
					'section' => 'magazinestyle_woo_settings',
					'priority'    => apply_filters( 'magazinestyle_wooaccount_priority', 45 ),
				));	