Fires just before PHP shuts down execution.
Source
do_action( 'shutdown' ); Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |
Fires just before PHP shuts down execution.
do_action( 'shutdown' ); | Version | Description |
|---|---|
| 1.2.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
The
shutdownaction is always called, even on fatal errors, Ajax requests, and when usingexit;ordie();to terminate a running request.That makes this function perfect for a “catch-all” logic, like writing a log file.
Note: If you call
exit;inside your shutdown action-handler, the request will be instantly halted without calling other shutdown action-handlers.