I am trying to modify data coming from a feed before it saved to a node by using hook_feeds_presave().
I have code that looks like this:
my_module_feeds_presave(FeedsSource $source, $entity, $item) {
$email = $item['email address'];
//Remove "NOT GIVEN" from the email column to stop errors
if($email == "NOT GIVEN"){
$entity->field_email['und'][0]['value'] = '';
}
}
I would think that when the node is saved that value in the email filed would be blank. However, it is still saving the value of NOT GIVEN.
If anyone can please point me in the right direction with this I would appreciate it.
Thanks,
Josh