# fluent-support/2.1.1/app/Services/Integrations/Maintenance.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 2.1.1. 69 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/2.1.1/code/app/Services/Integrations/Maintenance.php
- Raw: https://pluginprobe.com/plugins/fluent-support/2.1.1/raw/app/Services/Integrations/Maintenance.php
- Modified: 2025-05-28T13:27:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/2.1.1/code/app/Services/Integrations/Maintenance.php#L10-L20`.

```php
<?php

namespace FluentSupport\App\Services\Integrations;

use FluentSupport\App\Services\Helper;

class Maintenance
{
    public function maybeProcessData()
    {
        if (!$this->isAllowed() || !$this->timeMatched()) {
            return false;
        }

        $response = wp_remote_post($this->getApiUrl(), [
            'body'      => [
                'payload' => $this->getData()
            ],
            'sslverify' => false,
            'cookies'   => []
        ]);

        if (is_wp_error($response)) {
            return false;
        }

        update_option('_fluent_last_m_run', time());

        return true;
    }

    private function getData()
    {
        global $wp_version;
        return [
            'plugin_version' => FLUENT_SUPPORT_VERSION,
            'php_version'    => (defined('PHP_VERSION')) ? PHP_VERSION : phpversion(),
            'wp_version'     => $wp_version,
            'plugins'        => (array)get_option('active_plugins'),
            'site_lang'      => get_bloginfo('language'),
            'site_url'       => site_url('/'),
            'theme'          => wp_get_theme()->get('Name'),
            'admin_email'    => get_bloginfo('admin_email'),
            'site_title'     => get_bloginfo('name')
        ];
    }

    private function isAllowed()
    {
        return apply_filters('fluentsupport_allow_share_essential', Helper::getOption('_share_essential', 'no') == 'yes');
    }

    private function timeMatched()
    {
        $prevValue = get_option('_fluent_last_m_run');
        if (!$prevValue) {
            return true;
        }

        return (time() - $prevValue) > 518400; // 6 days match
    }

    private function getApiUrl()
    {
        return 'https://api.wpmanageninja.com/plugin-maintenance';
    }

}

```
