registerNotificationHooks(); ( new \Vizyt\Admin\AdminChrome() )->register(); ( new \Vizyt\Admin\EngineNotice() )->register(); \Vizyt\Admin\LegacyProNotice::register(); add_action( 'admin_notices', [ Migrator::class, 'render_notice' ] ); if ( ! \Vizyt\Admin\WidgetAppearancePage::replaced() ) { ( new \Vizyt\Admin\WidgetAppearancePage() )->register_hooks(); } ( new \Vizyt\Public\ManageBookingHandler() )->register(); ( new \Vizyt\Public\BookingBlock() )->register(); \Vizyt\Privacy\PersonalData::register(); \Vizyt\Rest\StatsController::register_hooks(); \Vizyt\Integrations\Multilingual::register_hooks(); \Vizyt\Integrations\Acf::register_hooks(); \Vizyt\Integrations\Elementor::register_hooks(); $this->maybeRunMigrations(); } private function registerNotificationHooks(): void { add_action( \Vizyt\Notifications\NotificationService::HOOK_BOOKING_CREATED, [ \Vizyt\Notifications\NotificationService::class, 'send_booking_created' ] ); add_action( \Vizyt\Notifications\NotificationService::HOOK_BOOKING_CANCELLED, [ \Vizyt\Notifications\NotificationService::class, 'send_booking_cancelled' ] ); add_action( \Vizyt\Notifications\NotificationService::HOOK_BOOKING_REMINDER, [ \Vizyt\Notifications\NotificationService::class, 'send_booking_reminder' ] ); add_action( \Vizyt\Notifications\NotificationService::HOOK_BOOKING_RESCHEDULED, [ \Vizyt\Notifications\NotificationService::class, 'send_booking_rescheduled' ], 10, 4 ); } public function enqueueAdminAssets( string $hook ): void { \Vizyt\Admin\AdminAssets::enqueue_menu(); if ( strpos( $hook, 'vizyt' ) === false ) { return; } \Vizyt\Admin\AdminAssets::enqueue_base( $hook ); } public function registerRestRoutes(): void { ( new \Vizyt\Rest\ServicesController() )->register_routes(); ( new \Vizyt\Rest\CategoriesController() )->register_routes(); ( new \Vizyt\Rest\StaffController() )->register_routes(); ( new \Vizyt\Rest\CustomerController() )->register_routes(); ( new \Vizyt\Rest\BookingController() )->register_routes(); ( new \Vizyt\Rest\AvailabilityController() )->register_routes(); ( new \Vizyt\Rest\SpecialDaysController() )->register_routes(); ( new \Vizyt\Rest\PublicServicesController() )->register_routes(); ( new \Vizyt\Rest\PublicBookingController() )->register_routes(); ( new \Vizyt\Rest\StatsController() )->register_routes(); } public function registerAdminMenu(): void { ( new \Vizyt\Admin\AdminMenu() )->register(); } public function registerSettings(): void { ( new \Vizyt\Admin\Settings() )->register(); } public function registerShortcodes(): void { ( new \Vizyt\Public\BookingWidget() )->register(); } private function maybeRunMigrations(): void { $current = get_option( 'vizyt_db_version', '0.0.0' ); if ( version_compare( $current, VIZYT_VERSION, '<' ) ) { ( new Migrator() )->run(); } } }