diff --git a/wp-feature-notifications.php b/wp-feature-notifications.php index 96a15325..52fe347d 100644 --- a/wp-feature-notifications.php +++ b/wp-feature-notifications.php @@ -71,13 +71,18 @@ // TODO: Standardise structure and/or autoloading. new REST\Notification_Controller(); -register_channel( - new Notifications\Channel( - 'core/updates', - array( - 'title' => __( 'WordPress Updates', 'wp-feature-notifications' ), - 'icon' => 'wordpress', - 'description' => __( 'WordPress core update events.', 'wp-feature-notifications' ), - ) - ) +add_action( + 'init', + function () { + register_channel( + new Notifications\Channel( + 'core/updates', + array( + 'title' => __( 'WordPress Updates', 'wp-feature-notifications' ), + 'icon' => 'wordpress', + 'description' => __( 'WordPress core update events.', 'wp-feature-notifications' ), + ) + ) + ); + } );