Linux 软件免费装
Banner图

Hook Fuse

开发者 orcnd
更新时间 2026年11月25日 03:06
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

debugging error log troubleshooting fatal error error handling

下载

0.1.0 0.1.1 0.1.2

详情介绍:

One plugin throws an error, and the visitor gets "There has been a critical error on this website" instead of your page. Hook Fuse keeps the page loading and writes the error to a log. You pick the plugins that cause trouble. When one of them throws an error inside a hook (a form submission, a checkout step, a tracking call), Hook Fuse stops that one callback and the rest of the page runs as usual. What you get How it works
  1. Tick the plugins to protect under Tools > Hook Fuse.
  2. Just before a hook runs, Hook Fuse wraps the callbacks of those plugins in memory.
  3. A callback throws. Hook Fuse catches the error, logs it, and WordPress goes on to the next callback.
  4. You read the log, report the bug, and untick the plugin once it is fixed.
A real case: Meta pixel and WPForms The WPForms integration of Meta pixel for WordPress throws a TypeError when a form has an email confirmation field. The visitor presses Send and gets the critical error page. With Hook Fuse the form is submitted, the confirmation message shows and the error is in the log. The first screenshot is that form, without and with Hook Fuse. If the Meta pixel plugin is installed when you first activate Hook Fuse, it is protected right away. What it cannot catch Hook Fuse hides errors from visitors, not from you. It is a stopgap until the plugin's author fixes the bug, so please report the errors you see in the log to them. Privacy Hook Fuse makes no HTTP requests to any outside service and has no tracking. The log is stored in your own database. The one thing that leaves your site is the weekly email. It is on by default and is sent only in a week when new errors were caught, to the site's admin email address (Settings > General). It goes out through your site's own mail setup (wp_mail), not through any service run by Hook Fuse. It contains the site name, and for each new error: the protected plugin's folder name, the hook name, the error message, the file path relative to wp-content and the line number, and how many times it happened. To stop it, untick "Weekly email" under Tools > Hook Fuse.

安装:

  1. Install and activate Hook Fuse from the Plugins screen.
  2. Open Tools > Hook Fuse and tick the plugins you want to protect.
  3. The weekly email to the site's admin address is on by default. Untick "Weekly email" on the same page if you do not want it.
  4. Check the log after plugin updates.

屏幕截图:

  • The notice on the Dashboard when something new was caught.
  • Tools > Hook Fuse: the caught errors and the plugins to protect. The two "Example" plugins are demo plugins with a bug.

常见问题:

Does it slow my site down?

It looks at each hook once per request, just before the hook runs, and only wraps callbacks that belong to a protected plugin. With no plugin protected it does nothing at all.

Will it hide errors I need to know about?

Every caught error is logged with its file and line. With WP_DEBUG on, each one is also written to the PHP error log.

Can I protect every plugin?

You can, but it is better to protect only the plugins that cause trouble. A plugin whose hook failed may have done only part of its work.

Does it change the protected plugin?

No. It wraps the plugin's hook callbacks in memory while the page loads. Deactivating Hook Fuse puts everything back.

更新日志:

0.1.2 0.1.1 0.1.0