Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
InlineFormBase::alterInlineForm() is fired within a #process.
This means that hook_commerce_inline_form_alter() is fired when the form is already being processed, which is fine for simple alters ("hide field X" as used by commerce_tax), but fails subtly with complex alters which add their own elements, such as the one I'm using for #2852207: Billing same as shipping.
So, we need to stop doing that, and fire the hooks elsewhere.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3113882-2-fix-inline-form-alter.patch | 3.82 KB | bojanz |
|
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedThis is the cleanest fix I could come up with, which doesn't involve breaking BC for inline form implementations. Alter-ception!
Comment #4
bojanz CreditAttribution: bojanz at Centarro commentedCommitted.