PluginProbe
Patchstack – WordPress & Plugins Security / 2.3.1
Patchstack – WordPress & Plugins Security v2.3.1
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
← All changes | includes/admin/ajax.php +0 -24 trunk2.3.1 View file →
@@ -24,11 +24,8 @@
24 24
25 25 // Auto license activator.
26 26 add_action( 'wp_ajax_patchstack_activate_auto', [ $this, 'auto_activate' ] );
27 27 add_action( 'wp_ajax_patchstack_activation_status', [ $this, 'activation_status' ] );
28 -
29 - // Manual connection re-check (Retry link on the settings card).
30 - add_action( 'wp_ajax_patchstack_check_connection', [ $this, 'check_connection' ] );
31 28 }
32 29 }
33 30
34 31 /**
@@ -88,27 +85,6 @@
88 85 public function activation_status() {
89 86 wp_send_json( [
90 87 'activated' => get_option( 'patchstack_clientid', false ) != false
91 88 ] );
92 - }
93 -
94 - /**
95 - * Run a connection check on demand and return the new state for the settings card row.
96 - * Wraps P_Api::update_license_status() so the existing 422-handling happens for free; a
97 - * successful request stamps patchstack_last_sync, which get_last_sync_time() reads back.
98 - *
99 - * @return void
100 - */
101 - public function check_connection() {
102 - $this->plugin->api->update_license_status();
103 -
104 - $timestamp = $this->get_last_sync_time();
105 -
106 - wp_send_json(
107 - [
108 - 'connected' => $this->is_connected(),
109 - 'timestamp' => $timestamp,
110 - 'label' => $this->format_relative_time( $timestamp ),
111 - ]
112 - );
113 89 }
114 90 }