Title: PHP Notice: Function register_uninstall_hook was called incorrectly.
Last modified: May 19, 2025

---

# PHP Notice: Function register_uninstall_hook was called incorrectly.

 *  [Dima](https://wordpress.org/support/users/dimastorozhuk/)
 * (@dimastorozhuk)
 * [1 year ago](https://wordpress.org/support/topic/php-notice-function-register_uninstall_hook-was-called-incorrectly/)
 * it looks like there is and PHP Notice, which would be nice to fix. 
   It becomes
   visible when enable debug and logging. [19-May-2025 02:04:19 UTC] PHP Notice:
   Function 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](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/)
   for more information. (This message was added in version 3.1.0.) in /var/www/
   html/web/wp/wp-includes/functions.php on line 6121[19-May-2025 02:04:19 UTC] 
   PHP Stack trace:[19-May-2025 02:04:19 UTC] PHP 1. {main}() /var/www/html/web/
   wp/wp-cron.php:0[19-May-2025 02:04:19 UTC] PHP 2. require_once() /var/www/html/
   web/wp/wp-cron.php:46[19-May-2025 02:04:19 UTC] PHP 3. require_once() /var/www/
   html/web/wp/wp-load.php:55[19-May-2025 02:04:19 UTC] PHP 4. require_once() /var/
   www/html/web/wp-config.php:27[19-May-2025 02:04:19 UTC] PHP 5. include_once()/
   var/www/html/web/wp/wp-settings.php:476[19-May-2025 02:04:19 UTC] PHP 6. register_uninstall_hook(
   $file = ‘/var/www/html/web/app/plugins/wieczos-virus-scanner/wieczos-virus-scanner.
   php’, $callback = [0 => class Wieczo\WordPress\Plugins\ClamAV\Table { }, 1 =>‘
   dropTable’]) /var/www/html/web/app/plugins/wieczos-virus-scanner/wieczos-virus-
   scanner.php:29[19-May-2025 02:04:19 UTC] PHP 7. _doing_it_wrong($function_name
   = ‘register_uninstall_hook’, $message = ‘Only a static class method or function
   can be used in an uninstall hook.’, $version = ‘3.1.0’) /var/www/html/web/wp/
   wp-includes/plugin.php:925[19-May-2025 02:04:19 UTC] PHP 8. wp_trigger_error(
   $function_name = ”, $message = ‘Function 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](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/)
   for more information. (This message was added in version 3.1.0.)’, $error_level
   = _uninitialized_) /var/www/html/web/wp/wp-includes/functions.php:6061[19-May-
   2025 02:04:19 UTC] PHP 9. trigger_error($message = ‘Function 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](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/)
   for more information. (This message was added in version 3.1.0.)’, $error_level
   = 1024) /var/www/html/web/wp/wp-includes/functions.php:6121
    -  This topic was modified 1 year ago by [Dima](https://wordpress.org/support/users/dimastorozhuk/).

The topic ‘PHP Notice: Function register_uninstall_hook was called incorrectly.’
is closed to new replies.

 * ![](https://ps.w.org/wieczos-virus-scanner/assets/icon-256x256.png?rev=3169488)
 * [Wieczo's Virus Scanner](https://wordpress.org/plugins/wieczos-virus-scanner/)
 * [Support Threads](https://wordpress.org/support/plugin/wieczos-virus-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/wieczos-virus-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wieczos-virus-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wieczos-virus-scanner/reviews/)

## Tags

 * [register_uninstall_hook](https://wordpress.org/support/topic-tag/register_uninstall_hook/)

 * 0 replies
 * 1 participant
 * Last reply from: [Dima](https://wordpress.org/support/users/dimastorozhuk/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/php-notice-function-register_uninstall_hook-was-called-incorrectly/)
 * Status: not a support question