endpoints = $endpoints; } public function add_hooks() { add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) ); } public function allowed_redirect_hosts( $hosts ) { $hosts[] = $this->endpoints->get_AMS_host(); $hosts[] = $this->endpoints->get_ATE_host(); return $hosts; } }