public function update($data = array())
{
if (empty($data)) {
return false;
}
$data = $this->sanitize_columns($data);
do_action('give_customer_pre_update', $this->id, $data);
$updated = false;
if ($this->db->update($this->id, $data)) {
$customer = $this->db->get_customer_by('id', $this->id);
$this->setup_customer($customer);
$updated = true;
}
do_action('give_customer_post_update', $updated, $this->id, $data);
return $updated;
}