Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2410 from woocommerce/fix/woocommerce-disabled-fatal
Browse files Browse the repository at this point in the history
Fix: Exit deactivate early if WooCommerce not active.
  • Loading branch information
psealock authored Jun 13, 2019
2 parents f16f6b9 + accce7f commit b566d0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions woocommerce-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b566d0c

Please sign in to comment.