Created
April 29, 2022 09:45
-
-
Save junaidpv/29669a025e7d6dace7798f855933debc to your computer and use it in GitHub Desktop.
Patch for field group module to fix error with migrating fied group on commerce order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php b/contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php | |
| index 35266ae..657573d 100644 | |
| --- a/contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php | |
| +++ b/contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php | |
| @@ -26,6 +26,11 @@ class FieldGroup extends DestinationBase { | |
| $values[$id] = $row->getDestinationProperty($id); | |
| } | |
| + // Fix commerce_order bundle, there is no only one order type. | |
| + if ('commerce_order' == $values['entity_type']) { | |
| + $values['bundle'] = 'default'; | |
| + } | |
| + | |
| $entity = $this->getEntity($values['entity_type'], $values['bundle'], $values['mode'], $values['type']); | |
| $settings = $row->getDestinationProperty('settings'); | |
| $settings += [ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment