/** * Saves the billing info to the attendee. @see EE_Attendee::billing_info_for_payment_method() which is used to retrieve it * @param EE_Billing_Attendee_Info_Form $billing_form * @param EE_Payment_Method $payment_method * @return boolean */ public function save_and_clean_billing_info_for_payment_method($billing_form, $payment_method) { if (!$billing_form instanceof EE_Billing_Attendee_Info_Form) { EE_Error::add_error(__('Cannot save billing info because there is none.', 'event_espresso')); return false; } $billing_form->clean_sensitive_data(); return update_post_meta($this->ID(), $this->get_billing_info_postmeta_name($payment_method), $billing_form->input_values(true)); }