/** * Gets the query params used to retrieve a specific line item for the given registration * @param EE_Registration $registration * @param array $original_query_params any extra query params you'd like to be merged with * @return array like EEM_Base::get_all()'s $query_params */ public function line_item_for_registration_query_params(EE_Registration $registration, $original_query_params = array()) { return array_replace_recursive($original_query_params, array(array('OBJ_ID' => $registration->ticket_ID(), 'OBJ_type' => 'Ticket', 'TXN_ID' => $registration->transaction_ID()))); }
/** * generates reg code * * @param \EE_Registration $registration * @return string */ public function generate_reg_code(EE_Registration $registration) { // figure out where to start parsing the reg code $chars = strpos($registration->reg_url_link(), '-') + 5; // TXN_ID + TKT_ID + first 3 and last 3 chars of reg_url_link $new_reg_code = array($registration->transaction_ID(), $registration->ticket_ID(), substr($registration->reg_url_link(), 0, $chars)); // now put it all together $new_reg_code = implode('-', $new_reg_code); return apply_filters('FHEE__EE_Registration_Processor___generate_reg_code__new_reg_code', $new_reg_code, $registration); }