| @@ -14,10 +14,8 @@ | ||
| 14 | 14 | /** |
| 15 | 15 | * Constructor |
| 16 | 16 | */ |
| 17 | 17 | public function __construct() { |
| 18 | - // Hook into the payment method form display | |
| 19 | - add_action('easy_invoice_payment_method_form', [$this, 'maybeRenderForm'], 10, 2); | |
| 20 | 18 | } |
| 21 | 19 | |
| 22 | 20 | /** |
| 23 | 21 | * Initialize the payment gateway |
| @@ -113,16 +111,5 @@ | ||
| 113 | 111 | // Base implementation does nothing |
| 114 | 112 | // Gateway classes should override this method to provide their specific payment form |
| 115 | 113 | } |
| 116 | 114 | |
| 117 | - /** | |
| 118 | - * Check if this is the gateway being requested and render its form if so | |
| 119 | - * | |
| 120 | - * @param string $gateway_id The gateway ID from the hook | |
| 121 | - * @param object $invoice The invoice object | |
| 122 | - */ | |
| 123 | - public function maybeRenderForm($gateway_id, $invoice): void { | |
| 124 | - if ($gateway_id === $this->getName()) { | |
| 125 | - $this->renderPaymentForm($invoice); | |
| 126 | - } | |
| 127 | - } | |
| 128 | 115 | } |