| @@ -11,9 +11,8 @@ | ||
| 11 | 11 | use Forge12\DoubleOptIn\Container\Container; |
| 12 | 12 | use Forge12\DoubleOptIn\Container\BootableProviderInterface; |
| 13 | 13 | use Forge12\DoubleOptIn\EmailTemplates\EmailTemplatePostType; |
| 14 | 14 | use Forge12\DoubleOptIn\EmailTemplates\EmailTemplateRepository; |
| 15 | -use Forge12\DoubleOptIn\EmailTemplates\EmailTemplateRestController; | |
| 16 | 15 | use Forge12\DoubleOptIn\EmailTemplates\EmailHtmlGenerator; |
| 17 | 16 | use Forge12\DoubleOptIn\EmailTemplates\EmailTemplateIntegration; |
| 18 | 17 | use Forge12\DoubleOptIn\EmailTemplates\BlockRegistry; |
| 19 | 18 | |
| @@ -55,18 +54,11 @@ | ||
| 55 | 54 | return new EmailHtmlGenerator(); |
| 56 | 55 | } |
| 57 | 56 | ); |
| 58 | 57 | |
| 59 | - // Register REST Controller | |
| 60 | - $container->singleton( | |
| 61 | - EmailTemplateRestController::class, | |
| 62 | - function ( Container $c ) { | |
| 63 | - return new EmailTemplateRestController( | |
| 64 | - $c->get( EmailTemplateRepository::class ), | |
| 65 | - $c->get( EmailHtmlGenerator::class ) | |
| 66 | - ); | |
| 67 | - } | |
| 68 | - ); | |
| 58 | + // The template REST routes (editing) belong to the email editor | |
| 59 | + // add-on since Core 5.8 / add-on 1.1.0. Core keeps what renders | |
| 60 | + // saved templates at send time. | |
| 69 | 61 | |
| 70 | 62 | // Register Block Registry |
| 71 | 63 | $container->singleton( |
| 72 | 64 | BlockRegistry::class, |
| @@ -93,13 +85,10 @@ | ||
| 93 | 85 | // the registered post type (admin column, capabilities, etc.). |
| 94 | 86 | $postType = $container->get( EmailTemplatePostType::class ); |
| 95 | 87 | $postType->init(); |
| 96 | 88 | |
| 97 | - // REST controller registration is OWNED BY addon-email-editor: | |
| 98 | - // its boot() picks the controller up from the same container | |
| 99 | - // and calls init() only when the addon is licensed + active. | |
| 100 | - // Free / unlicensed sites get no API surface, which is the | |
| 101 | - // intent of Pro-gating the editor + templates feature. | |
| 89 | + // The template REST routes live in addon-email-editor (1.1.0+), | |
| 90 | + // which registers them itself. Core ships no editing code. | |
| 102 | 91 | |
| 103 | 92 | // Initialize Integration with CF7/Avada — used by the email |
| 104 | 93 | // pipeline for templates referenced in form settings, so it |
| 105 | 94 | // stays in Core (otherwise free users couldn't send templated |