File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
plugins/wp-graphql-headless-webhooks/src Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,14 @@ class WebhooksAdmin {
4141 */
4242 public function __construct ( WebhookRepositoryInterface $ repository ) {
4343 $ this ->repository = $ repository ;
44+ }
4445
46+ /**
47+ * Initialize the admin functionality.
48+ *
49+ * @return void
50+ */
51+ public function init (): void {
4552 add_action ( 'admin_menu ' , [ $ this , 'add_admin_menu ' ] );
4653 add_action ( 'admin_enqueue_scripts ' , [ $ this , 'enqueue_assets ' ] );
4754 add_action ( 'admin_init ' , [ $ this , 'handle_actions ' ] );
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ private function setup(): void {
9696
9797 if ( class_exists ( 'WPGraphQL\Webhooks\Admin\WebhooksAdmin ' ) ) {
9898 $ admin = new \WPGraphQL \Webhooks \Admin \WebhooksAdmin ( $ repository );
99- // The constructor already sets up all necessary hooks
99+ $ admin -> init ();
100100 }
101101 }
102102
You can’t perform that action at this time.
0 commit comments