PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
← All changes | includes/Deactivator.php +9 -0 1.9.16 → 1.10.20 View file →
@@ -51,13 +51,22 @@
51 51 /**
52 52 * Fired when the plugin is deactivated.
53 53 */
54 54 public function single_deactivate(): void {
55 + // Report churn before tearing anything down, while settings (and so the
56 + // consent state) are still readable.
57 + $lifecycle = new \WCPOS\WooCommercePOS\Services\Lifecycle_Events();
58 + $lifecycle->report_deactivation();
59 + $lifecycle->clear_schedule();
60 +
55 61 // remove pos capabilities.
56 62 $this->remove_pos_capability();
57 63
58 64 // stop the print-job retention purge.
59 65 wp_clear_scheduled_hook( \WCPOS\WooCommercePOS\Services\Print_Job_Service::PURGE_HOOK );
66 +
67 + // stop the journal retention purge.
68 + wp_clear_scheduled_hook( \WCPOS\WooCommercePOS\Sync\Sync_Journal_Purge::PURGE_HOOK );
60 69
61 70 // remove pos rewrite rule.
62 71 flush_rewrite_rules( false ); // false will not overwrite .htaccess.
63 72 }