function commerce_file_field_attach_insert in Commerce File 7
Implements hook_field_attach_insert().
This hook is used to unserialize the commerce_file field's data array after it has been inserted, because the data array is serialized before it is saved and must be unserialized for compatibility with API requests performed during the same request after the insert occurs.
File
- includes/
commerce_file.field.inc, line 180 - Implement an commerce_file field, based on the file module's file field.
Code
function commerce_file_field_attach_insert($entity_type, $entity) {
_commerce_file_field_unserialize_data($entity_type, $entity);
}