You are here

function commerce_price_field_attach_insert in Commerce Core 7

Implements hook_field_attach_insert().

This hook is used to unserialize the price 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

modules/price/commerce_price.module, line 214
Defines the Price field with widgets and formatters used to add prices with currency codes to various Commerce entities.

Code

function commerce_price_field_attach_insert($entity_type, $entity) {
  _commerce_price_field_unserialize_data($entity_type, $entity);
}