Install fix
This commit is contained in:
parent
11a9e60c39
commit
cf795c1aec
|
@ -9,6 +9,13 @@
|
|||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
/**
|
||||
* Queue install when activated
|
||||
*/
|
||||
function queue_install_woocommerce() {
|
||||
add_action('init', 'install_woocommerce', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Install woocommerce
|
||||
*
|
||||
|
@ -17,8 +24,7 @@
|
|||
function install_woocommerce() {
|
||||
|
||||
global $woocommerce;
|
||||
$woocommerce = &new woocommerce();
|
||||
|
||||
|
||||
// Define post types before we start
|
||||
woocommerce_post_type();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue