PluginProbe
Hostinger Tools / 3.0.41
Hostinger Tools v3.0.41
3.0.79 3.0.78 3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 All 110 releases
← All changes | includes/Rest/SettingsRoutes.php +2 -6 3.0.75 → 3.0.41 View file →
@@ -40,9 +40,8 @@
40 40
41 41 /** PHPCS:disable Generic.CodeAnalysis.UnusedFunctionParameter.Found */
42 42 public function get_settings( \WP_REST_Request $request ): \WP_REST_Response {
43 43 global $wp_version;
44 - $plugin_settings = $this->plugin_settings->get_plugin_settings();
45 44
46 45 $data = array(
47 46 'newest_wp_version' => $this->get_latest_wordpress_version(),
48 47 'current_wp_version' => $wp_version,
@@ -48,20 +47,19 @@
48 47 'current_wp_version' => $wp_version,
49 48 'php_version' => phpversion(),
50 49 'newest_php_version' => '8.2', // Will be refactored.
51 50 'is_eligible_www_redirect' => $this->is_eligible_www_redirect(),
52 - 'optin_mcp' => $plugin_settings->get_optin_mcp(),
53 51 );
54 52
55 53 $hostinger_plugin_settings = get_option( HOSTINGER_PLUGIN_SETTINGS_OPTION, array() );
56 54
57 - if ( empty( $plugin_settings->get_bypass_code() ) ) {
55 + if ( empty( $this->plugin_settings->get_plugin_settings()->get_bypass_code() ) ) {
58 56 if ( empty( $hostinger_plugin_settings['bypass_code'] ) ) {
59 57 $hostinger_plugin_settings['bypass_code'] = Helper::generate_bypass_code( 16 );
60 58 }
61 59 }
62 60
63 - $plugin_settings = $plugin_settings->to_array();
61 + $plugin_settings = $this->plugin_settings->get_plugin_settings()->to_array();
64 62
65 63 $response = array(
66 64 'data' => array_merge( $data, $plugin_settings ),
67 65 );
@@ -139,10 +137,8 @@
139 137
140 138 if ( has_action( 'litespeed_purge_all' ) ) {
141 139 do_action( 'litespeed_purge_all' );
142 140 }
143 -
144 - do_action( 'hostinger_tools_settings_saved', $new_settings );
145 141
146 142 return $response;
147 143 }
148 144 /** PHPCS:enable */