From e91bf985f43d78ae00838978c53b96e8468ae2bd Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 14 May 2019 19:11:08 +0100 Subject: [PATCH] Call the installer in `register_activation_hook` (https://github.com/woocommerce/woocommerce-admin/pull/2220) * Call installer in register_activation_hook * Just create the tables --- plugins/woocommerce-admin/woocommerce-admin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/woocommerce-admin/woocommerce-admin.php b/plugins/woocommerce-admin/woocommerce-admin.php index 4cbebbbeddc..cede85bda33 100755 --- a/plugins/woocommerce-admin/woocommerce-admin.php +++ b/plugins/woocommerce-admin/woocommerce-admin.php @@ -169,6 +169,10 @@ function wc_admin_activate_wc_admin_plugin() { if ( ! wp_next_scheduled( 'wc_admin_daily' ) ) { wp_schedule_event( time(), 'daily', 'wc_admin_daily' ); } + + // Run the installer on activation. + require_once WC_ADMIN_ABSPATH . 'includes/class-wc-admin-install.php'; + WC_Admin_Install::create_tables(); } register_activation_hook( WC_ADMIN_PLUGIN_FILE, 'wc_admin_activate_wc_admin_plugin' );