You are here

function uc_catalog_node_type_insert in Ubercart 8.4

Implements hook_node_type_insert().

Adds product node types to the catalog vocabulary as they are created.

File

uc_catalog/uc_catalog.module, line 164
Ubercart Catalog module.

Code

function uc_catalog_node_type_insert(NodeTypeInterface $type) {
  $settings = $type
    ->getThirdPartySettings('uc_product');
  if (!empty($settings['product'])) {
    uc_catalog_add_node_type($type
      ->id());
  }
}