• Resolved nsemczyk

    (@nsemczyk)


    Hi !

    Thank you very much for your plugin! I tried to install it on a multisite version but it won’t activate.

    The get_option(‘active_plugins’) doesn’t test if GravityForm is activate on the network. So I put a patch in the activation function to take into account this case, here is the code if you could update the plugin accordingly it would be great and surely useful for several users.

    The patch that I use :

        public function require_gf()
        {
            if ((is_multisite() && !is_plugin_active_for_network('gravityforms/gravityforms.php')) ||
                (!is_multisite() && !in_array('gravityforms/gravityforms.php', apply_filters('active_plugins', get_option('active_plugins'))))) {
                add_action(
                    'admin_notices',
                    function () {
                        echo '<div class="error"><p>Sorry, This Addon Requires Gravity forms to be installed and activated.</p></div>';
                    }
                );
                deactivate_plugins(GF_FREE_SMS_VERIFICATION_PATH);
                if (isset($_GET['activate'])) {
                    unset($_GET['activate']);
                }
            }
        }
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Plugin doesn’t activate into multisite’ is closed to new replies.