public static function output()
{
global $current_section, $current_tab;
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
do_action('woocommerce_settings_start');
wp_enqueue_script('woocommerce_settings', WC()->plugin_url() . '/assets/js/admin/settings' . $suffix . '.js', array('jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'select2'), WC()->version, true);
wp_localize_script('woocommerce_settings', 'woocommerce_settings_params', array('i18n_nav_warning' => __('The changes you made will be lost if you navigate away from this page.', 'woocommerce')));
// Include settings pages
self::get_settings_pages();
// Get current tab/section
$current_tab = empty($_GET['tab']) ? 'general' : sanitize_title($_GET['tab']);
$current_section = empty($_REQUEST['section']) ? '' : sanitize_title($_REQUEST['section']);
// Save settings if data has been posted
if (!empty($_POST)) {
self::save();
}
// Add any posted messages
if (!empty($_GET['wc_error'])) {
self::add_error(stripslashes($_GET['wc_error']));
}
if (!empty($_GET['wc_message'])) {
self::add_message(stripslashes($_GET['wc_message']));
}
// Get tabs for the settings page
$tabs = apply_filters('woocommerce_settings_tabs_array', array());
include dirname(__FILE__) . '/views/html-admin-settings.php';
}