[Debug] register_uninstall_hook was called incorrectly.
-
Hello,
I’m not asking for support since this plugin is somehow long forgotten by its creator.I’ll use this topic to explain how I solved some issues from this plugin.
1) Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in XXX/wp-includes/functions.php on line 4773
==> Go to wp-cta-top-bar/includes/class-wpctatb.php and replace the line 55 to 58 by:
private function init_hooks() { register_activation_hook( WPCTATB_FILE, 'plugin_activate' ); //activate hook register_deactivation_hook( WPCTATB_FILE, 'plugin_deactivate' ); //deactivation hook register_uninstall_hook( WPCTATB_FILE, 'plugin_uninstall' ); //uninstall hook }
What I did was just remove the “array($this,” which was the old way of uninstalling things on WordPress.
- The topic ‘[Debug] register_uninstall_hook was called incorrectly.’ is closed to new replies.