You are here

woo3_taxonomy_vocabulary.yml in Commerce Migrate 3.1.x

modules/woocommerce/migrations/woo3_taxonomy_vocabulary.yml

File

modules/woocommerce/migrations/woo3_taxonomy_vocabulary.yml
View source
  1. # Creates 'Categories' and 'Tags' vocabularies, if they do not exist. This
  2. # migration can be removed if the necessary vocabularies exist on the
  3. # destination site. Other vocabularies can be created by adding extra rows
  4. # to the source field 'data_rows'.
  5. id: woo3_taxonomy_vocabulary
  6. label: Create default vocabularies for WooCommerce 3.
  7. migration_group: commerce_migrate_woo3
  8. migration_tags:
  9. - WooCommerce 3
  10. - Configuration
  11. source:
  12. plugin: embedded_data
  13. # Add or remove rows from the data_rows as needed.
  14. data_rows:
  15. -
  16. vid: categories
  17. name: Categories
  18. description: Product categories
  19. hierarchy: 0
  20. weight: 0
  21. -
  22. vid: tags
  23. name: Tags
  24. description: Tags
  25. hierarchy: 0
  26. weight: 0
  27. ids:
  28. vid:
  29. type: string
  30. source_module: taxonomy
  31. process:
  32. # Skip the row if the vocabulary already exists.
  33. not_exists:
  34. -
  35. plugin: entity_exists
  36. source: vid
  37. entity_type: taxonomy_vocabulary
  38. -
  39. plugin: callback
  40. callable: is_bool
  41. -
  42. plugin: skip_on_empty
  43. method: row
  44. vid: vid
  45. name: name
  46. description: description
  47. weight: weight
  48. destination:
  49. plugin: entity:taxonomy_vocabulary