| @@ -79,9 +79,9 @@ | ||
| 79 | 79 | $sdk = phastpress_get_plugin_sdk(); |
| 80 | 80 | $handler = $sdk->getPhastAPI()->deployOutputBufferForDocument(); |
| 81 | 81 | |
| 82 | 82 | // Allow disabling PhastPress with hook. |
| 83 | - add_filter('template_redirect', function () use ($handler) { | |
| 83 | + add_action('template_redirect', function () use ($handler) { | |
| 84 | 84 | if (apply_filters('phastpress_disable', false)) { |
| 85 | 85 | $handler->cancel(); |
| 86 | 86 | } |
| 87 | 87 | }, 100); |