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 3232// Prevent direct file access
3333defined ('ABSPATH ' ) or exit;
3434
35-
36-
37-
38- /** @ignore */
39- function _mc4wp_load_plugin ()
40- {
35+ // bootstrap main plugin
36+ add_action ('plugins_loaded ' , function () {
4137 global $ mc4wp ;
4238
4339 // don't run if Mailchimp for WP Pro 2.x is activated
44- if (defined ('MC4WP_VERSION ' )) {
45- return ;
46- }
47-
4840 // 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 ) {
5042 return ;
5143 }
5244
@@ -101,10 +93,7 @@ function _mc4wp_load_plugin()
10193
10294 // bootstrap integrations
10395 require __DIR__ . '/integrations/bootstrap.php ' ;
104- }
105-
106- // bootstrap main plugin
107- add_action ('plugins_loaded ' , '_mc4wp_load_plugin ' , 8 );
96+ }, 8 );
10897
10998// schedule the action hook to refresh the stored Mailchimp lists on a daily basis
11099register_activation_hook (__FILE__ , function () {
You can’t perform that action at this time.
0 commit comments