diff --git a/woocommerce-admin.php b/woocommerce-admin.php index f9e99f0713d..b589b3250c2 100755 --- a/woocommerce-admin.php +++ b/woocommerce-admin.php @@ -78,6 +78,12 @@ public function on_activation() { * @return void */ public function on_deactivation() { + // Check if we are deactivating due to dependencies not being satisfied. + // If WooCommerce is disabled we can't include files that depend upon it. + if ( ! $this->check_dependencies() ) { + return; + } + $this->includes(); WC_Admin_Reports_Sync::clear_queued_actions(); WC_Admin_Notes::clear_queued_actions();