HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/appointmentbook.me/wp-content/plugins/fluent-smtp/includes/Activator.php
<?php

namespace FluentMail\Includes;

class Activator
{
    public static function handle($network_wide = false)
    {
        require_once(FLUENTMAIL_PLUGIN_PATH . 'database/FluentMailDBMigrator.php');

        $emailReportHookName = 'fluentmail_do_daily_scheduled_tasks';
        if (!wp_next_scheduled($emailReportHookName)) {
            wp_schedule_event(time(), 'daily', $emailReportHookName);
        }
        
        add_filter('pre_update_option_active_plugins', function ($plugins) {
            $index = array_search('fluent-smtp/fluent-smtp.php', $plugins);
            if ($index !== false) {
                if ($index === 0) {
                    return $plugins;
                }
                unset($plugins[$index]);
                array_unshift($plugins, 'fluent-smtp/fluent-smtp.php');
            }
            return $plugins;
        });
    }
}