Install fix

This commit is contained in:
Mike Jolley 2011-09-06 16:51:28 +01:00
parent 11a9e60c39
commit cf795c1aec
2 changed files with 10 additions and 4 deletions

View File

@ -9,6 +9,13 @@
* @package WooCommerce
*/
/**
* Queue install when activated
*/
function queue_install_woocommerce() {
add_action('init', 'install_woocommerce', 0);
}
/**
* Install woocommerce
*
@ -17,7 +24,6 @@
function install_woocommerce() {
global $woocommerce;
$woocommerce = &new woocommerce();
// Define post types before we start
woocommerce_post_type();

View File

@ -50,9 +50,9 @@ if (is_admin()) :
/**
* Installs and upgrades
**/
register_activation_hook( __FILE__, 'install_woocommerce' );
register_activation_hook( __FILE__, 'queue_install_woocommerce' );
if (get_site_option('woocommerce_db_version') != WOOCOMMERCE_VERSION) add_action('init', 'install_woocommerce');
if (get_site_option('woocommerce_db_version') != WOOCOMMERCE_VERSION) add_action('init', 'install_woocommerce', 0);
endif;