diff --git a/modules/commerce/migrations/commerce1_order_item_type.yml b/modules/commerce/migrations/commerce1_order_item_type.yml index 8f7a83d..7e4748b 100644 --- a/modules/commerce/migrations/commerce1_order_item_type.yml +++ b/modules/commerce/migrations/commerce1_order_item_type.yml @@ -11,7 +11,7 @@ process: - plugin: static_map source: type - bypass: TRUE + bypass: true map: shipping: false - diff --git a/modules/commerce/src/Plugin/migrate/process/commerce1/OrderItemAdjustment.php b/modules/commerce/src/Plugin/migrate/process/commerce1/OrderItemAdjustment.php index d7bb75e..018fc86 100644 --- a/modules/commerce/src/Plugin/migrate/process/commerce1/OrderItemAdjustment.php +++ b/modules/commerce/src/Plugin/migrate/process/commerce1/OrderItemAdjustment.php @@ -3,7 +3,6 @@ namespace Drupal\commerce_migrate_commerce\Plugin\migrate\process\commerce1; use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; /** @@ -13,7 +12,7 @@ use Drupal\migrate\Row; * id = "commerce1_order_item_adjustment" * ) */ -class OrderItemAdjustment extends ProcessPluginBase { +class OrderItemAdjustment extends CommercePrice { /** * {@inheritdoc} @@ -39,8 +38,8 @@ class OrderItemAdjustment extends ProcessPluginBase { 'fraction_digits' => $fraction_digits, 'currency_code' => $currency_code, ]; - $price = new CommercePrice([], 'price', ''); - $price_scaled = $price->transform($input, $migrate_executable, $row, NULL); + + $price_scaled = parent::transform($input, $migrate_executable, $row, NULL); $type = 'promotion'; $label = $value['price']['data']['discount_component_title'];