function commerce_price_amount_decimal_get in Commerce Core 7
Property getter callback returning the amount (as a decimal).
1 string reference to 'commerce_price_amount_decimal_get'
- commerce_price_field_data_property_info in modules/
price/ commerce_price.module - Defines info for the properties of the Price field data structure.
File
- modules/
price/ commerce_price.module, line 830 - Defines the Price field with widgets and formatters used to add prices with currency codes to various Commerce entities.
Code
function commerce_price_amount_decimal_get($data, array $options, $name, $type, $info) {
return commerce_currency_amount_to_decimal($data['amount'], $data['currency_code']);
}