You are here

commerce1_tax_type.yml in Commerce Migrate 3.0.x

modules/commerce/migrations/commerce1_tax_type.yml

File

modules/commerce/migrations/commerce1_tax_type.yml
View source
  1. id: commerce1_tax_type
  2. label: Commerce 1 tax types
  3. migration_tags:
  4. - Drupal 7
  5. - Commerce
  6. - Configuration
  7. source:
  8. plugin: commerce1_tax_type
  9. constants:
  10. plugin: custom
  11. process:
  12. # Set to 30 characters to allow space for deduping.
  13. id:
  14. -
  15. plugin: machine_name
  16. source: name
  17. -
  18. plugin: make_unique_entity_field
  19. entity_type: commerce_tax_type
  20. field: id
  21. length: 30
  22. label: name
  23. 'plugin': constants/plugin
  24. 'configuration/rates/0/id': '@id'
  25. 'configuration/rates/0/label': name
  26. 'configuration/rates/0/amount': rate
  27. # The source tax information does not specify the country use the variable
  28. # 'site_default_country' as the territory for all tax types.. This will need
  29. # to be corrected on the destination site post migration.
  30. 'configuration/territories/0/country_code':
  31. plugin: default_value
  32. source: default_country
  33. default_value: US
  34. destination:
  35. plugin: entity:commerce_tax_type
  36. destination_module: commerce_tax