Moved settings init so it can be hooked into

This commit is contained in:
Mike Jolley 2011-09-19 10:49:52 +01:00
parent 491700f1ab
commit 1d162f6dab
3 changed files with 8 additions and 3 deletions

View File

@ -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' );

View File

@ -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();

View File

@ -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() {
</script>
</div>
<?php
}
}