PluginProbe
YayMail – WooCommerce Email Customizer / 3.4.1
YayMail – WooCommerce Email Customizer v3.4.1
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
yaymail / includes / Plugin.php

Plugin.php in YayMail – WooCommerce Email Customizer 3.4.1, at includes/Plugin.php

51 lines 844 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail;
3
4 use YayMail\Page\Source\CustomPostType;
5
6 defined( 'ABSPATH' ) || exit;
7 /**
8 * Plugin activate/deactivate logic
9 */
10 class Plugin {
11
12 protected static $instance = null;
13
14 public static function getInstance() {
15 if ( null == self::$instance ) {
16 self::$instance = new self();
17 self::$instance->do_hooks();
18 }
19
20 return self::$instance;
21 }
22
23 private function do_hooks() {
24 add_action( 'init', array( $this, 'init' ) );
25 }
26
27 public function init() {
28 $versionCurrent = YAYMAIL_VERSION;
29 $versionOld = get_option( 'yaymail_version' );
30 if ( $versionCurrent != $versionOld ) {
31 self::activate();
32 }
33 }
34
35 /**
36 *
37 * Plugin activated hook
38 */
39 public static function activate() {
40 Helper\ActivePlugin::getInstance();
41 }
42
43 /**
44 *
45 * Plugin deactivate hook
46 */
47 public static function deactivate() {
48
49 }
50 }
51