date = date('Ymd'); $history->copyValues($params); $history->save(); return $history; } /** * Erase a contact's subscription history records * * @param int $id * The contact id. * * @return void */ public static function deleteContact($id) { $history = new CRM_Contact_BAO_SubscriptionHistory(); $history->contact_id = $id; $history->delete(); } }