woo3_categories_term.yml in Commerce Migrate 8.2
Same filename and directory in other branches
modules/woocommerce/migrations/woo3_categories_term.yml
File
modules/woocommerce/migrations/woo3_categories_term.ymlView source
- # This migration uses a source CSV file created using the WooCommerce product
- # export.
- id: woo3_categories_term
- label: Migrate WooCommerce 3 category to taxonomy terms.
- migration_group: commerce_migrate_woo3
- migration_tags:
- - WooCommerce 3
- - Content
- source:
- # Uses a custom source plugin, based on the CSV source plugin in
- # migrate_source_csv, that will build an array of product variation ids as
- # well as trim the input from the source CSV.
- plugin: woo3_categories_term_csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/woo3-product-export-7-5-2018-1525686755964.csv'
- # Change the enclosure character to suit your source CVS file.
- enclosure: "\""
- # Change the number of header rows to suit your source CVS file.
- header_offset: 0
- # The key field for this migration. List many column names as needed to create
- # a unique key for your migration. These keys are also used when a
- # migration_lookup process is needed with this migration.
- ids: [name]
- constants:
- vocabulary: categories
- process:
- vid: constants/vocabulary
- name:
- -
- plugin: static_map
- source: name
- bypass: true
- map:
- Uncategorized: false
- -
- plugin: skip_on_empty
- method: row
- parent_id:
- -
- plugin: skip_on_empty
- method: process
- source: parent
- -
- plugin: migration_lookup
- migration: woo3_categories_term
- source:
- - parent
- parent:
- plugin: default_value
- default_value: 0
- source: '@parent_id'
- weight:
- plugin: default_value
- default_value: 0
- destination:
- plugin: entity:taxonomy_term