| @@ -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 | } |