diff --git a/admin/admin-init.php b/admin/admin-init.php index 4a30ae3b3a4..96ada90681a 100644 --- a/admin/admin-init.php +++ b/admin/admin-init.php @@ -9,11 +9,11 @@ * @package WooCommerce */ -include_once( 'admin-settings-forms.php' ); -include_once( 'admin-settings.php' ); include_once( 'admin-install.php' ); function woocommerce_admin_init() { + include_once( 'admin-settings-forms.php' ); + include_once( 'admin-settings.php' ); include_once( 'admin-attributes.php' ); include_once( 'admin-dashboard.php' ); include_once( 'admin-import.php' ); diff --git a/admin/admin-install.php b/admin/admin-install.php index 181802702d3..3a6c6ae732c 100644 --- a/admin/admin-install.php +++ b/admin/admin-install.php @@ -23,7 +23,10 @@ function queue_install_woocommerce() { */ function install_woocommerce() { - global $woocommerce; + global $woocommerce, $woocommerce_settings; + + // Include settings so that we can run through defaults + include( 'admin-settings.php' ); // Define post types before we start woocommerce_post_type(); diff --git a/admin/admin-settings.php b/admin/admin-settings.php index 7d9daa83a5d..307ada7c3db 100644 --- a/admin/admin-settings.php +++ b/admin/admin-settings.php @@ -539,6 +539,7 @@ $woocommerce_settings['tax'] = apply_filters('woocommerce_tax_settings', array( * * Handles the display of the main woocommerce settings page in admin. */ +if (!function_exists('woocommerce_settings')) { function woocommerce_settings() { global $woocommerce, $woocommerce_settings; @@ -704,4 +705,5 @@ function woocommerce_settings() {