/** * reg_step_sorting_callback * * @access public * @param EE_SPCO_Reg_Step $reg_step_A * @param EE_SPCO_Reg_Step $reg_step_B * @return array() */ public function reg_step_sorting_callback(EE_SPCO_Reg_Step $reg_step_A, EE_SPCO_Reg_Step $reg_step_B) { // send finalize_registration step to the end of the array if ($reg_step_A->slug() == 'finalize_registration') { return 1; } else { if ($reg_step_B->slug() == 'finalize_registration') { return -1; } } if ($reg_step_A->order() == $reg_step_B->order()) { return 0; } return $reg_step_A->order() > $reg_step_B->order() ? 1 : -1; }
/** * set_reg_step_initiated * * @access public * @param EE_SPCO_Reg_Step $reg_step * @throws \EE_Error */ public function set_reg_step_initiated(EE_SPCO_Reg_Step $reg_step) { // call set_reg_step_initiated ??? if (!$this->revisit && ($this->action === 'display_spco_reg_step' || $reg_step instanceof EE_SPCO_Reg_Step_Finalize_Registration)) { /** @type EE_Transaction_Processor $transaction_processor */ $transaction_processor = EE_Registry::instance()->load_class('Transaction_Processor'); // set the start time for this reg step if (!$transaction_processor->set_reg_step_initiated($this->transaction, $reg_step->slug())) { if (WP_DEBUG) { EE_Error::add_error(sprintf(__('The "%1$s" registration step was not initialized properly.', 'event_espresso'), $reg_step->name()), __FILE__, __FUNCTION__, __LINE__); } } } }