protected function CommerceExampleProductLineItemMigration::priceComponentShipping in Commerce Migrate 7
Add "shipping" price component for "shipping" line item types.
Parameters
string $amount: Shipping amount.
Return value
string|bool An amount of shipping or any non-numeric value to skip.
File
- commerce_migrate_example/
migrations/ product_line_item.inc, line 95 - Import line items of the "product" type.
Class
- CommerceExampleProductLineItemMigration
- Class CommerceExampleProductLineItemMigration.
Code
protected function priceComponentShipping($amount) {
return 'shipping' === $this
->type() ? $amount : FALSE;
}