singleton( PrivacyIntegration::class, function ( Container $c ) { return new PrivacyIntegration( $c->get( LoggerInterface::class ), $c->get( OptInRepositoryInterface::class ), // Bound by MailStatusServiceProvider (5.8.0); resolved lazily. $c->get( \Forge12\DoubleOptIn\Repository\OptInMailStatusRepository::class ) ); } ); $container->singleton( SingleConsentExportController::class, function ( Container $c ) { return new SingleConsentExportController( $c->get( LoggerInterface::class ), $c->get( OptInRepositoryInterface::class ) ); } ); } /** * {@inheritdoc} */ public function boot( Container $container ): void { // Register WordPress Privacy Tools hooks $container->get( PrivacyIntegration::class )->register(); // Register single-record consent export (fallback if Pro is not active) $container->get( SingleConsentExportController::class )->registerActions(); // A renewed consent is its own audit entry (5.8.0). if ( $container->has( EventDispatcherInterface::class ) ) { ( new ConsentAuditListener() )->register( $container->get( EventDispatcherInterface::class ) ); } } }