| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Handle the setup callback from PayPlug Portal |
| 36 | 36 | */ |
| 37 | - public function handle_setup_callback() | |
| 37 | + public function handle_setup_callback(): void | |
| 38 | 38 | { |
| 39 | 39 | // Check if we're on the PayPlug settings page |
| 40 | 40 | if (!$this->is_payplug_settings_page()) { |
| 41 | 41 | return; |
| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Display success message if setup was successful |
| 54 | 54 | if (isset($_GET['setup_success']) && $_GET['setup_success'] == '1') { |
| 55 | - add_action('admin_notices', function () { | |
| 55 | + add_action('admin_notices', function (): void { | |
| 56 | 56 | echo '<div class="notice notice-success is-dismissible">' . |
| 57 | 57 | '<p>' . esc_html__('PayPlug account successfully connected!', 'payplug') . '</p>' . |
| 58 | 58 | '</div>'; |
| 59 | 59 | }); |
| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | // Display error message if setup failed |
| 63 | 63 | if (isset($_GET['setup_error'])) { |
| 64 | - add_action('admin_notices', function () { | |
| 64 | + add_action('admin_notices', function (): void { | |
| 65 | 65 | $error_type = sanitize_text_field($_GET['setup_error']); |
| 66 | 66 | $error_message = ''; |
| 67 | 67 | |
| 68 | 68 | switch ($error_type) { |
| @@ -85,9 +85,9 @@ | ||
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Handle the OAuth callback |
| 88 | 88 | */ |
| 89 | - public function handle_oauth_callback() | |
| 89 | + public function handle_oauth_callback(): void | |
| 90 | 90 | { |
| 91 | 91 | // Only handle the callback when we're on the PayPlug settings page — prevents |
| 92 | 92 | // intercepting OAuth callbacks from other plugins (e.g. Google Site Kit) that |
| 93 | 93 | // also use a ?code= parameter on wp-admin pages. |