From a13600f873e51eb0bc70403d445bb96f38871e70 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Fri, 9 Aug 2024 12:46:03 -0600 Subject: [PATCH] Remove unused api_clear_scan_history_cache method --- .../plugins/protect/src/class-rest-controller.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/projects/plugins/protect/src/class-rest-controller.php b/projects/plugins/protect/src/class-rest-controller.php index a1ae1b67ba654..2f89144f5a86b 100644 --- a/projects/plugins/protect/src/class-rest-controller.php +++ b/projects/plugins/protect/src/class-rest-controller.php @@ -464,19 +464,4 @@ public static function api_get_scan_history() { $scan_history = Scan_History::get_scan_history( false ); return rest_ensure_response( $scan_history, 200 ); } - - /** - * Clear the Scan_History cache for the API endpoint - * - * @return WP_REST_Response - */ - public static function api_clear_scan_history_cache() { - $cache_cleared = Scan_History::delete_option(); - - if ( ! $cache_cleared ) { - return new WP_REST_Response( 'An error occured while attempting to clear the Jetpack Scan history cache.', 500 ); - } - - return new WP_REST_Response( 'Jetpack Scan history cache cleared.' ); - } }