How to resolve issue with WordPress plugin “Accept Donations with PayPal” that cannot be disabled or removed.

Issue.

When attempting to disable or remove the WordPress plugin “Accept Donations with PayPal”, you may receive the following error

Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method wpedon_ wpeasydonation::wpedon_deactivate() cannot be called statically in

Solution

This is an error that occurs because a plugin method is not static. Specifically, the ‘wpedon_deactivate()’ method is not static and cannot be called from a static context.

To resolve this issue, the ‘wpedon_deactivate()’ method needs to have the ‘static’ keyword added. As a result, the relevant part of the ‘easy-paypal-donation.php’ file should look like this

66 static function wpedon_deactivate() { 
67 delete_option("wpedon_notice_shown"); 
68 } 
69 
70 static function wpedon_uninstall() { 
71 }

This allows the method to be called from a static context as well, allowing the plugin to be disabled or deleted.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top