| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/ravel.network/public/wp-content/plugins/independent-analytics/IAWP/Cron/ |
Upload File : |
<?php
namespace IAWP\Cron;
use IAWPSCOPED\Illuminate\Support\Collection;
use IAWPSCOPED\Illuminate\Support\Str;
/** @internal */
class Unscheduler
{
/**
* Unschedule all cron events for Independent Analytics
*
* @return void
*/
public static function unschedule_all_events()
{
$prefix = 'iawp_';
$raw_cron_data = \get_option('cron');
if (!\is_array($raw_cron_data)) {
return;
}
$event_names = Collection::make();
foreach ($raw_cron_data as $timestamp => $events) {
if (!\is_int($timestamp) || !\is_array($events)) {
continue;
}
foreach ($events as $name => $details) {
if (!Str::startsWith($name, $prefix)) {
continue;
}
$event_names->push($name);
}
}
$event_names->unique()->values()->each(function ($event_name) {
\wp_unschedule_hook($event_name);
});
}
}