/** * Simplifies the form to merely reproduce 4.1's gateway settings functionality * * @param EE_Form_Section_Proper $form_section * @param string $payment_method_name * @return \EE_Payment_Method_Form * @throws \EE_Error */ protected function _simplify_form($form_section, $payment_method_name = '') { if ($form_section instanceof EE_Payment_Method_Form) { $form_section->exclude(array('PMD_type', 'PMD_slug', 'PMD_wp_user', 'Currency')); return $form_section; } else { throw new EE_Error(sprintf(__('The EE_Payment_Method_Form for the "%1$s" payment method is missing or invalid.', 'event_espresso'), $payment_method_name)); } }