1 | <?php |
||
23 | class WCSATT_STT { |
||
24 | |||
25 | /* Plugin version. */ |
||
26 | const VERSION = '1.0.0'; |
||
27 | |||
28 | /* Required WC version. */ |
||
29 | const REQ_WC_VERSION = '2.3.0'; |
||
30 | |||
31 | /* Required WCSATT version */ |
||
32 | const REQ_WCSATT_VERSION = '1.1.0'; |
||
33 | |||
34 | /* Text domain. */ |
||
35 | const TEXT_DOMAIN = 'wc-satt-stt'; |
||
36 | |||
37 | /** |
||
38 | * @var WCSATT_STT - the single instance of the class. |
||
39 | * |
||
40 | * @since 1.0.0 |
||
41 | */ |
||
42 | protected static $_instance = null; |
||
43 | |||
44 | /** |
||
45 | * Main WCSATT_STT Instance. |
||
46 | * |
||
47 | * Ensures only one instance of WCSATT_STT is loaded or can be loaded. |
||
48 | * |
||
49 | * @static |
||
50 | * @see WCSATT_STT() |
||
51 | * @return WCSATT_STT - Main instance |
||
52 | * @since 1.0.0 |
||
53 | */ |
||
54 | public static function instance() { |
||
60 | |||
61 | /** |
||
62 | * Cloning is forbidden. |
||
63 | * |
||
64 | * @since 1.0.0 |
||
65 | */ |
||
66 | public function __clone() { |
||
69 | |||
70 | /** |
||
71 | * Unserializing instances of this class is forbidden. |
||
72 | * |
||
73 | * @since 1.0.0 |
||
74 | */ |
||
75 | public function __wakeup() { |
||
78 | |||
79 | /** |
||
80 | * Load the plugin. |
||
81 | */ |
||
82 | public function __construct() { |
||
87 | |||
88 | public function plugin_path() { |
||
91 | |||
92 | /* |
||
93 | * Check requirements on activation. |
||
94 | * |
||
95 | * @global $woocommerce |
||
96 | */ |
||
97 | public function load_plugin() { |
||
121 | |||
122 | /** |
||
123 | * Display a warning message if minimum version of WooCommerce check fails. |
||
124 | * |
||
125 | * @return void |
||
126 | */ |
||
127 | public function wcsatt_stt_wc_admin_notice() { |
||
130 | |||
131 | /** |
||
132 | * Display a warning message if minimum version of WooCommerce Subscribe All the Things check fails. |
||
133 | * |
||
134 | * @return void |
||
135 | */ |
||
136 | public function wcsatt_stt_admin_notice() { |
||
139 | |||
140 | /** |
||
141 | * Initialize the plugin if ready. |
||
142 | * |
||
143 | * @return void |
||
144 | */ |
||
145 | public function init_plugin() { |
||
149 | |||
150 | /** |
||
151 | * Show row meta on the plugin screen. |
||
152 | * |
||
153 | * @param mixed $links Plugin Row Meta |
||
154 | * @param mixed $file Plugin Base file |
||
155 | * @param array $data Plugin Data |
||
156 | * @return array |
||
157 | */ |
||
158 | public function plugin_meta_links( $links, $file, $data, $status ) { |
||
167 | |||
168 | } // END class |
||
169 | |||
172 | return WCSATT_STT::instance(); |