File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change 32
32
// Prevent direct file access
33
33
defined ('ABSPATH ' ) or exit;
34
34
35
-
36
-
37
-
38
- /** @ignore */
39
- function _mc4wp_load_plugin ()
40
- {
35
+ // bootstrap main plugin
36
+ add_action ('plugins_loaded ' , function () {
41
37
global $ mc4wp ;
42
38
43
39
// don't run if Mailchimp for WP Pro 2.x is activated
44
- if (defined ('MC4WP_VERSION ' )) {
45
- return ;
46
- }
47
-
48
40
// don't run if PHP version is lower than 7.4.0
49
- if (PHP_VERSION_ID < 70400 ) {
41
+ if (defined ( ' MC4WP_VERSION ' ) || PHP_VERSION_ID < 70400 ) {
50
42
return ;
51
43
}
52
44
@@ -101,10 +93,7 @@ function _mc4wp_load_plugin()
101
93
102
94
// bootstrap integrations
103
95
require __DIR__ . '/integrations/bootstrap.php ' ;
104
- }
105
-
106
- // bootstrap main plugin
107
- add_action ('plugins_loaded ' , '_mc4wp_load_plugin ' , 8 );
96
+ }, 8 );
108
97
109
98
// schedule the action hook to refresh the stored Mailchimp lists on a daily basis
110
99
register_activation_hook (__FILE__ , function () {
You can’t perform that action at this time.
0 commit comments