This snippet works starting in drupal 8.8 and replaces older deprecated ones like taxonomy_vocabulary_load_multiple.

Use Drupal\taxonomy\Entity\Vocabulary;

$vocabularies = Vocabulary::loadMultiple();

// To get names:
foreach($vocabularies as $voc) {
  $vocabulary->label(); // etc
}

 


Saved you some valuable time?

Donate and get more free time-saving code on this website in the future.