Cannot uninstall WPMUDEV-Snapshot Pro plugin

I get the following error when trying to delete plugin and related data:
"Fatal error: Call to private WPMUDEVSnapshot::__construct() from invalid context in /customers/f/9/e/myskatespots.com/httpd.www/wp-content/plugins/snapshot/uninstall.php on line 7"

  • Milan

    Hi @Joakim,

    I hope you are having a good day.( Except this issue. :slight_smile: )

    Please do follow these steps and check that you are able to delete plugin or not.

    #1) Navigate to uninstall.php file of snapshot pro plugin. File path is /wp-content/plugins/snapshot/uninstall.php.
    #2) Comment out line no. 7

    Before commenting out line no. 7 of uninstall.php file.

    <?php
    if (WP_UNINSTALL_PLUGIN === "snapshot/snapshot.php") {
    
    	if (!isset($wpmudev_snapshot))
    	{
    		include dirname(__FILE__) . "/snapshot.php";
    	$wpmudev_snapshot = new WPMUDEVSnapshot();
    	}
    	$wpmudev_snapshot->uninstall_snapshot();
    }

    After commenting out line no 7 uninstall.php file.

    <?php
    if (WP_UNINSTALL_PLUGIN === "snapshot/snapshot.php") {
    
    	if (!isset($wpmudev_snapshot))
    	{
    		include dirname(__FILE__) . "/snapshot.php";
    		// $wpmudev_snapshot = new WPMUDEVSnapshot();
    	}
    	$wpmudev_snapshot->uninstall_snapshot();
    }

    #3) Try to delete plugin now.

    Let me know how it goes @Joakim. :slight_smile:

    Warmest Regards,
    Milan.

  • Milan

    Hi @Joakim,

    I hope you are having a good day.

    Commenting out that line trick was not a perfect solution. But that trick was worked for me. So just suggested you. I though that might work for you too. :slight_smile:

    Btw deleting plugin from ftp will not cleanup data of snapshot plugins which stored in database. It will just remove files from your host server.

    As manual database cleanup requires feedback of developer I am flagging developer for this.

    One quick note I want to mention here that developer response time is slightly more than usual staff response time.

    Please let me know if there is anything else I can do for you. :slight_smile:

    Kind Regards,
    Milan.