<?php global $sunshine; if (is_array($sunshine->options)) { $options = array(); /* General Options */ $options[] = array('name' => __('General', 'sunshine'), 'type' => 'heading'); $options[] = array('name' => __('Localization', 'sunshine'), 'type' => 'title', 'desc' => ''); $options[] = array('name' => __('Default Country', 'sunshine'), 'id' => 'country', 'type' => 'select', 'select2' => true, 'options' => SunshineCountries::$countries); $options[] = array('name' => __('Taxes', 'sunshine'), 'type' => 'title', 'desc' => ''); foreach (SunshineCountries::$countries as $key => $country) { $states = SunshineCountries::get_states($key); if ($states) { $tax_options[$key] = $country; foreach ($states as $state_key => $state) { $tax_options["{$key}|{$state_key}"] = $country . ' — ' . $state; } } else { $tax_options[$key] = $country; } } asort($tax_options); $tax_options = array_merge(array('' => __('Do not use taxes', 'sunshine')), $tax_options); $options[] = array('name' => __('Country / State', 'sunshine'), 'desc' => __('What country or state should have taxes applied', 'sunshine'), 'id' => 'tax_location', 'type' => 'select', 'select2' => true, 'options' => $tax_options); $options[] = array('name' => __('Tax rate (%)', 'sunshine'), 'desc' => __('Number only', 'sunshine'), 'id' => 'tax_rate', 'type' => 'text', 'css' => 'width: 50px;'); /* $options[] = array( 'name' => __( 'Show all prices with tax included', 'sunshine' ), 'id' => 'show_price_including_tax', 'type' => 'checkbox', 'tip' => __( 'All prices will have the tax % automatically added to each item price','sunshine' ),