Watch
1
0
Fork
You've already forked Seyyed_arc
0
forked from hesabix/arc
Seyyed_arc/extraScripts/arcwoc/includes/class-hesabix-v2-deactivator.php
2026-05-14 01:30:20 +03:30

39 lines
827 B
PHP
Executable file

<?php
/**
* Fired during plugin deactivation
*
* @since 2.0.0
* @package Hesabix_V2
* @subpackage Hesabix_V2/includes
*/
class Hesabix_V2_Deactivator
{
/**
* Deactivate the plugin
*
* @since 2.0.0
*/
public static function deactivate()
{
// Clear scheduled cron jobs
$timestamp = wp_next_scheduled('hesabix_v2_process_queue');
if ($timestamp) {
wp_unschedule_event($timestamp, 'hesabix_v2_process_queue');
}
$timestamp = wp_next_scheduled('hesabix_v2_clean_old_logs');
if ($timestamp) {
wp_unschedule_event($timestamp, 'hesabix_v2_clean_old_logs');
}
wp_clear_scheduled_hook('hesabix_v2_pull_stock_cron');
// Note: We don't delete data on deactivation
// Data will only be deleted if user chooses to uninstall
// Flush rewrite rules
flush_rewrite_rules();
}
}