コード例 #1
0
 /**
  *    _initialize_reg_steps
  * first makes sure that EE_Transaction_Processor::set_reg_step_initiated() is called as required
  * then loops thru all of the active reg steps and calls the initialize_reg_step() method
  *
  * @access    private
  * @param bool $reinitializing
  * @throws \EE_Error
  */
 private function _initialize_reg_steps($reinitializing = false)
 {
     $this->checkout->set_reg_step_initiated($this->checkout->current_step);
     // loop thru all steps to call their individual "initialize" methods and set i18n strings for JS
     foreach ($this->checkout->reg_steps as $reg_step) {
         if (!$reg_step->initialize_reg_step()) {
             // if not initialized then maybe this step is being removed...
             if (!$reinitializing && $reg_step->is_current_step()) {
                 // if it was the current step, then we need to start over here
                 $this->_initialize_reg_steps(true);
                 return;
             }
             continue;
         }
         // add css and JS for current step
         $reg_step->enqueue_styles_and_scripts();
         // i18n
         $reg_step->translate_js_strings();
         if ($reg_step->is_current_step()) {
             // the text that appears on the reg step form submit button
             $reg_step->set_submit_button_text();
         }
     }
     // dynamically creates hook point like: AHEE__Single_Page_Checkout___initialize_reg_step__attendee_information
     do_action("AHEE__Single_Page_Checkout___initialize_reg_step__{$this->checkout->current_step->slug()}", $this->checkout->current_step);
 }