Change label for a Commerce price field

Public

</> CopyGet raw version
php
  1. function hook_field_attach_view_alter(&$output, $context) {
  2. if (!empty($output['commerce_price'])) {
  3. $output['commerce_price']['#title'] = t('My label for price');
  4. }
  5. }