You are here

function commerce_price_field_data_auto_creation in Commerce Core 7

Returns the default array structure for a Price field for use when creating new data arrays through an entity metadata wrapper.

1 call to commerce_price_field_data_auto_creation()
commerce_price_wrapper_value in modules/price/commerce_price.module
Returns the data array of a single value price field from a wrapped entity, using an optional default value if the entity does not have data in the field.
1 string reference to 'commerce_price_field_data_auto_creation'
commerce_price_property_info_callback in modules/price/commerce_price.module
Callback to alter the property info of price fields.

File

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

Code

function commerce_price_field_data_auto_creation() {
  return array(
    'amount' => 0,
    'currency_code' => commerce_default_currency(),
    'data' => array(
      'components' => array(),
    ),
  );
}