PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 All 83 releases
← All changes | app/Bootstrap.php +8 -0 3.0.14.2trunk View file →
@@ -348,8 +348,16 @@
348 348 * Plugin deactivation
349 349 */
350 350 public function deactivate(): void
351 351 {
352 + // Clear the booking maintenance sweeps so a deactivated plugin leaves no
353 + // orphan events behind in WP-Cron. They are re-scheduled on `init` when
354 + // the plugin is active again; the expiry activation floor is an option,
355 + // so it survives and still protects pre-existing bookings.
356 + foreach (['yatra_booking_expiry', 'yatra_booking_reminder', 'yatra_booking_completion'] as $hook) {
357 + wp_clear_scheduled_hook($hook);
358 + }
359 +
352 360 // Clean up if needed
353 361 flush_rewrite_rules();
354 362 }
355 363