public function get_form() { if ($this->charge_status != null) { require_once plugin_dir_path(dirname(__FILE__)) . 'lib/form-helpers/post-show-receipt.php'; show_receipt($this->thank_you, $this->charge_status); } elseif ($this->page_status == "new") { require_once plugin_dir_path(dirname(__FILE__)) . 'lib/make-form.php'; $form = new Form_Form($this); echo $form->make(); } else { throw new Exception("Unexpected load scenario. Try reload the page."); } }