PluginProbe
PayPlug for WooCommerce (Official) / 3.1.0
PayPlug for WooCommerce (Official) v3.1.0
3.1.0 3.0.0 2.18.0 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.10.0 1.10.1 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 All 102 releases
← All changes | src/Admin/SetupCallback.php +4 -4 2.18.0 → 3.1.0 View file →
@@ -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.