Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
This commit is contained in:
Timmy Crawford 2020-03-12 10:57:57 -07:00 committed by GitHub
parent 41684985cf
commit 8a94703276
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ class FeaturePlugin {
if ( did_action( 'plugins_loaded' ) ) {
self::on_plugins_loaded();
} else {
// Make sure we hook into `plugins_loaded` before core's Automattic\WooCommerce\Package::init().
// If core is network activated but we aren't, the packaged version of WooCommerce Admin will
// attempt to use a data store that hasn't been loaded yet - because we've defined our constants here.
// See: https://github.com/woocommerce/woocommerce-admin/issues/3869.
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), 9 );
}
add_filter( 'action_scheduler_store_class', array( $this, 'replace_actionscheduler_store_class' ) );