# acymailing/11.1.0/back/Helpers/global/version.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 11.1.0. 68 lines.

- Page: https://pluginprobe.com/plugins/acymailing/11.1.0/code/back/Helpers/global/version.php
- Raw: https://pluginprobe.com/plugins/acymailing/11.1.0/raw/back/Helpers/global/version.php
- Modified: 2026-08-03T10:18:54+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/acymailing/11.1.0/code/back/Helpers/global/version.php#L10-L20`.

```php
<?php
defined('ABSPATH') || die('Restricted Access');

/**
 * Return TRUE if the level is handled by the current application
 * Return FALSE if the level is not enough
 */
function acym_level(int $neededLevel): bool
{
    $levels = [
        'Starter' => ACYM_STARTER,
        'Essential' => ACYM_ESSENTIAL,
        'Enterprise' => ACYM_ENTERPRISE,
    ];

    $config = acym_config();
    $currentLevel = $config->get('level');

    $expirationDate = $config->get('expirationdate', 'not-set');

    if ($config->get('isTrial', 0) == 1 && ($expirationDate !== 'not-set' && $expirationDate < time())) {
        $currentLevel = 'Starter';
    }

    $currentLevelNumber = $levels[$currentLevel] ?? 0;

    return $currentLevelNumber >= $neededLevel;
}

function acym_upgradeTo(string $version, string $utmMedium): void
{
    $link = ACYM_ACYMAILING_WEBSITE.'pricing?utm_source=acymailing_plugin&utm_medium='.$utmMedium.'&utm_campaign=purchase';
    $text = $version === 'essential' ? 'AcyMailing Essential' : 'AcyMailing Enterprise';
    echo '<div class="acym__upgrade cell grid-x text-center align-center">
            <h2 class="acym__listing__empty__title cell">'.wp_kses(
            acym_translationSprintf('ACYM_USE_THIS_FEATURE', '<span class="acym__color__blue">'.esc_html($text).'</span>'),
            [
                'span' => [
                    'class' => true,
                ],
            ]
        ).'</h2>
            <a target="_blank" href="'.esc_url($link).'" class="cell medium-6 large-shrink button acym__button__upgrade">'.esc_html(
            acym_translation('ACYM_UPGRADE_NOW_SIMPLE')
        ).'</a>
          </div>';
}

function acym_existsAcyMailing59(): bool
{
    $allTables = acym_getTables();

    if (!in_array(acym_getPrefix().'acymailing_config', $allTables)) {
        return false;
    }

    $version = acym_loadResult('SELECT `value` FROM #__acymailing_config WHERE `namekey` = "version"');

    return version_compare($version, '5.9.0', '>=');
}

function acym_displayButtonGetProVersion(string $class = 'cell shrink', string $text = 'ACYM_UPGRADE_NOW_SIMPLE'): void
{
    echo '<a href="'.esc_url(ACYM_ACYMAILING_WEBSITE.'pricing').'" 
            target="_blank" 
            class="button acym__button__upgrade '.esc_attr($class).'">'.esc_html(acym_translation($text)).'</a>';
}

```
