taxonomy = $taxonomy; } /** * @return void * @throws \Exception */ public function execute(): void { TaxonomyRepository::delete($this->taxonomy); unregister_taxonomy($this->taxonomy); flush_rewrite_rules(); } }