singleton( EmailTemplatePostType::class, function () { return new EmailTemplatePostType(); } ); // Register Repository $container->singleton( EmailTemplateRepository::class, function () { return new EmailTemplateRepository(); } ); // Register HTML Generator $container->singleton( EmailHtmlGenerator::class, function () { return new EmailHtmlGenerator(); } ); // The template REST routes (editing) belong to the email editor // add-on since Core 5.8 / add-on 1.1.0. Core keeps what renders // saved templates at send time. // Register Block Registry $container->singleton( BlockRegistry::class, function () { return new BlockRegistry(); } ); // Register Integration $container->singleton( EmailTemplateIntegration::class, function () { return new EmailTemplateIntegration(); } ); } /** * {@inheritdoc} */ public function boot( Container $container ): void { // Initialize Post Type — needed even on free sites so that // existing template posts in wp_posts continue to behave like // the registered post type (admin column, capabilities, etc.). $postType = $container->get( EmailTemplatePostType::class ); $postType->init(); // The template REST routes live in addon-email-editor (1.1.0+), // which registers them itself. Core ships no editing code. // Initialize Integration with CF7/Avada — used by the email // pipeline for templates referenced in form settings, so it // stays in Core (otherwise free users couldn't send templated // confirmation mails for templates created earlier or via the // legacy UI). $integration = $container->get( EmailTemplateIntegration::class ); $integration->init(); } }