<?php
/*
    woocommerce customizer extension
*/
if( ! defined( 'ABSPATH' ) ) exit;

new woo_customizer();
class woo_customizer {
    
    public $links = array();

    /* 
        Constructor 
    */
    function __construct() {
        add_action( 'customize_register', array($this, 'add_customizer_settings'), 98 );
        add_action( 'get_header', array($this, 'add_process_defaults') );
		add_action( 'customize_controls_init', array( $this, 'add_scripts' ), 30 );
        
        add_action( 'init', array( $this, 'init' ) );
        add_action( 'template_redirect', array( $this, 'preview_fill_cart' ), 99 );
        add_filter( 'woocommerce_available_payment_gateways', array( $this, 'preview_allow_payments' ), 9999, 1 );
    }
    
    /*
        Manipulate settings & add sections
    */
    public function add_customizer_settings( $wp_customize ) {

        if ( !function_exists('wc_get_page_permalink') ) return;
        
        /*
            Change 'Aufbauseite laden'
        */
        //$wp_customize->get_control('sep_pageloader')->label = __('Smart Preview', 'core');
        //$wp_customize->get_control('enable_pageloader')->description = __('Wenn du im Customizer einen Bereich öffnest, wird automatisch die passende Sektion der Aufbauseite oder die entsprechende Seite geladen.', 'core');
        
        // order settings section
        $wp_customize->get_panel('woocommerce')->priority = 138;
                
        /*
         *  Allgemein
         */
        $section = 'woo_general';
        $wp_customize->remove_section("woocommerce_store_notice");
		$wp_customize->add_section($section, array(
            'title'    => __( 'Allgemein', 'core' ),
            'priority' => 1,
            'panel'    => 'woocommerce',
        ) );
        
        // move image section to general
        $wp_customize->remove_section("woocommerce_product_images");
        $wp_customize->get_control('woocommerce_single_image_width')->section = $section;
        $wp_customize->get_control('woocommerce_single_image_width')->priority = 11;
        $wp_customize->get_control('woocommerce_single_image_width')->description = __( 'Breite des Hauptbildes (in px) auf einzelnen Produktseiten. Diese Bilder bleiben unbearbeitet. Hinweis: Eine Vorschau deiner Änderungen ist aus technischen Gründen nicht möglich.', 'core' );
        
        $wp_customize->get_control('woocommerce_thumbnail_image_width')->section = $section;
        $wp_customize->get_control('woocommerce_thumbnail_image_width')->priority = 12;
        $wp_customize->get_control('woocommerce_thumbnail_image_width')->description = __( 'Breite des Vorschaubildes (in px) in der Shop-Übersicht. Hinweis: Eine Vorschau deiner Änderungen ist aus technischen Gründen nicht möglich.', 'core' );
        
        $wp_customize->get_control('woocommerce_thumbnail_cropping')->section = $section;
        // debug($wp_customize->get_control('woocommerce_thumbnail_cropping'));
        $wp_customize->get_control('woocommerce_thumbnail_cropping')->priority = 13;
        $choices = $wp_customize->get_control('woocommerce_thumbnail_cropping')->choices;
        foreach ( $choices as $key => $val ) {
            $val['description'] .= '.';
            $choices[$key] = $val;
        }
        $wp_customize->get_control('woocommerce_thumbnail_cropping')->choices = $choices;
        
        // move privacy policy section to general
        $wp_customize->get_control('wp_page_for_privacy_policy')->section = $section;
        $wp_customize->get_control('wp_page_for_privacy_policy')->priority = 31;
        $wp_customize->get_control('wp_page_for_privacy_policy')->label = null;
        $wp_customize->get_control('wp_page_for_privacy_policy')->description = __( 'Seite für die Datenschutzerklärung', 'core' );
        
        $wp_customize->get_control('woocommerce_terms_page_id')->section = $section;
        $wp_customize->get_control('woocommerce_terms_page_id')->priority = 32;
        $wp_customize->get_control('woocommerce_terms_page_id')->label = null;
        $wp_customize->get_control('woocommerce_terms_page_id')->description = __( 'Seite für die AGB', 'core' );
                
        // move notice section to general
        $wp_customize->get_control('woocommerce_demo_store_notice')->section = $section;
        $wp_customize->get_control('woocommerce_demo_store_notice')->label = null;
        $wp_customize->get_control('woocommerce_demo_store_notice')->priority = 41;
        
        $wp_customize->get_control('woocommerce_demo_store')->section = $section;
        $wp_customize->get_control('woocommerce_demo_store')->priority = 42;     
        
        /*
         *  Navigation
         */
        $wp_customize->add_section('woo_navi', array(
            'title'    => __( 'Navigation', 'core' ),
            'priority' => 1,
            'panel'    => 'woocommerce',
        ) );
                
        /*
         *  Shop Seite
         */
        $wp_customize->get_section('woocommerce_product_catalog')->title = __( 'Shop Seite', 'core' );
        
        // shop products
        $wp_customize->get_control('woocommerce_shop_page_display')->label = null;
        $wp_customize->get_control('woocommerce_shop_page_display')->description = __( 'Anzeige auf normaler Shop-Seite', 'core' );
        $wp_customize->get_control('woocommerce_shop_page_display')->priority = 2;
        
        // category products
        $wp_customize->get_control('woocommerce_category_archive_display')->label = null;
        $wp_customize->get_control('woocommerce_category_archive_display')->description = __( 'Anzeige', 'core' );
        $wp_customize->get_control('woocommerce_category_archive_display')->priority = 13;
        
        // Sortierung
        $wp_customize->get_control('woocommerce_default_catalog_orderby')->label = null;
        $wp_customize->get_control('woocommerce_default_catalog_orderby')->description = __( 'Standard Produktsortierung', 'core' );
        $wp_customize->get_control('woocommerce_default_catalog_orderby')->priority = 17;
        $wp_customize->get_control('woocommerce_default_catalog_orderby')->dependency = 'woo_enable_ordering';
        $choices = $wp_customize->get_control('woocommerce_default_catalog_orderby')->choices;
        foreach ( $choices as $key => $val ) {
            if ( $key === 'date' ) $val = _x('Neueste', 'small', 'core');
            else if ( $key === 'price' ) $val = _x('Preis (aufsteigend)', 'small', 'core');
            else if ( $key === 'price-desc' ) $val = _x('Preis (absteigend)', 'small', 'core');
            $choices[$key] = $val;
        }
        $wp_customize->get_control('woocommerce_default_catalog_orderby')->choices = $choices;
        
        // Produkte
        $wp_customize->get_control('woocommerce_catalog_columns')->label = null;
        $wp_customize->get_control('woocommerce_catalog_columns')->description = __( 'Anzahl Produkte pro Reihe', 'core' );
        $wp_customize->get_control('woocommerce_catalog_columns')->priority = 21;
        
        $wp_customize->get_control('woocommerce_catalog_rows')->label = null;
        $wp_customize->get_control('woocommerce_catalog_rows')->description = __( 'Anzahl Reihen', 'core' );
        $wp_customize->get_control('woocommerce_catalog_rows')->priority = 22;
                
        /*
         *  Produkt Seite
         */
        $wp_customize->add_section('woo_product_page', array(
            'title'    => __( 'Produkt Seite', 'core' ),
            'priority' => 10,
            'panel'    => 'woocommerce',
        ) );
                
        /*
         *  Warenkorb Seite
         */
        $wp_customize->add_section('woo_cart_page', array(
            'title'    => __( 'Warenkorb', 'core' ),
            'priority' => 11,
            'panel'    => 'woocommerce',
        ) );
                        
        /*
         *  Kassen Seite
         */
        $wp_customize->get_section('woocommerce_checkout')->title = __( 'Kasse', 'core' );
        $wp_customize->get_section('woocommerce_checkout')->priority = 12;
        $wp_customize->get_section('woocommerce_checkout')->description = null;
        // 29: Vor- & Nachname
        // 30: Firma
        $wp_customize->get_control('woocommerce_checkout_company_field')->priority = 30;
        $wp_customize->get_control('woocommerce_checkout_company_field')->label = null;
        $wp_customize->get_control('woocommerce_checkout_company_field')->description = __( '3. Firma', 'core' );
        $wp_customize->get_control('woocommerce_checkout_company_field')->choices = array(
            'hidden'   => _x( 'ausblenden', 'small', 'core' ),
            'optional' => _x( 'optional', 'small', 'core' ),
            'required' => _x( 'erforderlich', 'small', 'core' ),
        );
        // 31: Land
        // 32: Adresszeile 1
        // 33: Adresszeile 2
        $wp_customize->get_control('woocommerce_checkout_address_2_field')->priority = 33;
        $wp_customize->get_control('woocommerce_checkout_address_2_field')->label = null;
        $wp_customize->get_control('woocommerce_checkout_address_2_field')->description = __( '4. Addresszeile 2', 'core' );
        $wp_customize->get_control('woocommerce_checkout_address_2_field')->choices = array(
            'hidden'   => _x( 'ausblenden', 'small', 'core' ),
            'optional' => _x( 'optional', 'small', 'core' ),
            'required' => _x( 'erforderlich', 'small', 'core' ),
        );
        // 34: PLZ, Ort & Land
        // 35: Telefon
        $wp_customize->get_control('woocommerce_checkout_phone_field')->priority = 35;
        $wp_customize->get_control('woocommerce_checkout_phone_field')->label = null;
        $wp_customize->get_control('woocommerce_checkout_phone_field')->description = __( '8. Telefonnummer', 'core' );
        $wp_customize->get_control('woocommerce_checkout_phone_field')->choices = array(
            'hidden'   => _x( 'ausblenden', 'small', 'core' ),
            'optional' => _x( 'optional', 'small', 'core' ),
            'required' => _x( 'erforderlich', 'small', 'core' ),
        );
        // 36: Notizen
        // 37: required fields checkbox
        $wp_customize->get_control('woocommerce_checkout_highlight_required_fields')->priority = 25;
        $wp_customize->get_control('woocommerce_checkout_highlight_required_fields')->label = __( 'Pflichtfelder mit Sternchen markieren', 'core' );
                
        /*
         *  Mein Konto Seite
         */
        $wp_customize->add_section('woo_account_page', array(
            'title'    => __( 'Mein Konto', 'core' ),
            'priority' => 13,
            'panel'    => 'woocommerce',
        ) );        
        
        // /*
        //  *  Login / Logout
        //  */
        // $wp_customize->add_section('woo_login_page', array(
        //     'title'    => __( 'Login / Registrierung', 'core' ),
        //     'priority' => 14,
        //     'panel'    => 'woocommerce',
        // ) );        
        
        /*
         *  Tabellen
         */
        $wp_customize->add_section('woo_tables', array(
            'title'    => __( 'Tabellen', 'core' ),
            'priority' => 15,
            'panel'    => 'woocommerce',
        ) );        
        
        /*
         *  Tabs
         */
        $wp_customize->add_section('woo_tabs', array(
            'title'    => __( 'Tabs', 'core' ),
            'priority' => 16,
            'panel'    => 'woocommerce',
        ) );
        
        // add processor settings
        $this->add_process_defaults();
    }
    
