Setup_Wizard_Config::class, self::SETUP_WIZARD_ENDPOINTS_CONFIG => Setup_Wizard_Endpoints_Config::class, ); public function register( Service_Container $container ) { parent::register( $container ); $this->container->add( self::LICENSE_CHECK_ENDPOINT, function () use ( $container ) { return new License_Check_Endpoint(); } ); } public function init( Service_Container $container ) { add_action( 'wp_ajax_' . License_Check_Endpoint::ACTION_NAME, function () use ( $container ) { $container->get( self::LICENSE_CHECK_ENDPOINT )->handle(); } ); } }