File "PluginActivatedHook.php"

Full Path: /home/warrior1/public_html/plugins/mailpoet/lib/Config/PluginActivatedHook.php
File size: 682 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace MailPoet\Config;

if (!defined('ABSPATH')) exit;


use MailPoet\WP\Functions as WPFunctions;

class PluginActivatedHook {
  private $deferredAdminNotices;

  public function __construct(
    DeferredAdminNotices $deferredAdminNotices
  ) {
    $this->deferredAdminNotices = $deferredAdminNotices;
  }

  public function action($plugin, $networkWide) {
    if ($plugin === WPFunctions::get()->pluginBasename(Env::$file) && $networkWide) {
      $this->deferredAdminNotices->addNetworkAdminNotice(__("We noticed that you're using an unsupported environment. While MailPoet might work within a MultiSite environment, we don’t support it.", 'mailpoet'));
    }
  }
}