Closed CustomCodeIT closed 1 year ago
When implementing the EVENT_BEFORE_CAPTURE_VARIANT_SNAPSHOT and EVENT_BEFORE_CAPTURE_PRODUCT_SNAPSHOT I am getting the following:
"Calling unknown method: craft\models\FieldLayout::getFields()"
Updating to $fieldLayout->getCustomFields() fixes the issue.
Wow, nice catch! Correct, this changed as part of the shift to “Field Layout Elements,” and was removed in Craft 4.
Thanks for the patch. 💞
When implementing the EVENT_BEFORE_CAPTURE_VARIANT_SNAPSHOT and EVENT_BEFORE_CAPTURE_PRODUCT_SNAPSHOT I am getting the following:
"Calling unknown method: craft\models\FieldLayout::getFields()"
Updating to $fieldLayout->getCustomFields() fixes the issue.
Description
Related issues