Forum Replies Created

Viewing 1 replies (of 1 total)
  • You can add a PHP file (the file name doesn’t matter) to the mu-plugins folder (create it if it doesn’t exist yet) inside your wp-content directory with the following code:

    <?php
    add_action('plugins_loaded', function(){
    if( defined('WEED_PLUGIN_VERSION') && WEED_PLUGIN_VERSION === '6.2.1' ){
    remove_action( 'plugins_loaded', array( Weed\Setup::get_instance(), 'setup' ) );
    add_action( 'init', array( Weed\Setup::get_instance(), 'setup' ) );
    }
    }, 5);

    If the plugin is installed and the plugin version is 6.2.1 it removes the plugin’s setup function from the plugins_loaded action and reattaches it to the init action.

Viewing 1 replies (of 1 total)