<?php

namespace PluginsNameSpaces\Hooks\Handlers;

/**
 * Runs once when the plugin is deactivated.
 */
class DeactivationHandler
{
    /**
     * Handle deactivation. Keep this non-destructive — do not drop
     * tables or delete user data here (use uninstall.php for that).
     *
     * @return void
     */
    public function handle()
    {
        // Clear any scheduled cron events registered by the plugin.
        wp_clear_scheduled_hook('__SNAKE_NAME___daily_tasks');

        flush_rewrite_rules();
    }
}
