Change order of wc_install to after db tables created

This commit is contained in:
roykho 2021-06-30 19:49:56 -07:00
parent 574d82bd16
commit 79e3f15696
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
1 changed files with 2 additions and 2 deletions

View File

@ -177,12 +177,12 @@ class WC_Unit_Tests_Bootstrap {
define( 'WC_REMOVE_ALL_DATA', true );
include $this->plugin_dir . '/uninstall.php';
WC_Install::install();
// Initialize the WC API extensions.
\Automattic\WooCommerce\Admin\Install::create_tables();
\Automattic\WooCommerce\Admin\Install::create_events();
WC_Install::install();
// Reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374.
if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) {
$GLOBALS['wp_roles']->reinit();