singleton( PersonalDataExporter::class, static fn ( Container $c ): PersonalDataExporter => new PersonalDataExporter( $c->get( CustomerRepository::class ), $c->get( OrderRepository::class ), $c->get( LicenseRepository::class ), $c->get( ActivationRepository::class ), $c->get( LogRepository::class ) ) ); $container->singleton( PersonalDataEraser::class, static fn ( Container $c ): PersonalDataEraser => new PersonalDataEraser( $c->get( CustomerRepository::class ), $c->get( OrderRepository::class ), $c->get( LicenseRepository::class ), $c->get( ActivationRepository::class ), $c->get( LogRepository::class ), $c->get( LicenseService::class ), $c->get( GatewayEventRepository::class ) ) ); $container->singleton( PrivacyRegistrar::class, static fn ( Container $c ): PrivacyRegistrar => new PrivacyRegistrar( $c->get( PersonalDataExporter::class ), $c->get( PersonalDataEraser::class ) ) ); } /** * Register the privacy hooks once the plugin has booted. * * @since 1.0.0 * * @param Container $container The shared plugin container. * @return void */ public function boot( Container $container ): void { $container->get( PrivacyRegistrar::class )->hooks(); } }