# yaymail/3.3/includes/Plugin.php

YayMail – WooCommerce Email Customizer, version 3.3. 43 lines.

- Page: https://pluginprobe.com/plugins/yaymail/3.3/code/includes/Plugin.php
- Raw: https://pluginprobe.com/plugins/yaymail/3.3/raw/includes/Plugin.php
- Modified: 2023-08-01T09:04: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/yaymail/3.3/code/includes/Plugin.php#L10-L20`.

```php
<?php
namespace YayMail;

use YayMail\Page\Source\CustomPostType;

defined( 'ABSPATH' ) || exit;
/**
 * Plugin activate/deactivate logic
 */
class Plugin {

	protected static $instance = null;

	public static function getInstance() {
		if ( null == self::$instance ) {
			self::$instance = new self();
			$versionCurrent = YAYMAIL_VERSION;
			$versionOld     = get_option( 'yaymail_version' );
			if ( $versionCurrent != $versionOld ) {
				self::activate();
			}
		}

		return self::$instance;
	}

	/**
	 *
	 * Plugin activated hook
	 */
	public static function activate() {
		Helper\ActivePlugin::getInstance();
	}

	/**
	 *
	 * Plugin deactivate hook
	 */
	public static function deactivate() {

	}
}

```
