deleteStore($store_id) ? 'has been deleted' : 'did not delete'; error_log("store id {$store_id} {$result} MailChimp"); } } } } catch (\Exception $e) { error_log($e->getMessage().' on '.$e->getLine().' in '.$e->getFile()); } mailchimp_remove_communication_status(); mailchimp_clean_database(); mailchimp_remove_activity_panel_inbox_notes(); } if (!is_multisite()) { mailchimp_woocommerce_uninstall(); } else { global $wpdb; try { foreach ($wpdb->get_col("SELECT blog_id FROM $wpdb->blogs") as $mailchimp_current_blog_id) { switch_to_blog($mailchimp_current_blog_id); mailchimp_woocommerce_uninstall(); } restore_current_blog(); } catch (\Exception $e) {} }