You are here

function gdpr_tasks_sars_callback_commerce_price in General Data Protection Regulation 7

GDPR SARs render callback for commerce price fields.

1 string reference to 'gdpr_tasks_sars_callback_commerce_price'
gdpr_tasks_field_metatdata_property_info_alter in modules/gdpr_tasks/gdpr_tasks.module
Field entity metadata property callback.

File

modules/gdpr_tasks/gdpr_tasks.module, line 943
Module file for the GDPR Tasks module.

Code

function gdpr_tasks_sars_callback_commerce_price(EntityMetadataWrapper $value) {
  return commerce_currency_format($value->amount
    ->value(), $value->currency_code
    ->value());
}