function commerce_registration_entity_update_fields in Commerce Registration 7
Updates the attached entity with field values.
Parameters
$entity: The referenced entity to update.
array $values: Array of values to add to the entity. Example value array: array( 'field_passport' => array( 'und' => array( 0 => array('value' => 'MY FIELD VALUE') ) ) )
1 call to commerce_registration_entity_update_fields()
- commerce_registration_information_checkout_form_submit in includes/
commerce_registration.checkout_pane.inc - Commerce checkout pane form submit callback.
File
- includes/
commerce_registration.checkout_pane.inc, line 235 - Checkout pane callback functions.
Code
function commerce_registration_entity_update_fields(&$entity, $values) {
if (empty($values)) {
return;
}
foreach ($values as $key => $value) {
$entity->{$key} = $value;
}
}