Title: Error when uninstalling
Last modified: August 21, 2016

---

# Error when uninstalling

 *  Resolved [Webbasica](https://wordpress.org/support/users/webbasica/)
 * (@webbasica)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/)
 * When trying to uninstall:
    Fatal error: Using $this when not in object context
   in /path-to/wp-content/plugins/world-cup-predictor/world-cup-predictor.php on
   line 299
 * [https://wordpress.org/plugins/world-cup-predictor/](https://wordpress.org/plugins/world-cup-predictor/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [landoweb](https://wordpress.org/support/users/landoweb/)
 * (@landoweb)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003309)
 * I’ll check it tonight.
 *  Plugin Author [landoweb](https://wordpress.org/support/users/landoweb/)
 * (@landoweb)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003345)
 * This has been fixed in version 1.9.1. If you want to make the adjustment manually,
   open the world-cup-predictor.php file and look for function wcp_uninstall() .
   Its contents should look like this:
 *     ```
       function wcp_uninstall() {
       	global $wpdb;
   
       	$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}wcup_stage");
       	$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}wcup_team");
       	$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}wcup_venue");
       	$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}wcup_match");
       	$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}wcup_prediction");
   
       	delete_option( 'wcup_db_version' );
       	delete_option( 'wcup_donated' );
       	delete_option( 'wcup_nag' );
       	delete_option( 'wcup_show_predictions' );
       	delete_option( 'wcup_promo_link' );
       	delete_option( 'wcup_group_stats');
       	delete_option( 'wcup_scoring' );
       	delete_option( 'wcup_countdown_format' );
       	delete_option( 'wcup_browser_locale' );
       	delete_option( 'wcup_match_separator' );
       	delete_option( 'wcup_match_predictions' );
       	delete_option( 'wcup_player_predictions' );	
   
       	$roles = array("subscriber", "contributor", "author", "editor", "administrator");
       	foreach ($roles as $role) {
       		$arole = get_role($role);
       		$arole->remove_cap('wcup_manager');
       	}
       }
       ```
   
 *  Thread Starter [Webbasica](https://wordpress.org/support/users/webbasica/)
 * (@webbasica)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003384)
 * Thanks!
 *  Plugin Author [landoweb](https://wordpress.org/support/users/landoweb/)
 * (@landoweb)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003396)
 * Working now? What is the link of your website?
 *  Thread Starter [Webbasica](https://wordpress.org/support/users/webbasica/)
 * (@webbasica)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003397)
 * I was able to uninstall the plugin. I had on my site [http://www.listomarketing.com](http://www.listomarketing.com)
 *  Plugin Author [landoweb](https://wordpress.org/support/users/landoweb/)
 * (@landoweb)
 * [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003398)
 * Ok. Topic is resolved then.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error when uninstalling’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/world-cup-predictor.svg)
 * [World Cup Predictor](https://wordpress.org/plugins/world-cup-predictor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/world-cup-predictor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/world-cup-predictor/)
 * [Active Topics](https://wordpress.org/support/plugin/world-cup-predictor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/world-cup-predictor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/world-cup-predictor/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [landoweb](https://wordpress.org/support/users/landoweb/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/error-when-uninstalling/#post-5003398)
 * Status: resolved