    /*
        Add Settings to CSS
    */
    public function add_process_defaults() {

        if ( !function_exists('wc_get_page_permalink') ) return;

        $settings = array();
        
        /*
         *  Allgemein
         */
        $section = 'woo_general';
        $prio = 20;
        $settings[] = array(
            'WOOinfo'           => array( 'section' => $section, 'type' => 'info',          'description' => sprintf(__('Bevor du Anpassungen im Customizer vornimmst, solltest du zuerst die %sShop-Einrichtung%s durchlaufen haben.', 'core'), '<a href="'.admin_url('admin.php?page=wc-setup').'">', '</a>'), 'mod' => 'woo_info' , 'input_attrs' => 'info', 'priority' => 1),
            'WOOimagesep'       => array( 'section' => $section, 'type' => 'separator',     'label' => 'Produktbilder', 'mod' => 'woo_sep_images', 'priority' => 10 ),
            'WOOimageinfo'      => array( 'section' => $section, 'type' => 'info',          'description' => 'Wenn du deine Änderungen veröffentlichst, werden Bilder beim Upload in die Medien automatisch in den entsprechenden Größen generiert.', 'mod' => 'woo_image_info', 'priority' => 10 , 'input_attrs' => 'info'),
            // 11+12+13: image options
            // privacy
            'WOOdatasep'        => array( 'section' => $section, 'type' => 'separator',     'label' => 'Datenschutz', 'mod' => 'woo_sep_data', 'priority' => 30 ),
            // 31+32: Datenschutz Seiten
            'WOOnoticesep'      => array( 'section' => $section, 'type' => 'separator',     'label' => 'Shop Mitteilung', 'mod' => 'woo_sep_notice', 'priority' => 40 ),
            // 41+42: store notice
            'WOOnoticeinfo'     => array( 'section' => $section, 'type' => 'info',          'description' => 'Wenn die WooCommerce Pagespeed Optimierung aktiv ist, funktioniert die Shop Mitteilung nicht auf allen Unterseiten. Stelle sie ab, bevor deine Seite live geht.', 'mod' => 'woo_notice_info', 'priority' => 50 , 'input_attrs' => 'info'),
        );
        
        /*
         *  Shop Seite
         */
        $section = 'woocommerce_product_catalog';
        
        // Oberhalb
        $settings[] = array(
            'WOOlayoutsep'   => array( 'section' => $section, 'type' => 'separator',   'label' => 'Layout', 'mod' => 'woo_sep_layout', 'priority' => 1 ),
            // 1 - Anzeige
            'WOObreadcrumbs' => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Breadcrumbs anzeigen', 'mod' => 'woo_enable_breadcrumbs', 'default' => 1, 'priority' => 4, 'transport' => 'refresh' ),
            'WOOshophead'    => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Shop Überschrift anzeigen', 'mod' => 'woo_enable_shop_headline', 'default' => 1, 'priority' => 5, 'transport' => 'refresh' ),
            'WOOcount'       => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Produktanzahl anzeigen', 'mod' => 'woo_enable_count', 'default' => 1, 'priority' => 6, 'transport' => 'refresh' ),
            'WOOordering'    => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Sortierung anzeigen', 'mod' => 'woo_enable_ordering', 'default' => 1, 'priority' => 7, 'transport' => 'refresh' ),
            
            'Woosubcatgroup' => array( 'section' => $section, 'type' => 'group',       'label' => 'Kategorieseiten', 'description' => 'einstellen', 'mod' => 'woo_subcats_group', 'priority' => 12, 'input_attrs' => array( 'children' => 4 ) ),
            // 13 - Anzeige
            'WOOtaxhead'     => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Kategorie als Überschrift anzeigen', 'mod' => 'woo_enable_tax_headline', 'default' => 1, 'priority' => 14, 'transport' => 'refresh' ),
            'WOOdescription' => array( 'section' => $section, 'type' => 'checkbox',    'label' => 'Beschreibungen der Kategorie anzeigen (wenn angegeben)', 'mod' => 'woo_enable_description', 'default' => 1, 'priority' => 15, 'transport' => 'refresh' ),
            'WOOcategoryinfo'=> array( 'section' => $section, 'type' => 'info',             'description' => 'Tipp: Um alle Einstellungen in der Vorschau nachvollziehen zu können, lege am besten zuerst die benötigten WooCommerce Kategorien an.', 'mod' => 'woo_category_info', 'priority' => 16 , 'input_attrs' => 'info' ),
            // 17 - Sortierung
            'WOOsortinginfo' => array( 'section' => $section, 'type' => 'info',        'description' => 'Benutzerdef. Reihenfolge kann in den Produktdaten unter „Erweitert“ eingestellt werden.', 'mod' => 'woo_sorting_info', 'priority' => 18, 'input_attrs' => 'info' ),
        );
        
        // Produkte
        $prio = 23;
        $settings[] = array(
            'WOOshopsep2'           => array( 'section' => $section, 'type' => 'separator', 'label' => 'Produkte', 'mod' => 'woo_sep_shop_2', 'priority' => 20 ),
            // 21+22 - Grid options
            '--WOOshopAlign'        => array( 'section' => $section, 'type' => 'select',    'description' => 'Ausrichtung der Elemente', 'mod' => 'woo_shop_align', 'default' => 'center', 'priority' => $prio, 
                                                                                                'choices' => array( 'left' => 'linksbündig', 'center' => 'zentriert', 'right' => 'rechtsbündig' ) ),
            'WOOshopinfo'           => array( 'section' => $section, 'type' => 'info',      'description' => 'Die Größe der Bilder kannst du im Bereich <i>WooCommerce > Allgemein</i> einstellen.', 'mod' => 'woo_shop_info' , 'input_attrs' => 'info', 'priority' => $prio),
            
            // title
            '--WOOtitlefontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Titel', 'mod' => 'woo_title_fontfamily', 'default' => 'fontFamily1', 'transport' => 'refresh', 'priority' => $prio ),
            '--WOOtitlefontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_title_font_size', 'default' => 1, 'unit' => 'em', 'priority' => $prio ),
            '--WOOtitlefontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_title_font_weight', 'default' => 400, 'priority' => $prio ),
            '--WOOtitlelineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_title_line_height', 'default' => 140, 'unit' => '%', 'priority' => $prio ),
            'WOOtitlefontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_title_font', 'input_attrs' => array( 'children' => 3 ), 'priority' => $prio ),
            '--WOOtitletextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_title_text_transform', 'default' => 'none', 'priority' => $prio ),
            '--WOOtitleletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_title_letter_spacing', 'default' => 0, 'unit' => 'px', 'priority' => $prio ),
            '--WOOtitlewordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_title_word_spacing', 'default' => 0, 'unit' => 'px', 'priority' => $prio ),
            
            '--WOOtitlecolor2'       => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Schriftfarbe', 'mod' => 'woo_title_color2', 'priority' => $prio, 'default' => 'color21', 'transport' => 'refresh' ),
            '--WOOtitlecolor2_h'     => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Hover Schriftfarbe', 'mod' => 'woo_title_color2_h', 'priority' => $prio, 'default' => 'color31', 'transport' => 'refresh' ),
            '--WOOtitlemargin'       => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand darüber:', 'mod' => 'woo_title_margin', 'default' => 10, 'unit' => 'px', 'priority' => $prio,
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),
            
            // price
            '--WOOpricefontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Preis', 'mod' => 'woo_price_fontfamily', 'default' => 'fontFamily1', 'transport' => 'refresh', 'priority' => $prio ),
            '--WOOpricefontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_price_font_size', 'default' => 2, 'unit' => 'em', 'priority' => $prio,
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 6, 'step'  => 0.05 ) ),
            '--WOOpricefontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_price_font_weight', 'default' => 600, 'priority' => $prio ),
            '--WOOpricelineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_price_line_height', 'default' => 100, 'unit' => '%', 'priority' => $prio ),
            'WOOpricefontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_price_font', 'input_attrs' => array( 'children' => 3 ), 'priority' => $prio ),
            '--WOOpricetextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_price_text_transform', 'default' => 'none', 'priority' => $prio ),
            '--WOOpriceletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_price_letter_spacing', 'default' => 0, 'unit' => 'px', 'priority' => $prio ),
            '--WOOpricewordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_price_word_spacing', 'default' => 0, 'unit' => 'px', 'priority' => $prio ),
            
            '--WOOpricecolor2'      => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Schriftfarbe', 'mod' => 'woo_price_color2', 'priority' => $prio, 'default' => 'color31', 'transport' => 'refresh' ),
            '--WOOpricecolor2_h'    => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Hover Schriftfarbe', 'mod' => 'woo_price_color2_h', 'priority' => $prio, 'default' => 'color13', 'transport' => 'refresh' ),
            '--WOOpricemargin'       => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand darüber:', 'mod' => 'woo_price_margin', 'default' => 10, 'unit' => 'px', 'priority' => $prio,
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),
        );
        
        // Pagination
        $settings[] = array(
            'WOOshopsep3'    => array( 'section' => $section, 'type' => 'separator',    'label' => 'Paginierung', 'mod' => 'woo_sep_shop_3', 'priority' => 30 ),
            'WOOpagination'  => array( 'section' => $section, 'type' => 'checkbox',     'label' => 'Paginierung anzeigen', 'mod' => 'woo_enable_pagination', 'default' => 1, 'priority' => 31, 'transport' => 'refresh' ),
            'WOOpagePrev'    => array( 'section' => $section, 'type' => 'select',         'description' => 'Symbol nach links', 'mod' => 'woo_edit_pagination_prev', 'default' => '◂', 'priority' => 32, 'transport' => 'refresh', 'dependency' => 'woo_enable_pagination',
                                                                                                        'choices' => array( '◂' => 'Dreieck ◂', '←' => 'Pfeil ←', '‹' => 'Chevron ‹', '«' => 'Chevron (doppelt) «' ) ),
            'WOOpageNext'    => array( 'section' => $section, 'type' => 'select',         'description' => 'Symbol nach rechts', 'mod' => 'woo_edit_pagination_next', 'default' => '▸', 'priority' => 33, 'transport' => 'refresh', 'dependency' => 'woo_enable_pagination',
                                                                                                        'choices' => array( '▸' => 'Dreieck ▸', '→' => 'Pfeil →', '›' => 'Chevron ›', '»' => 'Chevron (doppelt) »' ) ),
        );
                
        /*
         *  Produkt
         */
        $section = 'woo_product_page';
        $settings[] = array(
            
            // Produktbilder
            'WOOproductimagesep'    => array( 'section' => $section, 'type' => 'separator', 'label' => 'Produktbilder', 'mod' => 'woo_sep_product_images' ),
            'WOOimages'             => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'Produktbilder anzeigen', 'mod' => 'woo_enable_images', 'default' => 1, 'transport' => 'refresh' ),
            'WOOimagesinfo'         => array( 'section' => $section, 'type' => 'info',      'description' => 'Die Größe der Bilder kannst du im Bereich <i>WooCommerce > Allgemein</i> einstellen.', 'mod' => 'woo_images_info' , 'input_attrs' => 'info',
                                                                                                'dependency' => 'woo_enable_images'),
            'WOOimggallery'         => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'Bildzoom und Lightbox aktivieren', 'mod' => 'woo_enable_gallery', 'default' => 1, 'dependency' => 'woo_enable_images', 'transport' => 'refresh' ),
            'WOOimgslider'          => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'Slider für Galleriebilder aktivieren', 'mod' => 'woo_enable_slider', 'default' => 1, 'dependency' => 'woo_enable_images', 'transport' => 'refresh' ),
            
            // Layout
            'WOOproductlayoutsep'   => array( 'section' => $section, 'type' => 'separator', 'label' => 'Layout', 'mod' => 'woo_product_layout_sep', 'dependency' => 'woo_enable_images' ),
            '--WOOproductLayout'    => array( 'section' => $section, 'type' => 'select',    'description' => 'Anordnung', 'mod' => 'woo_product_layout', 'transport' => 'refresh', 'default' => 'row', 
                                                                                                'choices' => array( 'row' => 'nebeneinander (Standard)', 'column' => 'untereinander (Bild oben)', 'row-reverse' => 'nebeneinander (Bild rechts, Infos links)', 'column-reverse' => 'untereinander (Infos oben)' ),
                                                                                                'dependency' => 'woo_enable_images' ),
            '--WOOproductAlign'     => array( 'section' => $section, 'type' => 'select',    'description' => 'Ausrichtung', 'mod' => 'woo_product_align', 'default' => 'flex-start', 
                                                                                                'choices' => array( 'flex-start' => 'oben', 'center' => 'mittig', 'flex-end' => 'unten' ), 'dependency' => array( 'woo_enable_images', array( 'element' => 'woo_product_layout', 'value' => array('row', 'row-reverse') ) ) ),
            '--WOOproductWidth'     => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Breite Produktbild:', 'mod' => 'woo_product_width', 'default' => 50, 'unit' => '%', 'input_attrs' => array( 'min' => 20, 'max' => 80, 'step'  => 1 ), 'transport' => 'refresh', 
                                                                                                'dependency' => array( 'woo_enable_images', array( 'element' => 'woo_product_layout', 'value' => array('row', 'row-reverse') ) ) ),
            '--WOOproductMargin'    => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand dazwischen:', 'mod' => 'woo_product_margin', 'default' => 40, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 200, 'step'  => 1 ), 
                                                                                                'dependency' => array( 'woo_enable_images', array( 'element' => 'woo_product_layout', 'value' => array('row', 'row-reverse') ) ) ),
            '--WOOproductMaxwidth'  => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Maximale Breite:', 'mod' => 'woo_product_maxwidth', 'default' => 500, 'unit' => 'px', 'input_attrs' => array( 'min' => 200, 'max' => 2000, 'step'  => 10 ), 
                                                                                                'dependency' => array( 'woo_enable_images', array( 'element' => 'woo_product_layout', 'value' => array('column', 'column-reverse') ) ) ),
            
            // Info Bereich
            'WOOproductdescsep'         => array( 'section' => $section, 'type' => 'separator', 'label' => 'Produktinformationen', 'mod' => 'woo_sep_product_desc' ),
            '--WOOproductpricefontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Preis', 'mod' => 'woo_product_price_fontfamily', 'default' => 'fontFamily1', 'transport' => 'refresh' ),
            '--WOOproductpricefontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_product_price_font_size', 'default' => 3, 'unit' => 'em',
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 6, 'step'  => 0.05 ) ),
            '--WOOproductpricefontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_product_price_font_weight', 'default' => 900 ),
            '--WOOproductpricelineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_product_price_line_height', 'default' => 100, 'unit' => '%' ),
            'WOOproductpricefontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_product_price_font', 'input_attrs' => array( 'children' => 3 ) ),
            '--WOOproductpricetextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_product_price_text_transform', 'default' => 'none' ),
            '--WOOproductpriceletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_product_price_letter_spacing', 'default' => 0, 'unit' => 'px' ),
            '--WOOproductpricewordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_product_price_word_spacing', 'default' => 0, 'unit' => 'px' ),
            '--WOOproductpricemargin'       => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand darunter:', 'mod' => 'woo_product_price_margin', 'default' => 0.5, 'unit' => 'em',
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 3, 'step'  => 0.05 ) ),
            
            '--WOOproductpricecolor2'      => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Schriftfarbe', 'mod' => 'woo_product_price_color2', 'default' => 'color31', 'transport' => 'refresh' ),
            
            'WOOproductMobileButton'=> array( 'section' => $section, 'type' => 'select',        'description' => 'Zweiter Kaufen Button (direkt unter dem Preis)', 'mod' => 'woo_product_mobile_button', 'transport' => 'refresh', 'default' => 'hidden',
                                                                                                    'choices' => array( 'hidden' => 'nicht anzeigen', 'on' => 'immer anzeigen', 'no_mobile' => 'nur Desktop', 'no_desktop' => 'nur Mobil' ) ),
            
            'WOOmeta'               => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Produkt-Metadaten anzeigen', 'description' => 'Kategorien, Schlagwörter (wenn vorhanden)', 'mod' => 'woo_enable_meta', 'default' => 1, 'transport' => 'refresh' ),
            
            // Darunter
            'WOOproductbelowsep'    => array( 'section' => $section, 'type' => 'separator',     'label' => 'Zusatzinformationen', 'mod' => 'woo_sep_product_below' ),
            'WOOtabs'               => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Zusätzliche Informationen anzeigen', 'mod' => 'woo_enable_tabs', 'default' => 1, 'transport' => 'refresh',
                                                                                                    'description' => 'Tabs für weitere Metainformationen wie ausführliche Beschreibungen oder Rezensionen werden unter dem Produkt angezeigt.' ),
            'WOObelowinfo'          => array( 'section' => $section, 'type' => 'info',          'description' => 'Das Aussehen der Tabs kannst du im Bereich <i>WooCommerce > Tabs</i> einstellen.', 'mod' => 'woo_below_info' , 'input_attrs' => 'info', 'dependency' => 'woo_enable_tabs'),
            
            '--WOOproductstarfontSize'     => array( 'section' => $section, 'type' => 'range',  'label' => 'Bewertungen (Sterne)', 'mod' => 'woo_product_star_font_size', 'default' => 1, 'unit' => 'em',
                                                                                                'input_attrs' => array( 'min' => 0.5, 'max' => 2, 'step'  => 0.05 ), 'dependency' => 'woo_enable_tabs' ),
            '--WOOproductstarmargin'       => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand darüber & darunter:', 'mod' => 'woo_product_star_margin', 'default' => 4, 'unit' => 'px',
                                                                                                'input_attrs' => array( 'min' => 0, 'max' => 20, 'step'  => 1 ), 'dependency' => 'woo_enable_tabs' ),
            '--WOOproductstarcolor2'       => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Schriftfarbe', 'mod' => 'woo_product_star_color2', 'default' => 'color13', 'transport' => 'refresh', 
                                                                                                'dependency' => ['woo_enable_tabs'] ),
            '--WOOproductstarcolor2_h'     => array( 'section' => $section, 'type' => 'colselect', 'description' => 'Hover', 'mod' => 'woo_product_star_color2_h', 'default' => 'color13', 'transport' => 'refresh', 
                                                                                                'dependency' => ['woo_enable_tabs'] ),
            
            'WOOproductmoresep'     => array( 'section' => $section, 'type' => 'sub_separator', 'label' => 'Weitere Produkte', 'mod' => 'woo_sep_product_more' ),
            'WOOupsell'             => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Upselling-Produkte anzeigen', 'description' => 'wenn vorhanden', 'mod' => 'woo_enable_upsell', 'default' => 1, 'transport' => 'refresh' ),
            'WOOrelated'            => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Ähnliche Produkte anzeigen', 'mod' => 'woo_enable_related', 'default' => 1, 'transport' => 'refresh' ),
        );

        /*
         *  Warenkorb
         */
        $section = 'woo_cart_page';
        $settings[] = array(
            // top table
            'WOOcartsep_1'          => array( 'section' => $section, 'type' => 'separator',     'label' => 'Obere Tabelle', 'mod' => 'woo_sep_cart_1' ),
            'WOOcartinfo'           => array( 'section' => $section, 'type' => 'info',          'description' => 'Das Aussehen der Tabelle kannst du im Bereich <i>WooCommerce > Tabellen</i> einstellen.', 'mod' => 'woo_cart_info' , 'input_attrs' => 'info'),
            
            'WOOcartsep_2'          => array( 'section' => $section, 'type' => 'sub_separator', 'label' => 'Produktbilder', 'mod' => 'woo_sep_cart_2' ),
            'WOOcartimage'          => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'anzeigen', 'description' => 'Zeigt die Produktbilder auf großen Bildschirmen an. Mobil werden sie immer ausgeblendet.', 'mod' => 'woo_enable_cart_image', 'default' => 1, 'transport' => 'refresh' ),
            '--WOOcartimagewidth'   => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Breite:', 'mod' => 'woo_cart_img_width', 'default' => 100, 'unit' => 'px', 'input_attrs' => array( 'min' => 20, 'max' => 300, 'step'  => 10 ), 
                                                                                                    'dependency' => 'woo_enable_cart_image' ),
        );
        if ( is_plugin_active('woocommerce-germanized/woocommerce-germanized.php') ) {
            $settings[] = array(
                'WOOcartsep_3'          => array( 'section' => $section, 'type' => 'sub_separator', 'label' => 'Kurzbeschreibung (Germanized)', 'mod' => 'woo_sep_cart_3' ),
                'WOOcartdescr'          => array( 'section' => $section, 'type' => 'select',        'mod' => 'woo_enable_cart_descr', 'transport' => 'refresh', 'default' => 'on',
                                                                                                        'choices' => array( 'hidden' => 'ausblenden', 'on' => 'immer anzeigen', 'no_mobile' => 'nur Desktop', 'no_desktop' => 'nur mobil' ) ),
                
                '--WOOcartdescrcols'    => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Schriftfarbe', 'mod' => 'woo_cart_descr_color2', 'default' => 'color32', 'transport' => 'refresh',
                                                                                                        'dependency' => [ ['element' => 'woo_enable_cart_descr', 'value' => ['on', 'no_mobile', 'no_desktop']]] ),
                '--WOOcartdescrfontsize'=> array( 'section' => $section, 'type' => 'range',         'lbl' => 'Schriftgröße:', 'mod' => 'woo_cart_descr_font_size', 'default' => 0.8, 'unit' => 'em',
                                                                                                    'dependency' => ['element' => 'woo_enable_cart_descr', 'value' => ['on', 'no_mobile', 'no_desktop']] ),
            );
        }
        $settings[] = array(
            'WOOcartsep_4'          => array( 'section' => $section, 'type' => 'sub_separator', 'label' => 'Entfernen Button', 'mod' => 'woo_sep_cart_4' ),
            '--WOOcartdelfontsize'  => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Größe:', 'mod' => 'woo_cart_del_font_size', 'default' => 1.5, 'unit' => 'em', 'input_attrs' => array( 'min' => 1, 'max' => 3, 'step'  => 0.05 ) ),
            '--WOOcartdelfontWeight' => array( 'section' => $section, 'type' => 'select',       'description' => 'Stärke (Schriftschnitt)', 'mod' => 'woo_cart_del_font_weight', 'default' => 400 ),
            'WOOcartdelgroup'       => array( 'section' => $section, 'type' => 'group',         'label' => 'Farben einstellen', 'description' => '&nbsp;', 'mod' => 'woo_cart_group_del', 'input_attrs' => array( 'children' => 5 ) ),
            
            '--WOOcartdelcols'      => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Schriftfarbe', 'mod' => 'woo_cart_del_color2', 'default' => 'color43', 'transport' => 'refresh' ),
            
            '--WOOcartdelcols_bg'   => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hintergrund', 'mod' => 'woo_cart_del_color2_bg', 'default' => 'color53', 'transport' => 'refresh' ),
            'WOOcartsep_5'          => array( 'section' => $section, 'type' => 'sub_separator', 'label' => 'Hover', 'mod' => 'woo_sep_cart_5' ),
            
            '--WOOcartdelcols_h'    => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Schriftfarbe', 'mod' => 'woo_cart_del_color2_h', 'default' => 'color62', 'transport' => 'refresh' ),
            
            '--WOOcartdelcols_bg_h' => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hintergrund', 'mod' => 'woo_cart_del_color2_bg_h', 'default' => 'color43', 'transport' => 'refresh' ),
            
            // bottom table
            'WOOcartsep_6'          => array( 'section' => $section, 'type' => 'separator',     'label' => 'Untere Tabelle', 'mod' => 'woo_sep_cart_6' ),
            '--WOOcartalign'        => array( 'section' => $section, 'type' => 'select',        'description' => 'Ausrichtung', 'mod' => 'woo_cart_align', 'default' => 'flex-end', 
                                                                                                    'choices' => array( 'flex-start' => 'links', 'center' => 'mittig', 'flex-end' => 'rechts' ) ),
            '--WOOcartmaxwidth'     => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Maximale Breite:', 'mod' => 'woo_cart_max_width', 'default' => 500, 'unit' => 'px', 'input_attrs' => array( 'min' => 300, 'max' => 2000, 'step'  => 10 ) ),
            '--WOOcartmargintop'    => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Abstand darüber:', 'mod' => 'woo_cart_margin_top', 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step'  => 1 ) ),
        );
           
        /*
         *  Kasse
         */
        $section = 'woocommerce_checkout';
        $prio = 10;
        $settings[] = array(
            'WOOcheckoutsep_1'      => array( 'section' => $section, 'type' => 'separator',     'label' => 'Layout', 'mod' => 'woo_sep_checkout_1', 'priority' => $prio ),
            '--WOOcheckoutLayout'   => array( 'section' => $section, 'type' => 'select',        'description' => 'Anordnung', 'mod' => 'woo_checkout_layout', 'transport' => 'refresh', 'default' => 'column', 'priority' => $prio, 
                                                                                                    'choices' => array( 'row' => 'nebeneinander', 'column' => 'untereinander (Standard)' ) ),
            '--WOOcheckoutAlign'    => array( 'section' => $section, 'type' => 'select',        'description' => 'Ausrichtung', 'mod' => 'woo_checkout_align', 'default' => '0 auto', 'priority' => $prio, 
                                                                                                    'choices' => array( '0' => 'links', '0 auto' => 'mittig', '0 0 0 auto' => 'rechts' ),
                                                                                                    'dependency' => array( array( 'element' => 'woo_checkout_layout', 'value' => 'column' ) ) ),
            '--WOOcheckoutwidth'    => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Verhältnis:', 'mod' => 'woo_checkout_width', 'default' => 45, 'unit' => '%',
                                                                                                    'input_attrs' => array( 'min' => 30, 'max' => 70, 'step'  => 1 ), 'priority' => $prio,
                                                                                                    'dependency' => array( array( 'element' => 'woo_checkout_layout', 'value' => 'row' ) ) ),
            '--WOOcheckoutMaxwidth' => array( 'section' => $section, 'type' => 'range',         'lbl' => 'max. Breite der Spalten:', 'mod' => 'woo_checkout_maxwidth', 'default' => 600, 'unit' => 'px',
                                                                                                    'input_attrs' => array( 'min' => 200, 'max' => 2000, 'step'  => 10 ), 'priority' => $prio ),
            '--WOOcheckoutMargin'   => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Abstand dazwischen:', 'mod' => 'woo_checkout_margin', 'default' => 40, 'unit' => 'px',
                                                                                                    'input_attrs' => array( 'min' => 0, 'max' => 200, 'step'  => 1 ), 'priority' => $prio ),
            
            'WOOcheckoutsep_2'      => array( 'section' => $section, 'type' => 'separator',     'label' => 'Eingabefelder', 'mod' => 'woo_sep_checkout_2', 'priority' => 24 ),
        );
        // 25: required fields checkbox
        
        $group_items = 9;
        if (get_option('woocommerce_gzd_checkout_address_field') == 'yes') {
            $settings[] = array(
                'WOOordertitle'     => array( 'section' => $section, 'type' => 'select',    'description' => '0. Anrede', 'mod' => 'woo_checkout_order_title', 'priority' => 28, 'transport' => 'refresh', 'default' => 'optional', 'choices' => array( 'hidden' => 'ausblenden',  'optional' => 'optional', 'required' => 'erforderlich' ) ),
            );
            $group_items = 10;
        }
        $group_items = apply_filters('greyd_woocommerce_checkout_fields_count', $group_items);
        $settings[] = array(
            'WOOcheckoutfields'     => array( 'section' => $section, 'type' => 'group',     'label' => 'Benötigte Felder einstellen', 'description' => ' ', 'mod' => 'woo_checkout_group_fields', 'priority' => 26, 'input_attrs' => array( 'children' => $group_items ) ),
            // 28: optionales Anrede Feld
            'WOOordernames'         => array( 'section' => $section, 'type' => 'select',    'description' => '1. Vor- & Nachname', 'mod' => 'woo_checkout_order_names', 'priority' => 29, 'transport' => 'refresh', 'default' => 'required',
                                                                                                'choices' => array( 'optional' => 'optional', 'required' => 'erforderlich' ) ),
            'WOOorderemailinfo'     => array( 'section' => $section, 'type' => 'info',      'description' => 'Das Feld „E-Mail“ ist zwingend erforderlich.', 'mod' => 'woo_order_email_info', 'priority' => 29, 'input_attrs' => 'info'),
            // 30: Firma
            'WOOordercountry'       => array( 'section' => $section, 'type' => 'select',    'description' => '4. Land', 'mod' => 'woo_checkout_order_country', 'priority' => 31, 'transport' => 'refresh', 'default' => 'optional',
                                                                                                'choices' => array( 'hidden' => 'ausblenden', 'optional' => 'optional', 'required' => 'erforderlich' ) ),
            'WOOorderaddress1'      => array( 'section' => $section, 'type' => 'select',    'description' => '5. Adresszeile 1', 'mod' => 'woo_checkout_order_address1', 'priority' => 32, 'transport' => 'refresh', 'default' => 'required',
                                                                                                'choices' => array( 'hidden' => 'ausblenden', 'optional' => 'optional', 'required' => 'erforderlich' ) ),
            // 33: Addresszeile 2
            'WOOorderaddress3'      => array( 'section' => $section, 'type' => 'select',    'description' => '7. PLZ, Ort und Bundesland', 'mod' => 'woo_checkout_order_address3', 'priority' => 34, 'transport' => 'refresh', 'default' => 'optional',
                                                                                                'choices' => array( 'hidden' => 'ausblenden', 'optional' => 'optional', 'required' => 'erforderlich' ) ),
            // 35: Telefon
            'WOOordernotes'         => array( 'section' => $section, 'type' => 'select',    'description' => '9. Bestellnotiz', 'mod' => 'woo_checkout_order_notes', 'priority' => 36, 'transport' => 'refresh', 'default' => 'hidden',
                                                                                                'choices' => array( 'hidden' => 'ausblenden', 'optional' => 'optional', 'required' => 'erforderlich' ) ),
        );
        // Zahlungsart Optionen
        $prio = 40;
        $settings[] = array(
            'WOOpaymentsep'         => array( 'section' => $section, 'type' => 'separator',     'label' => 'Zahlungsart', 'mod' => 'woo_payment_sep', 'priority' => $prio ),
            // 'WOOpaymenticons'       => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Stripe & Paypal Icons anzeigen', 'mod' => 'woo_payment_icons', 'priority' => $prio, 'default' => 1, 'transport' => 'refresh' ),
            
            'WOOpaymentmore'        => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'als Box gestalten', 'mod' => 'woo_payment_more', 'priority' => $prio, 'default' => 0, 'transport' => 'refresh' ),

            '--WOOpaymentbgcolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Hintergrundfarbe', 'mod' => 'woo_payment_background_color2', 'priority' => $prio, 'default' => 'color63', 'transport' => 'refresh',
                                                                                                    'dependency' => ['woo_payment_more'] ),
            '--WOOpaymenttopbottom'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding oben/unten:', 'mod' => 'woo_payment_topbottom', 'priority' => $prio, 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                    'dependency' => 'woo_payment_more' ),
            '--WOOpaymentleftright'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding seitlich:', 'mod' => 'woo_payment_leftright', 'priority' => $prio, 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                    'dependency' => 'woo_payment_more' ),                                                                                                       

            '--WOOpaymentborderRadius' => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_payment_border_radius', 'priority' => $prio, 'default' => 0, 'unit' => 'px',
                                                                                                    'dependency' => 'woo_payment_more' ),
            'WOOpaymentborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',   'label' => 'Rahmen', 'mod' => 'woo_payment_border_enable', 'priority' => $prio, 'default' => 0,
                                                                                                    'dependency' => 'woo_payment_more' ),
            '--WOOpaymentbocolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Rahmenfarbe', 'mod' => 'woo_payment_border_color2', 'priority' => $prio, 'default' => 'color21', 'transport' => 'refresh',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            
            '--WOOpaymentborderWidth'  => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_payment_border_width', 'priority' => $prio, 'default' => 0, 'unit' => 'px',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            'WOOpaymentbordergroup'    => array( 'section' => $section, 'type' => 'group',      'label' => 'einzelne Seiten', 'mod' => 'group_woo_payment_border', 'priority' => $prio, 'input_attrs' => array( 'children' => 4 ),
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            '--WOOpaymentborderTop'    => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_border_style_top', 'priority' => $prio, 'default' => 'solid',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            '--WOOpaymentborderLeft'   => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_border_style_left', 'priority' => $prio, 'default' => 'solid',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            '--WOOpaymentborderRight'  => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_border_style_right', 'priority' => $prio, 'default' => 'solid',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            '--WOOpaymentborderBottom' => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_border_style_bottom', 'priority' => $prio, 'default' => 'solid',
                                                                                                    'dependency' => ['woo_payment_more', 'woo_payment_border_enable'] ),
            
            // Notifications
            'WOOpaymentboxsep'       => array( 'section' => $section, 'type' => 'sub_separator',   'label' => 'Innere Boxen', 'mod' => 'woo_payment_box_sep', 'priority' => $prio ),

            '--WOOpaymentboxbgcolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Hintergrundfarbe', 'mod' => 'woo_payment_box_background_color2', 'priority' => $prio, 'default' => 'color33', 'transport' => 'refresh' ),
            '--WOOpaymentboxcolselect'    => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Schriftfarbe', 'mod' => 'woo_payment_box_color2', 'priority' => $prio, 'default' => 'color21', 'transport' => 'refresh' ),
            
            '--WOOpaymentboxtriangle'     => array( 'section' => $section, 'type' => 'range',       'lbl' => 'Größe des Dreiecks:', 'mod' => 'woo_payment_box_triangle', 'priority' => $prio, 'default' => 10, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 30, 'step'  => 1 ) ),
            
            '--WOOpaymentboxtopbottom'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding oben/unten:', 'mod' => 'woo_payment_box_topbottom', 'priority' => $prio, 'default' => 12, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 30, 'step'  => 1 ) ),
            '--WOOpaymentboxleftright'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding seitlich:', 'mod' => 'woo_payment_box_leftright', 'priority' => $prio, 'default' => 12, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 30, 'step'  => 1 ) ),                                                                                                       

            '--WOOpaymentboxborderRadius' => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_payment_box_border_radius', 'priority' => $prio, 'default' => 3, 'unit' => 'px' ),
            'WOOpaymentboxborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',   'label' => 'Rahmen', 'mod' => 'woo_payment_box_border_enable', 'priority' => $prio, 'default' => 0 ),
            '--WOOpaymentboxbocolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Rahmenfarbe', 'mod' => 'woo_payment_box_border_color2', 'priority' => $prio, 'default' => 'color21', 'transport' => 'refresh',
                                                                                                        'dependency' => ['woo_payment_box_border_enable'] ),
            
            '--WOOpaymentboxborderWidth'  => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_payment_box_border_width', 'priority' => $prio, 'default' => 0, 'unit' => 'px',
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            'WOOpaymentboxbordergroup'    => array( 'section' => $section, 'type' => 'group',      'label' => 'einzelne Seiten', 'mod' => 'group_woo_payment_box_border', 'priority' => $prio, 'input_attrs' => array( 'children' => 4 ),
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            '--WOOpaymentboxborderTop'    => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_box_border_style_top', 'priority' => $prio, 'default' => 'solid',
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            '--WOOpaymentboxborderLeft'   => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_box_border_style_left', 'priority' => $prio, 'default' => 'solid',
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            '--WOOpaymentboxborderRight'  => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_box_border_style_right', 'priority' => $prio, 'default' => 'solid',
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            '--WOOpaymentboxborderBottom' => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_payment_box_border_style_bottom', 'priority' => $prio, 'default' => 'solid',
                                                                                                        'dependency' => 'woo_payment_box_border_enable' ),
            
            // Summary
            'WOOsummarysep'       => array( 'section' => $section, 'type' => 'separator',           'label' => 'Zusammenfassung der Bestellung', 'mod' => 'woo_summary_sep', 'priority' => $prio ),
            'WOOsummaryinfo'      => array( 'section' => $section, 'type' => 'info',                'description' => 'Das Aussehen der Tabelle kannst du im Bereich <i>WooCommerce > Tabellen</i> einstellen.', 'mod' => 'woo_summary_info' , 'input_attrs' => 'info', 'priority' => $prio),
            
            'WOOsummarysep_2'          => array( 'section' => $section, 'type' => 'sub_separator',  'label' => 'Produktbilder', 'mod' => 'woo_sep_summary_2', 'priority' => $prio ),
            //'WOOsummaryimage'          => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Produktbilder anzeigen', 'mod' => 'woo_enable_summary_image', 'default' => 1, 'transport' => 'refresh' ),
            'WOOsummaryimage'          => array( 'section' => $section, 'type' => 'select',         'mod' => 'woo_enable_summary_image', 'transport' => 'refresh', 'default' => 'on', 'priority' => $prio,
                                                                                                        'choices' => array( 'hidden' => 'ausblenden', 'on' => 'immer anzeigen', 'no_mobile' => 'nur auf Desktop anzeigen', 'no_desktop' => 'nur mobil anzeigen' ) ),
            '--WOOsummaryimagewidth'   => array( 'section' => $section, 'type' => 'range',          'lbl' => 'Breite:', 'mod' => 'woo_summary_img_width', 'default' => 60, 'unit' => 'px', 'input_attrs' => array( 'min' => 20, 'max' => 200, 'step'  => 1 ), 'priority' => $prio, 
                                                                                                        'dependency' => ['element' => 'woo_enable_summary_image', 'value' => ['on', 'no_mobile', 'no_desktop']] ),
            'WOOsummarydescr'          => array( 'section' => $section, 'type' => 'select',         'label' => 'Kurzbeschreibung', 'mod' => 'woo_enable_summary_descr', 'transport' => 'refresh', 'default' => 'on', 'priority' => $prio,
                                                                                                        'choices' => array( 'hidden' => 'ausblenden', 'on' => 'immer anzeigen', 'no_mobile' => 'nur auf Desktop anzeigen', 'no_desktop' => 'nur mobil anzeigen' ) )
        );
        
        /*
         *  Mein Konto
         */
        $section = 'woo_account_page';
        $settings[] = array(
            'WOOaccountlayoutsep'   => array( 'section' => $section, 'type' => 'separator',     'label' => 'Menü', 'mod' => 'woo_account_layout_sep' ),
            'WOOaccountlayout'      => array( 'section' => $section, 'type' => 'select',        'description' => 'Darstellung', 'mod' => 'woo_account_layout', 'transport' => 'refresh', 'default' => 'list', 
                                                                                                    'choices' => array( 'list' => 'als Liste (Standard)', 'box' => 'als Box', 'tabs' => 'als Tabs' ) ),
            // tabs
            'WOOaccounttabsinfo'    => array( 'section' => $section, 'type' => 'info',          'description' => 'Das Aussehen der Tabs kannst du im Bereich <i>WooCommerce > Tabs</i> einstellen.', 'mod' => 'woo_account_tabs_info' , 'input_attrs' => 'info',
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'tabs'] ),
            // list
            '--WOOaccountlistStyle' => array( 'section' => $section, 'type' => 'select',        'description' => 'Listenstil', 'mod' => 'woo_account_list_style', 'default' => 'none', 
                                                                                                    'choices' => array( 'none' => 'kein Symbol', 'disc' => '• gefüllter Kreis', 'circle' => '◦ offener Kreis', 'square' => '▪ gefülltes Quadrat', 'decimal'               => 'numerisch (1. 2. ...)', 'decimal-leading-zero'  => 'numerisch mit Null (01. 02. ...)', 'lower-roman'           => 'römisch klein (i. ii. ...)', 'upper-roman'           => 'römisch groß (I. II. ...)', 'lower-greek'           => 'griechisch klein (α. β. ...)', 'armenian'              => 'armenisch (Ա. Բ. ...)', 'georgian'              => 'georgisch (ა. ბ. ...)', 'lower-alpha'           => 'alphabetisch klein (a. b. ...)', 'upper-alpha'           => 'alphabetisch groß (A. B. ...)' ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'list'] ),
            // list & box
            '--WOOaccountwidth'     => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Breite:', 'mod' => 'woo_account_width', 'default' => 30, 'unit' => '%', 'input_attrs' => array( 'min' => 10, 'max' => 50, 'step'  => 1 ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => ['list', 'box']] ),
            '--WOOaccountmargin'    => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Abstand daneben:', 'mod' => 'woo_account_margin', 'default' => 30, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step'  => 1 ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => ['list', 'box']] ),
            // box
            '--WOOaccountbgcolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Hintergrundfarbe', 'mod' => 'woo_account_background_color2', 'default' => 'color63', 'transport' => 'refresh',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box']] ),
            '--WOOaccounttopbottom'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding oben/unten:', 'mod' => 'woo_account_topbottom', 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'box'] ),
            '--WOOaccountleftright'    => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Padding seitlich:', 'mod' => 'woo_account_leftright', 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'box'] ),                                                                                                       

            '--WOOaccountborderRadius' => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_account_border_radius', 'default' => 0, 'unit' => 'px',
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'box'] ),
            'WOOaccountborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',   'label' => 'Rahmen', 'mod' => 'woo_account_border_enable', 'default' => 0,
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => 'box'] ),
            '--WOOaccountbocolor'      => array( 'section' => $section, 'type' => 'colselect',  'description' => 'Rahmenfarbe', 'mod' => 'woo_account_border_color2', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            
            '--WOOaccountborderWidth'  => array( 'section' => $section, 'type' => 'range',      'mod' => 'woo_account_border_width', 'default' => 0, 'unit' => 'px',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            'WOOaccountbordergroup'    => array( 'section' => $section, 'type' => 'group',      'label' => 'einzelne Seiten', 'mod' => 'group_woo_account_border', 'input_attrs' => array( 'children' => 4 ),
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            '--WOOaccountborderTop'    => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_account_border_style_top', 'default' => 'solid',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            '--WOOaccountborderLeft'   => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_account_border_style_left', 'default' => 'solid',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            '--WOOaccountborderRight'  => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_account_border_style_right', 'default' => 'solid',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            '--WOOaccountborderBottom' => array( 'section' => $section, 'type' => 'select',     'mod' => 'woo_account_border_style_bottom', 'default' => 'solid',
                                                                                                    'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_border_enable'] ),
            // box: items
            'WOOaccountitemsep'        => array( 'section' => $section, 'type' => 'separator',  'label' => 'Menüpunkte', 'mod' => 'woo_account_item_sep',
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => ['list', 'box']] ),
            // list & box
            '--WOOaccountitemmargin'       => array( 'section' => $section, 'type' => 'range',      'lbl' => 'Abstand dazwischen:', 'mod' => 'woo_account_item_margin', 'default' => 0.2, 'unit' => 'em', 'input_attrs' => array( 'min' => 0, 'max' => 2, 'step'  => 0.05 ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => ['list', 'box']] ),
            
            // box: more
            'WOOaccountitemmore'            => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'zusätzliche Optionen', 'description' => 'Paddings, Hintergrund, Rahmen, etc.', 'mod' => 'woo_account_item_more', 'default' => 0, 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box']]  ),
            
            '--WOOaccountitemtopbottom'     => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Padding oben/unten:', 'mod' => 'woo_account_item_topbottom', 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more'] ),
            '--WOOaccountitemleftright'     => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Padding seitlich:', 'mod' => 'woo_account_item_leftright', 'default' => 0, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ),
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more'] ),
            
            '--WOOaccountitemcolor2'        => array( 'section' => $section, 'type' => 'colselect',     'label' => 'Aussehen', 'description' => 'Schriftfarbe', 'mod' => 'woo_account_item_color2', 'default' => 'color32', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => ['box', 'list']] ]  ),
            '--WOOaccountitembgcolor2'      => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hintergrund', 'mod' => 'woo_account_item_color2_bg', 'default' => 'color63', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more' ] ),
            
            '--WOOaccountitemborderRadius'  => array( 'section' => $section, 'type' => 'range',         'mod' => 'woo_account_item_border_radius', 'default' => 0, 'unit' => 'px',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more'] ),
            'WOOaccountitemborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',       'label' => 'Rahmen', 'mod' => 'woo_account_item_border_enable', 'default' => 0,
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more'] ),
            '--WOOaccountitembocolor'      => array( 'section' => $section, 'type' => 'colselect',      'description' => 'Rahmenfarbe', 'mod' => 'woo_account_item_border_color2', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            
            '--WOOaccountitemborderWidth'  => array( 'section' => $section, 'type' => 'range',          'mod' => 'woo_account_item_border_width', 'default' => 0, 'unit' => 'px',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            'WOOaccountitembordergroup'    => array( 'section' => $section, 'type' => 'group',          'label' => 'einzelne Seiten', 'mod' => 'group_woo_account_item_border', 'input_attrs' => array( 'children' => 4 ),
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            '--WOOaccountitemborderTop'    => array( 'section' => $section, 'type' => 'select',         'mod' => 'woo_account_item_border_style_top', 'default' => 'solid',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            '--WOOaccountitemborderLeft'   => array( 'section' => $section, 'type' => 'select',         'mod' => 'woo_account_item_border_style_left', 'default' => 'solid',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            '--WOOaccountitemborderRight'  => array( 'section' => $section, 'type' => 'select',         'mod' => 'woo_account_item_border_style_right', 'default' => 'solid',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            '--WOOaccountitemborderBottom' => array( 'section' => $section, 'type' => 'select',         'mod' => 'woo_account_item_border_style_bottom', 'default' => 'solid',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            
            '--WOOaccountitemcolor2_h'      => array( 'section' => $section, 'type' => 'colselect',     'label' => 'Hover', 'description' => 'Schriftfarbe', 'mod' => 'woo_account_item_color2_h', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => ['box', 'list']] ] ),
            '--WOOaccountitembgcolor2_h'    => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hintergrund', 'mod' => 'woo_account_item_color2_bg_h', 'default' => 'color63', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more' ] ),
            '--WOOaccountitembocolor_h'      => array( 'section' => $section, 'type' => 'colselect',      'description' => 'Rahmenfarbe', 'mod' => 'woo_account_item_border_color2_h', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            
            '--WOOaccountitemcolor2_a'      => array( 'section' => $section, 'type' => 'colselect',     'label' => 'Aktiv', 'description' => 'Schriftfarbe', 'mod' => 'woo_account_item_color2_a', 'default' => 'color13', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => ['box', 'list']] ] ),
            '--WOOaccountitembgcolor2_a'    => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hintergrund', 'mod' => 'woo_account_item_color2_bg_a', 'default' => 'color63', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more' ] ),
            '--WOOaccountitembocolor_a'      => array( 'section' => $section, 'type' => 'colselect',      'description' => 'Rahmenfarbe', 'mod' => 'woo_account_item_border_color2_a', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                            'dependency' => [['element' => 'woo_account_layout', 'value' => 'box'], 'woo_account_item_more', 'woo_account_item_border_enable'] ),
            
            '--WOOaccountlayoutmobile' => array( 'section' => $section, 'type' => 'select',     'label' => 'Mobil', 'description' => 'Position', 'mod' => 'woo_account_layout_mobile', 'default' => 'column', 
                                                                                                    'choices' => array( 'column' => 'über dem Inhalt', 'column-reverse' => 'unter dem Inhalt' ),
                                                                                                    'dependency' => ['element' => 'woo_account_layout', 'value' => ['list', 'box']] ),
            
            'WOOaccountheadlinesep'     => array( 'section' => $section, 'type' => 'separator',     'label' => 'Konto-Header', 'mod' => 'woo_account_headline_sep' ),
            'WOOaccountheadline'        => array( 'section' => $section, 'type' => 'select',        'description' => 'Darstellung', 'mod' => 'woo_account_headline', 'default' => 'logout', 'transport' => 'refresh',
                                                                                                        'choices' => array( 'none' => 'nicht aktivieren', 'logout' => 'Begrüßung & Abmelden-Link', 'simple' => 'nur Begrüßung' ), ),
            'WOOaccountheadlinesize'    => array( 'section' => $section, 'type' => 'select',        'description' => 'Überschriftseinheit', 'mod' => 'woo_account_headline_size', 'default' => 'h4', 'transport' => 'refresh',
                                                                                                        'choices' => array( 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6' ),
                                                                                                        'dependency' => ['element' => 'woo_account_headline', 'value' => ['simple', 'logout']] ),
            '--WOOaccountheadmargin'    => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Abstand darunter:', 'mod' => 'woo_account_headline_margin', 'default' => 1, 'unit' => 'em', 'input_attrs' => array( 'min' => 0, 'max' => 3, 'step'  => 0.05 ),
                                                                                                        'dependency' => ['element' => 'woo_account_headline', 'value' => ['simple', 'logout']] ),
            
            '--WOOaccountheadlinkcols'  => array( 'section' => $section, 'type' => 'colselect',     'label' => 'Abmelden Link', 'description' => 'Farbe', 'mod' => 'woo_account_headline_link_cols', 'default' => 'color32', 'transport' => 'refresh',
                                                                                                        'dependency' => [['element' => 'woo_account_headline', 'value' => 'logout']] ),
            
            '--WOOaccountheadlinkcols_h'=> array( 'section' => $section, 'type' => 'colselect',     'description' => 'Hover', 'mod' => 'woo_account_headline_link_cols_h', 'default' => 'color43', 'transport' => 'refresh',
                                                                                                        'dependency' => [['element' => 'woo_account_headline', 'value' => 'logout']] ),
            
            '--WOOaccountheadlinksize'  => array( 'section' => $section, 'type' => 'range',         'lbl' => 'Schriftgröße:', 'mod' => 'woo_account_headline_link_size', 'default' => 0.8, 'unit' => 'em', 'input_attrs' => array( 'min' => 0.4, 'max' => 1.6, 'step'  => 0.05 ),
                                                                                                        'dependency' => ['element' => 'woo_account_headline', 'value' => 'logout'] ),
        );
        /* Login */
        $section = 'woo_account_page';
        $link = '<br><i>'.wc_get_page_permalink( 'myaccount' ).'</i>';
        $settings[] = array(
            'WOOloginsep'       => array( 'section' => $section, 'type' => 'separator',         'label' => 'Login-Formulare', 'mod' => 'woo_login_sep' ),
            'WOOlogininfo'      => array( 'section' => $section, 'type' => 'info',              'mod' => 'woo_login_info' , 'input_attrs' => 'info', 
                                                                                                    'description' => sprintf( __('Öffne den folgenden Link in einem privaten Fenster, um deine Änderungen dort anzusehen: %s (die Änderungen sind erst nach Veröffentlichung sichtbar).', 'core'), $link) ),
            
            '--WOOloginAlign'        => array( 'section' => $section, 'type' => 'select',       'description' => 'Ausrichtung', 'mod' => 'woo_login_align', 'default' => '0 auto', 
                                                                                                    'choices' => array( '0' => 'links', '0 auto' => 'mittig', '0 0 0 auto' => 'rechts' ) ),
            '--WOOloginbgcolor'      => array( 'section' => $section, 'type' => 'colselect',    'description' => 'Hintergrundfarbe', 'mod' => 'woo_login_background_color2', 'default' => 'color23', 'transport' => 'refresh' ),
            
            '--WOOlogintopbottom'    => array( 'section' => $section, 'type' => 'range',        'lbl' => 'Padding oben/unten:', 'mod' => 'woo_login_topbottom', 'default' => 12, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),
            '--WOOloginleftright'    => array( 'section' => $section, 'type' => 'range',        'lbl' => 'Padding seitlich:', 'mod' => 'woo_login_leftright', 'default' => 12, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),                                                                                                       

            '--WOOloginborderRadius' => array( 'section' => $section, 'type' => 'range',        'mod' => 'woo_login_border_radius', 'default' => 4, 'unit' => 'px' ),
            'WOOloginborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',     'label' => 'Rahmen', 'mod' => 'woo_login_border_enable', 'default' => 0 ),
            '--WOOloginbocolor'      => array( 'section' => $section, 'type' => 'colselect',    'description' => 'Rahmenfarbe', 'mod' => 'woo_login_border_color2', 'default' => 'color21', 'transport' => 'refresh',
                                                                                                    'dependency' => ['woo_login_border_enable'] ),
            
            '--WOOloginborderWidth'  => array( 'section' => $section, 'type' => 'range',        'mod' => 'woo_login_border_width', 'default' => 0, 'unit' => 'px',
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            'WOOloginbordergroup'    => array( 'section' => $section, 'type' => 'group',        'label' => 'einzelne Seiten', 'mod' => 'group_woo_login_border', 'input_attrs' => array( 'children' => 4 ),
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            '--WOOloginborderTop'    => array( 'section' => $section, 'type' => 'select',       'mod' => 'woo_login_border_style_top', 'default' => 'solid',
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            '--WOOloginborderLeft'   => array( 'section' => $section, 'type' => 'select',       'mod' => 'woo_login_border_style_left', 'default' => 'solid',
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            '--WOOloginborderRight'  => array( 'section' => $section, 'type' => 'select',       'mod' => 'woo_login_border_style_right', 'default' => 'solid',
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            '--WOOloginborderBottom' => array( 'section' => $section, 'type' => 'select',       'mod' => 'woo_login_border_style_bottom', 'default' => 'solid',
                                                                                                    'dependency' => 'woo_login_border_enable' ),
            
            'WOOshadowEnable'       => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Schlagschatten', 'mod' => 'woo_shadow_shadow_enable', 'default' => 0 ),
            'WOOsdwgroup'           => array( 'section' => $section, 'type' => 'group',         'label' => 'Schlagschatten einstellen', 'mod' => 'woo_shadow_shadow_group', 'input_attrs' => array( 'children' => 1 ),
                                                                                                    'dependency' => ['woo_shadow_shadow_enable'] ),
            '--WOOshadow'           => array( 'section' => $section, 'type' => 'shadow',        'mod' => 'woo_shadow_shadow', 'default' => 'none', 
                                                                                                    'dependency' => ['woo_shadow_shadow_enable'] ),
        );
                
        /*
         *  Tabellen
         */
        $section = 'woo_tables';
        $settings[] = array(
            'WOOtableSep'      => array( 'section' => $section, 'type' => 'separator', 'label' => 'Allgemein', 'mod' => 'woo_sep_tables' ),
            
            '--WOOtablealign'        => array( 'section' => $section, 'type' => 'select',    'description' => 'Ausrichtung der Inhalte', 'mod' => 'woo_table_align', 'default' => 'middle', 'choices' => array( 'top' => 'oben', 'middle' => 'mittig (Standard)', 'bottom' => 'unten' ) ),
            '--WOOtablebgcolor'      => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Hintergrundfarbe', 'mod' => 'woo_table_background_color2', 'default' => 'color23', 'transport' => 'refresh' ),
            '--WOOtableborderRadius' => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_table_border_radius', 'default' => 4, 'unit' => 'px', ),
            
            'WOOtableborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'Rahmen außen', 'mod' => 'woo_table_border_enable', 'default' => 0, ),
            '--WOOtablebordercolor'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Rahmenfarbe', 'mod' => 'woo_table_border_color2', 'default' => 'color33', 'transport' => 'refresh', 'dependency' => ['woo_table_border_enable'] ),
            
            '--WOOtableborderWidth'  => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_table_border_width', 'default' => 0, 'unit' => 'px', 'dependency' => 'woo_table_border_enable' ),
            'WOOtablebordergroup'    => array( 'section' => $section, 'type' => 'group',     'label' => 'einzelne Seiten', 'mod' => 'group_woo_table_border', 'input_attrs' => array( 'children' => 4 ), 'dependency' => 'woo_table_border_enable' ),
            '--WOOtableborderTop'    => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_table_border_style_top', 'default' => 'solid', 'dependency' => 'woo_table_border_enable' ),
            '--WOOtableborderLeft'   => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_table_border_style_left', 'default' => 'solid', 'dependency' => 'woo_table_border_enable' ),
            '--WOOtableborderRight'  => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_table_border_style_right', 'default' => 'solid', 'dependency' => 'woo_table_border_enable' ),
            '--WOOtableborderBottom' => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_table_border_style_bottom', 'default' => 'solid', 'dependency' => 'woo_table_border_enable' ),
            
            'WOOtableheadSep'       => array( 'section' => $section, 'type' => 'separator', 'label' => 'Kopfzeilen', 'mod' => 'woo_sep_table_head' ),
            
            '--WOOtableheadfontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Schrift', 'mod' => 'woo_table_head_fontfamily', 'default' => 'fontFamily2', 'transport' => 'refresh' ),
            '--WOOtableheadfontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_head_font_size', 'default' => 0.85, 'unit' => 'em' ),
            '--WOOtableheadfontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_table_head_font_weight', 'default' => 600 ),
            '--WOOtableheadlineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_head_line_height', 'default' => 150, 'unit' => '%' ),
            'WOOtableheadfontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_table_head_font', 'input_attrs' => array( 'children' => 3 ) ),
            '--WOOtableheadtextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_table_head_text_transform', 'default' => 'none' ),
            '--WOOtableheadletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_head_letter_spacing', 'default' => 0, 'unit' => 'px' ),
            '--WOOtableheadwordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_head_word_spacing', 'default' => 0, 'unit' => 'px' ),
            
            '--WOOtableheadtopbottom'    => array( 'section' => $section, 'type' => 'range',     'label' => 'Größen & Abstände', 'lbl' => 'Padding oben/unten:', 'mod' => 'woo_table_head_topbottom', 'default' => 9, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 40, 'step'  => 1 ) ),
            
            '--WOOtableheadtxtcolor'     => array( 'section' => $section, 'type' => 'colselect', 'label' => 'Aussehen', 'description' => 'Schriftfarbe', 'mod' => 'woo_table_head_text_color2', 'default' => 'color32', 'transport' => 'refresh' ),
            '--WOOtableheadbgcolor'      => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Hintergrund', 'mod' => 'woo_table_head_background_color2', 'default' => 'color33', 'transport' => 'refresh' ),
            
            'WOOtableheadbordersecEnable'   => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'horizontale Trennlinie', 'mod' => 'woo_table_head_border_enable_sec', 'default' => 0 ),
            '--WOOtableheadborderseccolor'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Linienfarbe', 'mod' => 'woo_table_head_border_color2_sec', 'default' => 'color22', 'transport' => 'refresh', 'dependency' => ['woo_table_head_border_enable_sec'] ),
            
            '--WOOtableheadbordersecWidth'  => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_table_head_border_width_sec', 'default' => 0, 'unit' => 'px', 'dependency' => 'woo_table_head_border_enable_sec' ),
            '--WOOtableheadbordersecstyle'  => array( 'section' => $section, 'type' => 'select',      'description' => 'Stil', 'mod' => 'woo_table_head_border_style_sec', 'default' => 'solid', 'dependency' => 'woo_table_head_border_enable_sec' ),
            
            'WOOtablenormalSep'      => array( 'section' => $section, 'type' => 'separator', 'label' => 'Normale Zeilen', 'mod' => 'woo_sep_table_normal' ),
            
            '--WOOtablefontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Schrift', 'mod' => 'woo_table_fontfamily', 'default' => 'fontFamily1', 'transport' => 'refresh' ),
            '--WOOtablefontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_font_size', 'default' => 1, 'unit' => 'em' ),
            '--WOOtablefontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_table_font_weight', 'default' => 400 ),
            '--WOOtablelineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_line_height', 'default' => 150, 'unit' => '%' ),
            'WOOtablefontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_table_font', 'input_attrs' => array( 'children' => 3 ) ),
            '--WOOtabletextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_table_text_transform', 'default' => 'none' ),
            '--WOOtableletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_letter_spacing', 'default' => 0, 'unit' => 'px' ),
            '--WOOtablewordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_table_word_spacing', 'default' => 0, 'unit' => 'px' ),
            
            '--WOOtabletopbottom'    => array( 'section' => $section, 'type' => 'range',     'label' => 'Größen & Abstände', 'lbl' => 'Padding oben/unten:', 'mod' => 'woo_table_topbottom', 'default' => 9, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 40, 'step'  => 1 ) ),
            '--WOOtableleftright'    => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Padding seitlich:', 'mod' => 'woo_table_leftright', 'default' => 12, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 40, 'step'  => 1 ) ),

            '--WOOtabletxtcolor'     => array( 'section' => $section, 'type' => 'colselect', 'label' => 'Aussehen', 'description' => 'Schriftfarbe', 'mod' => 'woo_table_text_color2', 'default' => 'color21', 'transport' => 'refresh' ),
            
            'WOOtablebordersecEnable'   => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'horizontale Trennlinien', 'mod' => 'woo_table_border_enable_sec', 'default' => 0, ),
            '--WOOtableborderseccolor'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Linienfarbe', 'mod' => 'woo_table_border_color2_sec', 'default' => 'color21', 'transport' => 'refresh', 'dependency' => ['woo_table_border_enable_sec'] ),
            '--WOOtablebordersecWidth'  => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_table_border_width_sec', 'default' => 0, 'unit' => 'px', 'dependency' => 'woo_table_border_enable_sec' ),
            '--WOOtablebordersecstyle'  => array( 'section' => $section, 'type' => 'select',      'description' => 'Stil', 'mod' => 'woo_table_border_style_sec', 'default' => 'solid', 'dependency' => 'woo_table_border_enable_sec' ),
        );
                
        /*
         *  Tabs
         */
        $section = 'woo_tabs';
        $settings[] = array(
            'WOOtabSep'             => array( 'section' => $section, 'type' => 'separator', 'label' => 'Allgemein', 'mod' => 'woo_sep_tab' ),
            
            '--WOOtablinemargin'    => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand darunter:', 'mod' => 'woo_tab_line_margin', 'default' => 30, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step'  => 1 ) ),
            '--WOOtablinecolor'     => array( 'section' => $section, 'type' => 'colselect',   'label' => 'Linie darunter', 'description' => 'Linienfarbe', 'mod' => 'woo_tab_line_color2', 'default' => 'color31', 'transport' => 'refresh' ),
            
            '--WOOtablineWidth'     => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_tab_line_border_width', 'default' => 1, 'unit' => 'px' ),
            '--WOOtablinestyle'     => array( 'section' => $section, 'type' => 'select',      'description' => 'Stil', 'mod' => 'woo_tab_line_border_style', 'default' => 'solid' ),
            '--WOOtablinepadding'   => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Padding seitlich:', 'mod' => 'woo_tab_line_padding', 'default' => 10, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),
            
            'WOOtabsSep'        => array( 'section' => $section, 'type' => 'separator', 'label' => 'Einzelne Tabs', 'mod' => 'woo_sep_tabs' ),
            
            '--WOOtabfontFamily'   => array( 'section' => $section, 'type' => 'ffselect',  'label' => 'Schrift', 'mod' => 'woo_tab_fontfamily', 'default' => 'fontFamily1', 'transport' => 'refresh' ),
            '--WOOtabfontSize'     => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_tab_font_size', 'default' => 1, 'unit' => 'em' ),
            '--WOOtabfontWeight'   => array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_tab_font_weight', 'default' => 400 ),
            '--WOOtablineHeight'   => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_tab_line_height', 'default' => 150, 'unit' => '%' ),
            'WOOtabfontgroup'      => array( 'section' => $section, 'type' => 'group',     'label' => 'erweiterte Optionen', 'mod' => 'group_woo_tab_font', 'input_attrs' => array( 'children' => 3 ) ),
            '--WOOtabtextTransform'=> array( 'section' => $section, 'type' => 'select',    'mod' => 'woo_tab_text_transform', 'default' => 'none' ),
            '--WOOtabletterSpacing'=> array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_tab_letter_spacing', 'default' => 0, 'unit' => 'px' ),
            '--WOOtabwordSpacing'  => array( 'section' => $section, 'type' => 'range',     'mod' => 'woo_tab_word_spacing', 'default' => 0, 'unit' => 'px' ),
            
            '--WOOtabtopbottom'    => array( 'section' => $section, 'type' => 'range',     'label' => 'Größen & Abstände', 'lbl' => 'Padding oben/unten:', 'mod' => 'woo_tab_topbottom', 'default' => 9, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 20, 'step'  => 1 ) ),
            '--WOOtableftright'    => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Padding seitlich:', 'mod' => 'woo_tab_leftright', 'default' => 16, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 50, 'step'  => 1 ) ),
            '--WOOtabmargin'       => array( 'section' => $section, 'type' => 'range',     'lbl' => 'Abstand dazwischen:', 'mod' => 'woo_tab_margin', 'default' => 4, 'unit' => 'px', 'input_attrs' => array( 'min' => 0, 'max' => 30, 'step'  => 1 ), ),

            '--WOOtabtxtcolor'     => array( 'section' => $section, 'type' => 'colselect', 'label' => 'Aussehen', 'description' => 'Schriftfarbe', 'mod' => 'woo_tab_text_color2', 'default' => 'color21', 'transport' => 'refresh' ),
            '--WOOtabbgcolor'      => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Hintergrund', 'mod' => 'woo_tab_background_color2', 'default' => 'color33', 'transport' => 'refresh' ),
            
            '--WOOtabborderRadius' => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_tab_border_radius', 'default' => 4, 'unit' => 'px', ),
            
            'WOOtabborderEnable'   => array( 'section' => $section, 'type' => 'checkbox',  'label' => 'Rahmen', 'mod' => 'woo_tab_border_enable', 'default' => 0, ),
            '--WOOtabbordercolor'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Rahmenfarbe', 'mod' => 'woo_tab_border_color2', 'default' => 'color21', 'transport' => 'refresh', 'dependency' => ['woo_tab_border_enable'] ),
            '--WOOtabborderWidth'  => array( 'section' => $section, 'type' => 'range',       'mod' => 'woo_tab_border_width', 'default' => 0, 'unit' => 'px', 'dependency' => 'woo_tab_border_enable' ),
            'WOOtabbordergroup'    => array( 'section' => $section, 'type' => 'group',     'label' => 'einzelne Seiten', 'mod' => 'group_woo_tab_border', 'input_attrs' => array( 'children' => 4 ), 'dependency' => 'woo_tab_border_enable' ),
            '--WOOtabborderTop'    => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_tab_border_style_top', 'default' => 'solid', 'dependency' => 'woo_tab_border_enable' ),
            '--WOOtabborderLeft'   => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_tab_border_style_left', 'default' => 'solid', 'dependency' => 'woo_tab_border_enable' ),
            '--WOOtabborderRight'  => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_tab_border_style_right', 'default' => 'solid', 'dependency' => 'woo_tab_border_enable' ),
            '--WOOtabborderBottom' => array( 'section' => $section, 'type' => 'select',      'mod' => 'woo_tab_border_style_bottom', 'default' => 'none', 'dependency' => 'woo_tab_border_enable' ),

            '--WOOtabtxtcolor_h'     => array( 'section' => $section, 'type' => 'colselect', 'label' => 'Hover', 'description' => 'Schriftfarbe', 'mod' => 'woo_tab_text_color2_h', 'default' => 'color31', 'transport' => 'refresh' ),
            '--WOOtabbgcolor_h'      => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Hintergrund', 'mod' => 'woo_tab_background_color2_h', 'default' => 'color22', 'transport' => 'refresh' ),
            '--WOOtabbordercolor_h'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Rahmenfarbe', 'mod' => 'woo_tab_border_color2_h', 'default' => 'color22', 'transport' => 'refresh', 'dependency' => ['woo_tab_border_enable'] ),
            
            '--WOOtabtxtcolor_a'     => array( 'section' => $section, 'type' => 'colselect', 'label' => 'Aktiv', 'description' => 'Schriftfarbe', 'mod' => 'woo_tab_text_color2_a', 'default' => 'color62', 'transport' => 'refresh' ),
            '--WOOtabbgcolor_a'      => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Hintergrund', 'mod' => 'woo_tab_background_color2_a', 'default' => 'color31', 'transport' => 'refresh' ),
            '--WOOtabbordercolor_a'  => array( 'section' => $section, 'type' => 'colselect',   'description' => 'Rahmenfarbe', 'mod' => 'woo_tab_border_color2_a', 'default' => 'color31', 'transport' => 'refresh', 'dependency' => ['woo_tab_border_enable'] ),
        );
                
        /*
            Navigation
        */
        $menu_choices = [];
        $menus = wp_get_nav_menus();
        foreach ($menus as $menu) {
            $menu_choices[$menu->slug] = $menu->name;
        }
        asort( $menu_choices );
        $menu_choices = array_merge( ['none' => 'Menü auswählen'], $menu_choices);
        
        $section = 'woo_navi';
        $settings[] = array(
            
            // cart
            'WOOcartsep'            => array( 'section' => $section, 'type' => 'separator',     'label' => 'Warenkorb Icon', 'description' => 'Fügt dem Hauptmenü ein dynamisches Warenkorb-Symbol hinzu.', 'mod' => 'woo_sep_cart' ),
            'WOOdyncart'            => array( 'section' => $section, 'type' => 'select',        'description' => 'Anzeige', 'mod' => 'woo_cart', 'transport' => 'refresh', 'default' => '', 
                                                                                                    'choices'     => array( '' => 'nicht anzeigen', 'left' => 'als erster Menüpunkt', 'right' => 'als letzter Menüpunkt', ) ),
            'WOOcartPrice'          => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Warenkorb-Summe anzeigen', 'mod' => 'woo_enable_cart_price', 'default' => 0, 'transport' => 'refresh',
                                                                                                    'description' => 'Die Gesamtsumme des Warenkorbs wird hinter dem Warenkorb-Icon angezeigt.', 
                                                                                                    'dependency' => array( array( 'element' => 'woo_cart', 'not_value' => '' ) ) ),
            'WOOcartempty'          => array( 'section' => $section, 'type' => 'checkbox',      'label' => 'Nicht anzeigen wenn leer', 'mod' => 'woo_disable_cart_when_empty', 'default' => 0, 'transport' => 'refresh',
                                                                                                    'description' => 'Das Icon wird erst angezeigt, wenn der Warenkorb mindestens 1 Element enthält.', 
                                                                                                    'dependency' => array( array( 'element' => 'woo_cart', 'not_value' => '' ) ) ),

            '--WOOcartCountSize'    => array( 'section' => $section, 'type' => 'range',         'label' => 'Icon', 'lbl' => 'Größe:', 'mod' => 'woo_cart_count_size', 'default' => 15, 'unit' => 'px',
                                                                                                    'input_attrs' => array( 'min' => 10, 'max' => 20, 'step'  => 1 ),
                                                                                                    'dependency' => array( array( 'element' => 'woo_cart', 'not_value' => '' ) ) ),
            
            '--WOcartCountColor'    => array( 'section' => $section, 'type' => 'colselect',     'description' => 'Farbe', 'mod' => 'woo_cart_count_color2', 'default' => 'color43', 'transport' => 'refresh',
                                                                                                    'dependency' => array( array( 'element' => 'woo_cart', 'not_value' => '' ) ) ),
            '--WOcartCountFontcolor'=> array( 'section' => $section, 'type' => 'colselect',     'description' => 'Schriftfarbe', 'mod' => 'woo_cart_count_fontcolor2', 'default' => 'color62', 'transport' => 'refresh',
                                                                                                    'dependency' => array( array( 'element' => 'woo_cart', 'not_value' => '' ) ) ),
            
            // login
            'WOOloginmenusep'       => array( 'section' => $section, 'type' => 'separator',     'label' => 'Login / Mein Konto', 'description' => 'Fügt einen dynamischen Login-Link zu einem Menü hinzu.', 'mod' => 'woo_sep_cart', 'mod' => 'woo_login_menu_sep' ),
            'WOOloginmenulocation'  => array( 'section' => $section, 'type' => 'select',        'description' => 'Menü wählen', 'mod' => 'woo_login_menu_location', 'transport' => 'refresh', 'default' => 'none', 'choices' => $menu_choices ),
            'WOOloginmenu'          => array( 'section' => $section, 'type' => 'select',        'description' => 'Anzeige', 'mod' => 'woo_login_menu', 'transport' => 'refresh', 'default' => 'right', 
                                                                                                    'choices'     => array( 'left' => 'als erster Menüpunkt', 'right' => 'als letzter Menüpunkt' ), 
                                                                                                    'dependency' => ['element' => 'woo_login_menu_location', 'not_value' => 'none'] ),
            'WOOlogininfo2'         => array( 'section' => $section, 'type' => 'info',          'mod' => 'woo_login_info2' , 'input_attrs' => 'info', 
                                                                                                    'description' => 'Dem gewählten Menü wird ein Link zum Konto-Bereich hinzugefügt. Nicht eingeloggte Nutzer sehen den Text „Login“, eingeloggte Nutzer sehen „Mein Konto“.', 
                                                                                                    'dependency' => ['element' => 'woo_login_menu_location', 'not_value' => 'none'] ),
        );
        
        /*
            Add settings to processor
        */
        $all_settings = array();
        foreach ( (array) $settings as $setting) {
            $all_settings = array_merge($all_settings, $setting);
        }
        processor::$root = array_merge(processor::$root, $all_settings);
    }
    
    /*
        Get Links
    */
    public function init() {
        
        if ( !function_exists('wc_get_page_permalink') ) return;
        
        $links = self::get_woo_links();
        $this->links = $links;
    }
    
    public static function get_woo_links() {

        if ( !function_exists('wc_get_page_permalink') ) return array();
        
        $links = array();
        
        // Get permalinks
        $links['product_link'] = false;
        $products = get_posts( array( 'numberposts' => 1, 'post_type'   => 'product' ) );
        if (is_array($products) && count($products) > 0) {
            $product = $products[0];
            $links['product_id']    = $product->ID;
            $links['product_link']  = get_permalink( $links['product_id'] );
        }
        $links['shop_link']     = wc_get_page_permalink( 'shop' );
        $links['cart_link']     = wc_get_page_permalink( 'cart' );
        $links['account_link']  = wc_get_page_permalink( 'myaccount' );
        $links['tabs_link']     = false;
        if ( get_theme_mod('woo_account_layout', 'list') === 'tabs' ) $links['tabs_link'] = $links['account_link'];
        else if ( get_theme_mod('woo_enable_meta', 1) && $links['product_link'] !== false ) $links['tabs_link'] = $links['product_link'];
        
        return $links;
    }
    
    /*
        Add Inline Script to bind sections to pages
    */
	public function add_scripts() {
        
        if ( !function_exists('wc_get_page_permalink') ) return;

        global $config;
        
        $links = $this->links;
        foreach($links as $id => $link) {
            $links[$id] = esc_js( $link );
        }
        
        // enqueue script
        wp_register_script('woo_customizer_js', get_template_directory_uri().'/extensions/woocommerce/assets/customizer.js', array('jquery'), $config->theme_version, true);
        wp_localize_script('woo_customizer_js', 'local', $links );
        wp_enqueue_script('woo_customizer_js');
    }
    
    /*
        Modify Customizer Preview
    */
    public function preview_fill_cart() {
        if ( !is_customize_preview() ) return;
        if ( !is_cart() && !is_checkout() ) return;
        
        if ( !function_exists('wc_get_page_permalink') ) return;
        
        // add newest product to cart
        if ( WC()->cart->get_cart_contents_count() == 0 ) {
            if ( isset($this->links['product_id']) ) WC()->cart->add_to_cart( $this->links['product_id'] );
        }
        // hide infinite block-overlay
        echo "<style>.blockUI.blockOverlay{display:none!important;}</style>";
    }
    public function preview_allow_payments( $allowed_gateways ){
        if ( !is_customize_preview() ) return $allowed_gateways;
        
        if ( !function_exists('wc_get_page_permalink') ) return $allowed_gateways;
        
        if ( empty($allowed_gateways) ) {
            $allowed_gateways = array();
            $all_gateways = WC()->payment_gateways->payment_gateways();
            $allowed_gateways['paypal'] = isset($all_gateways['paypal']) ? $all_gateways['paypal'] : null;
            $allowed_gateways['invoice'] = isset($all_gateways['invoice']) ? $all_gateways['invoice'] : null;
        }
        return $allowed_gateways;
    }
    
    
}